/* 布局样式：导航栏、页脚、移动端菜单、各section外层容器布局 */

/* ========== 顶部导航 ========== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 68px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--gray-100);
    z-index: 100;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
}
.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 18px; font-weight: 800;
}
.logo-img {
    height: 40px;
    width: auto;
    display: block;
}
.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
    gap: 2px;
}
.logo-main {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: 0.5px;
}
.logo-sub {
    font-size: 9px;
    color: var(--gray-400);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-weight: 500;
}
.nav-menu {
    display: flex;
    gap: 26px;
    list-style: none;
    align-items: center;
}
.nav-menu a {
    text-decoration: none;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
}
.nav-menu a:hover { color: var(--primary); }
.nav-menu a.active { color: var(--primary); font-weight: 600; }
.nav-menu > li:first-child { margin-right: 10px; }
.nav-menu a.highlight {
    color: var(--secondary);
    font-weight: 600;
    position: relative;
}
.nav-menu a.highlight::after {
    content: 'GEO';
    position: absolute;
    top: -6px;
    right: -28px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.nav-menu a .nav-geo-badge {
    display: inline-block;
    margin-left: 6px;
    background: linear-gradient(135deg, var(--secondary), #22c55e);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    vertical-align: 1px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(16,185,129,.35);
}
.nav-actions { display: flex; gap: 8px; align-items: center; margin-left: 24px; }
.nav-actions .btn { white-space: nowrap; flex-shrink: 0; }

/* 下拉菜单 - 仅桌面端 */
@media (min-width: 961px) {
    .nav-menu { margin-left: auto; }
    .nav-menu .has-dropdown { position: relative; }
    .nav-menu .dropdown-arrow {
        width: 14px;
        height: 14px;
        margin-left: 4px;
        transition: transform 0.2s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        vertical-align: middle;
        color: var(--gray-400);
    }
    .nav-menu .dropdown-arrow svg {
        width: 12px;
        height: 12px;
        stroke: currentColor;
        stroke-width: 2.2;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .nav-menu .has-dropdown:hover .dropdown-arrow {
        transform: rotate(180deg);
        color: var(--primary);
    }
    .nav-menu .dropdown {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(8px);
        min-width: 220px;
        background: white;
        border-radius: 12px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
        list-style: none;
        padding: 10px;
        opacity: 0;
        visibility: hidden;
        transition: all 0.25s ease;
        z-index: 100;
        border: 1px solid var(--gray-100);
    }
    .nav-menu .has-dropdown:hover .dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
    .nav-menu .dropdown li { width: 100%; }
    .nav-menu .dropdown a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        font-size: 14px;
        color: var(--gray-700);
        font-weight: 400;
        white-space: nowrap;
        transition: all 0.2s ease;
        border-radius: 8px;
        text-decoration: none;
    }
    .nav-menu .dropdown a:hover {
        color: var(--primary);
        background: linear-gradient(135deg, var(--primary-light), rgba(99, 102, 241, 0.05));
        transform: translateX(4px);
    }
    .nav-menu .dropdown-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: all 0.2s ease;
        color: var(--primary);
    }
    .nav-menu .dropdown-icon svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        stroke-width: 1.8;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .nav-menu .dropdown a:hover .dropdown-icon {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
        transform: scale(1.08);
    }
    .nav-menu .dropdown-text {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    .nav-menu .dropdown-text span:first-child {
        font-size: 14px;
        font-weight: 500;
        color: var(--gray-800);
    }
    .nav-menu .dropdown-text span:last-child {
        font-size: 11px;
        color: var(--gray-400);
        font-weight: 400;
    }
    .nav-menu .dropdown a:hover .dropdown-text span:first-child {
        color: var(--primary);
    }
}

/* ========== 各 Section 外层容器布局 ========== */
.hero {
    padding: 140px 24px 90px;
    background: linear-gradient(180deg, #eef2ff 0%, var(--primary-lighter) 50%, white 100%);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 5%; right: -8%;
    width: 550px; height: 550px;
    background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 60%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 5%; left: -5%;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(14,165,233,0.06) 0%, transparent 60%);
    border-radius: 50%;
}
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.trust-bar {
    padding: 40px 24px;
    background: white;
    border-bottom: 1px solid var(--gray-100);
}
.trust-container { max-width: 1200px; margin: 0 auto; text-align: center; }

