/* 教育科研信息管理中心 - 样式表 */
/* 蓝色主调、方正布局 */

:root {
    /* 主色（沿用 --primary-red 变量名以便子页样式兼容，实为蓝色） */
    --primary-red: #1565c0;
    --primary-red-dark: #0d47a1;
    --primary-red-light: #1976d2;
    --accent-gold: #42a5f5;
    --link-blue: #0d47a1;
    --link-blue-hover: #0a3d7a;
    --text-dark: #1a2332;
    --text-gray: #4a5568;
    --text-light: #718096;
    --border-color: #cfd8e6;
    --border-light: #e8edf4;
    --bg-light: #eef3f9;
    --bg-white: #ffffff;
    --paper: #fafbfc;
    --shadow-sm: 0 1px 4px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 8px 28px rgba(15, 23, 42, 0.1);
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 4px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: #e8eef5;
    background-image: none;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--link-blue-hover);
    text-decoration: underline;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部欢迎栏 */
.top-bar {
    background: linear-gradient(90deg, #0d47a1 0%, var(--primary-red) 50%, #0a3d7a 100%);
    color: white;
    padding: 10px 0;
    font-size: 13px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset;
    border-bottom: 2px solid var(--accent-gold);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar .welcome {
    font-weight: 500;
    letter-spacing: 0.3px;
}

.top-bar .links a {
    color: rgba(255,255,255,0.95);
    margin-left: 18px;
}

.top-bar .links a:hover {
    text-decoration: none;
    color: white;
}

.top-bar .divider {
    margin: 0 10px;
    opacity: 0.7;
}

/* 头部 */
.header {
    background: var(--bg-white);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
    position: relative;
    z-index: 100;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 22px;
    padding-bottom: 18px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 18px;
    text-align: left;
    margin: 0;
}

.logo-link {
    flex-shrink: 0;
    line-height: 0;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.25);
    transition: var(--transition);
}

.logo-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.35);
}

.logo-link:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 3px;
}

