/*****************************************************************
    Mobile Enhanced CSS - 移动端增强样式
    专为移动设备优化的额外样式规则
    Author: AI Assistant
    Created: 2024
*****************************************************************/

/* ==========================================================================
   移动端基础优化
   ========================================================================== */

/* 触摸友好的按钮和链接 */
@media only screen and (max-width: 767px) {
    
    /* 增大触摸目标区域 */
    .btn, button, .read-more, .banner-btn a {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 24px;
        font-size: 16px;
        line-height: 1.4;
    }
    
    /* 导航菜单优化 */
    .navbar-nav .nav-link {
        padding: 15px 20px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    /* 表单元素优化 */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    textarea,
    select {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 16px; /* 防止iOS缩放 */
        border-radius: 8px;
        border: 2px solid #e0e0e0;
        transition: border-color 0.3s ease;
    }
    
    input:focus,
    textarea:focus,
    select:focus {
        border-color: #7b68ee;
        outline: none;
        box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.1);
    }
    
    /* 卡片和内容区域优化 */
    .card, .single-services-item, .single-portfolio {
        margin-bottom: 20px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .card:hover, .single-services-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    }
    
    /* 文字大小和行高优化 */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    h1 {
        font-size: 28px !important;
        line-height: 1.2;
        margin-bottom: 16px;
    }
    
    h2 {
        font-size: 24px !important;
        line-height: 1.3;
        margin-bottom: 14px;
    }
    
    h3 {
        font-size: 20px !important;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    
    p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 16px;
    }
    
    /* 图片优化 */
    img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }
    
    /* 容器和间距优化 */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .ptb-100 {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    /* 导航栏移动端优化 */
    .navbar-section {
        padding: 10px 0;
    }
    
    .navbar-brand img {
        max-height: 40px;
    }
    
    /* 轮播图移动端优化 */
    .home-section {
        min-height: 100vh;
        padding-top: 120px;
        padding-bottom: 60px;
    }
    
    .main-banner-content {
        text-align: center;
        padding: 0 20px;
    }
    
    /* 服务卡片网格优化 */
    .services-area .row .col-lg-4,
    .services-area .row .col-md-6 {
        margin-bottom: 30px;
    }
    
    /* 团队成员卡片优化 */
    .single-team-member {
        margin-bottom: 30px;
        text-align: center;
    }
    
    /* 联系表单优化 */
    .contact-form {
        padding: 30px 20px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }
    
    /* 页脚优化 */
    .footer-area {
        padding: 40px 0 20px;
    }
    
    .single-footer-widget {
        margin-bottom: 30px;
        text-align: center;
    }
    
    /* 滚动条优化 */
    ::-webkit-scrollbar {
        width: 6px;
    }
    
    ::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    ::-webkit-scrollbar-thumb {
        background: #7b68ee;
        border-radius: 3px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: #6a5acd;
    }
}

/* ==========================================================================
   超小屏幕优化 (小于480px)
   ========================================================================== */

@media only screen and (max-width: 479px) {
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    h1 {
        font-size: 24px !important;
    }
    
    h2 {
        font-size: 20px !important;
    }
    
    h3 {
        font-size: 18px !important;
    }
    
    .btn, button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .banner-btn {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .banner-btn a {
        width: 100%;
        text-align: center;
    }
    
    /* 表格响应式 */
    .table-responsive {
        font-size: 14px;
    }
    
    /* 模态框优化 */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
}

/* ==========================================================================
   平板设备优化 (768px - 991px)
   ========================================================================== */

@media only screen and (min-width: 768px) and (max-width: 991px) {
    
    .container {
        padding-left: 30px;
        padding-right: 30px;
    }
    
    /* 两列布局优化 */
    .col-md-6 {
        margin-bottom: 30px;
    }
    
    /* 服务卡片两列显示 */
    .services-area .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* 团队成员两列显示 */
    .team-area .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ==========================================================================
   性能优化和动画
   ========================================================================== */

@media only screen and (max-width: 767px) {
    
    /* 减少动画以提升性能 */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }
    
    /* 禁用复杂动画 */
    .wow {
        animation: none !important;
    }
    
    /* 简化阴影效果 */
    .card, .single-services-item {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }
    
    /* 优化背景图片 */
    .home-section,
    .page-title-area {
        background-attachment: scroll !important;
        background-size: cover !important;
    }
}

/* ==========================================================================
   可访问性增强
   ========================================================================== */

@media only screen and (max-width: 767px) {
    
    /* 焦点指示器 */
    a:focus,
    button:focus,
    input:focus,
    textarea:focus,
    select:focus {
        outline: 2px solid #7b68ee;
        outline-offset: 2px;
    }
    
    /* 跳转链接 */
    .skip-link {
        position: absolute;
        top: -40px;
        left: 6px;
        background: #7b68ee;
        color: white;
        padding: 8px;
        text-decoration: none;
        border-radius: 4px;
        z-index: 1000;
    }
    
    .skip-link:focus {
        top: 6px;
    }
    
    /* 高对比度模式支持 */
    @media (prefers-contrast: high) {
        .btn {
            border: 2px solid currentColor;
        }
        
        .card {
            border: 1px solid #333;
        }
    }
    
    /* 减少动画偏好支持 */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation: none !important;
            transition: none !important;
        }
    }
}

/* ==========================================================================
   打印样式优化
   ========================================================================== */

@media print {
    .navbar-section,
    .footer-area,
    .btn,
    button {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    p {
        orphans: 3;
        widows: 3;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}