/* 头部和导航栏样式，来自news.css，保证与news.html一致 */
.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;
}
@media (max-width: 768px) {
    .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;
    }
    .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;
    }
}

body {
    background-color: #fdfaf5; /* Same light cream background from other pages */
}
.news-container {
    position: relative;
    gap: 40px;
    padding: 50px 0;
    align-items: flex-start;
}

.news-content-area {
    flex: 1;
    min-height: 650px;
    display: flex;
    flex-direction: column;
    margin-left: 240px;
}

/* --- Sidebar specific to News 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;
}

.announcements-container {
    display: flex;
    gap: 40px;
    padding: 50px 0;
    align-items: flex-start;
}

/* --- Sidebar --- */
.announcements-sidebar {
    flex: 0 0 130px; /* Fixed width (200px * 0.8) */
    position: relative;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #a42013; /* Dark red */
    color: white;
    padding-top: 5px; /* Add space for the top red line */
    /* Creates the angled bottom-right cut */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 35px), 0 100%);
    box-sizing: border-box;
    padding-bottom: 40px;
}

.sidebar-menu li a {
    display: block;
    padding: 5px 25px; /* Increased vertical padding to increase height */
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Style for the active/selected link */
.sidebar-menu li a.active {
    background-color: #e0e6c4; /* Light greenish-yellow */
    color: #333;
}

/* Hover effect for non-active links */
.sidebar-menu li a:not(.active):hover {
    background-color: #c83c2e; /* A lighter red for hover */
}

/* --- Content Area --- */
.announcements-content {
    flex: 1;
    min-height: 650px; /* Ensure content area has a minimum height */
    display: flex;
    flex-direction: column;
}

.announcement-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1; /* Make the list grow to push pagination down */
    box-sizing: border-box;
    padding-left: 220px;
}

.announcement-list li {
    background-color: #fff;
    margin-bottom: 15px;
    border: 1px solid #fdf2f2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.announcement-list li:first-child {
    border: 1px solid #fbe2e3;
    box-shadow: 0 4px 20px rgba(212, 126, 126, 0.2);
}

.announcement-list li:hover {
    box-shadow: 0 0 15px rgba(212, 126, 126, 0.5); /* Centered reddish shadow on all sides */
    transform: translateY(-2px);
}

.announcement-list li a {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    text-decoration: none;
    color: #333;
}

.announcement-list .date {
    color: #d9534f; /* A soft red */
    font-weight: 500;
    font-size: 1rem;
    margin-right: 25px;
    flex-shrink: 0;
    width: 90px;
}

.announcement-list .title {
    font-size: 1rem;
    line-height: 1.6;
}

/* --- Pagination --- */
.pagination {
    margin-top: 50px;
    text-align: center;
    padding-bottom: 30px;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 2px;
    border: 1px solid #ddd;
    background-color: transparent;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 38px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination a.active {
    border-color: #A42013;
    color: #A42013;
    font-weight: bold;
}

.pagination .ellipsis {
    border: none;
    background: none;
    padding: 8px 5px;
}

.pagination a.disabled {
    color: #ccc;
    pointer-events: none;
    border-color: #eee;
}

/* =================================== */
/* 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) {
    .announcement-list{
        padding-left: 0;
    }
    /* 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);
    }
}

/* 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) {
    /* 隐藏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: 100vh;
        padding: 60px 20px 40px 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        box-sizing: border-box;
    }

    .mobile-menu-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        color: #fff;
        font-size: 2.5rem;
        z-index: 10;
        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;
        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;
    }
} 