/* 全局重置与基础 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #222;
    line-height: 1.7;
    transition: background 0.3s, color 0.3s;
}
a {
    color: #1a3a5c;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: #c0392b;
}
img, svg {
    max-width: 100%;
    display: block;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航吸顶 */
.navbar {
    background: #fff;
    border-bottom: 1px solid #e0e6ed;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s, border-color 0.3s;
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a3a5c;
    transition: color 0.3s;
}
.logo svg {
    width: 40px;
    height: 40px;
}
.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}
.nav-links a {
    font-size: 0.95rem;
    padding: 6px 0;
    transition: color 0.2s, transform 0.2s;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #c0392b;
    transition: width 0.3s;
}
.nav-links a:hover::after {
    width: 100%;
}
.nav-links a:hover {
    color: #c0392b;
    transform: translateY(-1px);
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #1a3a5c;
    transition: color 0.3s;
}
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 20px;
        border-bottom: 1px solid #e0e6ed;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transition: all 0.3s;
    }
    .nav-links.open {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 6px;
    align-items: center;
}
.search-box input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 180px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fff;
    color: #222;
}
.search-box input:focus {
    outline: none;
    border-color: #1a3a5c;
    box-shadow: 0 0 0 3px rgba(26,58,92,0.15);
}
.search-box button {
    padding: 8px 16px;
    background: #1a3a5c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}
.search-box button:hover {
    background: #c0392b;
    transform: scale(1.05);
}
.dark-toggle {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 8px;
    color: #1a3a5c;
    transition: color 0.3s, transform 0.3s;
}
.dark-toggle:hover {
    transform: rotate(15deg);
}

/* Banner 轮播 - 渐变背景 */
.banner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a3a5c 0%, #2a5a7c 50%, #1a3a5c 100%);
    color: #fff;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}
.banner-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    padding: 40px;
    text-align: center;
    transform: scale(0.95);
}
.banner-slide.active {
    opacity: 1;
    transform: scale(1);
}
.banner h1 {
    font-size: 2.4rem;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease;
}
.banner p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
    animation: fadeInUp 0.8s ease 0.2s both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}
.banner-dots span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.banner-dots span.active {
    background: #fff;
    transform: scale(1.3);
}
.banner-dots span:hover {
    background: rgba(255,255,255,0.8);
}

/* 通用区块 */
.section {
    padding: 60px 0;
}
.section-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 40px;
    color: #1a3a5c;
    position: relative;
    transition: color 0.3s;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #c0392b, #e67e22);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* 网格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}
.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 24px;
}
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* 卡片 - 毛玻璃效果与圆角 */
.card {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.95);
}
.card h3 {
    margin-bottom: 12px;
    color: #1a3a5c;
    transition: color 0.3s;
}
.card p {
    color: #555;
    transition: color 0.3s;
}
.card svg {
    margin: 0 auto 16px;
    transition: transform 0.3s;
}
.card:hover svg {
    transform: scale(1.1);
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid #e0e6ed;
    padding: 16px 0;
    transition: border-color 0.3s;
}
.faq-question {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
}
.faq-question:hover {
    color: #c0392b;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s;
    color: #444;
    padding-top: 0;
}
.faq-item.open .faq-answer {
    max-height: 600px;
    padding-top: 8px;
}
.faq-toggle {
    font-size: 1.2rem;
    transition: transform 0.3s;
}
.faq-item.open .faq-toggle {
    transform: rotate(45deg);
}

