* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root {
    --primary-blue: #0A2463;
    --accent-red: #E63946;
    --accent-teal: #2A9D8F;
    --accent-yellow: #E9C46A;
    --accent-blue: #264653;
    --tab-life: #2A6F66;
    --tab-health: #2554B7;
    --tab-sustain: #D4E157;
    --text-dark: #000000;
    --text-light: #FFFFFF;
    --bg-light: #FFFFFF;
    --bg-dark: #000000;
    --transition: all 0.35s cubic-bezier(0.32, 0.01, 0.15, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== 导航栏 ========== */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: var(--bg-light);
    border-bottom: 5px solid var(--primary-blue);
    z-index: 999;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    /* 1. 设置背景图（替换为你的图片路径） */
    background: url("../img/LOGO.png") no-repeat center / contain;
    /* 2. 隐藏原文字 */
    text-indent: -9999px;
    /* 3. 必须设置宽高（根据你的logo尺寸调整，示例宽100px高40px） */
    width: 130px;
    height: 45px;
    /* 若原样式有字体样式，需清空 */
    font-size: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
}

.nav-menu a {
    font-size: 16px;
    font-weight: 500;
    position: relative;
}

.nav-menu a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-icons {
    display: flex;
    gap: 24px;
    align-items: center;
    font-size: 22px;
    cursor: pointer;
}

/* ========== Hero 区域 ========== */
.hero {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    background: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80') center/cover;
    background-blend-mode: darken;
}

.hero::after {
    content: '';
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 40%;
    height: 80%;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg"><path d="M350 380 Q300 300 380 150" stroke="%23E9C46A" stroke-width="8" fill="none"/><path d="M370 360 Q320 280 390 100" stroke="%23264653" stroke-width="8" fill="none"/><path d="M390 340 Q340 260 370 80" stroke="%23E63946" stroke-width="8" fill="none"/><circle cx="380" cy="70" r="8" fill="%23264653"/><circle cx="395" cy="120" r="10" fill="%232A9D8F"/><circle cx="400" cy="180" r="12" fill="%23E63946"/><circle cx="370" cy="30" r="8" fill="%23E9C46A"/></svg>') no-repeat right center;
    background-size: contain;
    opacity: 0.9;
    transition: var(--transition);
}

.hero-content {
    max-width: 600px;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s 0.2s forwards;
}

.hero h1 {
    font-size: 38px;
    line-height: 1.3;
    margin-bottom: 24px;
    font-weight: 600;
}

/* ========== 期刊介绍区域 ========== */
.journals-intro {
    padding: 56px 24px;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s 0.4s forwards;
}

.journals-intro h2 {
    font-size: 32px;
    color: var(--primary-blue);
    margin-bottom: 24px;
    font-weight: 700;
}

.journals-intro p {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 32px;
}

.journals-tabs {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.tab-btn {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-blue);
    background: none;
    border: none;
    padding: 8px 0;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-btn::after {
    content: "";
    position: absolute;
    bottom: -13px;
    left: 0;
    width: 100%;
    height: 8px;
    transition: var(--transition);
}

.tab-life::after {
    background: var(--tab-life);
}

.tab-health::after {
    background: var(--tab-health);
}

.tab-sustain::after {
    background: var(--tab-sustain);
}

.tab-btn.active-tab {
    transform: translateY(-2px);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

/* ========== 期刊网格 ========== */
.journals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    margin-bottom: 48px;
    max-width: 900px;
    /* 可选：给左右加内边距，适配移动端 */
    padding: 0 20px;
}

.journal-card {
    transition: var(--transition);
    opacity: 0;
    display: none;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    overflow: hidden !important; /* 关键：解决卡顿 */
    will-change: transform, opacity; /* 告诉浏览器提前优化 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    /* 不要用大阴影：0 10px 30px rgba(0,0,0,0.2) 这种必卡！ */
}

.journal-card.visible {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.journal-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-6px) translateZ(0);
}

.journal-img {
    width:100%;
    height:380px;
    border-radius: 4px 4px 0 0;
    margin: auto auto;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    /* 图片加载失败时显示浅灰底色 */
    background-color: #f1f1f1 !important;
}

.journal-img::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 16px;
}

/* 生命科学期刊底部色条 */
.life-1::after { background: var(--primary-blue); }
/*.life-2::after { background: #3A6EA5; }*/
/*.life-3::after { background: #4A90E2; }*/

/* 健康科学期刊底部色条 */
.health-4::after { background: #C0392B; }
.health-5::after { background: #7B4397; }
/*.health-6::after { background: #9B59B6; }*/

/* 可持续发展科学期刊底部色条 */
.sustain-7::after { background: #9B59B6; }
.sustain-8::after { background: #8F9779; }
/*.sustain-9::after { background: var(--primary-blue); }*/

.journal-card h3 {
    font-size: 22px;
    color: var(--primary-blue);
    margin-bottom: 16px;
    text-decoration: underline;
    text-underline-offset: 6px;
    text-align: center;
    margin-top: 10px;
}

.journal-card p {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    padding-left: 15px;
    padding-right: 15px;
}

/* ========== 页脚 ========== */
.footer {
    background: var(--primary-blue);
    color: var(--text-light);
    padding: 60px 24px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 36px;
}

.footer-logo {
    /* 1. 设置背景图（替换为你的图片路径） */
    background: url("../img/BottomLogo.png") no-repeat center / contain;
    /* 2. 隐藏原文字 */
    text-indent: -9999px;
    /* 3. 必须设置宽高（根据你的logo尺寸调整，示例宽100px高40px） */
    width: 300px;
    height: 120px;
    /* 若原样式有字体样式，需清空 */
    font-size: 0;
    margin-bottom: 40px;
    margin-right: 40px;
}

.footer-social {
    display: flex;
    gap: 16px;
    font-size: 24px;
    margin-bottom: 22px;
}

.footer-info {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
    margin-left: 35px;
}

.footer-column h4 {
    font-size: 18px;
    margin-bottom: 18px;
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
    font-size: 15px;
    opacity: 0.9;
    transition: var(--transition);
}

.footer-column li:hover {
    padding-left: 4px;
    opacity: 1;
}

.footer-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-form input {
    padding: 13px;
    font-size: 15px;
    border: none;
    border-radius: 4px;
    outline: none;
}

.footer-form .btn {
    background: var(--text-light);
    color: var(--primary-blue);
    align-self: flex-start;
    border: none;
    cursor: pointer;
    padding: 13px 38px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    transition: var(--transition);
}

.footer-form .btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* ========== 返回顶部 ========== */
.back-to-top {
    position: fixed;
    bottom: 36px;
    right: 36px;
    width: 52px;
    height: 52px;
    background: var(--primary-blue);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* 侧边栏链接样式重置，完美还原原设计 */
.side-nav-menu ul li a {
    /* 核心：去掉默认下划线，继承原li的所有样式 */
    text-decoration: none;
    /* 继承父元素li的文字颜色，避免链接变蓝 */
    color: inherit;
    /* 继承父元素的字体、行高，避免间距错乱 */
    font: inherit;
    /* 让a标签占满整个li的点击区域，点击更友好 */
    display: block;
    /* 保持原有的内边距，和li完全对齐 */
    padding: inherit;
}

/* 可选：hover效果（和原设计风格统一，不影响整齐度） */
.side-nav-menu ul li a:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
/* ========== 动画 ========== */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero::after {
        display: none;
    }

    .journals-tabs {
        flex-direction: column;
        gap: 16px;
    }

    .journals-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}