/* Mobile Responsive Optimization for Hokimi Landing Page */
/* 针对手机和iPad的响应式优化 */

/* 移动端基础设置 */
@media screen and (max-width: 768px) {
    /* 确保文字大小适配移动端 */
    [data-font-size] {
        font-size: clamp(14px, 4vw, 28px) !important;
    }
    
    /* 标题文字优化 */
    [data-font-size="3.5vw"] {
        font-size: clamp(20px, 6vw, 32px) !important;
    }
    
    [data-font-size="3vw"] {
        font-size: clamp(18px, 5.5vw, 28px) !important;
    }
    
    [data-font-size="1.4vw"] {
        font-size: clamp(16px, 3.5vw, 20px) !important;
    }
    
    [data-font-size="1vw"] {
        font-size: clamp(14px, 3vw, 18px) !important;
    }
    
    /* 按钮优化 */
    .btn-ece02 {
        padding: 12px 24px !important;
        font-size: 16px !important;
        margin: 8px 4px !important;
    }
    
    .btn-text-d97c4 {
        font-size: 16px !important;
    }
    
    /* 导航栏优化 */
    .btn-row-c58e4 {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    /* 图片优化 */
    .img_wrapper-eb43b {
        margin: 20px 0 !important;
    }
    
    .image_item-ff7d7 {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* App下载按钮优化 */
    .image_box-c5e00[style*="1e19de426ffc79bbe8c8086d1151e36d.png"],
    .image_box-c5e00[style*="e7daf524dde62b6bafa316f03236d277.png"] {
        max-width: 180px !important;
        margin: 10px auto !important;
    }
    
    /* 布局容器优化 */
    .layout-col-container-aa69d {
        padding: 0 15px !important;
    }
    
    .page-layout-row-inner-ab83f {
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    /* Grid布局优化 */
    .grid-layer--inner-ef909 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .grid-item-af6e7 {
        text-align: center !important;
    }
    
    /* 右上角链接优化 */
    .grid-layer-cb854[data-align-x="right"] {
        text-align: center !important;
    }
    
    .grid-layer-cb854[data-align-x="right"] .grid-layer--inner-ef909 {
        justify-items: center !important;
    }
    
    /* 表单优化 */
    .modern-contact-form-container {
        padding: 20px 15px !important;
        margin: 20px 10px !important;
    }
    
    .form-row {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .form-group {
        margin-bottom: 20px !important;
    }
    
    /* 页面边距优化 */
    .layout_group-limit_content-bd8af {
        padding: 0 15px !important;
    }
    
    /* 语言选择器优化 */
    #language-selector-container {
        margin-top: 15px !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    /* 弹窗优化 */
    #app-download-popup {
        max-width: 95% !important;
        max-height: 80% !important;
        margin: 20px !important;
    }
    
    #app-download-image {
        max-width: 100% !important;
        max-height: 60vh !important;
    }
}

/* iPad横屏优化 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    /* iPad特殊优化 */
    [data-font-size="3.5vw"] {
        font-size: clamp(24px, 3.5vw, 36px) !important;
    }
    
    [data-font-size="3vw"] {
        font-size: clamp(22px, 3vw, 32px) !important;
    }
    
    /* 布局优化 */
    .layout-col-container-aa69d {
        padding: 0 30px !important;
    }
    
    /* 按钮优化 */
    .btn-ece02 {
        padding: 10px 20px !important;
    }
    
    /* 图片优化 */
    .img_wrapper-eb43b {
        margin: 15px 0 !important;
    }
}

/* 手机竖屏特殊优化 */
@media screen and (max-width: 480px) {
    /* 更小屏幕的特殊处理 */
    body {
        font-size: 14px !important;
    }
    
    /* 标题更小 */
    [data-font-size="3.5vw"] {
        font-size: clamp(18px, 7vw, 28px) !important;
        line-height: 1.2 !important;
    }
    
    [data-font-size="3vw"] {
        font-size: clamp(16px, 6vw, 24px) !important;
        line-height: 1.3 !important;
    }
    
    /* 按钮更紧凑 */
    .btn-ece02 {
        padding: 10px 16px !important;
        font-size: 14px !important;
        margin: 6px 2px !important;
    }
    
    /* 导航栏堆叠 */
    .btn-list-a1de5 {
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    /* 容器更紧凑 */
    .layout-col-container-aa69d {
        padding: 0 10px !important;
    }
    
    /* 图片更小 */
    .image_box-c5e00[style*="1e19de426ffc79bbe8c8086d1151e36d.png"],
    .image_box-c5e00[style*="e7daf524dde62b6bafa316f03236d277.png"] {
        max-width: 150px !important;
    }
    
    /* 表单优化 */
    .modern-contact-form-container {
        padding: 15px 10px !important;
        margin: 15px 5px !important;
    }
    
    /* 弹窗优化 */
    #app-download-popup {
        max-width: 98% !important;
        margin: 10px !important;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    /* 触摸设备优化 */
    .btn-ece02,
    a,
    button {
        min-height: 44px !important;
        min-width: 44px !important;
        touch-action: manipulation !important;
    }
    
    /* 图片点击区域优化 */
    .image_box-c5e00 {
        touch-action: manipulation !important;
    }
}

/* 确保滚动性能 */
@media screen and (max-width: 768px) {
    * {
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* 减少动画复杂度 */
    [data-scroll-effect-param] {
        transform: none !important;
        opacity: 1 !important;
    }
    
    /* 简化背景 */
    .bg-layer-b9970[data-effect="scroll"] {
        position: static !important;
        transform: none !important;
    }
}

/* 横屏模式优化 */
@media screen and (max-height: 500px) and (orientation: landscape) {
    /* 横屏时减少垂直间距 */
    .layout_row-margin_top-e2d5e,
    .layout_row-margin_bottom-b3e51 {
        height: 20px !important;
    }
    
    /* 文字大小调整 */
    [data-font-size] {
        font-size: clamp(12px, 3vh, 20px) !important;
    }
}