/* HowTo */
.howto-steps {
    counter-reset: step;
}
.howto-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
    transition: transform 0.3s;
}
.howto-step:hover {
    transform: translateX(4px);
}
.howto-step::before {
    counter-increment: step;
    content: counter(step);
    background: linear-gradient(135deg, #1a3a5c, #2a5a7c);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(26,58,92,0.3);
}

/* 文章列表 */
.article-list .article-item {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8ecf0;
    transition: border-color 0.3s, transform 0.3s;
}
.article-item:hover {
    transform: translateX(4px);
}
.article-item .date {
    color: #999;
    font-size: 0.85rem;
}
.article-item h4 {
    margin-bottom: 6px;
    transition: color 0.3s;
}
.article-item:hover h4 {
    color: #c0392b;
}
.article-item p {
    color: #666;
}
.read-more {
    color: #c0392b;
    font-weight: 500;
    transition: color 0.3s, padding-left 0.3s;
}
.read-more:hover {
    color: #1a3a5c;
    padding-left: 4px;
}

/* 面包屑 */
.breadcrumb {
    background: linear-gradient(135deg, #eef1f5, #e4e8ee);
    padding: 12px 20px;
    font-size: 0.9rem;
    transition: background 0.3s;
}
.breadcrumb a {
    color: #1a3a5c;
}
.breadcrumb span {
    color: #888;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #1a3a5c 0%, #0d1b2a 100%);
    color: #ddd;
    padding: 40px 20px 20px;
    transition: background 0.3s;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 30px;
    margin-bottom: 30px;
}
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.footer h4 {
    color: #fff;
    margin-bottom: 16px;
    position: relative;
}
.footer h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: #c0392b;
    margin-top: 6px;
}
.footer a {
    color: #bbb;
    transition: color 0.3s, padding-left 0.3s;
}
.footer a:hover {
    color: #fff;
    padding-left: 4px;
}
.footer ul {
    list-style: none;
}
.footer ul li {
    margin-bottom: 6px;
}
.footer-bottom {
    border-top: 1px solid #2a4a6c;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* 返回顶部 */
.back-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: linear-gradient(135deg, #1a3a5c, #2a5a7c);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(26,58,92,0.3);
}
.back-top.visible {
    opacity: 1;
}
.back-top:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 6px 20px rgba(26,58,92,0.5);
}

/* 数字动画 */
.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: #c0392b;
    transition: color 0.3s;
}

/* 暗黑模式 */
.dark-mode {
    background: #121212;
    color: #e0e0e0;
}
.dark-mode .navbar {
    background: #1e1e1e;
    border-bottom-color: #333;
}
.dark-mode .card {
    background: rgba(30,30,30,0.9);
    backdrop-filter: blur(12px);
    border-color: rgba(255,255,255,0.1);
    color: #ddd;
}
.dark-mode .card p {
    color: #bbb;
}
.dark-mode .card h3 {
    color: #e0e0e0;
}
.dark-mode .footer {
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
}
.dark-mode .breadcrumb {
    background: linear-gradient(135deg, #2a2a2a, #333);
    color: #ccc;
}
.dark-mode .breadcrumb a {
    color: #aaa;
}
.dark-mode .search-box input {
    background: #2a2a2a;
    color: #eee;
    border-color: #444;
}
.dark-mode .search-box input:focus {
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230,126,34,0.2);
}
.dark-mode .nav-links a {
    color: #ccc;
}
.dark-mode .nav-links a::after {
    background: #e67e22;
}
.dark-mode .section-title {
    color: #e0e0e0;
}
.dark-mode .logo {
    color: #e0e0e0;
}
.dark-mode .faq-question {
    color: #ddd;
}
.dark-mode .faq-item {
    border-bottom-color: #333;
}
.dark-mode .article-item {
    border-bottom-color: #333;
}
.dark-mode .article-item p {
    color: #aaa;
}
.dark-mode .article-item h4 {
    color: #ddd;
}
.dark-mode .stat-number {
    color: #e67e22;
}
.dark-mode .banner {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a2a3c 50%, #0d1b2a 100%);
}
.dark-mode .dark-toggle {
    color: #f0c040;
}
.dark-mode .search-box button {
    background: #e67e22;
}
.dark-mode .search-box button:hover {
    background: #c0392b;
}
.dark-mode .menu-toggle {
    color: #e0e0e0;
}
.dark-mode .banner-dots span {
    background: rgba(255,255,255,0.2);
}
.dark-mode .banner-dots span.active {
    background: #e67e22;
}
.dark-mode .back-top {
    background: linear-gradient(135deg, #e67e22, #c0392b);
}
.dark-mode .howto-step::before {
    background: linear-gradient(135deg, #e67e22, #c0392b);
}
.dark-mode .read-more {
    color: #e67e22;
}
.dark-mode .read-more:hover {
    color: #f0c040;
}

/* 滚动动画 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式微调 */
@media (max-width: 480px) {
    .banner {
        height: 300px;
    }
    .banner h1 {
        font-size: 1.6rem;
    }
    .banner p {
        font-size: 0.95rem;
    }
    .section-title {
        font-size: 1.4rem;
    }
    .search-box input {
        width: 120px;
    }
    .navbar-inner {
        flex-wrap: wrap;
    }
}