/* 
 * 启宇科技官方网站 - 响应式布局文件
 * Author: 启宇科技开发团队
 * Description: 定义不同屏幕尺寸下的适配样式，确保在桌面、平板、手机上都有良好的显示效果
 */

/* ==========================================================================
   Hero Banner Mobile Optimizations
   ========================================================================== */

/* 超小屏幕优化 (手机竖屏) */
@media (max-width: 575.98px) {
    .hero-section {
        min-height: 100vh;
        padding-top: 80px; /* 增加顶部间距 */
        padding-bottom: 20px; /* 增加底部间距 */
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1.5rem; /* 增加底部间距 */
    }
    
    .hero-title-main,
    .hero-title-highlight {
        display: block;
        margin-bottom: 0.5rem; /* 增加内部间距 */
    }
    
    .hero-subtitle {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 2rem; /* 增加底部间距 */
        text-align: center;
    }
    
    .badge-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        border-radius: 20px;
    }
    
    .hero-description {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 2rem; /* 增加底部间距 */
        text-align: center;
        padding: 0 10px;
    }
    
    .hero-tags {
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 2.5rem; /* 增加底部间距 */
    }
    
    .hero-tag {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-radius: 25px;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        align-items: center;
    }
    
    .hero-btn-primary,
    .hero-btn-secondary {
        width: 90%;
        max-width: 280px;
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
        justify-content: center;
    }
    
    .scroll-indicator {
        bottom: 15px;
        transform: translateX(-50%) scale(0.8);
    }
    
    .scroll-text {
        font-size: 0.75rem;
    }
}

/* 小屏幕优化 (手机横屏) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section {
        padding-top: 65px;
    }
    
    .hero-title {
        font-size: 2.2rem;
        text-align: center;
        margin-bottom: 2rem; /* 增加底部间距 */
    }
    
    .hero-subtitle {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    
    .hero-description {
        text-align: center;
        font-size: 1rem;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-tags {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .hero-actions {
        justify-content: center;
        gap: 1.2rem;
    }
    
    .hero-btn-primary,
    .hero-btn-secondary {
        min-width: 160px;
        padding: 0.9rem 2rem;
    }
}

/* 中等屏幕优化 (平板) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-title {
        font-size: 2.8rem;
        text-align: center;
        margin-bottom: 2.5rem; /* 增加底部间距 */
    }
    
    .hero-subtitle {
        justify-content: center;
    }
    
    .hero-description {
        text-align: center;
        font-size: 1.1rem;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 2.5rem; /* 增加底部间距 */
    }
    
    .hero-tags {
        justify-content: center;
    }
    
    .hero-actions {
        justify-content: center;
        gap: 1.5rem;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .hero-tag:hover,
    .hero-btn-primary:hover,
    .hero-btn-secondary:hover {
        transform: none;
    }
    
    .floating-element:hover {
        transform: none;
    }
    
    /* 增大触摸目标 */
    .hero-btn-primary,
    .hero-btn-secondary {
        min-height: 48px;
        padding: 1rem 2rem;
    }
    
    .scroll-indicator {
        cursor: pointer;
        padding: 10px;
    }
}

/* 高密度屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-bg-image {
        image-rendering: -webkit-optimize-contrast; /* Webkit引擎 */
        image-rendering: optimizeQuality; /* 标准属性 */
    }
}

/* 横屏模式优化 */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: 100vh;
        padding-top: 60px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-subtitle {
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .hero-tags {
        margin-bottom: 1.5rem;
        gap: 0.5rem;
    }
    
    .hero-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* 减少动画的用户偏好 */
@media (prefers-reduced-motion: reduce) {
    .floating-element {
        animation: none;
    }
    
    .scroll-wheel {
        animation: none;
    }
    
         .hero-title-highlight {
         animation: none;
         color: #ffffff;
     }
    
    .hero-particles {
        display: none;
    }
}

/* 黑暗模式适配 */
@media (prefers-color-scheme: dark) {
    .hero-overlay {
        background: linear-gradient(135deg, 
            rgba(52, 152, 219, 0.9) 0%, 
            rgba(102, 126, 234, 0.8) 50%, 
            rgba(155, 89, 182, 0.9) 100%);
    }
    
    .badge-item {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.25);
    }
    
    .hero-tag {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.2);
    }
}

