/* --- GENERAL & PAGE OVERRIDES --- */
html {
    overflow-y: auto; /* Ensure scrolling is enabled */
}

body {
    background-color: #fdfaf5;
    font-family: 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: #333;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Site Header Styling */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(164, 32, 19, 0.7);
    z-index: 1000;
    box-sizing: border-box;
    padding-right: 26px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.main-nav > ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}
.main-nav li {
    border-bottom: none;
}
.main-nav a {
    color: white;
    padding: 15px 20px;
    display: block;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.3s;
}
.main-nav a.active {
    background: rgba(0,0,0,0.2);
}
.mobile-menu-btn {
    display: none;
}
.mobile-menu-close {
    display: none;
}
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}
.page-header {
    height: 40vh;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-bottom: 20px;
}
@media (max-width: 768px) {
    .page-header {
        height: 25vh;
       
    }

    .page-title-box {
        transform: scale(0.6);
        transform-origin: left center;
    }
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(164, 32, 19, 0.7);
        z-index: 1000;
        box-sizing: border-box;
        padding-right: 26px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .main-nav > ul {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
        width: 40px;
        height: 40px;
        background: url('../images/btn-r.png') no-repeat center center;
        background-size: contain;
        border: none;
        cursor: pointer;
        padding: 0;
        transition: transform 0.3s ease;
    }
    .mobile-menu-btn.active {
        transform: rotate(90deg);
    }
    .main-nav {
        display: block;
        position: fixed;
        top: 66px;
        right: 0;
        width: 100%;
        background: #a42013;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        z-index: 1000;
    }
    .main-nav.active {
        max-height: 500px;
    }
    .main-nav.active > ul {
        display: flex;
        flex-direction: column;
        padding: 0;
        margin: 0;
    }
    .main-nav li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .main-nav a {
        color: white;
        padding: 15px 20px;
        display: block;
        font-size: 16px;
    }
    .main-nav a.active {
        background: rgba(0,0,0,0.2);
    }
    .mobile-menu-close {
        display: none;
    }
}
@media (min-width: 769px) {
    .main-nav > ul {
        display: flex !important;
    }
}

/* Site Header Styling */
.site-header .main-nav a {
    color: #fff;
}
.site-header .main-nav a.active,
.site-header .main-nav a:hover {
    color: #ffd79e;
    border-bottom-color: #ffd79e;
}


/* --- PAGE STRUCTURE & HERO --- */
#timeline-page {
    padding-top: 0;
}



.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 2;
}

.page-title-box {
    background-color: rgba(164, 32, 19, 0.85);
    color: white;
    padding: 8px 35px 8px 25px;
    clip-path: polygon(0 0, 100% 0, 93% 100%, 0% 100%);
}

.page-title {
    font-size: 2rem;
    margin: 0;
    color: white;
}

.breadcrumb {
    font-size: 1rem;
    color: white;
}
.breadcrumb a {
    color: #fff;
    text-decoration: none;
    transition: text-decoration 0.3s;
}
.breadcrumb a:hover {
    text-decoration: underline;
}

