:root {
    --primary: #2455a5;
    --primary-dark: #1a3f7a;
    --primary-light: #4a7fd4;
    --accent: #2455a5;
    --accent2: #7c3aed;
    --bg-main: #f0f4fa;
    --bg-white: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(36, 85, 165, 0.12);
    --text: #1a2332;
    --text-dim: #5a6a80;
    --gradient-main: linear-gradient(135deg, #2455a5 0%, #3a7bd5 50%, #5b9cf0 100%);
    --gradient-card: linear-gradient(135deg, rgba(36, 85, 165, 0.06) 0%, rgba(58, 123, 213, 0.03) 100%);
    --shadow: 0 4px 24px rgba(36, 85, 165, 0.08);
    --shadow-hover: 0 12px 40px rgba(36, 85, 165, 0.15);
}
*{
    margin:0;
    padding:0;
    list-style: none;
}
body{
    background-color: var(--bg-main);
    min-width: 380px
}
/* 全局网格线背景 */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
    linear-gradient(rgba(36, 85, 165, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 85, 165, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
    pointer-events: none;
}
a{
    color:var(--primary);
    text-decoration: none;
}
.container{
    max-width: 1200px;
    margin:auto;
    box-sizing: border-box;
}
.top-banner{
    width: 100%;
    padding:20px 0;
    background: var(--primary);
    box-sizing: border-box;
}

.top-banner .logo-area{
    width: 100%;
    display: flex; align-items: center; gap: 30px;
    user-select: none;
}
.top-banner .logo-area img.dcc-logo{
    display: block; height: 68px;
}

.top-banner .logo-area div.dept-title
{
    color:#fff; border-left: 1px solid rgba(255, 255, 255, .2);
    padding:10px 0; padding-left: 30px;
    padding-top:15px;
}

.top-banner .logo-area div.dept-title h1{
    line-height: 1; margin-bottom: 5px; letter-spacing: 5px;
}

.navbar-main{
    background-color: #fff;box-shadow: 0px 1px 2px #ccc; margin-bottom: 5px;
}
.navbar-main .container{
    padding:0;
}
.navbar-main ul{
    display: flex; align-items: center;
}
.navbar-main ul>li{
    border-right: 1px solid rgba(0, 0, 0, .1);
}
.navbar-main ul>li>a{
    display: flex; align-items: center;justify-content: center;
    width: 180px; gap:4px;
    padding:10px 0; box-sizing: border-box;
    border-bottom: 2px solid transparent;
    color:#565656;
}
.navbar-main ul>li>a>i{
    font-size: 0.8em; margin-top:2px;
}
.navbar-main ul>li>a:hover{
    border-bottom: 2px solid var(--primary);;
}
.navbar-main ul>li:last-child{
    border-right: none;
}

/* 一级导航 li 设为相对定位，作为子菜单的锚点 */
.navbar-main ul>li.has-submenu {
    position: relative;
}

/* 子菜单 —— 默认隐藏 */
.navbar-main ul>li.has-submenu ul.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: 2px solid var(--primary);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    z-index: 100;
    white-space: nowrap;
}

/* 子菜单项 */
.navbar-main ul>li.has-submenu ul.submenu li {
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
}
.navbar-main ul>li.has-submenu ul.submenu li:last-child {
    border-bottom: none;
}

/* 子菜单链接 */
.navbar-main ul>li.has-submenu ul.submenu li a {
    display: block;
    width: auto;
    padding: 10px 24px;
    color: #565656;
    border-bottom: none;
    text-align: left;
    justify-content: flex-start;
}
.navbar-main ul>li.has-submenu ul.submenu li a:hover {
    background: rgba(36, 85, 165, 0.06);
    color: var(--primary);
    border-bottom: none;
}

/* 鼠标悬停时显示子菜单 */
.navbar-main ul>li.has-submenu:hover ul.submenu {
    display: block;
}




/* Hero 轮播 */
.hero {
    position: relative;
    z-index: 1;
}
.hero-slider {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    aspect-ratio: 16/8;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-top: none;
    box-shadow: var(--shadow);
}

.hero-slide {
    display: none;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.hero-slide.active { display: block; }

.hero-slide img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.hero-caption {
    position: absolute;
    bottom: 40px; left: 40px;
    color: #fff;
    z-index: 5;
    max-width: 55%;
}

.hero-caption h2 {
    font-family: 'ZenDots', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 2px;
}

.hero-caption p {
    font-size: 1.1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    opacity: 0.95;
}

.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero-dot {
    width: 30px; height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background: var(--primary);
    width: 50px;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    background: rgba(36, 85, 165, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(36, 85, 165, 0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 12px;
    font-size: 1.1rem;
}

.hero-nav:hover {
    background: rgba(36, 85, 165, 0.9);
    box-shadow: 0 4px 20px rgba(36, 85, 165, 0.3);
}

.hero-nav.prev { left: 20px; opacity: 0;}
.hero-nav.next { right: 20px; opacity: 0;}

#hero:hover .hero-nav.prev , #hero:hover .hero-nav.next{
    opacity: .8;
}

/* 工作快讯和通知公告 */
.news-notices {
    position: relative;
    z-index: 1;
    padding: 5px 0;
    overflow-x: hidden;
    /* background: linear-gradient(180deg, rgba(36, 85, 165, 0.06) 0%, transparent 100%); */
}

.news-notices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}

@media (max-width: 900px) {
    .news-notices {
        padding: 40px 0;
    }
    .news-notices-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.news-section {
    background: var(--bg-white);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 20px 32px;
    min-width: 0;
    min-height: 300px;
}

@media (max-width: 900px) {
    .news-section {
        padding: 20px;
        border-radius: 16px;
    }
}

.news-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(36, 85, 165, 0.08);
    flex-wrap: wrap;
    gap: 10px;
}

.news-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 900px) {
    .news-section-title {
        font-size: 1.2rem;
    }
}

.news-section-title i {
    color: var(--primary);
}

.news-more {
    font-size: 0.85rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 2px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.news-more:hover {
    gap: 10px;
}

.news-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dotted rgba(36, 85, 165, 0.08);
    transition: all 0.3s ease;
    gap: 12px;
    min-width: 0;
}

@media (max-width: 900px) {
    .news-item {
        padding: 12px 0;
        gap: 8px;
    }
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    padding-left: 10px;
    background: rgba(36, 85, 165, 0.04);
    border-radius: 6px;
}

@media (max-width: 900px) {
    .news-item:hover {
        padding-left: 6px;
    }
}

.news-item-title {
    font-size: 0.95rem;
    font-weight: 500;
    flex: 1;
    margin: 0;
    line-height: 1.5;
    min-width: 0;
}

.news-item-title a {
    color: var(--text);
    transition: color 0.3s ease;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .news-item-title {
        font-size: 0.9rem;
    }
    .news-item-title a {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.6;
    }
}

.news-item-date {
    font-family: 'ZenDots', sans-serif;
    font-size: 0.75rem;
    color: var(--primary);
    white-space: nowrap;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    margin-top: 2px;
}

.news-item-title a:hover {
    color: var(--primary);
}

.news-item-date {
    font-family: sans-serif;
    font-size: 1rem;
    color: var(--primary);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* 通知公告 */
.notices {
    position: relative;
    z-index: 1;
    padding: 30px 0;
}

.notices-panel {
    background: var(--bg-white);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow);
}

.notice-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(36, 85, 165, 0.08);
    transition: all 0.3s ease;
    gap: 16px;
}

