/**
 * 亦庄维修网 - 移动端样式补丁
 * 文件名：mobile.css
 * 路径：/var/www/zmzk.org.cn/css/
 * 说明：此文件仅当屏幕宽度 <= 768px 时被加载，用于覆盖主样式表 (style.css) 中的部分规则。
 */

/* ============================================
   1. 通用移动端优化
   ============================================ */
@media screen and (max-width: 768px) {
    /* 调整基础字号，提升移动端可读性 */
    html {
        font-size: 15px;
    }

    /* 减少部分容器的左右内边距，利用屏幕宽度 */
    .container, .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* 调整标题大小，避免在手机上过大 */
    h1.display-4 {
        font-size: 2.2rem !important;
    }
    h2.display-5 {
        font-size: 1.8rem !important;
    }

    /* 调整行高，使移动端文本更紧凑 */
    .lead {
        line-height: 1.5;
        font-size: 1.05rem;
    }

    /* 按钮在移动端稍微缩小，并改为块级显示以适应窄屏 */
    .btn-lg {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
    }
    .btn-group .btn-lg {
        display: inline-block;
        width: auto;
    }

    /* 调整卡片间距，在移动端堆叠时更清晰 */
    .row.g-4 > [class*='col-'] {
        margin-bottom: 1.5rem;
    }
}

/* ============================================
   2. 首页模块移动端特定调整
   ============================================ */
@media screen and (max-width: 768px) {
    /* 首页Banner: 调整内边距和文字大小 */
    .home-banner {
        padding-top: 4.5rem !important;
        padding-bottom: 3rem !important;
    }
    .home-banner h1.display-4 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    .home-banner .lead {
        font-size: 1rem;
    }
    .home-banner .banner-image-container {
        margin-top: 2rem;
    }

    /* 核心优势/服务/套餐卡片: 取消悬停上浮效果，避免触摸误判 */
    .advantage-card:hover,
    .service-card:hover,
    .package-card:hover {
        transform: none !important;
    }

    /* 流程时间轴: 隐藏桌面端的横向时间轴，显示移动端纵向列表 */
    .process-timeline {
        display: none;
    }
    .process-vertical {
        display: block !important;
    }

    /* 行动号召区域: 调整布局，使表单和文字上下排列 */
    .cta-section .row {
        flex-direction: column;
    }
    .cta-section .col-md-7,
    .cta-section .col-md-5 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    .cta-section .col-md-5 {
        margin-top: 2rem;
    }

    /* 信任徽章区域: 调整徽章间距，避免拥挤 */
    .trust-badges .row {
        justify-content: center !important;
    }
    .trust-logo-placeholder {
        margin: 0.5rem !important;
        width: 80px !important;
        height: 50px !important;
        line-height: 50px !important;
        font-size: 0.7rem;
    }
}

/* ============================================
   3. 导航与页脚移动端优化
   ============================================ */
@media screen and (max-width: 768px) {
    /* 导航栏: 调整品牌标识和菜单项 */
    .navbar-brand .brand-text {
        font-size: 1.2rem;
    }
    .navbar-brand small {
        display: none; /* 在小屏幕上隐藏副标题 */
    }
    .navbar-nav {
        text-align: center;
        padding-top: 1rem;
    }
    .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    /* 页脚: 调整列布局，使内容垂直堆叠 */
    .site-footer .row > div {
        margin-bottom: 2rem;
    }
    .site-footer .row > div:last-child {
        margin-bottom: 0;
    }
    .footer-contact p {
        margin-bottom: 0.5rem;
    }

    /* 浮动按钮: 调整位置和大小，避免遮挡内容 */
    .floating-action-buttons {
        bottom: 70px;
        right: 15px;
    }
    .floating-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .btn-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ============================================
   4. 表单元素移动端优化
   ============================================ */
@media screen and (max-width: 768px) {
    /* 表单控件在移动端使用更大的触控区域 */
    .form-control, .form-select, .form-check-input {
        font-size: 16px !important; /* 防止iOS自动缩放 */
        min-height: 44px; /* 最小触控区域 */
    }
    .form-check-label {
        padding-left: 0.5rem;
    }

    /* 简化CTA表单，减少边距 */
    #homepageCtaForm .mb-3 {
        margin-bottom: 1rem !important;
    }
}