/* 响应式样式：所有 max-width 媒体查询 */

/* 仅在移动端生效的标题换行点 */
.mobile-br { display: none; }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .nav-container { max-width: 100%; padding: 0 16px; }
    .nav-menu { gap: 12px; margin-left: 20px; margin-right: 12px; }
    .nav-actions { padding-left: 12px; }
    .hero-container { max-width: 100%; padding: 0 20px; }
    .section-container { max-width: 100%; padding: 0 20px; }
    .trust-container { max-width: 100%; padding: 0 20px; }
    .footer-container { max-width: 100%; padding: 0 20px; }
}

/* 961-1000 窄桌面：再收一档，避免登录按钮被截断 */
@media (min-width: 961px) and (max-width: 1000px) {
    .nav-menu { gap: 8px; }
    .nav-menu > li > a { font-size: 12px; }
}

@media (max-width: 960px) {
    .navbar {
        height: 60px;
        background: #fff;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .mobile-br { display: inline; }
    .nav-menu { display: none; }
    .nav-actions { display: none; }
    .mobile-menu-btn { display: flex; margin-left: auto; }

    /* 移动端导航菜单 */
    .nav-menu.mobile-open {
        display: flex;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        margin: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 0;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        z-index: 100;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .nav-menu.mobile-open.active {
        transform: translateY(0);
        opacity: 1;
    }
    .nav-menu.mobile-open > li {
        width: 100%;
        border-bottom: 1px solid var(--gray-100);
    }
    .nav-menu.mobile-open > li:last-child { border-bottom: none; }
    .nav-menu.mobile-open a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 20px;
        font-size: 15px;
    }
    .nav-menu.mobile-open > li:first-child { margin-right: 0; }
    .nav-menu.mobile-open a.highlight {
        color: var(--secondary);
        font-weight: 600;
        position: relative;
        display: flex;
        width: 100%;
        box-sizing: border-box;
        align-items: center;
        padding-right: 42px;
    }
    .nav-menu.mobile-open a.highlight::after {
        content: 'GEO';
        position: absolute;
        top: 8px;
        right: 15px;
        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.mobile-open .dropdown-arrow {
        width: 20px;
        height: 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--gray-400);
        transition: transform 0.2s ease, color 0.2s ease;
        flex-shrink: 0;
    }
    .nav-menu.mobile-open .dropdown-arrow svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
        stroke-width: 2.2;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* 移动端下拉菜单 */
    .nav-menu.mobile-open .has-dropdown .dropdown {
        list-style: none;
        background: var(--gray-50);
        width: 100%;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .nav-menu.mobile-open .has-dropdown.open .dropdown {
        max-height: 500px;
        padding: 4px 0 10px;
    }
    .nav-menu.mobile-open .has-dropdown .dropdown-arrow {
        transition: transform 0.3s ease, color 0.3s ease;
    }
    .nav-menu.mobile-open .has-dropdown.open .dropdown-arrow {
        transform: rotate(180deg);
        color: var(--primary);
    }
    .nav-menu.mobile-open .dropdown li {
        width: 100%;
    }
    .nav-menu.mobile-open .dropdown a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 20px 12px 56px;
        font-size: 14px;
        color: var(--gray-700);
        font-weight: 400;
        text-decoration: none;
        transition: all 0.2s ease;
        border-left: 3px solid transparent;
    }
    .nav-menu.mobile-open .dropdown a:active {
        color: var(--primary);
        background: rgba(59, 130, 246, 0.06);
        border-left-color: var(--primary);
    }
    .nav-menu.mobile-open .dropdown-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        color: var(--primary);
        transition: all 0.2s ease;
    }
    .nav-menu.mobile-open .dropdown a:active .dropdown-icon {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
    }
    .nav-menu.mobile-open .dropdown-icon svg {
        width: 17px;
        height: 17px;
        stroke: currentColor;
        stroke-width: 1.8;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .nav-menu.mobile-open .dropdown-text {
        display: flex;
        flex-direction: column;
        gap: 3px;
        flex: 1;
    }
    .nav-menu.mobile-open .dropdown-text span:first-child {
        font-size: 14px;
        font-weight: 500;
        color: var(--gray-800);
        line-height: 1.3;
    }
    .nav-menu.mobile-open .dropdown-text span:last-child {
        font-size: 12px;
        color: var(--gray-400);
        line-height: 1.3;
    }
    .nav-menu.mobile-open .dropdown a:active .dropdown-text span:first-child {
        color: var(--primary);
    }

    .mobile-menu-overlay { display: block; }

    .hero { padding: 100px 20px 60px; }
    .hero-container { grid-template-columns: 1fr; gap: 32px; text-align: center; }
    .hero h1 { font-size: 28px; }
    /* 高亮短语整体换行，避免最后一两个字单独掉行 */
    h1 .highlight { display: inline-block; }
    .hero-subtitle { font-size: 15px; margin: 0 auto 24px; }
    .hero-subtitle strong { display: inline-block; }
    .hero-value-props { justify-content: center; }
    .hero-cta { justify-content: center; flex-wrap: wrap; }

    .trust-bar { padding: 32px 20px; }
    .trust-stats { gap: 24px; }
    .trust-stat .num { font-size: 22px; }
    .trust-stat .label { font-size: 12px; }
    .trust-partners-logos { gap: 24px; }

    .section { padding: 56px 20px; }
    .section-title { font-size: 24px; }
    .section-desc { font-size: 14px; }

    .geo-grid { grid-template-columns: 1fr; gap: 32px; }
    .geo-content h2 { font-size: 22px; text-align: center; }
    .geo-content > p { text-align: center; font-size: 14px; }
    .geo-features { grid-template-columns: 1fr; }

    .advantages-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .adv-card { padding: 24px 20px; }
    .adv-icon { width: 48px; height: 48px; font-size: 22px; margin-bottom: 14px; }
    .adv-card h3 { font-size: 16px; }
    .adv-card p { font-size: 13px; }

    .process-steps { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .process-step { padding: 20px 16px; }
    .step-number { width: 32px; height: 32px; font-size: 14px; margin-bottom: 10px; }
    .process-step h4 { font-size: 14px; }
    .process-step p { font-size: 11px; }

    .templates-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .template-info { padding: 12px; }
    .template-info h4 { font-size: 13px; }

    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .product-card { padding: 20px 18px; }
    .product-card h3 { font-size: 15px; }
    .product-price { font-size: 18px; }

    .why-grid { grid-template-columns: 1fr; gap: 24px; }
    .why-left { padding: 24px; }
    .why-right { padding: 24px; }

    .cta-section { padding: 48px 20px; }
    .cta-section h2 { font-size: 22px; }
    .cta-section p { font-size: 14px; }
    .cta-buttons { flex-direction: column; align-items: stretch; }
    .cta-buttons .btn { width: 100%; justify-content: center; }

    .footer { padding: 48px 20px 24px; }
    .footer-grid { flex-direction: column; gap: 40px; }
    .footer-brand { flex: 0 0 auto; }
    .footer-cols { width: 100%; grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}

@media (max-width: 600px) {
    .hero { padding: 90px 16px 50px; }
    .hero h1 { font-size: 24px; }
    .hero-subtitle { font-size: 14px; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { width: 100%; justify-content: center; }

    .trust-stats { gap: 16px; }
    .trust-stat .num { font-size: 20px; }
    .trust-stat .label { font-size: 11px; }

    .section { padding: 48px 16px; }
    .section-title { font-size: 22px; }

    .advantages-grid { grid-template-columns: 1fr; }
    .process-steps { grid-template-columns: repeat(2, 1fr); }
    .templates-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: 1fr; }
    .footer-grid { flex-direction: column; }
    /* 手机上页脚导航保持两列，避免一行一条拉得过长 */
    .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 22px 16px; }

    .geo-compare-body { grid-template-columns: 1fr; }
    .geo-features { grid-template-columns: 1fr; }

    .partner-logo { font-size: 13px; }
}

@media (max-width: 400px) {
    .process-steps { grid-template-columns: 1fr; }
    .hero h1 { font-size: 22px; }
    .section-title { font-size: 20px; }
    .cta-section h2 { font-size: 20px; }
}

/* ========== 移动端可读性与触控优化（2026-11-03） ========== */
@media (max-width: 768px) {
    /* 辅助文字不低于 12px，避免手机上过小难读 */
    .label,
    .check,
    .gift,
    .tpl-card-type,
    .tpl-card-badge,
    .tab-meta,
    .plan-tag,
    .bw-url,
    .tag,
    .ft-cta,
    small {
        font-size: 12px;
    }

    /* 触控目标：按钮/标签/分页高度不低于 40px */
    .line-tab,
    .cc-chip {
        min-height: 40px;
    }
    .help-pager-btn {
        min-width: 40px;
        height: 40px;
    }
    .pw-toggle {
        width: 40px;
        height: 40px;
        right: 4px;
    }
    .adv-link,
    .card-link {
        padding: 8px 0;
    }
    .cc-range {
        height: 32px;
    }

    /* 页脚链接增大触控区，避免手机上点不中 */
    .footer-col a {
        display: inline-block;
        padding: 6px 0;
        min-height: 32px;
        line-height: 18px;
    }
    .footer-col li { margin-bottom: 4px; }
    .footer-legal-links a { padding: 6px 0; }

    /* 防止网格/弹性子项被内容顶宽（中文长标题、标签组常见） */
    .hero-container > *,
    .section-container > *,
    .footer-grid > * {
        min-width: 0;
    }

    /* 图片/内嵌内容不撑破容器 */
    img,
    video,
    iframe {
        max-width: 100%;
    }

    /* 宽表格（对比表/规格表）：外层固定 100%，内容横向滚动，避免被裁切 */
    table {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0 !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* 宽表格横向滑动提示（由 main.js 动态插入） */
    .table-scroll-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin: 0 0 8px;
        padding: 8px 12px;
        font-size: 12px;
        line-height: 1.5;
        color: var(--gray-600);
        background: var(--gray-50);
        border: 1px dashed var(--gray-200);
        border-radius: 8px;
    }
    .table-scroll-hint::before {
        content: '↔';
        font-size: 14px;
        color: var(--primary);
    }
}

/* iOS 上输入框字号小于 16px 会自动放大页面，这里仅在 iOS 生效 */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        input,
        select,
        textarea {
            font-size: 16px;
        }
    }
}