.notice-row:last-child { border-bottom: none; }

.notice-row:hover {
    padding-left: 12px;
    background: rgba(36, 85, 165, 0.04);
    border-radius: 8px;
}

.notice-row h4 {
    font-size: 1.05rem;
    font-weight: 500;
    flex: 1;
    margin: 0;
}

.notice-row h4 a {
    color: var(--text);
    transition: color 0.3s ease;
}

.notice-row h4 a:hover { color: var(--primary); }

.notice-date {
    font-family: 'ZenDots', sans-serif;
    font-size: 0.8rem;
    color: var(--primary);
    white-space: nowrap;
    letter-spacing: 1px;
}

.notices-footer {
    text-align: center;
    margin-top: 30px;
}

.more-info-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}
.more-info-grid .morder-info-section {
    background: var(--bg-white);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 20px 22px;
    min-width: 0;
    min-height: 300px;
}
.more-info-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(36, 85, 165, 0.08);
    flex-wrap: wrap;
    gap: 10px;
}
.more-info-section-title{
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 页脚 */
.footer {
    position: relative;
    z-index: 1;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-white);
    margin-top:30px;
}

.footer p { color: var(--text-dim); font-size: 0.9rem; }

.footer a {
    color: var(--primary);
    transition: color 0.3s ease;
}

