/*
 * Kohost Professional 纯CSS移动端适配
 * 作者: WHMCSHome
 * 创建时间: 2025-08-29
 * 适配目标: 768px以下移动设备
 * 设计原则: 纯CSS，无JavaScript依赖，触摸友好
 */

/* ================================
   移动端断点定义
   ================================ */

/* 平板设备 (768px - 992px) */
@media (max-width: 991px) and (min-width: 769px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* 移动设备主要适配 (768px及以下) - 需要覆盖992px样式 */
@media (max-width: 768px) {
    /* ================================
       全局移动端基础设置
       ================================ */
    
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    body {
        font-size: 14px;
        line-height: 1.6;
        overflow-x: hidden;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
        width: 100%;
    }

    /* ================================
       Banner区域移动端优化 (覆盖992px样式)
       ================================ */
    
    section#home-banner {
        width: 100vw !important;
        height: auto !important;
        min-height: 60vh;
        padding: 50px 5vw !important; /* 覆盖992px的10vw */
        background-position: center center !important;
        background-size: cover !important;
        background-attachment: scroll !important;
    }
    
    #home-banner .container {
        height: auto !important;
        padding: 0 15px;
        text-align: center;
    }
    
    /* Banner标题移动端适配 */
    #home-banner .bannerTitle {
        width: 100% !important;
        height: auto !important;
        margin: 0 auto;
        text-align: center;
    }
    
    #home-banner .bannerTitle .first {
        font-size: 1.8rem !important; /* 更适合移动端的尺寸 */
        line-height: 1.2;
        margin-bottom: 8px;
        font-weight: 700 !important;
    }
    
    #home-banner .bannerTitle .second {
        font-size: 2.2rem !important; /* 更适合移动端的尺寸 */
        line-height: 1.2;
        margin-bottom: 20px;
        font-weight: 700 !important;
    }
    
    /* Banner箭头 */
    #home-banner .bannerArrow {
        height: 18px !important;
        margin: 20px auto !important;
        display: block;
    }
    
    /* Banner副标题 */
    #home-banner .bannerSubtitle {
        width: 100% !important;
        max-width: 350px;
        margin: 20px auto !important;
        padding: 0 10px;
        font-size: 15px !important;
        line-height: 1.5 !important;
        text-align: center;
    }
    
    /* Banner按钮区域 */
    #home-banner .bannerBtnBox {
        flex-direction: column !important;
        align-items: center;
        gap: 15px;
        margin-top: 30px !important;
        margin-left: 0 !important;
        width: 100%;
    }
    
    #home-banner .bannerBtnLeft,
    #home-banner .bannerBtnRight {
        width: 280px !important;
        max-width: 90%;
        height: 100px !important;
        background-size: contain !important;
        background-position: center !important;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center !important;
        padding: 20px 15px !important;
    }
    
    #home-banner .bannerBtnSubText {
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin-bottom: 5px;
    }
    
    #home-banner .bannerBtnText {
        font-size: 18px !important;
        line-height: 1.3 !important;
        font-weight: 600;
    }

    /* ================================
       产品模块区域移动端适配
       ================================ */
    
    .homeModuleBox {
        padding: 60px 15px !important;
        text-align: center;
    }
    
    /* 覆盖Tailwind类的固定宽度 */
    .homeModuleBox .tw-w-\[839px\] {
        width: 100% !important;
        max-width: 350px;
        margin: 0 auto;
    }
    
    /* 产品卡片布局调整 */
    .homeModuleBox .tw-flex-row {
        flex-direction: column !important;
        gap: 20px;
    }
    
    .homeModuleBox .tw-justify-between {
        justify-content: center !important;
        align-items: center;
    }
    
    /* 产品卡片响应式 */
    .homeModuleBox [class*="tw-w-["] {
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto 20px auto;
    }
    
    /* 产品标题文字大小调整 */
    .homeModuleBox .tw-text-title {
        font-size: 24px !important;
        line-height: 1.3;
        padding: 0 20px;
    }
    
    .homeModuleBox .tw-text-18px {
        font-size: 16px !important;
        line-height: 1.4;
        padding: 0 20px;
    }

    /* ================================
       企业服务区域移动端适配
       ================================ */
    
    .homeServiceBox {
        padding: 60px 15px !important;
        text-align: center;
    }
    
    .homeServiceBox .tw-text-title {
        font-size: 24px !important;
        line-height: 1.3;
        padding: 0 20px;
    }
    
    .homeServiceBox .tw-text-18px {
        font-size: 16px !important;
        padding: 0 20px;
    }
    
    /* 服务卡片响应式 */
    .homeServiceBox .tw-flex-row {
        flex-direction: column !important;
        gap: 20px;
    }
    
    .homeServiceBox [class*="tw-w-["] {
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto 20px auto;
    }

    /* ================================
       团队介绍区域移动端适配
       ================================ */
    
    .homeTeamBox {
        padding: 60px 15px !important;
        text-align: center;
    }
    
    .homeTeamBox .tw-text-title {
        font-size: 24px !important;
        line-height: 1.3;
        padding: 0 20px;
    }
    
    .homeTeamBox .tw-text-18px {
        font-size: 16px !important;
        padding: 0 20px;
    }
    
    /* 团队成员卡片垂直排列 */
    .homeTeamBox .tw-flex-row {
        flex-direction: column !important;
        gap: 25px;
        align-items: center !important;
    }
    
    /* 团队成员卡片尺寸适配 */
    .homeTeamBox [class*="tw-w-[260px]"] {
        width: 280px !important;
        max-width: 90%;
        margin: 0 auto 20px auto;
    }
    
    /* 头像尺寸调整 */
    .homeTeamBox .tw-w-\[79px\] {
        width: 70px !important;
        height: 70px !important;
    }
    
    /* 头像图片优化 */
    .homeTeamBox .tw-w-\[79px\] img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 50% !important;
    }
    
    /* 头像容器优化 */
    .homeTeamBox .tw-p-\[4px\] {
        padding: 3px !important;
    }
    
    /* 团队成员文字调整 */
    .homeTeamBox .tw-text-20px {
        font-size: 18px !important;
    }
    
    .homeTeamBox .tw-text-16px {
        font-size: 15px !important;
    }
    
    .homeTeamBox .tw-text-14px {
        font-size: 13px !important;
        line-height: 1.4;
    }
    
    /* 团队卡片单列显示 - 强制覆盖 */
    .homeTeamBox .tw-mt-\[55px\] {
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        margin-top: 30px !important;
    }
    
    .homeTeamBox .tw-gap-x-\[20px\] {
        gap: 20px !important;
    }
    
    /* ================================
       触摸友好增强（纯CSS）
       ================================ */
    
    /* 按钮最小触摸区域 44px */
    .bannerBtnLeft,
    .bannerBtnRight,
    .btn,
    .button,
    a[class*="btn"] {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
        touch-action: manipulation;
    }
    
    /* 卡片可点击反馈 */
    .homeModuleBox > div:hover,
    .homeServiceBox > div:hover,
    .homeTeamBox > div:hover,
    a.bannerBtnLeft:hover,
    a.bannerBtnRight:hover {
        transform: scale(0.98);
        transition: transform 0.2s ease;
    }
    
    /* ================================
       技术支持区域移动端适配
       ================================ */
    
    /* 技术支持按钮垂直布局 */
    .homeHelpBox .tw-flex-row {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
    }
    
    .homeHelpBox .btn-card {
        width: 90% !important;
        max-width: 300px !important;
    }
    
    /* 技术支持标题 */
    .homeHelpBox .tw-text-\[42px\] {
        font-size: 24px !important;
        line-height: 1.3 !important;
        text-align: center !important;
        padding: 0 20px !important;
    }
    
    .homeHelpBox .tw-text-20px {
        font-size: 16px !important;
        text-align: center !important;
        padding: 0 20px !important;
    }
    
    /* ================================
       定制开发模块移动端优化
       ================================ */
    
    .homeCustomBox {
        padding: 30px 20px !important;
    }
    
    .homeCustomBox .tw-flex-row {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    .homeCustomBox .tw-py-\[64px\] {
        padding: 30px 20px !important;
    }
    
    .homeCustomBox .tw-pl-\[57px\] {
        padding-left: 0 !important;
    }
    
    .homeCustomBox .tw-pr-\[114px\] {
        padding-right: 0 !important;
    }
    
    .homeCustomBox .tw-pr-\[70px\] {
        padding-right: 0 !important;
    }
    
    .homeCustomBox .tw-text-\[42px\] {
        font-size: 24px !important;
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
    }
    
    .homeCustomBox .tw-text-15px {
        font-size: 14px !important;
        line-height: 1.6 !important;
        margin-bottom: 20px !important;
    }
    
    /* 隐藏定制模块右侧图片 */
    .homeCustomBox img {
        display: none !important;
    }
    
    .homeCustomBox .btn-primary {
        margin: 0 auto !important;
    }
    
    /* 其他内容区域 */
    .homeServiceBox img.tw-w-\[900px\] {
        width: 100% !important;
        height: auto !important;
    }
}

/* 小屏手机设备 (480px及以下) */
@media (max-width: 480px) {
    
    /* Banner进一步优化 */
    #home-banner .bannerTitle .first {
        font-size: 1.8rem !important;
    }
    
    #home-banner .bannerTitle .second {
        font-size: 2.2rem !important;
    }
    
    #home-banner .bannerSubtitle {
        font-size: 14px !important;
        max-width: 280px;
    }
    
    #home-banner .bannerBtnLeft,
    #home-banner .bannerBtnRight {
        width: 250px !important;
        height: 90px !important;
        padding: 15px 10px !important;
    }
    
    /* 模块区域紧凑布局 */
    .homeModuleBox,
    .homeServiceBox,
    .homeTeamBox {
        padding: 40px 10px !important;
    }
    
    .homeModuleBox .tw-text-title,
    .homeServiceBox .tw-text-title,
    .homeTeamBox .tw-text-title {
        font-size: 20px !important;
        padding: 0 15px;
    }
}