/* 1. 头部全局样式 — 教务处：庄重、清晰、易读 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #eef1f7 0%, #f5f7fb 35%, #f0f3f9 100%);
    color: #2a3344;
    line-height: 1.65;
    font-size: 15px;
}

/* 2. 教务主色：学院蓝 + 点缀金 + 中医药绿（装饰用） */
:root {
    --edu-blue: #153d82;
    --edu-blue-light: #1e4d9e;
    --tech-blue: #2a6faf;
    --herbal-green: #2d7a55;
    --accent-gold: #c9a227;
    --accent-gold-soft: rgba(201, 162, 39, 0.25);
    --light-bg: #eef2fa;
    --border-color: #d9e2ef;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --card-shadow: 0 2px 14px rgba(21, 61, 130, 0.07);
    --card-shadow-hover: 0 6px 24px rgba(21, 61, 130, 0.1);
    --radius-card: 10px;
}

/* 3. 顶部装饰条 */
.top-decoration {
    height: 4px;
    background: linear-gradient(90deg, var(--herbal-green) 0%, var(--edu-blue) 28%, var(--tech-blue) 72%, var(--accent-gold) 100%);
    width: 100%;
}

/* 4. 头部样式 */
.header-wrapper {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border-bottom: 1px solid rgba(21, 61, 130, 0.08);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 20px rgba(21, 61, 130, 0.04);
    overflow: visible !important;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.logo-img {
    height: 65px;
    width: auto;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.logo-img img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

/* 5. 响应式设计 */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 25px;
        padding: 25px 20px;
    }
}

/* ========== INDEX.CSS - 页面内容样式 + 独立导航样式 ========== */

/* 第一部分：页面内容样式 */
/* 确保页面主要内容容器不会导致滚动问题 */
.container,
.fullscreen-banner,
.news-dynamic,
.news-section,
.two-column-section {
    overflow-x: hidden;
    max-width: 100vw;
}

/* 轮播图样式 */
.fullscreen-banner {
    width: 100%;
    height: 420px;
    overflow: hidden;
    position: relative;
    margin-bottom: 36px;
}

.fullscreen-banner::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(15, 35, 75, 0.45), transparent);
    pointer-events: none;
    z-index: 1;
}

.carousel {
    overflow: hidden;
    position: relative;
    height: 100%;
    z-index: 2;
}

.carousel-inner {
    display: flex;
    transition: transform 0.6s ease;
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 轮播图控制 */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 26px;
    transition: all 0.3s;
    z-index: 10;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
}

.carousel:hover .carousel-control {
    opacity: 1;
}

.carousel-control:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.carousel-control.prev {
    left: 25px;
}

.carousel-control.next {
    right: 25px;
}

.carousel-indicators {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.indicator.active {
    background-color: white;
    transform: scale(1.2);
    border-color: var(--accent-gold);
}

/* 主要内容区域 */
.container {
    max-width: 1400px;
    margin: 0 auto 56px;
    padding: 0 20px;
    overflow-x: hidden;
}

/* 新闻动态区域 */
.news-dynamic {
    background-color: #fff;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 440px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.section-header {
    background: linear-gradient(105deg, var(--edu-blue) 0%, var(--edu-blue-light) 48%, var(--tech-blue) 100%);
    padding: 18px 26px 18px 22px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    border-bottom: 2px solid var(--accent-gold);
}

.section-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent-gold), #e8c76b);
}

.section-title {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    margin: 0;
}

.section-title::before {
    content: "";
    width: 4px;
    height: 1.15em;
    margin-right: 12px;
    border-radius: 2px;
    background: var(--accent-gold);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.section-more {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 7px 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s;
}

.section-more:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
}

