/* --- 基础设置 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Georgia", sans-serif;
    background-color: #f9f7f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.container {
    width: 1200px;
    max-width: 98%;
    margin: 0 auto;
}

.mb-20 {
    margin-bottom: 20px;
}

/* --- Header & 搜索 --- */
.header-section {
    background: #fff;
    box-shadow: 0 1px 0 rgba(139, 35, 35, 0.06);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 60px;
    display: block;
}

/* --- 导航条（具体项见 style/menu.css · .menu-content） --- */
.nav-section {
    background: linear-gradient(180deg, #9a2d2d 0%, #8b2323 42%, #761d1d 100%);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}

/* --- Banner：紧贴导航无顶距；内层 .container 由图片列表组件输出 --- */
.banner-section {
    background: #f9f7f5;
    padding: 0 0 20px;
}

/* ========== 主轮播（团委首页同款：圆角卡片 + 横滑无缝 + 圆点）人文红配色 ========== */
.hero-carousel-section {
    margin-top: 0;
    margin-bottom: 28px;
    border-radius: 0 0 14px 14px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(139, 35, 35, 0.14);
}

.hero-carousel {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    outline: none;
    /* 避免缝隙露出黑底（母版或浏览器默认） */
    background: #6b2a2a;
}

.hero-carousel:focus-visible {
    box-shadow: inset 0 0 0 3px rgba(192, 161, 107, 0.9);
}

.hero-carousel-inner {
    display: flex;
    height: 100%;
    min-height: 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-carousel-item {
    flex: 0 0 auto;
    height: 100%;
    position: relative;
    box-sizing: border-box;
    /* 宽度由 banner.js 按 .hero-carousel 像素设置，避免与 translate 不同步出现左侧露底 */
}

.hero-carousel-item img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-carousel-item::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    background: linear-gradient(transparent, rgba(139, 35, 35, 0.55));
    pointer-events: none;
    z-index: 1;
}

.hero-carousel-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 40px;
    text-align: center;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    z-index: 2;
    padding: 0 48px;
}

.hero-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(139, 35, 35, 0.88);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    transition: background 0.3s, transform 0.3s;
}

.hero-carousel-btn:hover {
    background: #8B2323;
    transform: translateY(-50%) scale(1.1);
}

.hero-carousel-btn:focus-visible {
    outline: 2px solid #c0a16b;
    outline-offset: 3px;
}

.hero-carousel-btn.prev { left: 16px; }
.hero-carousel-btn.next { right: 16px; }

.hero-carousel.is-single .hero-carousel-btn,
.hero-carousel.is-single .hero-carousel-dots {
    display: none;
}

.hero-carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(100% - 32px);
}

.hero-carousel-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s;
}

.hero-carousel-dots span.active {
    background: #fff;
    width: 28px;
    border-radius: 5px;
}

.hero-carousel-dots span:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .hero-carousel-inner {
        transition-duration: 0.01ms;
    }

    .hero-carousel-btn,
    .hero-carousel-dots span {
        transition-duration: 0.01ms;
    }
}

/* --- 内容布局 --- */
.main-content {
    padding: 8px 0 40px;
}

.content-row {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
}

.col-half {
    flex: 1;
    width: 50%;
}

.col-full {
    flex: 1;
    width: 100%;
}

.info-card {
    background: #fff;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(139, 35, 35, 0.07);
    border: 1px solid rgba(139, 35, 35, 0.06);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    margin: 0;
    background: linear-gradient(105deg, #7a1e1e 0%, #8b2323 42%, #a23434 100%);
}

.card-header:has(.theme-title.secondary) {
    background: linear-gradient(105deg, #6b5428 0%, #8d6f3a 38%, #c0a16b 100%);
}

.theme-title {
    margin: 0;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.04em;
    border: none;
    padding: 0;
    line-height: 1.35;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.theme-title.secondary {
    color: #fff;
}

.card-header .more {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #6b1a1a;
    background: linear-gradient(180deg, #fffefb 0%, #f5ebe0 100%);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.card-header:has(.theme-title.secondary) .more {
    color: #4a3a18;
    background: linear-gradient(180deg, #fffefb 0%, #f8f0dc 100%);
}

.card-header .more:hover {
    color: #8b2323;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.card-header:has(.theme-title.secondary) .more:hover {
    color: #6b5428;
}

.scroll-wrapper {
    height: 300px;
    overflow-y: auto;
    padding: 18px 22px 22px;
    margin: 0;
}

.scroll-wrapper::-webkit-scrollbar {
    width: 5px;
}

.scroll-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.scroll-wrapper::-webkit-scrollbar-thumb {
    background: #dcbdbd;
    border-radius: 5px;
}

.scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #8B2323;
}

.gold-scroll::-webkit-scrollbar-thumb:hover {
    background: #c0a16b;
}

.news-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    font-size: 15px;
    align-items: center;
}

.news-item a:hover {
    color: #8B2323;
}

.news-item span {
    color: #999;
    font-size: 13px;
    white-space: nowrap;
    margin-left: 10px;
}

.list-label {
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
    display: inline-block;
}

.list-label:first-child {
    margin-top: 0;
}

.two-column-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.two-column-list .news-item {
    width: 48%;
}

/* --- Footer --- */
.footer-links-section {
    background: #eaeaea;
    padding: 20px 0;
    border-top: 1px solid #ddd;
}

.links-container {
    text-align: center;
}

.links-container a {
    margin: 0 15px;
    color: #666;
    font-size: 14px;
}

.links-container a:hover {
    color: #8B2323;
}

.footer-section {
    /* 与顶栏同色起笔，向下渐沉为深褐，与导航形成呼应 */
    background: linear-gradient(
        180deg,
        #8b2323 0%,
        #6e1c1c 14%,
        #451818 38%,
        #2a1414 68%,
        #160d0d 100%
    );
    color: rgba(245, 232, 228, 0.88);
    padding: 40px 0 44px;
    text-align: center;
    border-top: 3px solid rgba(201, 160, 106, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.footer-uni {
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.footer-copy,
.footer-addr {
    font-size: 13px;
    margin: 6px 0;
    color: rgba(230, 215, 210, 0.82);
}

/* --- 响应式 --- */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 10px;
    }

    .content-row {
        flex-direction: column;
    }

    .col-half,
    .col-full,
    .two-column-list .news-item {
        width: 100%;
    }

    .banner-section {
        padding-bottom: 16px;
    }

    .hero-carousel-section {
        margin-bottom: 18px;
        border-radius: 0 0 10px 10px;
    }

    .hero-carousel {
        height: 300px;
    }

    .hero-carousel-caption {
        font-size: 16px;
        bottom: 32px;
        padding: 0 40px;
    }

    .card-header {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .card-header .more {
        width: 100%;
        margin-top: 4px;
        justify-content: center;
    }
}
