/* ======================================================
   新外网络 - 前台业务端 移动端响应式修复 (responsive.css)
   仅覆盖移动端/平板端样式，不修改PC端
   断点统一: 575.98px(手机) / 767.98px(平板) / 991.98px(小屏PC)
   ====================================================== */

/* ===== viewport安全区适配 (仅移动端) ===== */
@media (max-width: 991.98px) {
    @supports (padding: max(0px)) {
        .xw-header-inner {
            padding-left: max(14px, env(safe-area-inset-left));
            padding-right: max(14px, env(safe-area-inset-right));
        }
    }
}

/* ===== 平板端 (768px - 991.98px) ===== */
@media (max-width: 991.98px) {

    /* 容器padding调整 */
    .xw-container {
        padding: 0 18px;
    }

    /* 首页Hero区域调整 */
    .xw-hero {
        height: 440px !important;
    }

    .xw-slide-content h1 {
        font-size: 2rem !important;
        white-space: normal !important;
    }

    .xw-slide-content p {
        font-size: 1rem !important;
    }

    /* Hero轮播按钮隐藏（平板端不显示两侧按钮） */
    .xw-hero-next,
    .xw-hero-prev {
        display: none !important;
    }

    /* 首页特色功能3列改2列 */
    .home-features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 18px !important;
    }

    /* 首页产品卡片 */
    .home-product-card-lg {
        flex: 0 0 calc(33.333% - 14px) !important;
        min-width: 200px !important;
    }

    /* 服务流程4列改2列 */
    .home-process-steps {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    .home-process-steps::before {
        display: none !important;
    }

    /* 新闻3列改2列 */
    .home-news-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }

    /* 客户评价2列改1列 */
    .home-review-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* 信任数据条 */
    .home-trust-inner {
        flex-wrap: wrap !important;
        border-radius: 20px !important;
        padding: 18px 20px !important;
        gap: 8px !important;
    }

    .home-trust-item {
        flex: 0 0 calc(50% - 4px) !important;
        border-right: none !important;
        padding: 8px 0 !important;
    }

    /* CTA区域 */
    .home-process-cta {
        flex-direction: column !important;
        gap: 16px !important;
        padding: 20px 28px !important;
        text-align: center;
        border-radius: 20px !important;
    }

    /* 页脚5列/4列改2列 */
    .xw-footer-grid,
    .xw-footer-grid--5 {
        grid-template-columns: 1fr 1fr !important;
        gap: 28px !important;
    }

    /* 页面头部 */
    .xw-page-header {
        padding: 52px 20px !important;
    }

    .xw-page-header h1 {
        font-size: 28px !important;
    }

    /* Section标题 */
    .xw-section-title {
        margin-bottom: 40px !important;
    }

    .xw-section-title h2 {
        font-size: 26px !important;
    }

    /* 通用卡片 */
    .xw-card {
        padding: 24px !important;
    }

    /* 产品价格表格 - 添加横向滚动 */
    .table-responsive-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -18px;
        padding: 0 18px;
    }

    .table-responsive-wrap table {
        min-width: 600px;
    }

    /* 浮动侧边栏调整 */
    .xw-float-sidebar {
        right: 14px !important;
        gap: 8px !important;
    }

    .xw-float-btn {
        width: 52px !important;
        height: 52px !important;
        border-radius: 12px !important;
    }

    .xw-float-btn i {
        font-size: 18px !important;
    }

    .xw-float-btn .xw-float-text {
        font-size: 9px !important;
    }

    .xw-float-qrcode img {
        width: 110px !important;
        height: 110px !important;
    }

    .xw-float-qrcode {
        right: 62px !important;
        width: 134px !important;
    }

    .xw-float-btn .xw-float-label {
        right: 62px !important;
    }

    /* 产品列表页grid */
    .product-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    /* 解决方案卡片 */
    .solution-grid,
    .solution-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    /* 帮助中心grid */
    .help-grid,
    .help-categories {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }

    /* 关于我们页面统计 */
    .about-stats,
    .xw-about-stats {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 1.5rem !important;
    }
}

