/* ============================================================
   文件名：common.css
   说明：全站公共样式（变量、重置、排版、按钮、导航、页脚、响应式基础）
   适用范围：所有页面
   ============================================================ */

/* -------------------- 1. CSS Variables -------------------- */
:root {
    /* 品牌色 */
    --orange: #e86f1c;
    --orange-dark: #c95f16;
    --orange-light: #f59a4c;
    --orange-bg: rgba(232, 111, 28, 0.08);
    --blue: #2b7fc4;
    --blue-light: #5ba0d9;

    /* 灰度 */
    --gray-900: #0f0c0a;
    --gray-800: #1a1614;
    --gray-700: #2d2824;
    --gray-600: #4d4640;
    --gray-500: #7a726a;
    --gray-400: #a8a09a;
    --gray-300: #d0cbc6;
    --gray-200: #e8e5e1;
    --gray-100: #f7f6f4;
    --white: #ffffff;

    /* 阴影 */
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* 字体 */
    --font-cn: 'Source Han Sans SC', 'Microsoft YaHei', '微软雅黑', 'PingFang SC', sans-serif;
    --font-en: Arial, 'Helvetica Neue', Helvetica, sans-serif;

    /* 过渡 */
    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* -------------------- 2. Reset & Base -------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-cn);
    color: var(--gray-700);
    background: var(--gray-100);
    line-height: 1.7;
    font-size: 16px;
}

/* 工具类 */
.en {
    font-family: var(--font-en);
}
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}
.text-center {
    text-align: center;
}

/* -------------------- 3. 排版 -------------------- */
.section-title {
    font-size: clamp(1.8rem, 3.6vw, 3rem);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.15;
    letter-spacing: -0.01em;
    font-family: var(--font-cn);
}
.section-sub {
    font-size: 1.05rem;
    color: var(--gray-500);
    max-width: 560px;
    margin-top: 10px;
    font-weight: 400;
}
.text-center .section-sub {
    margin-left: auto;
    margin-right: auto;
}

/* -------------------- 4. 按钮 -------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 34px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-cn);
    border-radius: 60px;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    line-height: 1.4;
}
.btn-primary {
    background: var(--orange);
    color: var(--white);
    box-shadow: 0 6px 24px rgba(232, 111, 28, 0.28);
}
.btn-primary:hover {
    background: var(--orange-dark);
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(232, 111, 28, 0.35);
}
.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255, 255, 255, 0.30);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--orange);
    transform: translateY(-3px);
}

/* -------------------- 5. 头部导航 -------------------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 25px 0;
    background: rgba(15, 12, 10, 0.60);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition);
}
header.scrolled {
    background: rgba(15, 12, 10, 0.80);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.30);
    padding: 10px 0;
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
    font-weight: 700;
    font-size: 1.2rem;
    font-family: var(--font-cn);
    letter-spacing: -0.3px;
    flex-shrink: 0;
}
.logo img {
    height: 38px;
    width: auto;
    display: block;
}

/* 导航列表 */
.nav-links .nav-list {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links .nav-list > li {
    position: relative;
    padding: 4px 0;
}
.nav-links .nav-list > li > a {
    color: rgba(255, 255, 255, 0.60);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-cn);
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    position: relative;
    display: inline-block;
}
.nav-links .nav-list > li > a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--orange);
    transition: var(--transition);
}
.nav-links .nav-list > li > a:hover {
    color: var(--white);
}
.nav-links .nav-list > li > a:hover::after {
    width: 100%;
}
.nav-links .nav-list > li > a .nav-indicator {
    color: var(--orange);
    margin-right: 4px;
    font-family: var(--font-en);
}

/* 二级下拉菜单（PC端悬停展开） */
.nav-links .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    padding: 10px 0;
    list-style: none;
    background: rgba(15, 12, 10, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.5s;
    pointer-events: none;
    z-index: 999;
}
.nav-links .nav-list > li:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.nav-links .submenu li a {
    display: block;
    padding: 8px 20px;
    color: rgba(255, 255, 255, 0.70);
    font-size: 0.9rem;
    font-weight: 400;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.nav-links .submenu li:last-child a {
    border-bottom: none;
}
.nav-links .submenu li a:hover {
    background: rgba(232, 111, 28, 0.12);
    color: var(--white);
}

/* 有子菜单的父级箭头 */
.nav-links .has-submenu > a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.6rem;
    margin-left: 6px;
    opacity: 0.5;
    transition: transform 0.3s;
}
.nav-links .has-submenu:hover > a::after {
    transform: rotate(180deg);
    opacity: 1;
}