/* 新闻动态内部布局 — flex 子项须 min-width:0，否则右侧标题无法收缩、会一直换行 */
.news-container {
    display: flex;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.news-carousel {
    flex: 1.5;
    min-width: 0;
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, #f8fafc 0%, #f0f5fb 100%);
    border-right: 1px solid var(--border-color);
}

/* 教务动态轮播外层是 .news-carousel，没有 .carousel 包裹，全局规则 .carousel:hover 不会生效，箭头会一直保持 opacity:0 */
.news-carousel .carousel-control {
    opacity: 1;
    z-index: 20;
    color: #fff;
    line-height: 1;
    background: rgba(21, 61, 130, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 2px 10px rgba(15, 40, 90, 0.2);
}

.news-carousel .carousel-control:hover {
    background: rgba(21, 61, 130, 0.55);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.06);
}

/* 新闻列表 */
.news-list-container {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.news-list {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

.news-item {
    padding: 14px 24px 14px 20px;
    border-bottom: 1px solid rgba(217, 226, 239, 0.85);
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s, box-shadow 0.2s;
    min-height: 52px;
    min-width: 0;
    border-left: 3px solid transparent;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background: linear-gradient(90deg, rgba(238, 242, 250, 0.95) 0%, #fff 12%);
    border-left-color: var(--edu-blue-light);
}

/* 列表标题：单行 + 省略号（须 overflow:hidden + text-overflow:ellipsis + nowrap 同时生效） */
.news-title,
.news-list .news-item > a:first-child,
.news-list .news-item a.news-title,
.simple-list .news-item > a:first-child,
.simple-list .news-item a.news-title {
    font-size: 17px;
    color: var(--text-dark);
    text-decoration: none;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    line-height: 1.45;
    letter-spacing: 0.02em;
    display: block;
    /* !important：避免 CMS/内联样式去掉省略号 */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    transition: color 0.2s;
}

.news-title br,
.news-list .news-item a br,
.simple-list .news-item a br {
    display: none;
}

.news-title p,
.news-title div:not(.news-tag),
.news-list .news-item a p,
.news-list .news-item a div:not(.news-tag),
.simple-list .news-item a p,
.simple-list .news-item a div:not(.news-tag) {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
}

.news-title .news-tag,
.news-list .news-item a .news-tag,
.simple-list .news-item a .news-tag {
    margin-bottom: 0;
    vertical-align: middle;
    flex-shrink: 0;
    white-space: nowrap;
}

.news-title:hover,
.news-list .news-item > a:first-child:hover,
.simple-list .news-item > a:first-child:hover {
    color: var(--edu-blue);
}

.news-date {
    color: var(--text-light);
    font-size: 12px;
    min-width: 78px;
    flex-shrink: 0;
    text-align: right;
    margin-left: 14px;
    font-variant-numeric: tabular-nums;
}

.news-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #edf2f9;
    color: var(--edu-blue);
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 4px;
    border: 1px solid #d4e0f0;
    letter-spacing: 0.02em;
}

/* 两列布局的新闻区块 */
.two-column-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
}

.news-section {
    background-color: #fff;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    height: 440px;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.25s, border-color 0.25s;
}

.news-section:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: #cdd9ea;
}

.section-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.simple-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0 12px;
}

/* 中医药特色装饰 */
.herbal-decoration {
    text-align: center;
    margin: 40px 0;
    position: relative;
    color: var(--herbal-green);
    font-size: 16px;
    letter-spacing: 2px;
}

.herbal-decoration::before,
.herbal-decoration::after {
    content: "❈";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--accent-gold);
}

.herbal-decoration::before {
    left: 30%;
}

.herbal-decoration::after {
    right: 30%;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .two-column-section {
        grid-template-columns: 1fr;
    }

    .news-section {
        height: auto;
        min-height: 400px;
    }

    .herbal-decoration::before {
        left: 25%;
    }

    .herbal-decoration::after {
        right: 25%;
    }
}

@media (max-width: 1024px) {
    .fullscreen-banner {
        height: 360px;
    }

    .news-dynamic {
        height: auto;
        min-height: 400px;
    }

    .news-container {
        flex-direction: column;
    }

    .news-carousel {
        flex: none;
        height: 260px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

@media (max-width: 768px) {
    .fullscreen-banner {
        height: 300px;
    }

    .container {
        padding: 0 20px;
        width: 100vw;
        box-sizing: border-box;
    }

    .section-title {
        font-size: 20px;
    }

    .carousel-control {
        width: 48px;
        height: 48px;
        font-size: 22px;
        opacity: 1;
    }

    .carousel-control.prev {
        left: 15px;
    }

    .carousel-control.next {
        right: 15px;
    }

    .news-dynamic {
        height: auto;
    }

    .herbal-decoration::before {
        left: 15%;
    }

    .herbal-decoration::after {
        right: 15%;
    }
}

@media (max-width: 576px) {
    .fullscreen-banner {
        height: 260px;
    }

    .news-carousel {
        height: 220px;
    }

    .section-header {
        padding: 18px 22px;
    }

    .news-item {
        padding: 16px 22px;
    }

    .herbal-decoration {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .herbal-decoration::before,
    .herbal-decoration::after {
        font-size: 16px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.simple-list::-webkit-scrollbar,
.news-list::-webkit-scrollbar {
    width: 6px;
}

.simple-list::-webkit-scrollbar-track,
.news-list::-webkit-scrollbar-track {
    background: transparent;
}

.simple-list::-webkit-scrollbar-thumb,
.news-list::-webkit-scrollbar-thumb {
    background: rgba(21, 61, 130, 0.22);
    border-radius: 3px;
}

.simple-list::-webkit-scrollbar-thumb:hover,
.news-list::-webkit-scrollbar-thumb:hover {
    background: rgba(21, 61, 130, 0.35);
}