.site-logo {
    width: 56px;
    height: 56px;
    display: block;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.brand-text .site-title {
    font-size: clamp(22px, 3.2vw, 32px);
    font-weight: 700;
    color: var(--primary-red);
    margin: 0 0 6px;
    letter-spacing: 3px;
    line-height: 1.25;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.site-subtitle {
    font-size: 12px;
    color: var(--text-gray);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin: 0;
    opacity: 0.9;
}

/* 主导航条 */
.nav-strip {
    background: linear-gradient(180deg, #1565c0 0%, #0d47a1 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
    border-top: 1px solid rgba(255,255,255,0.12);
}

.nav-strip .nav-inner {
    padding: 0 12px;
}

.main-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.main-nav a {
    padding: 14px 20px;
    color: rgba(255,255,255,0.95);
    font-size: 15px;
    font-weight: 500;
    border-radius: 0;
    transition: var(--transition);
    position: relative;
}

.main-nav a:hover {
    background: rgba(0,0,0,0.18);
    color: #fff;
    text-decoration: none;
}

.main-nav a.active {
    background: rgba(255,255,255,0.98);
    color: var(--primary-red) !important;
    text-decoration: none;
    box-shadow: 0 -3px 0 var(--accent-gold) inset;
}

/* 热点滚动条 */
.news-ticker-strip {
    background: linear-gradient(90deg, #f8fafc 0%, #fff 50%, #f8fafc 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.ticker-inner {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-height: 48px;
}

.ticker-label {
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 0 18px;
    display: flex;
    align-items: center;
    letter-spacing: 2px;
}

.ticker-list {
    list-style: none;
    margin: 0;
    padding: 10px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    flex: 1;
}

.ticker-list li {
    position: relative;
    padding-left: 14px;
    font-size: 14px;
    line-height: 1.5;
}

.ticker-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    background: var(--primary-red);
    border-radius: 1px;
    opacity: 0.85;
}

.ticker-list a {
    color: var(--text-dark);
}

.ticker-list a:hover {
    color: var(--primary-red);
}

/* 轮播图 */
.carousel-section {
    margin-bottom: 28px;
}

.carousel {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.06);
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 420px;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 50px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: white;
}

.carousel-caption h3 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 8px;
}

.carousel-caption p {
    font-size: 15px;
    opacity: 0.95;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(0,0,0,0.45);
    color: white;
    font-size: 26px;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

.carousel-btn:hover {
    background: rgba(21, 101, 192, 0.92);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 1px;
    background: rgba(255,255,255,0.45);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: white;
    width: 22px;
    border-radius: 1px;
}

/* 图片展示 */
.image-gallery {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 26px 30px;
    margin-bottom: 28px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.image-gallery:hover {
    box-shadow: var(--shadow-md);
}

.image-gallery .section-header::before {
    width: 72px;
}

.image-gallery .section-header h3 {
    padding-left: 12px;
    border-left: 4px solid var(--primary-red);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-item:hover {
    text-decoration: none;
}

.gallery-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.gallery-item:hover .gallery-title {
    background: linear-gradient(transparent, rgba(21, 101, 192, 0.88));
}

/* 主内容 */
.main-content {
    padding: 30px 0 50px;
}

/* 焦点新闻 */
.featured-news {
    margin-top: 4px;
    margin-bottom: 22px;
}

.news-banner {
    background: linear-gradient(135deg, #0d47a1 0%, var(--primary-red) 45%, #0a3d7a 100%);
    color: white;
    padding: 26px 32px 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.12);
    position: relative;
    overflow: hidden;
}

.news-banner::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 45%;
    height: 180%;
    background: linear-gradient(120deg, rgba(255,255,255,0.08) 0%, transparent 60%);
    transform: rotate(12deg);
}

.news-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #64b5f6, #bbdefb, #64b5f6);
    opacity: 0.95;
}

.news-banner h2 {
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 600;
    margin-bottom: 14px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.news-banner h2 a {
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.news-banner h2 a:hover {
    color: #fff8e6;
}

.news-banner .news-sub {
    font-size: 14px;
    opacity: 0.94;
    margin: 0;
    line-height: 1.75;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 14px;
}

/* 教育资讯 + 通知公告 */
.news-section {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 28px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.news-section:hover {
    box-shadow: var(--shadow-md);
    border-color: #d1dae4;
}

.news-tabs {
    display: flex;
    border-bottom: 3px solid var(--primary-red);
}

.tab-btn {
    padding: 14px 32px;
    border: none;
    background: var(--bg-light);
    font-size: 15px;
    cursor: pointer;
    color: var(--text-gray);
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--primary-red);
    color: white;
    font-weight: 600;
}

.tab-btn:hover:not(.active) {
    background: #e8eaed;
    color: var(--text-dark);
}

.news-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.news-col {
    padding: 24px 28px;
    min-height: 380px;
}

.news-col .col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-red);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-light);
}

.news-col .col-header span {
    padding-left: 10px;
    border-left: 4px solid var(--primary-red);
}

.news-col .col-header .more {
    font-size: 14px;
    font-weight: normal;
}

.news-col:first-child {
    border-right: 1px solid var(--border-light);
}

.news-list {
    list-style: none;
}

.news-list li {
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: var(--transition);
}

.news-list li:hover {
    padding-left: 4px;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list .date {
    flex-shrink: 0;
    color: var(--text-light);
    font-size: 14px;
}

.news-list a {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-list a:hover {
    color: var(--primary-red);
}

/* 区块通用样式 */
.section-block {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 26px 30px;
    margin-bottom: 28px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.section-block:hover {
    box-shadow: var(--shadow-md);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.section-header::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 72px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-red-light));
    border-radius: 2px;
}

.section-header h3 {
    font-size: 20px;
    color: var(--primary-red);
    font-weight: 700;
    padding-left: 12px;
    border-left: 4px solid var(--primary-red);
    line-height: 1.3;
}

.section-header .more {
    font-size: 14px;
    color: var(--link-blue);
}

.section-header .more:hover {
    color: var(--link-blue-hover);
}

.section-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.section-content.full-width {
    grid-template-columns: 1fr;
}

.highlight-item {
    padding-right: 24px;
}

.highlight-item h4 {
    font-size: 16px;
    margin-bottom: 12px;
    line-height: 1.55;
}

.highlight-item h4 a {
    color: var(--text-dark);
}

.highlight-item h4 a:hover {
    color: var(--primary-red);
}

.highlight-item p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.8;
}

.simple-list {
    list-style: none;
}

.simple-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    gap: 12px;
    transition: var(--transition);
}

.simple-list li:hover {
    padding-left: 4px;
}

.simple-list li:last-child {
    border-bottom: none;
}

.simple-list .date {
    flex-shrink: 0;
    color: var(--text-light);
    font-size: 14px;
}

.simple-list a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.simple-list a:hover {
    color: var(--primary-red);
}

