/* ============================================================
   复百澳 响应式
   ============================================================ */

@media (max-width: 1200px) {
    .business-grid { grid-template-columns: repeat(2, 1fr); }
    .partners { grid-template-columns: repeat(6, 1fr); }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid .footer-col:first-child { grid-column: 1 / -1; }
    .footer-logo .name { font-size: 13px; }
    .footer-logo-img { width: 150px; }
    .footer-about-text { font-size: 16px; }
    .news-grid-6 { grid-template-columns: repeat(2, 1fr); }
}

/* 992–1100 是 header 的「夹层」：导航尚未折叠成汉堡（≤768 才折叠）、
   而 .container 边距（≤992 才收窄）与搜索框宽度（≤992 才缩到 120px）都还是桌面值，
   三者相加在 1024 附近会超出视口约 23px。此处只针对 header 收紧，不动全站 container。 */
@media (max-width: 1100px) {
    .header-wrap { gap: 14px; }
    .nav-list { gap: 22px; }
    .nav-item > a { font-size: 15px; }
    .header-search { width: 148px; }
    .header-search input { font-size: 12.5px; padding-right: 32px; }
    .lang-label { font-size: 10px; }
}

@media (max-width: 992px) {
    .container { padding: 0 16px; }
    .nav-list { gap: 20px; }
    .nav-item > a { font-size: 14px; }
    .header-search { width: 120px; }
    .header-search input { font-size: 12px; }
    .lang-label { font-size: 10px; }
    .banner { height: 420px; }
    .banner-slide h1 { font-size: 40px; }
    .banner-slide p { font-size: 16px; }
    .section { padding: 60px 0; }
    .section-title h2 { font-size: 28px; }
    .advantage-grid { grid-template-columns: repeat(2, 1fr); }
    .news-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
    .news-cover { width: 180px; min-width: 180px; }
    .news-body { padding: 16px; }
    .news-title { font-size: 15px; }
    .news-summary { font-size: 12px; }
    .about-block { gap: 40px; }
    .testimonial-grid { grid-template-columns: 1fr; }
    .detail-layout { grid-template-columns: 240px 1fr; gap: 24px; }
    .partners { grid-template-columns: repeat(4, 1fr); }
    .page-banner { padding: 60px 0; }
    .page-banner h1 { font-size: 32px; }
    /* 案例表格 992px */
    .case-table-header { font-size: 12px; }
    .case-table-header > div { padding: 12px 8px; }
    .case-row > div { padding: 12px 8px; font-size: 12px; }
    .case-row-title { font-size: 13px; }
}