/* --- TIMELINE CONTAINER & AXIS --- */
.timeline-body-container {
    padding: 60px 0;
    position: relative;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* The Central DOTTED Line */
.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    top: 30px; /* Start below first marker's center */
    bottom: -80px; /* Extend to connect with the load-more button */
    left: 50%;
    transform: translateX(-50%);
    background-image: radial-gradient(circle, #A42013 1px, transparent 1px);
    background-size: 2px 8px;
    z-index: 0;
}


/* --- TIMELINE ITEMS & MARKERS --- */
.timeline-item-left,
.timeline-item-right {
    position: relative;
    padding: 20px 0;
    display: flex;
    align-items: center;
    width: 50%;
    box-sizing: border-box;
}

/* Ensure anchor usage does not break layout when items are links */
a.timeline-item-left,
a.timeline-item-right {
    display: flex;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

a.timeline-item-left:focus,
a.timeline-item-right:focus {
    outline: none;
}

.timeline-item-left {
    left: 0;
    padding-right: 50px;
    justify-content: flex-end;
}

.timeline-item-right {
    left: 50%;
    padding-left: 50px;
}

/* The Circle Marker */
.timeline-item-left::after,
.timeline-item-right::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: white;
    border: 3px solid #A42013;
    top: 50%;
    border-radius: 50%;
    z-index: 1;
}

/* Precise positioning for alignment */
.timeline-item-left::after {
    left: 100%;
    transform: translate(-50%, -50%);
}
.timeline-item-right::after {
    left: 0;
    transform: translate(-50%, -50%);
}

/* Fill the first marker */
/* .timeline > div:first-child::after {
    background-color: #A42013;
} */

.timeline-item-left.active::after,
.timeline-item-right.active::after {
    background-color: #a42013;
    border-color: #ffd79e;
    box-shadow: 0 0 0 4px rgba(164,32,19,0.15);
    transition: box-shadow 0.3s, border-color 0.3s, background-color 0.3s;
}

/* --- TIMELINE CARD STYLING --- */
.timeline-card {
    width: 100%;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 15px;
    border-bottom: 2px solid #A42013;
}

.card-image {
    max-width: 150px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-year {
    font-size: 2.5rem;
    font-weight: bold;
    color: #d3b392;
    padding-left: 20px;
}

.card-description {
    font-size: 1rem;
    line-height: 1.6;
    padding-top: 15px;
    margin: 0;
}

/* Alignment adjustments for left/right items */
.timeline-item-left .timeline-card {
    text-align: right;
}
.timeline-item-right .timeline-card {
    text-align: left;
}


/* --- LOAD MORE BUTTON --- */
.load-more-container {
    text-align: center;
    margin-top: 40px;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

/* 隐藏checkbox */
/* .load-more-checkbox {
    display: none;
} */

/* 默认隐藏额外内容 */
.additional-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* 当checkbox被选中时显示额外内容 */
.load-more-checkbox:checked ~ .timeline .additional-content {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* 当checkbox被选中时隐藏"加载更多"按钮
.load-more-checkbox:checked ~ .load-more-container .load-more-btn {
    display: none;
} */

.load-more-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    font-family: inherit;
}

.load-more-marker {
    position: relative;
    width: 24px;
    height: 24px;
    background-color: #A42013;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    margin-bottom: 25px;
}
.load-more-marker::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    background: white;
    border-radius: 50%;
}

.load-more-text {
    color: #A42013;
    font-size: 14px;
    margin-bottom: 8px;
}

.load-more-arrows {
    width: 12px;
    height: 12px;
    border-left: 2px solid #A42013;
    border-bottom: 2px solid #A42013;
    transform: rotate(-45deg);
    position: relative;
}
.load-more-arrows::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-left: 2px solid #A42013;
    border-bottom: 2px solid #A42013;
    top: 8px;
    left: -8px;
}

/* --- RESPONSIVE --- */
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 20px;
        transform: translateX(0);
    }

    .timeline-item-left,
    .timeline-item-right {
        width: 100%;
        left: 0 !important;
        padding-left: 50px;
        padding-right: 0;
    }

    .timeline-item-left::after,
    .timeline-item-right::after {
        left: 20px;
        transform: translate(-50%, -50%);
    }

    .timeline-item-left .timeline-card,
    .timeline-item-right .timeline-card {
        text-align: left;
    }
    

    /* Card responsive adjustments */
    .timeline-card {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        padding: 20px;
        margin-right: 16px;
        margin-bottom: 20px;
        border: 1px solid rgba(164, 32, 19, 0.1);
        transition: all 0.3s ease;
    }
    
    .timeline-card:hover {
        box-shadow: 0 8px 30px rgba(164, 32, 19, 0.15);
        transform: translateY(-2px);
    }
    
    .card-header {
        flex-direction: row;
        align-items: center;
        gap: 0;
        margin-bottom: 15px;
    }
    
    .card-image {
        width: 110px;
        height: 80px;
        max-width: none;
        margin: 0;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        object-fit: cover;
        flex-shrink: 0;
    }
    
    .card-year {
        margin-left: 18px;
        font-size: 1.5rem;
        font-weight: bold;
        color: #a42013;
        background: none;
        -webkit-background-clip: initial;
        -webkit-text-fill-color: initial;
        background-clip: initial;
        padding: 0;
        margin-bottom: 0;
    }
    
    .card-description {
        font-size: 0.95rem;
        line-height: 1.6;
        color: #555;
        margin: 0;
        padding: 0;
    }
}

/* Page-specific footer adjustment */
#timeline-page + .site-footer-section {
    padding-top: 50px;
    padding-bottom: 50px;
}

#timeline-page + .site-footer-section {
    margin-top: 0;
}

/* =================================== */
/* Sidebar and Mobile Tags Container */
/* =================================== */

/* --- Sidebar specific to Timeline page --- */
.news-sidebar {
    width: 200px;
    color: white;
    position: absolute;
    top: -69px;
    left: 0;
}

.news-sidebar-title {
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
    padding: 15px 20px;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(164, 32, 19, 0.6); /* Semi-transparent red */
}

.news-sidebar-menu {
    list-style: none;
    box-sizing: border-box;
    padding: 20px 0;
    margin: 0;
    background-color: #a42013;
}