/* 学术活动 */
.academic-events .events-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.event-card {
    display: block;
    padding: 22px 18px;
    background: linear-gradient(135deg, #f8fafc 0%, var(--bg-light) 100%);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 15px;
    color: var(--text-dark);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.event-card:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: var(--link-blue);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    border-color: #90caf9;
}

/* 页脚 */
.footer {
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    color: #aaa;
    padding: 40px 0 30px;
}

.footer-logo {
    text-align: center;
    margin-bottom: 24px;
}

.footer-logo strong {
    display: block;
    color: white;
    font-size: 20px;
    margin-bottom: 6px;
}

.footer-logo span {
    font-size: 13px;
    color: #8b9cad;
}

.footer-nav {
    text-align: center;
    margin-bottom: 28px;
}

.footer-nav a {
    color: #9ca8b8;
    margin: 0 18px;
}

.footer-nav a:hover {
    color: white;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 800px;
    margin: 0 auto 28px;
}

.link-group h4 {
    font-size: 15px;
    color: white;
    margin-bottom: 14px;
}

.link-group a {
    display: block;
    color: #9ca8b8;
    font-size: 14px;
    margin-bottom: 10px;
}

.link-group a:hover {
    color: white;
}

.copyright {
    text-align: center;
    font-size: 13px;
    color: #7a8a9a;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.mobile-tip {
    text-align: center;
    font-size: 13px;
    color: #6b7b8c;
    margin-top: 18px;
}

/* ========== 移动端汉堡菜单 ========== */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: var(--primary-red);
    color: white;
    font-size: 24px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-toggle:focus {
    outline: none;
}


/* ========== 响应式 ========== */
@media (max-width: 992px) {
    .container {
        padding: 0 16px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .carousel-inner {
        height: 320px;
    }

    .carousel-caption h3 {
        font-size: 22px;
    }

    .news-columns {
        grid-template-columns: 1fr;
    }

    .news-col:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }

    .section-content {
        grid-template-columns: 1fr;
    }

    .academic-events .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    /* 顶部栏 - 垂直排列 */
    .top-bar .container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 12px 0;
    }

    .top-bar .links a {
        margin-left: 12px;
        margin-right: 12px;
    }

    .top-bar .divider {
        display: none;
    }

    /* 头部 - 汉堡菜单 */
    .nav-toggle {
        display: flex;
    }

    .header-top {
        padding: 14px 12px 16px;
        max-width: 100%;
    }

    .logo-area {
        flex: 1;
        min-width: 0;
        gap: 12px;
    }

    .site-logo {
        width: 48px;
        height: 48px;
    }

    .site-title {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .site-subtitle {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .nav-strip .nav-inner {
        padding: 0;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 0 0 12px;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        text-align: left;
        width: 100%;
        padding: 14px 16px;
        font-size: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .main-nav a:last-child {
        border-bottom: none;
    }

    .ticker-inner {
        flex-direction: column;
    }

    .ticker-label {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }

    .ticker-list {
        flex-direction: column;
        align-items: flex-start;
    }

    /* 轮播 */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .carousel-inner {
        height: 200px;
    }

    .carousel-caption {
        padding: 16px 12px;
    }

    .carousel-caption h3 {
        font-size: 16px;
    }

    .carousel-caption p {
        font-size: 12px;
        display: none;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .carousel-prev {
        left: 8px;
    }

    .carousel-next {
        right: 8px;
    }

    /* 焦点新闻 */
    .news-banner {
        padding: 20px 16px;
    }

    .news-banner h2 {
        font-size: 17px;
        line-height: 1.5;
    }

    .news-banner .news-sub {
        font-size: 13px;
    }

    /* 新闻列表 - 允许换行 */
    .news-list a {
        white-space: normal;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* 区块 */
    .section-block,
    .image-gallery {
        padding: 18px 16px;
        margin-bottom: 20px;
    }

    .section-header h3 {
        font-size: 17px;
    }

    .section-content {
        gap: 18px;
    }

    .highlight-item {
        padding-right: 0;
    }

    .simple-list a {
        white-space: normal;
    }

    /* 学术活动 */
    .academic-events .events-grid {
        grid-template-columns: 1fr;
    }

    .event-card {
        padding: 18px 14px;
        font-size: 14px;
    }

    /* 页脚 */
    .footer {
        padding: 28px 0 20px;
    }

    .footer-nav a {
        margin: 0 10px;
        font-size: 14px;
    }

    .footer-links {
        gap: 24px;
    }

    .main-content {
        padding: 20px 0 36px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .site-title {
        font-size: 18px;
    }

    .carousel-inner {
        height: 160px;
    }

    .carousel-caption h3 {
        font-size: 14px;
    }

    .news-banner h2 {
        font-size: 15px;
    }

    .news-col {
        padding: 16px 12px;
        min-height: auto;
    }

    .tab-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .gallery-grid {
        gap: 12px;
    }

    .gallery-title {
        font-size: 14px;
        padding: 12px;
    }
}