.footer a:hover { color: var(--primary-dark); }


/* ============================================================
   学院视频 - <video> 播放器
   说明：index.php 中 .videos 内的 <video data-file="..."> 由
   video_player.js 注入 src 与 poster 属性；这里统一控制外观。
   ============================================================ */

/* 视频外层容器 */
.videos {
    width: 100%;
    margin-top: 6px;
    
}

.videos a.media-link{
    display: block;
    user-select: none;
    background-color: #f1f1f1;overflow: hidden; border-radius: 6px;
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.videos a.media-link:hover{
    opacity: 0.8;
}
.videos .cover{
    padding-top:0;
    margin-bottom: 5px;
}
.videos .cover img{
    width: 100%; display: block; margin-top:-2px
}
.videos .desc{
    width: 100%; text-align: center; color:#333;
}


/* ============================================================
   友情链接
   说明：index.php 中 .morder-info-section 内的链接列表
   ============================================================ */

.friend-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    /* 自适应多列：宽屏 3 列、平板 2 列、手机 1 列 */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 6px;
}

.friend-links li {
    margin: 0;
}

.friend-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--glass-border);
    border-left: 3px solid transparent;
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.4;
    transition: all .25s ease;
    text-decoration: none;
}

.friend-links a i {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    color: var(--primary);
    font-size: 0.95rem;
}

.friend-links a span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.friend-links a:hover {
    background: rgba(36, 85, 165, 0.04);
    border-left-color: var(--primary);
    color: var(--primary);
    transform: translateX(2px);
}
.friend-links a:hover i {
    color: var(--primary-dark);
}


/* ============================================================
   学院概况页 - 两列布局
   说明：宽屏下左侧内容区占满剩余宽度，右侧侧边栏固定最大 320px
   两列之间间距 10px；窄屏下堆叠为单列
   ============================================================ */

.about-layout {
    display: grid;
    grid-template-columns: 1fr 320px;   /* 左列自适应，右列最多 320px */
    gap: 10px;
    margin: 10px 0;
    align-items: start;
}

/* 左侧内容区 —— 图文并茂排版容器 */
.about-content {
    background: var(--bg-white);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 24px 28px;
    min-height: 400px;
    min-width: 0;                        /* 防止 grid 子项溢出 */
}

/* 内容区顶部标题条 */
.about-content .content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    position: relative;
}

/* 标题文字 */
.about-content .content-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    position: relative;
    padding-left: 12px;
}
/* 标题左侧装饰竖条 */
.about-content .content-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
}

/* 正文区域 */
.about-content .content-body {
    line-height: 1.8;
    color: var(--text);
    font-size: 0.95rem;
}

/* 右侧子栏目导航容器 */
.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 子栏目按钮 */
.about-sub-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-white);
    border: 1px solid var(--glass-border);
    border-left: 3px solid transparent;
    border-radius: 4px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.25s ease;
    text-decoration: none;
}

.about-sub-btn i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.about-sub-btn:hover {
    background: rgba(36, 85, 165, 0.04);
    border-left-color: var(--primary-light);
    transform: translateX(2px);
}

/* 当前激活的子栏目按钮 */
.about-sub-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.about-sub-btn.active i {
    color: #fff;
}

