/**
 * 响应式设计优化 - 适配各种终端
 * 断点：
 * - 大屏桌面：≥1200px
 * - 桌面：992px - 1199px
 * - 平板：768px - 991px
 * - 手机横屏：576px - 767px
 * - 手机竖屏：<576px
 */

/* ==================== 基础响应式设置 ==================== */
html {
    font-size: 16px;
}

/* 大屏桌面 */
@media (min-width: 1200px) {
    html {
        font-size: 16px;
    }
}

/* 桌面 */
@media (max-width: 1199px) and (min-width: 992px) {
    html {
        font-size: 15px;
    }
}

/* 平板 */
@media (max-width: 991px) and (min-width: 768px) {
    html {
        font-size: 14px;
    }
}

/* 手机 */
@media (max-width: 767px) {
    html {
        font-size: 13px;
    }
}

/* ==================== 头部导航响应式 ==================== */
@media (max-width: 991px) {
    .header-head {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 10000;
    }
    
    .header {
        width: 100% !important;
        height: auto !important;
        min-height: 4rem;
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
        line-height: normal !important;
        box-sizing: border-box;
    }
    
    .header .logo-link {
        order: 1;
        flex: 0 0 auto;
        margin-right: auto;
    }
    
    .header .logo-link img {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    .header .logo-text {
        font-size: 1.1rem;
        line-height: normal !important;
    }
    
    /* 移动端菜单按钮 */
    .mobile-menu-toggle {
        display: flex !important;
        order: 2;
        width: 2.5rem;
        height: 2.5rem;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        flex-direction: column;
        gap: 0.3rem;
        padding: 0.5rem;
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 1.5rem;
        height: 2px;
        background: #333;
        transition: all 0.3s;
        border-radius: 1px;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* 导航菜单 */
    .header .header-item {
        display: none !important;
        order: 3;
        width: 100%;
        padding: 0;
        border-top: 1px solid #eee;
        line-height: normal !important;
    }
    
    .header.menu-open .header-item {
        display: block !important;
    }
    
    .header-item a,
    .header-item .el-dropdown-link {
        padding: 0.8rem 0;
        display: block;
        line-height: normal !important;
    }
    
    .header .visable {
        line-height: normal !important;
    }
    
    /* 下拉菜单在移动端全宽显示 */
    .el-dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        box-shadow: none !important;
        border: 1px solid #eee;
        margin-top: 0.5rem;
        display: none;
    }
    
    .el-dropdown-menu.show {
        display: block;
    }
    
    .el-dropdown-menu.solutions-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        width: 100% !important;
        min-width: auto !important;
    }
    
    .el-dropdown-menu.products-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* 电话和申请试用按钮 */
    .header .inphone {
        order: 4;
        width: auto;
        margin: 0.5rem 0;
        margin-left: auto;
        font-size: 0.9rem;
        line-height: normal !important;
    }
    
    .header .inphone img {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .header-right {
        order: 5;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        margin-left: 0.5rem;
    }
}

/* ==================== 底部响应式 ==================== */
@media (max-width: 991px) {
    .zlhx-footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
        padding: 2rem 1rem;
    }
    
    .zlhx-footer-brand {
        grid-column: 1 / -1;
    }
    
    .zlhx-footer-col h3 {
        font-size: 0.95rem;
    }
    
    .zlhx-footer-col ul li a {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .zlhx-footer-content {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .zlhx-footer-brand {
        text-align: center;
    }
    
    .zlhx-footer-brand .logo {
        justify-content: center;
    }
    
    .zlhx-footer-brand .phone {
        justify-content: center;
    }
    
    .zlhx-footer-bottom-content {
        padding: 1rem;
    }
    
    .zlhx-footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .zlhx-footer-links a {
        font-size: 0.75rem;
    }
}

/* ==================== 首页轮播响应式 ==================== */
@media (max-width: 991px) {
    .el-carousel__container {
        height: 30rem !important;
    }
    
    .lunbo1 .one {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
    }
    
    .lunbo1 .one p {
        font-size: 1.5rem !important;
        line-height: 2rem !important;
    }
    
    .lunbo1 .one img {
        width: 60%;
        max-width: 300px;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .el-carousel__container {
        height: 25rem !important;
    }
    
    .lunbo1 .one p {
        font-size: 1.2rem !important;
        line-height: 1.8rem !important;
    }
}

/* ==================== 产品区域响应式 ==================== */
@media (max-width: 991px) {
    .xin-products {
        padding: 2rem 1rem;
    }
    
    .xin-products .pMain {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .xin-products .pMain img {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .xin-products .rightP {
        width: 100%;
    }
}

/* ==================== 解决方案响应式 ==================== */
@media (max-width: 991px) {
    .resolve-section {
        padding: 2rem 1rem;
    }
    
    .resolve-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .resolve-tab {
        flex: 1 1 calc(33.333% - 0.5rem);
        min-width: 100px;
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .resolve-content {
        flex-direction: column;
    }
    
    .resolve-content img {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .resolve-tab {
        flex: 1 1 calc(50% - 0.5rem);
    }
}

/* ==================== 案例页面响应式 ==================== */
@media (max-width: 991px) {
    .case-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .case-list {
        grid-template-columns: 1fr !important;
    }
}

/* ==================== 关于我们响应式 ==================== */
@media (max-width: 991px) {
    .about-content {
        width: 90% !important;
        margin-top: 4rem;
    }
    
    .about-content h1 {
        font-size: 2rem;
    }
    
    .about-content .stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .about-content .stats .stat {
        flex: 1 1 calc(50% - 1rem);
        min-width: 120px;
    }
}

/* ==================== 资讯中心响应式 ==================== */
@media (max-width: 991px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .news-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==================== 帮助中心响应式 ==================== */
@media (max-width: 991px) {
    .help-content {
        flex-direction: column;
        padding: 1rem;
    }
    
    .help-sidebar {
        width: 100% !important;
        margin-bottom: 1rem;
    }
    
    .help-main {
        width: 100% !important;
    }
}

/* ==================== 侧边客服响应式 ==================== */
@media (max-width: 768px) {
    .customer-service {
        right: 0.5rem;
        bottom: 3rem;
        gap: 0.3rem;
    }
    
    .customer-service button {
        width: 2.5rem;
        height: 2.5rem;
        padding: 0.3rem;
    }
    
    .customer-service button img {
        width: 1rem;
        height: 1rem;
    }
    
    .customer-service button .cs-text {
        font-size: 0.6rem;
    }
}

/* ==================== 弹窗响应式 ==================== */
@media (max-width: 576px) {
    .cs-modal {
        width: 90%;
        max-width: 300px;
        padding: 1.5rem;
    }
    
    .trial-modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .trial-form-row {
        grid-template-columns: 1fr !important;
    }
}

/* ==================== 通用工具类 ==================== */
.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

@media (max-width: 991px) {
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
}

/* 文字省略 */
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 弹性布局工具 */
.flex-wrap {
    flex-wrap: wrap;
}

.flex-col {
    flex-direction: column;
}

/* 间距工具 */
@media (max-width: 576px) {
    .px-1-mobile {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ==================== 申请试用板块响应式 ==================== */

/* 桌面端基础修复 */
.youMain {
    background-size: cover !important;
    background-position: center !important;
}

@media (max-width: 991px) {
    .youMain {
        height: auto !important;
        min-height: 8.11rem;
        padding: 2rem 1rem;
        line-height: normal !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }
    
    .youMain > span:first-of-type {
        font-size: 1.4rem !important;
        text-align: center;
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .youMain > span:last-of-type {
        width: 9rem !important;
        height: 3rem !important;
        line-height: 3rem !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 576px) {
    .youMain {
        padding: 1.5rem 1rem;
        gap: 0.8rem;
    }
    
    .youMain > span:first-of-type {
        font-size: 1.1rem !important;
        line-height: 1.5;
    }
    
    .youMain > span:last-of-type {
        width: 8rem !important;
        height: 2.6rem !important;
        line-height: 2.6rem !important;
        font-size: 0.9rem !important;
    }
}