/* 语言切换 */
.lang-switch {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 60px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.lang-switch a {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 60px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-en);
    color: rgba(255, 255, 255, 0.40);
    text-decoration: none;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: none !important;
}
.lang-switch a::after {
    display: none !important;
}
.lang-switch a.active {
    background: var(--orange);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(232, 111, 28, 0.25);
}
.lang-switch a:hover:not(.active) {
    color: rgba(255, 255, 255, 0.80);
}

/* 移动端汉堡按钮（默认隐藏） */
.menu-toggle {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

/* -------------------- 6. 页脚 -------------------- */
.yunu-footer {
    background: #222;
    color: #999;
    padding: 25px 0 20px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #333;
}
.yunu-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.yunu-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    font-size: 13px;
    font-family: var(--font-cn);
}
.yunu-footer .footer-links a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}
.yunu-footer .footer-links a:hover {
    color: #fff;
}
.yunu-footer .footer-links .sep {
    color: #444;
    font-family: var(--font-en);
}
.yunu-footer .copyright {
    color: #777;
    font-size: 13px;
    line-height: 1.8;
    font-family: var(--font-cn);
}

/* -------------------- 7. 响应式基础（移动端导航） -------------------- */
@media (max-width: 700px) {
    .container {
        padding: 0 20px;
    }

    /* 汉堡按钮 */
    .menu-toggle {
        display: block;
    }
    header .container {
        flex-wrap: wrap;
    }
    .nav-links {
        display: none;
        width: 100%;
    }
    .nav-links.open {
        display: block;
    }

    /* 导航列表垂直排列 */
    .nav-links .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 2px;
        padding: 12px 0;
        background: rgba(15, 12, 10, 0.98);
        border-radius: var(--radius-md);
        align-items: stretch;
        margin-top: 10px;
    }

    .nav-links .nav-list > li {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        position: relative;
    }
    .nav-links .nav-list > li:last-child {
        border-bottom: none;
    }

    /* 一级菜单链接 */
    .nav-links .nav-list > li > a {
        display: block;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px;
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.80);
        text-decoration: none;
        border-bottom: none !important;
        transition: background 0.2s;
    }
    .nav-links .nav-list > li > a:hover {
        background: rgba(255, 255, 255, 0.04);
    }
    .nav-links .nav-list > li > a::after {
        display: none !important;
    }

    /* 父级箭头（下拉指示器） */
    .nav-links .sub-arrow {
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.30);
        transition: transform 0.3s ease;
        margin-left: 8px;
        flex-shrink: 0;
    }
    .nav-links .has-submenu.open > a .sub-arrow {
        transform: rotate(180deg);
        color: var(--orange);
    }

    /* ===== 二级菜单 — 可展开/收起 ===== */
    .nav-links .submenu {
        display: block !important;        /* 改为 block，配合 max-height 控制展开/收起 */
        position: static !important;
        background: rgba(255, 255, 255, 0.03);
        backdrop-filter: none;
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0 !important;
        margin: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), padding 0.3s ease;
        width: 100%;
    }

    /* 展开状态 */
    .nav-links .has-submenu.open .submenu {
        max-height: 500px;
        padding: 8px 0 12px 20px !important;
    }

    /* 二级菜单项 */
    .nav-links .submenu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }
    .nav-links .submenu li:last-child {
        border-bottom: none;
    }
    .nav-links .submenu li a {
        display: block;
        padding: 10px 16px;
        font-size: 0.92rem;
        color: rgba(255, 255, 255, 0.55);
        text-decoration: none;
        transition: background 0.2s, color 0.2s;
        border-left: 2px solid transparent;
    }
    .nav-links .submenu li a:hover {
        background: rgba(232, 111, 28, 0.06);
        color: rgba(255, 255, 255, 0.85);
        border-left-color: var(--orange);
    }

    /* 语言切换 */
    .nav-links .lang-item {
        padding: 0 20px;
        margin-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.04);
        padding-top: 12px;
    }
    .nav-links .lang-item .lang-switch {
        width: 100%;
        justify-content: center;
    }

    /* 移除PC端父级箭头（用上面的 .sub-arrow 替代） */
    .nav-links .has-submenu > a::after {
        display: none !important;
    }
}