.news-sidebar-menu li a {
    display: block;
    padding: 12px 25px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.news-sidebar-menu li:first-child a {
    border-top: none;
}

.news-sidebar-menu li a.active {
    background-color: #ffd79e;
    color: #333;
}

.news-sidebar-menu li a:not(.active) {
    color: white;
    background-color: transparent;
}

.news-sidebar-menu li a:not(.active):hover {
    background-color: #c83c2e;
}

/* --- Timeline Content Area --- */
.timeline-content {
    flex: 1;
    min-height: 650px;
    display: flex;
    flex-direction: column;
    margin-left: 240px;
}

/* =================================== */
/* Mobile Tags Container (Hidden on PC) */
/* =================================== */
.news-tags-container {
    display: none !important; /* Hidden on PC by default */
}

/* PC Media Query - Ensure mobile layout is hidden on PC */
@media (min-width: 769px) {
    .news-tags-container {
        display: none !important; /* Force hide mobile layout on PC */
    }
    
    .news-sidebar {
        display: block !important; /* Force show PC sidebar */
    }
}

/* Mobile Tags Container Styles */
@media (max-width: 768px) {
    .page-title{
        display: none;
    }
    /* Hide PC sidebar on mobile */
    .news-sidebar {
        display: none !important; /* Force hide on mobile */
    }

    /* Show mobile tags layout */
    .news-tags-container {
        display: flex !important; /* Force show on mobile */
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px 12px 16px;
        border-bottom: 1px solid #e8e8e8;
        background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
        margin-bottom: 8px;
        position: relative;
    }

    .news-tags-container::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 12px;
        right: 12px;
        height: 1px;
        background: linear-gradient(90deg, transparent, #a42013, transparent);
    }

    .news-tags-title {
        font-size: 1.2rem;
        font-weight: 600;
        color: #2c3e50;
        margin: 0;
        letter-spacing: -0.01em;
    }

    .news-tags {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .news-tag {
        display: inline-block;
        padding: 8px 16px;
        background-color: rgba(255, 255, 255, 0.8);
        color: #5a6c7d;
        text-decoration: none;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 500;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border: 1px solid rgba(164, 32, 19, 0.1);
        backdrop-filter: blur(10px);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .news-tag:hover {
        background-color: rgba(164, 32, 19, 0.05);
        color: #a42013;
        border-color: rgba(164, 32, 19, 0.2);
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(164, 32, 19, 0.15);
    }

    .news-tag.active {
        background: linear-gradient(135deg, #a42013, #c83c2e);
        color: white;
        border-color: #a42013;
        box-shadow: 0 2px 8px rgba(164, 32, 19, 0.3);
    }

    .news-tag.active:hover {
        background: linear-gradient(135deg, #8a1b10, #a42013);
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(164, 32, 19, 0.4);
    }

    /* Adjust timeline container for mobile */
    .timeline-body-container {
        padding-top: 20px;
    }
    
    .timeline-content {
        margin-left: 0 !important;
    }
}

/* =================================== */
/* Breadcrumb Dropdown Navigation */
/* =================================== */
.breadcrumb-container {
    position: relative;
    display: inline-block;
}

.breadcrumb-dropdown {
    cursor: pointer;
    color: #fff;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.breadcrumb-dropdown:hover {
    color: #ffd79e;
}

.breadcrumb-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(164, 32, 19, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 150px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.breadcrumb-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.breadcrumb-menu a {
    display: block;
    padding: 8px 20px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.breadcrumb-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.breadcrumb-menu a.active {
    background-color: rgba(255, 215, 158, 0.2);
    color: #ffd79e;
}

/* Mobile styles for breadcrumb */
@media (max-width: 768px) {
    .breadcrumb-menu {
        min-width: 120px;
        font-size: 12px;
    }
    
    .breadcrumb-menu a {
        padding: 6px 15px;
        font-size: 12px;
    }
}

/* ===== Footer Styles (from news.css) ===== */
@media (min-width: 769px) {
    .site-footer-section.red-footer {
        background: #a42013;
        padding: 32px 0 18px;
    }
    .footer-container {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding-left: 0;
        padding-right: 0;
    }
    .footer-top {
        display: flex;
        flex-direction:row ;
        justify-content: space-evenly;
        align-items: center;
        padding-bottom: 20px;
    }
    .footer-logo img {
        height: 60px;
    }
    .footer-info p {
        margin: 5px 0;
        text-align: right;
    }
    .footer-divider {
        height: 1px;
        background-color: rgba(255,255,255,0.15);
        margin: 0 auto;
    }
    .footer-bottom {
        padding-top: 20px;
        text-align: center;
    }
}

.site-footer-section.red-footer {
    background: #a42013;
    padding: 32px 0 18px;
}
.footer-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.footer-top {
    /* flex-direction: column; */
    text-align: center;
    gap: 15px;
}
.footer-logo img {
    height: 40px;
}
.footer-info p {
    font-size: 12px;
    margin: 5px 0;
}
.footer-bottom p {
    font-size: 12px;
    text-align: center;
}
.footer-divider {
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 18px 0;
    border: none;
}
@media (max-width: 480px) {
    .site-footer-section.red-footer {
        padding: 25px 0 15px;
    }
    .footer-container {
        padding: 0 12px;
    }
    .footer-top {
        gap: 15px;
        margin-bottom: 15px;
    }
    .footer-logo img {
        height: 40px;
    }
    .footer-info p {
        font-size: 12px;
    }
    .footer-bottom p {
        font-size: 11px;
    }
    .footer-divider {
        margin: 15px 0;
    }
}

/* PC端导航样式恢复 */
@media (min-width: 769px) {
    .main-nav {
        display: block !important;
        position: static !important;
        background: transparent !important;
        transform: none !important;
        height: auto !important;
        width: auto !important;
    }
    
    .main-nav > ul {
        display: flex !important;
        flex-direction: row !important;
        gap: 36px !important;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    
    .mobile-menu-panel {
        display: none !important;
    }
    
    .mobile-menu-close {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* 页脚移动端样式 */
    .footer-container {
        padding: 20px 0;
    }
    
    .footer-top {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-logo img {
        height: 40px;
    }
    
    .footer-info p {
        font-size: 12px;
        margin: 5px 0;
    }
    
    .footer-bottom p {
        font-size: 12px;
        text-align: center;
    }
    
    /* 隐藏PC端导航 */
    .main-nav > ul {
        display: none !important;
    }
    
    /* 移动端自定义菜单 - 默认隐藏 */
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(164,32,19,0.97);
        z-index: 2000;
        transform: translateY(-100%);
        transition: transform 0.4s ease;
        overflow-y: auto;
    }
    
    .main-nav.active {
        transform: translateY(0);
    }
    
    .mobile-menu-panel {
        width: 100vw;
        min-height: 50vh;
        padding: 60px 20px 40px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        box-sizing: border-box;
        transform: translateY(0);

    }

    .mobile-menu-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        color: #fff;
        font-size: 2.5rem;
        z-index: 999999;
        display: block;
        line-height: 1;
        cursor: pointer;
        font-weight: 300;
    }

    .mobile-menu-search {
        width: 90%;
        max-width: 350px;
        margin: 0 auto 12px auto;
        display: flex;
        align-items: center;
        background: rgba(255,255,255,0.1);
        border-radius: 25px;
        padding: 0 15px;
        height: 50px;
        box-sizing: border-box;
        border: 1px solid rgba(255,255,255,0.2);
    }

    .mobile-menu-search-input {
        flex: 1;
        border: none;
        background: transparent;
        color: #fff;
        font-size: 16px;
        outline: none;
        padding: 0 10px;
        height: 48px;
    }
    
    .mobile-menu-search-input::placeholder {
        color: rgba(255,255,255,0.8);
    }

    .mobile-menu-search-btn {
        background: none;
        border: none;
        outline: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        padding: 5px;
    }

    .mobile-menu-search-btn svg {
        display: block;
    }

    .mobile-menu-title {
        color: #fff;
        font-size: 24px;
        font-weight: bold;
        text-align: center;
        margin: 0 0 15px 0;
        letter-spacing: 2px;
    }

    /* 竖向列表布局 */
    .mobile-menu-list {
        width: 90%;
        max-width: 400px;
        margin: 0 auto;
        padding: 0;
        flex-direction: column;
        list-style: none;
        background: none;
    }

    .mobile-menu-list li {
        border-bottom: 1px solid rgba(255,255,255,0.2);
        margin: 0;
        padding: 0;
        position: relative;
    }

    .mobile-menu-list li:last-child {
        border-bottom: none;
    }

    .mobile-menu-list a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #fff;
        font-size: 18px;
        font-weight: 500;
        padding: 10px 15px;
        text-decoration: none;
        transition: background 0.2s;
        text-align: left;
        min-height: 20px;
    }

    .mobile-menu-list a:active,
    .mobile-menu-list a:hover {
        background: rgba(255,255,255,0.1);
    }

    .mobile-menu-list .arrow {
        font-size: 18px;
        color: #fff;
        font-weight: bold;
        margin-left: 10px;
    }

    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.4);
        z-index: 1999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}