/* 窄屏下改为单列堆叠 */
@media (max-width: 1100px) {
    .about-layout {
        grid-template-columns: 1fr;
        margin: 10px;
    }
    .about-content {
        padding: 16px;
        min-height: auto;
    }
    .about-sub-btn {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}


/* ============================================================
   移动端 / 响应式适配
   说明：针对 768px 及以下屏幕做自适应调整
   ============================================================ */

/* 汉堡菜单按钮 —— 默认隐藏（桌面端不显示） */
.nav-toggle {
    display: none;
    padding: 10px 16px;
    color: #565656;
    font-size: 1.4rem;
    cursor: pointer;
    user-select: none;
}
@media (max-width: 930px)
{
    .navbar-main ul {
        display: flex;
        flex-wrap: wrap;
        gap: 1px;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
        background-color: rgba(0, 0, 0, .1);
    }
    .navbar-main ul li {
        flex: 1 0 calc((100% - 2px) / 3);
        box-sizing: border-box;
        min-width: 0;
        background-color: #fff;
    }
    .navbar-main ul>li>a {
        width: 100%
    }
}

@media (max-width: 930px)
{
    .navbar-main ul {
        display: flex;
        flex-wrap: wrap;
        gap: 1px;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
        background-color: rgba(0, 0, 0, .1);
    }
    .navbar-main ul li {
        flex: 1 0 calc((100% - 2px) / 3);
        box-sizing: border-box;
        min-width: 0;
        background-color: #fff;
    }
    .navbar-main ul>li>a {
        width: 100%;
        font-size: 14px;
    }
    .navbar-main ul > li.has-submenu ul.submenu li {
        white-space: normal;          /* 取消禁止单行，开启自动换行（很多导航默认nowrap） */
        overflow-wrap: break-word;    /* 长英文/长字符在单词末尾换行（新标准） */
        word-break: break-all;        /* 连续无空格文字强制拆字符换行，必加 */
    }
}
@media (max-width: 768px) {
    .navbar-main ul>li>a {
        font-size: 0.8rem; 
    }
    .navbar-main ul > li.has-submenu:nth-child(3) ul.submenu{
        width: 300px;
        left:unset;
        right:0;
    }
}

@media (max-width: 768px) {

    /* ---------- 顶部横幅 ---------- */
    .top-banner {
        padding: 12px 16px;
    }
    .top-banner .logo-area {
        gap: 14px;
    }
    .top-banner .logo-area img.dcc-logo {
        height: 40px;
    }
    .top-banner .logo-area div.dept-title {
        padding: 4px 0 4px 14px;
    }
    .top-banner .logo-area div.dept-title h1 {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }
    .top-banner .logo-area div.dept-title .en-desc {
        font-size: 0.6rem; line-height: 1;
    }

    /* ---------- 导航栏 ---------- */
    .navbar-main .container {
        padding: 0;
    }
    /* 隐藏汉堡按钮 */
    .nav-toggle {
        display: none;
    }
    

    /* ---------- Hero 轮播 ---------- */
    .hero-slider {
        aspect-ratio: 16/10;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .hero-caption {
        bottom: 24px;
        left: 16px;
        max-width: 80%;
    }
    .hero-caption h2 {
        font-size: 1.2rem;
        letter-spacing: 1px;
        margin-bottom: 6px;
    }
    .hero-caption p {
        font-size: 0.85rem;
    }
    .hero-nav {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    .hero-nav.prev { left: 8px; }
    .hero-nav.next { right: 8px; }
    .hero-dots {
        bottom: 12px;
        gap: 6px;
    }
    .hero-dot {
        width: 20px;
        height: 3px;
    }
    .hero-dot.active {
        width: 32px;
    }

    /* ---------- 新闻公告 ---------- */
    .news-notices {
        padding: 12px 10px;
    }
    .news-section {
        padding: 16px;
        min-height: auto;
    }
    .news-section-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    .news-section-title {
        font-size: 1rem;
    }
    .news-item {
        padding: 8px 0;
    }
    .news-item-title {
        font-size: 0.85rem;
    }
    .news-item-date {
        font-size: 0.8rem;
    }

    /* ---------- 更多信息（学院视频 + 友情链接） ---------- */
    .more-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 0 10px;
    }
    .more-info-grid .morder-info-section {
        padding: 14px 16px;
        min-height: auto;
    }
    .more-info-section-title {
        font-size: 1rem;
    }

    /* ---------- 视频卡片 ---------- */
    .video-card {
        width: 160px;
    }
    .videos-scroll {
        gap: 12px;
    }

    /* ---------- 页脚 ---------- */
    .footer {
        padding: 16px 10px;
    }
    .footer p {
        font-size: 0.8rem;
    }
}
