/* 响应式优化 - 页眉页脚 */
/* 小屏幕设备 */
@media (max-width: 768px) {
    /* 页眉优化 */
    .header-main {
        height: auto;
       
    }
    
    /* 更高优先级，确保左右分布：左Logo标题，右电话 */
    header#masthead .header-main .header-container {
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
    }

    .header-logo-section {
        display: flex;
        align-items: center;
    }
    
    .header-certification-section {
        display: none !important;
    }
    
    /* 强制显示并靠右对齐电话区域（覆盖 index.css 的隐藏） */
    header#masthead .header-contact-section {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        margin-left: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* 强制显示电话图标（避免被其他样式隐藏） */
    header#masthead .header-contact-section .header-phone-icon {
        display: flex !important;
        width: 36px !important;
        height: 36px !important;
        margin-right: 0 !important;
    }
    header#masthead .header-contact-section .header-phone-info { display: none !important; }
    
    .header-phone-container {
        display: flex;
        align-items: center;
    }
    
    .header-search-form {
        display: none;
    }

    /* 限制移动端 Logo 尺寸为 60×40 且不拉伸 */
    header#masthead .custom-logo.logo-img {
        width: 60px !important;
        height: 40px !important;
        object-fit: contain !important;
    }

    /* 隐藏副标题，仅保留主标题 */
    header#masthead .header-logo-section .logo-text .logo-subtitle { display: none !important; }
    header#masthead .header-logo-section .logo-text .logo-title { font-size: 16px !important; line-height: 1.2 !important; }

    /* 移动端导航栏改为蓝色条并左侧汉堡按钮 */
    .header-navigation-wrapper {
        background-color: #0a6fd8 !important; /* 深蓝背景 */
        padding: 12px 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .header-navigation {
        justify-content: flex-start !important; /* 汉堡靠左 */
        align-items: center !important;
    }

    .header-menu-toggle {
        display: block !important;
        margin: 0 16px !important;
        width: 32px !important;
        height: 24px !important;
    }

    .header-menu-toggle span {
        background: #ffffff !important; /* 白色条纹 */
        height: 3px !important;
    }

    /* 展开后的菜单保持白底，与参考样式一致 */
    .header-navigation ul {
        background: #ffffff !important;
    }

    /* 页脚优化 - 确保使用高优先级选择器 */
    footer .footer_top {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        border-bottom: none !important;
        padding: 10px 0 !important;
    }

    /* 隐藏页脚菜单 */
    .footer_menuContent {
        display: none !important;
    }
    
    /* 强制页脚logo和文本水平排列 */
    footer .footer_top .logo_footer {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: left !important;
        margin-bottom: 0 !important;
        padding: 10px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        width: auto !important;
    }
    
    footer .footer_top .logo_footer img {
        margin-bottom: 0 !important;
        margin-right: 10px !important;
        max-height: 45px !important;
    }
    
    footer .footer_top .logo_footer .logo-text {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        margin-left: 10px !important;
    }
    
    footer .footer_top .logo_footer .logo-title {
        margin: 0 !important;
        font-size: 16px !important;
        color: #ffffff !important;
        font-weight: 600 !important;
    }
    
    footer .footer_top .logo_footer .logo-subtitle {
        margin: 2px 0 0 !important;
        font-size: 12px !important;
        color: rgba(255, 255, 255, 0.9) !important;
    }
    
    .footer_top .footer_menuContent {
        display: none !important;
    }

    /* 确保版权信息显示 */
    footer .fbottom_left {
        border-top: none !important;
        padding: 10px 0 !important;
        margin-top: 0 !important;
        text-align: center !important;
        width: 100% !important;
        display: block !important;
    }
    
    footer .fbottom_left .fbootom_web {
        font-size: 12px !important;
        color: #d4dfef !important;
    }
}

/* iPhone XR尺寸 (414px) 特殊处理 */
@media (max-width: 414px) {
    /* 确保版权信息显示 */
    footer .fbottom_left {
        display: block !important;
        padding: 8px 0 !important;
    }
    
    /* 进一步减小边距 */
    footer .footer_top {
        padding: 8px 0 !important;
    }
    
    footer .footer_top .logo_footer {
        padding: 8px 0 !important;
    }
    
    footer .footer_top .logo_footer img {
        max-height: 40px !important;
    }
    
    footer .footer_top .logo_footer .logo-title {
        font-size: 15px !important;
    }
    
    footer .footer_top .logo_footer .logo-subtitle {
        font-size: 11px !important;
    }
}

/* 超小屏幕设备（iPhone SE 等）保持横排并收紧尺寸 */
@media (max-width: 375px) {
    .header-main .header-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .header-contact-section { margin-left: 0; }

    /* 保持横排，避免 logo 与文字上下堆叠 */
    footer .footer_top .logo_footer {
        flex-direction: row !important;
        text-align: left !important;
        justify-content: flex-start !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    footer .footer_top .logo_footer img {
        margin-right: 6px !important;
        margin-bottom: 0 !important;
        max-height: 22px !important;
    }

    footer .footer_top .logo_footer .logo-title {
        font-size: 15px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    footer .footer_top .logo_footer .logo-subtitle {
        font-size: 12px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    /* 版权区域保持紧凑 */
    footer .fbottom_left {
        display: block !important;
        padding: 8px 0 !important;
    }
}