/* ====================== CSS变量定义 ====================== */
:root {
    --primary: #2563eb;
    --muted: #6b7280;
    --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ====================== 全局重置 ====================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background: #f9fafb;
    color: #1f2937;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.22s ease; /* 全局链接颜色过渡 */
}

    a:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

.container {
    width: 100%;
    padding-inline: 0.75rem;
    margin: 0 auto;
}

/* ====================== 顶部导航 site-head ====================== */
.site-head {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    position: relative;
    margin: 0 auto;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

    .brand small {
        font-family: var(--sans);
        font-size: .7rem;
        color: var(--muted);
        font-weight: 400;
        margin-left: 6px;
        letter-spacing: 0;
    }

.nav-links {
    display: flex;
    gap: 1.5rem;
    font-size: 1rem;
}

    .nav-links a:nth-child(1):hover {
        color: #16a34a;
    }

    .nav-links a:nth-child(2):hover {
        color: #dc2626;
    }

    .nav-links a:nth-child(3):hover {
        color: #d97706;
    }

    .nav-links a:nth-child(4):hover {
        color: #4b5563;
    }

    .nav-links a:nth-child(5):hover {
        color: #0284c7;
    }

    .nav-links a:nth-child(6):hover {
        color: var(--primary);
    }

    /* 当前页面高亮 */
    .nav-links a.active {
        color: var(--primary);
        font-weight: 600;
        border-bottom: 2px solid var(--primary);
        padding-bottom: 0.25rem;
    }

.menu-btn {
    display: none;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

    .menu-btn:hover {
        background-color: #f3f4f6;
    }

/* ====================== 移动端汉堡菜单 ====================== */
@media (max-width:768px) {
    .menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
        display: none;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

        .nav-links.active {
            display: flex;
            opacity: 1;
            transform: translateY(0);
        }
}

/* ====================== 面包屑 crumbs ====================== */
.crumbs {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 2rem 0 1.5rem;
}

    .crumbs a:hover {
        color: var(--primary);
    }

/* ====================== 顶部Banner ====================== */
.banner {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    border-radius: 1.5rem;
    padding: 2rem;
    color: #fff;
    margin-bottom: 2.5rem;
}

    .banner h1 {
        font-size: clamp(2rem,4vw,3rem);
        font-weight: 700;
        margin-bottom: 0.75rem;
    }

    .banner p {
        color: rgba(255,255,255,0.9);
        font-size: 1.125rem;
        max-width: 64rem;
    }

/* ====================== 页脚 site-foot ====================== */
.site-foot {
    background: #1f2937;
    color: #fff;
    width: 100%;
    padding: 2.5rem 0;
    margin-top: 4rem;
}

.foot-links {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

    .foot-links a {
        padding: 0.5rem 0; /* 扩大点击区域 */
    }

@media (min-width:768px) {
    .foot-links {
        grid-template-columns: repeat(5,1fr);
    }
}

/* 页脚链接基础色 + hover白色（解决优先级问题） */
.foot-links a:nth-child(1) {
    color: #16a34a;
}

.foot-links a:nth-child(2) {
    color: #dc2626;
}

.foot-links a:nth-child(3) {
    color: #d97706;
}

.foot-links a:nth-child(4) {
    color: #4b5563;
}

.foot-links a:nth-child(5) {
    color: #0284c7;
}

    .foot-links a:hover {
        color: #ffffff !important;
    }


.copyright {
    border-top: 1px solid var(--primary);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
}