@media (max-width: 768px) {
    .header { height: 56px; }
    .header-wrap { flex-wrap: wrap; height: 56px; }
    .logo img { height: 34px; }
    .header-tools { gap: 2px; }
    .header-search { display: none; }
    .lang-label { font-size: 10px; }
    .menu-toggle { display: block; order: 3; }

    /* 移动端导航展开 */
    .nav-list {
        display: none;
        flex-direction: column;
        align-items: stretch;   /* V14.58: PC 端 .nav-list 是 align-items:center，不改会让菜单项收缩成文字宽、点击热区只剩窄条 */
        width: 100%;
        height: auto;
        gap: 0;
        order: 4;
        background: #fff;
        border-top: 1px solid var(--border);
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        max-height: 70vh;
        overflow-y: auto;
    }
    .nav-list.mobile-open { display: flex; }
    .nav-item {
        height: auto;
        width: 100%;            /* V14.58: 保证整行可点，而非只有文字宽度可点 */
        display: block;
        border-bottom: 1px solid var(--border);
    }
    .nav-item > a {
        display: block;
        width: 100%;
        padding: 14px 16px;
        font-size: 15px;
    }
    .nav-item > a::after { display: none; }
    .nav-item.drop-item > a::before {
        float: right;
        margin-top: 6px;
    }
    /* 二级下拉在移动端展开 */
    .nav-drop {
        position: static;
        display: none;
        box-shadow: none;
        border-radius: 0;
        min-width: 0;
        padding: 0;
        background: var(--bg-light);
    }
    .nav-item.drop-item.open .nav-drop { display: block; }
    .nav-drop a {
        padding: 10px 16px 10px 32px;
        font-size: 14px;
        border-bottom: 1px solid rgba(0,0,0,0.04);
    }
    .nav-drop a:hover { padding-left: 36px; }
    /* 移动端三级飞出菜单展开为内联 */
    .nav-drop .has-flyout > a .flyout-arrow { float: right; }
    .nav-flyout {
        position: static;
        display: none;
        box-shadow: none;
        border-radius: 0;
        min-width: 0;
        padding: 0;
        background: rgba(0,0,0,0.02);
    }
    .nav-drop .has-flyout.open .nav-flyout { display: block; }
    .nav-flyout a {
        padding: 8px 16px 8px 44px;
        font-size: 13px;
        border-bottom: 1px solid rgba(0,0,0,0.03);
    }

    /* mega 面板移动端：固定覆盖式面板，单列堆叠
       V14.58: 原为 position:static —— ① PC 端用于居中的 transform:translateX(-50%) 未清除，
       会让面板内容左移半个宽度、整块推到屏幕外；② 与绝对定位的菜单互相覆盖，点「产品服务」看不到面板 */
    .header > .nav-mega {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        transform: none;
        display: none;
        box-shadow: none;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 56px);
        overflow-y: auto;
        padding: 12px 16px;
        background: var(--bg-light);
        z-index: 200;
    }
    .nav-mega-5,
    .nav-mega-4,
    .nav-mega-6 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .nav-mega-col {
        padding: 0;
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        padding-bottom: 10px;
    }
    .nav-mega-col:last-child { border-bottom: none; padding-bottom: 0; }
    .nav-mega-title { font-size: 14px; margin-bottom: 6px; padding-bottom: 6px; }
    .nav-mega-col a {
        font-size: 13px;
        padding: 5px 0;
        border-bottom: none;
    }

    .banner { height: 360px; }
    .banner-slide h1 { font-size: 28px; }
    .banner-slide p { font-size: 14px; margin-bottom: 24px; }
    .banner-arrow { width: 36px; height: 36px; font-size: 14px; }
    .banner-arrow.prev { left: 12px; }
    .banner-arrow.next { right: 12px; }

    .section { padding: 40px 0; }
    .section-title { margin-bottom: 32px; }
    .section-title h2 { font-size: 24px; }
    .business-grid, .advantage-grid, .news-grid, .product-grid, .news-grid-6 { grid-template-columns: 1fr; }
    .products-toolbar { flex-direction: column; align-items: stretch; }
    .products-toolbar .filter-bar { flex: none; }
    .products-search-box input { width: 100%; flex: 1; }
    .news-card { flex-direction: column; }
    .news-cover { width: 100%; min-width: 100%; height: 180px; }
    .news-tabs { justify-content: flex-start; gap: 8px; }
    .news-tab { padding: 8px 16px; font-size: 13px; }
    .about-block { grid-template-columns: 1fr; }
    .about-image { height: 240px; }
    .about-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .about-stat { padding: 10px 8px 8px; }
    .about-stat .stat-icon { font-size: 16px; margin-bottom: 4px; }
    .about-stat .num { font-size: 17px; }
    .about-stat .num.num-text { font-size: 15px; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; padding-bottom: 30px; }
    .footer { padding-top: 40px; }
    .footer-logo-img { width: 160px; }
    .footer-about-text { font-size: 15px; letter-spacing: .5px; }
    .footer-company-bottom { flex-direction: column; gap: 16px; }
    .footer-social-inline .social-item img { width: 40px; height: 40px; }

    .detail-layout { grid-template-columns: 1fr; }
    .sidebar-card { display: none; }
    .detail-content { padding: 24px 16px; }
    /* 新闻详情页响应式 */
    .news-detail-layout { grid-template-columns: 1fr; gap: 24px; }
    .news-detail-sidebar { display: none; }
    .news-detail-main article { padding: 24px 20px; }
    .news-detail-main .detail-title { font-size: 22px; }
    .news-detail-main .detail-pager { flex-direction: column; }
    .news-detail-main .detail-pager .pager-btn { width: 100%; }
    .news-detail-banner { height: 150px; }
    .news-detail-banner .banner-en { font-size: 24px; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-info-card, .contact-form { padding: 24px; }
    .partners { grid-template-columns: repeat(3, 1fr); }
    .page-banner { padding: 40px 0; }
    .page-banner h1 { font-size: 24px; }
    .back-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }
    .float-fixed-box { right: 15px; }
    .float-item { width: 44px; height: 44px; }
    
    /* 合作案例表格移动端 */
    .case-table-header { display: none; }
    .case-row { grid-template-columns: 1fr; gap: 0; padding: 12px 0; }
    .case-row > div { padding: 6px 0; border-right: none; font-size: 13px; }
    .case-col-title { order: -2; }
    .case-row-title { font-size: 15px; }
    /* 案例详情 */
    .cd-meta-grid { grid-template-columns: repeat(2, 1fr); }
    .cd-title { font-size: 22px; }
    .cd-hero { padding: 32px 0 24px; }
    /* 悬浮客服移动端（原先这三条因括号位置错误落在媒体查询之外，会泄漏到桌面端） */
    .float-badge { width: 8px; height: 8px; top: 2px; right: 2px; }
    .float-badge.has-count { min-width: 16px; font-size: 9px; line-height: 12px; }
    .float-tips { display: none; }
}