.section { padding: 80px 24px; }
.section-container { max-width: 1200px; margin: 0 auto; }

.geo-section {
    background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%);
}
.geo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.geo-visual { position: relative; }

.process-section { background: var(--gray-50); }

.templates-section { background: white; }

.why-section { background: var(--gray-50); }
.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.why-visual { position: relative; }

.cta-section {
    padding: 80px 24px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%; left: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    border-radius: 50%;
}
.cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%; right: -5%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    border-radius: 50%;
}

/* ========== 底部 ========== */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 60px 24px 30px;
}
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-grid {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 80px;
    margin-bottom: 40px;
}
.footer-brand {
    flex: 0 0 360px;
    min-width: 0;
}
.footer-cols {
    flex: 0 0 auto;
    width: 700px;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    min-width: 0;
}
.footer-brand .logo { color: white; margin-bottom: 14px; }
.footer-brand .logo-img {
    height: 44px;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}
.footer-brand .logo-main {
    color: white;
    font-size: 18px;
}
.footer-brand .logo-sub {
    color: rgba(255,255,255,0.5);
}
.footer-brand p {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 16px;
}
.footer-contact { font-size: 13px; }
.footer-contact div { margin-bottom: 6px; }
.footer-qr {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    padding: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
}
.footer-qr-box {
    flex-shrink: 0;
    padding: 5px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.footer-qr-img {
    display: block;
    width: 84px;
    height: 84px;
    border-radius: 4px;
}
.footer-qr-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.footer-qr-info strong { color: #fff; font-size: 14px; font-weight: 600; }
.footer-qr-info span { color: var(--gray-400); font-size: 12px; line-height: 1.6; }
.footer-col h5 {
    color: white; font-size: 14px; font-weight: 600; margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 10px;
}
/* 底部法律声明等链接 */
.footer-legal-links {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.footer-legal-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-legal-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}
/* 版权行内的备案号链接，与法律声明/隐私政策链接一致 */
.footer-bottom a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-bottom a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* 移动端汉堡菜单按钮 */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
}
.mobile-menu-btn:hover { background: var(--gray-50); }
.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 移动端菜单遮罩 */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 98;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ========== 语言切换提示（2026-11-24） ========== */
.lang-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100vw - 40px);
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.lang-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
.lang-toast-spin {
    display: none;
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lang-toast-spin 0.8s linear infinite;
}
.lang-toast.spinning .lang-toast-spin {
    display: inline-block;
}
@keyframes lang-toast-spin {
    to { transform: rotate(360deg); }
}
.nav-lang-btn.loading {
    opacity: 0.65;
    pointer-events: none;
}
.mobile-lang-opts button:disabled {
    opacity: 0.5;
}
html.lang-switching,
html.lang-switching body {
    cursor: progress;
}

/* ========== 英文导航适配（2026-11-24） ========== */
/* 英文标签较长：隐藏与文案重复的 SEO 徽标，收紧间距，避免挤压 */
html[data-translate-lang="english"] .nav-menu a .nav-geo-badge {
    display: none;
}
@media (min-width: 961px) {
    html[data-translate-lang="english"] .nav-menu {
        gap: 16px;
    }
    /* 英文下 GEO 徽标改为跟随文字的行内徽标，避免绝对定位压到下一项 */
    html[data-translate-lang="english"] .nav-menu a.highlight::after {
        position: static;
        display: inline-block;
        margin-left: 6px;
        vertical-align: 1px;
    }
}
@media (min-width: 961px) and (max-width: 1180px) {
    html[data-translate-lang="english"] .nav-menu { gap: 12px; }
    html[data-translate-lang="english"] .nav-menu a { font-size: 12.5px; }
}
@media (min-width: 961px) and (max-width: 1040px) {
    /* 窄桌面：中英文都略收字号与间距，保证登录按钮完整可见 */
    .nav-menu { gap: 12px; }
    .nav-menu a { font-size: 13px; }
    html[data-translate-lang="english"] .nav-menu { gap: 8px; }
    html[data-translate-lang="english"] .nav-menu a { font-size: 11.5px; }
}