/* ========== 响应式断点定义 ========== */
/* 
 * 超小屏幕 (手机竖屏): < 576px
 * 小屏幕 (手机横屏): >= 576px
 * 中等屏幕 (平板): >= 768px  
 * 大屏幕 (桌面): >= 992px
 * 超大屏幕 (大桌面): >= 1200px
 * 特大屏幕 (4K): >= 1400px
 * 最大内容宽度: 1320px
 */

/* ========== 容器最大宽度限制 ========== */
.container,
.container-fluid {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 15px;
}

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* ========== 超大屏幕 (>= 1400px) ========== */
@media (min-width: 1400px) {
  .hero-title {
    font-size: 4rem;
  }
  
  .section-title {
    font-size: 3rem;
  }
  
  .service-card {
    padding: 3rem;
  }
  
  .hero-section {
    padding: 120px 0;
  }
  
  section {
    padding: 100px 0;
  }
}

/* ========== 大屏幕 (992px - 1399px) ========== */
@media (min-width: 992px) and (max-width: 1399px) {
  .hero-title {
    font-size: 3.5rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .navbar-nav .nav-link {
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
  }
  
  .hero-buttons {
    justify-content: flex-start;
  }
  
  .service-card {
    padding: 2.5rem;
  }
  
  /* 浮动图标在中等大屏幕上的优化 */
  .floating-element {
    display: flex;
    width: 85px;
    height: 85px;
    font-size: 2rem;
  }
  
  /* 中等屏幕容器调整 */
  .hero-decoration {
    height: 650px;
    padding: 40px 15px;
  }
  
  /* 在中等屏幕上只显示前6个核心图标 */
  .floating-7,
  .floating-8,
  .floating-9,
  .floating-10,
  .floating-11 {
    display: none;
  }
}

/* ========== 中等屏幕 - 平板 (768px - 991px) ========== */
@media (min-width: 768px) and (max-width: 991px) {
  .hero-title {
    font-size: 3rem;
    text-align: center;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
    margin-top: 2rem;
  }
  
  .section-title {
    font-size: 2.25rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
  
  .service-card {
    padding: 2rem;
    margin-bottom: 2rem;
  }
  
  .case-card {
    margin-bottom: 2rem;
  }
  

  
  /* 导航栏调整 */
  .navbar-collapse {
    text-align: center;
    margin-top: 1rem;
  }
  
  .navbar-nav {
    flex-direction: column;
    align-items: center;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.25rem 0;
    width: 100%;
  }
  
  /* 页面间距调整 */
  section {
    padding: 60px 0;
  }
  
  .hero-section {
    padding: 100px 0;
    min-height: 80vh;
  }
  
  /* 文字大小调整 */
  .service-card h4 {
    font-size: 1.375rem;
  }
  
  .case-title {
    font-size: 1.125rem;
  }
  

  
  /* 统计数据展示调整 */
  .company-stats .row {
    justify-content: center;
  }
  
  .company-stats .col-md-3 {
    flex: 0 0 50%;
    max-width: 50%;
    margin-bottom: 1rem;
  }
  
  /* 平板上隐藏浮动图标以节省空间 */
  .hero-decoration {
    display: none;
  }
}

/* ========== 小屏幕 - 手机横屏 (576px - 767px) ========== */
@media (min-width: 576px) and (max-width: 767px) {
  .hero-title {
    font-size: 2.5rem;
    text-align: center;
    line-height: 1.3;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    text-align: center;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .hero-buttons .btn {
    width: 200px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .section-subtitle {
    font-size: 0.95rem;
  }
  
  .service-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .service-card h4 {
    font-size: 1.25rem;
  }
  

  

  
  /* 导航栏优化 */
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .navbar-toggler {
    padding: 0.5rem;
  }
  
  /* 页面间距 */
  section {
    padding: 50px 0;
  }
  
  .hero-section {
    padding: 80px 0;
    min-height: 70vh;
  }
  

  
  /* 统计数据 */
  .company-stats .col-md-3 {
    flex: 0 0 50%;
    max-width: 50%;
    margin-bottom: 1rem;
  }
  
  /* 浮动元素隐藏 */
  .floating-elements {
    display: none;
  }
}

/* ========== 超小屏幕 - 手机竖屏 (< 576px) ========== */
@media (max-width: 575px) {
  .container {
    padding: 0 12px;
  }
  
  .hero-title {
    font-size: 2rem;
    text-align: center;
    line-height: 1.3;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 250px;
    padding: 0.75rem 1.5rem;
  }
  
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }
  
  .section-subtitle {
    font-size: 0.9rem;
    margin-bottom: 2rem;
  }
  
  .service-card {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
  }
  
  .service-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
  
  .service-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }
  
  .service-card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .service-features li {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }
  

  
  /* 导航栏移动端优化 */
  .navbar {
    padding: 0.5rem 0;
  }
  
  .navbar-brand {
    font-size: 1.125rem;
  }
  
  .navbar-brand img {
    height: 32px;
  }
  
  .navbar-toggler {
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
  }
  
  .navbar-collapse {
    margin-top: 1rem;
    text-align: center;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.125rem 0;
    font-size: 0.95rem;
  }
  
  /* 移动端下拉菜单样式优化 */
  .dropdown-menu {
    position: static !important;
    float: none;
    width: auto;
    margin-top: 0;
    box-shadow: none;
    border: none;
    background: rgba(248, 250, 252, 0.95);
    border-radius: 0;
    padding: 0;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-align: left;
  }
  
  .dropdown-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    color: var(--text-primary);
    background: transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
  }
  
  .dropdown-item:hover,
  .dropdown-item:focus {
    background: var(--primary-color);
    color: white;
    transform: none;
    padding-left: 2rem;
  }
  
  .dropdown-item i {
    color: var(--primary-color);
    transition: color 0.3s ease;
    margin-right: 0.5rem;
    width: 16px;
  }
  
  .dropdown-item:hover i,
  .dropdown-item:focus i {
    color: white;
  }
  
  .dropdown-divider {
    margin: 0;
    border-color: rgba(37, 99, 235, 0.2);
  }
  
  /* 移动端导航菜单展开样式 */
  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    padding: 0.5rem 0;
  }
  
  /* 下拉菜单箭头旋转效果 */
  .dropdown-toggle::after {
    transition: transform 0.3s ease;
  }
  
  .dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
  }
  
  /* 页面间距调整 */
  section {
    padding: 40px 0;
  }
  
  .hero-section {
    padding: 60px 0;
    min-height: 60vh;
  }
  

  
  .form-control {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  

  

  
  /* 统计数据单列显示 */
  .company-stats .col-md-3 {
    flex: 0 0 50%;
    max-width: 50%;
    margin-bottom: 1rem;
  }
  
  /* 隐藏复杂动画效果 */
  .floating-elements,
  .particles,
  .parallax-layer {
    display: none;
  }
  
  /* 简化动画 */
  .service-card:hover {
    transform: none;
  }
  
  /* 表单元素优化 */
  .form-group {
    margin-bottom: 1rem;
  }
  
  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
}

/* ========== 特殊情况处理 ========== */

/* iPhone SE 和其他超小屏幕 */
@media (max-width: 380px) {
  .hero-title {
    font-size: 1.75rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .service-card {
    padding: 1rem;
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.85rem;
  }
  
  .hero-buttons .btn {
    max-width: 200px;
  }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: 100vh;
    padding: 40px 0;
  }
  
  .hero-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-buttons {
    gap: 0.5rem;
  }
  
  section {
    padding: 30px 0;
  }
}

/* 打印样式 */
@media print {
  .navbar,
  .hero-buttons,
  .floating-elements,
  .particles {
    display: none !important;
  }
  
  .hero-section {
    background: white !important;
    color: black !important;
    min-height: auto;
    padding: 2rem 0;
  }
  
  section {
    padding: 1rem 0;
  }
  
  .service-card {
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}

/* 无障碍访问优化 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .floating-elements,
  .particles,
  .parallax-layer {
    display: none;
  }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  .service-card,
  .case-card,
  .advantage-card,
  .news-card {
    border: 2px solid #000;
  }
  
  .btn-primary {
    background: #000;
    border-color: #000;
  }
  
  .text-gradient {
    background: none;
    color: #000;
    -webkit-text-fill-color: initial;
  }
}