/* ===== 手机端 (max-width: 767.98px) ===== */
@media (max-width: 767.98px) {

    /* 基础容器 */
    .xw-container {
        padding: 0 14px !important;
    }

    /* 导航栏 */
    .xw-header-inner {
        padding: 10px 0 !important;
    }

    .xw-nav-spacer {
        height: 56px !important;
    }

    .xw-logo-text {
        font-size: 1.25rem !important;
    }

    .xw-logo-icon {
        width: 34px !important;
        height: 34px !important;
        font-size: 16px !important;
        padding: 4px 7px !important;
        margin-right: 8px !important;
    }

    /* 移动端按钮 */
    .xw-mobile-btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.2rem !important;
    }

    .xw-mobile-user-status {
        margin-right: 6px !important;
    }

    .xw-mobile-status-icon {
        width: 34px !important;
        height: 34px !important;
        font-size: 15px !important;
    }

    /* 移动端菜单全屏面板 - 平板端调整 */
    .xw-mobile-menu-links a {
        padding: 13px 14px !important;
        font-size: 14px !important;
    }

    .xw-mobile-auth-btns {
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* Hero区域 */
    .xw-hero {
        height: 380px !important;
    }

    .xw-slide-content {
        padding: 0 14px !important;
        text-align: center;
        align-items: center !important;
    }

    .xw-slide-content h1 {
        font-size: 1.6rem !important;
        white-space: normal !important;
        line-height: 1.3 !important;
        margin-bottom: 14px !important;
    }

    .xw-slide-content p {
        font-size: 0.9rem !important;
        margin-bottom: 20px !important;
        line-height: 1.7 !important;
    }

    .xw-slide-btns {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100%;
        max-width: 280px;
    }

    .xw-slide-btns .xw-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 24px !important;
        font-size: 14px !important;
    }

    .xw-hero-pagination.swiper-pagination-bullets {
        bottom: 16px !important;
    }

    /* 信任数据条 */
    .home-trust {
        margin-top: -24px !important;
        padding: 0 14px 14px !important;
    }

    .home-trust-inner {
        padding: 14px !important;
        border-radius: 16px !important;
    }

    .home-trust-item {
        flex: 0 0 100% !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid rgba(203, 213, 225, .25) !important;
    }

    .home-trust-item:last-child {
        border-bottom: none !important;
    }

    .home-trust-num {
        font-size: 18px !important;
    }

    .home-trust-label {
        font-size: 11px !important;
    }

    /* 特色功能2列改1列 */
    .home-features {
        padding: 50px 0 !important;
    }

    .home-features-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .home-feature-card {
        padding: 22px 20px !important;
    }

    .home-feature-card h3 {
        font-size: 15px !important;
    }

    .home-feature-card p {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }

    /* 产品展示 */
    .home-products {
        padding: 50px 0 !important;
    }

    .home-products-slider-wrap {
        gap: 0 !important;
    }

    .home-products-slider-btn {
        display: none !important;
    }

    .home-products-slider-viewport {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        border-radius: 16px !important;
    }

    .home-products-slider-viewport::-webkit-scrollbar {
        display: none !important;
    }

    .home-product-card-lg {
        flex: 0 0 calc(50% - 8px) !important;
        min-width: 160px !important;
    }

    .home-product-lg-icon {
        height: 90px !important;
        font-size: 32px !important;
    }

    .home-product-lg-body {
        padding: 16px 14px 12px !important;
    }

    .home-product-lg-body h4 {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }

    .home-product-lg-body p {
        font-size: 12px !important;
        -webkit-line-clamp: 2 !important;
    }

    .home-product-lg-footer {
        padding: 0 14px 14px !important;
    }

    .home-product-lg-link {
        font-size: 12px !important;
    }

    /* 服务流程 */
    .home-process {
        padding: 50px 0 !important;
    }

    .home-process-steps {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .home-process-step {
        padding: 22px 16px !important;
    }

    .home-process-num {
        width: 40px !important;
        height: 40px !important;
        line-height: 40px !important;
        font-size: 15px !important;
        margin-bottom: 12px !important;
    }

    .home-process-step h4 {
        font-size: 15px !important;
    }

    .home-process-step p {
        font-size: 13px !important;
    }

    /* CTA区域 */
    .home-process-cta {
        margin-top: 24px !important;
        padding: 18px 20px !important;
        border-radius: 16px !important;
        gap: 12px !important;
    }

    .home-cta-text {
        font-size: 13px !important;
        text-align: center;
    }

    .home-cta-btn {
        padding: 10px 24px !important;
        font-size: 13px !important;
    }

    /* 新闻资讯 */
    .home-news {
        padding: 50px 0 !important;
    }

    .home-news-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .home-news-item {
        padding: 16px !important;
        gap: 14px !important;
    }

    .home-news-date {
        width: 44px !important;
        height: 44px !important;
        border-radius: 10px !important;
    }

    .home-news-day {
        font-size: 17px !important;
    }

    .home-news-month {
        font-size: 10px !important;
    }

    .home-news-body h4 {
        font-size: 14px !important;
    }

    .home-news-body p {
        font-size: 12px !important;
    }

    /* 客户评价 */
    .home-reviews-new {
        padding: 50px 0 !important;
    }

    .home-review-card {
        padding: 20px 18px !important;
        border-radius: 16px !important;
    }

    .home-review-avatar {
        width: 36px !important;
        height: 36px !important;
        font-size: 13px !important;
    }

    .home-review-top strong {
        font-size: 13px !important;
    }

    .home-review-top em {
        font-size: 11px !important;
    }

    .home-review-stars {
        font-size: 12px !important;
    }

    .home-review-card p {
        font-size: 13px !important;
        line-height: 1.7 !important;
    }

    /* 页面头部 */
    .xw-page-header {
        padding: 44px 16px !important;
    }

    .xw-page-header h1 {
        font-size: 22px !important;
        margin-bottom: 8px !important;
    }

    .xw-page-header p {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }

    /* Section标题 */
    .xw-section-title {
        margin-bottom: 32px !important;
    }

    .xw-section-title h2 {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }

    .xw-section-title p {
        font-size: 13px !important;
    }

    /* 面包屑 */
    .xw-breadcrumb {
        padding: 10px 0 !important;
    }

    .xw-breadcrumb-list {
        font-size: 12px !important;
        gap: 5px !important;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .xw-breadcrumb-list::-webkit-scrollbar {
        display: none;
    }

    /* 通用卡片 */
    .xw-card {
        padding: 18px !important;
        border-radius: 14px !important;
    }

    .xw-card-icon {
        width: 42px !important;
        height: 42px !important;
        font-size: 17px !important;
        margin-bottom: 12px !important;
        border-radius: 10px !important;
    }

    .xw-card h3 {
        font-size: 15px !important;
    }

    .xw-card p {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }

    /* 按钮 */
    .xw-btn {
        padding: 9px 20px !important;
        font-size: 13px !important;
        border-radius: 10px !important;
    }

    .xw-btn-lg {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }

    .xw-btn-sm {
        padding: 5px 12px !important;
        font-size: 12px !important;
    }

    /* 页脚 */
    .xw-footer {
        padding: 36px 0 20px !important;
    }

    .xw-footer-grid,
    .xw-footer-grid--5 {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .xw-footer-brand {
        font-size: 17px !important;
    }

    .xw-footer-brand .xw-logo {
        width: 30px !important;
        height: 30px !important;
        font-size: 13px !important;
    }

    .xw-footer-desc {
        font-size: 13px !important;
        line-height: 1.7 !important;
    }

    .xw-footer h4 {
        font-size: 14px !important;
        margin-bottom: 12px !important;
    }

    .xw-footer-links li {
        margin-bottom: 8px !important;
    }

    .xw-footer-links a {
        font-size: 13px !important;
    }

    .xw-footer-bottom {
        flex-direction: column !important;
        gap: 6px !important;
        padding-top: 18px !important;
        font-size: 11px !important;
        text-align: center;
    }

    .xw-footer-qrcode {
        margin-top: 14px !important;
    }

    .xw-footer-qrcode img {
        width: 60px !important;
        height: 60px !important;
    }

    .xw-footer-qrcode span {
        font-size: 11px !important;
    }

    /* 浮动侧边栏 */
    .xw-float-sidebar {
        right: 10px !important;
        bottom: 20px !important;
        gap: 6px !important;
    }

    .xw-float-btn {
        width: 44px !important;
        height: 44px !important;
        border-radius: 10px !important;
    }

    .xw-float-btn i {
        font-size: 16px !important;
    }

    .xw-float-btn .xw-float-text {
        display: none !important;
    }

    /* 二维码和标签默认保持隐藏（通过opacity/visibility），点击时由 .xw-float-active 控制显示 */
    .xw-float-qrcode {
        right: 54px !important;
        width: 120px !important;
    }

    .xw-float-qrcode img {
        width: 100px !important;
        height: 100px !important;
    }

    /* 移动端点击显示二维码 */
    .xw-float-btn.xw-float-active .xw-float-qrcode {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
        pointer-events: auto !important;
        z-index: 10000 !important;
    }

    /* 移动端热线标签点击显示 */
    .xw-float-btn.xw-float-active .xw-float-label {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
    }

    /* 产品列表grid */
    .product-grid,
    .products-grid,
    .solution-grid,
    .solution-cards,
    .help-grid,
    .help-categories {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* 产品详情页 */
    .product-detail-layout {
        flex-direction: column !important;
    }

    .product-detail-sidebar {
        width: 100% !important;
        position: static !important;
    }

    /* 价格表格横向滚动 */
    .xw-products .table,
    .price-table,
    table.xw-table {
        font-size: 13px !important;
    }

    .xw-products .table thead th,
    .price-table th {
        padding: 10px 8px !important;
        font-size: 12px !important;
        white-space: nowrap;
    }

    .xw-products .table tbody td,
    .price-table td {
        padding: 10px 8px !important;
        font-size: 13px !important;
    }

    /* 所有表格添加横向滚动保护 */
    .xw-products,
    .price-section,
    .table-section {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 表单 */
    .xw-form-group {
        margin-bottom: 16px !important;
    }

    .xw-form-control,
    .xw-form-select {
        height: 44px !important;
        font-size: 16px !important;
        /* 防止iOS缩放 */
        padding: 8px 14px !important;
        border-radius: 10px !important;
    }

    .xw-form-label {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }

    /* 帮助中心 */
    .help-search-box {
        padding: 16px !important;
    }

    .help-search-input {
        height: 44px !important;
        font-size: 14px !important;
    }

    /* 文章详情 */
    .article-content {
        font-size: 15px !important;
        line-height: 1.8 !important;
    }

    .article-content img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* 域名查询 */
    .domain-search-box {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .domain-search-input {
        width: 100% !important;
    }

    .domain-search-btn {
        width: 100% !important;
    }
}

/* ===== 超小屏幕 (max-width: 575.98px) ===== */
@media (max-width: 575.98px) {
    .xw-container {
        padding: 0 12px !important;
    }

    /* 导航栏 */
    .xw-logo-text {
        font-size: 1.15rem !important;
    }

    .xw-logo-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 14px !important;
        padding: 3px 6px !important;
        border-radius: 7px !important;
        margin-right: 6px !important;
    }

    .xw-mobile-btn {
        width: 34px !important;
        height: 34px !important;
        font-size: 1.1rem !important;
    }

    .xw-mobile-status-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 13px !important;
    }

    /* Hero */
    .xw-hero {
        height: 340px !important;
    }

    .xw-slide-content h1 {
        font-size: 1.4rem !important;
    }

    .xw-slide-content p {
        font-size: 0.85rem !important;
    }

    .xw-slide-btns .xw-btn {
        padding: 11px 20px !important;
        font-size: 13px !important;
    }

    /* 页头 */
    .xw-page-header {
        padding: 36px 12px !important;
    }

    .xw-page-header h1 {
        font-size: 20px !important;
    }

    /* Section标题 */
    .xw-section-title h2 {
        font-size: 18px !important;
    }

    /* 卡片 */
    .xw-card {
        padding: 16px !important;
    }

    /* 浮动按钮 */
    .xw-float-btn {
        width: 44px !important;
        height: 44px !important;
        border-radius: 10px !important;
    }

    .xw-float-btn i {
        font-size: 16px !important;
    }

    /* 移动端点击显示二维码 */
    .xw-float-btn.xw-float-active .xw-float-qrcode {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
        pointer-events: auto !important;
        z-index: 10000 !important;
    }

    /* 移动端二维码弹出位置调整 */
    .xw-float-qrcode {
        right: 54px !important;
        padding: 10px !important;
        width: 120px !important;
    }

    .xw-float-qrcode img {
        width: 100px !important;
        height: 100px !important;
    }

    /* 移动端热线标签点击显示 */
    .xw-float-btn.xw-float-active .xw-float-label {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
    }

    /* 产品卡片更小 */
    .home-product-card-lg {
        flex: 0 0 calc(60% - 6px) !important;
        min-width: 140px !important;
    }

    .home-product-lg-icon {
        height: 80px !important;
        font-size: 28px !important;
    }

    .home-product-lg-body h4 {
        font-size: 13px !important;
    }

    .home-product-lg-body p {
        font-size: 11px !important;
    }

    /* 信任数据 */
    .home-trust-num {
        font-size: 16px !important;
    }

    .home-trust-num small {
        font-size: 10px !important;
    }

    /* 页脚 */
    .xw-footer {
        padding: 28px 0 16px !important;
    }

    .xw-footer-brand {
        font-size: 15px !important;
    }

    .xw-footer-desc {
        font-size: 12px !important;
    }

    .xw-footer h4 {
        font-size: 13px !important;
    }

    .xw-footer-links a {
        font-size: 12px !important;
    }
}

/* ===== 横屏手机适配 (landscape) ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .xw-hero {
        height: 280px !important;
    }

    .xw-slide-content h1 {
        font-size: 1.3rem !important;
        margin-bottom: 8px !important;
    }

    .xw-slide-content p {
        margin-bottom: 12px !important;
    }
}

/* ===== 手机端全局安全适配 (仅移动端) ===== */
@media (max-width: 767.98px) {
    /* iOS安全区域适配 */
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        .xw-footer {
            padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important;
        }

        .xw-float-sidebar {
            bottom: calc(20px + env(safe-area-inset-bottom)) !important;
        }
    }

    /* 防止元素溢出视口 */
    img,
    video,
    iframe,
    table,
    .xw-card,
    .xw-footer-grid,
    .home-feature-card,
    .home-product-card-lg,
    .home-review-card,
    .home-news-item {
        max-width: 100% !important;
    }

    /* ===== 文字不截断/不隐藏 (遵循用户需求) ===== */
    .xw-card p,
    .xw-card h3,
    .home-news-body h4,
    .home-news-body p,
    .home-review-card p,
    .xw-footer-desc,
    .xw-dropdown-desc,
    .xw-dropdown-name {
        overflow: visible !important;
        text-overflow: clip !important;
        display: block !important;
        -webkit-line-clamp: unset !important;
        -webkit-box-orient: unset !important;
        white-space: normal !important;
    }

    /* 产品描述保持2行省略（避免卡片过高） */
    .home-product-lg-body p {
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        display: -webkit-box !important;
        overflow: hidden !important;
    }
}