/* 响应式设计 */

/* 大屏幕 (1200px以上) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* 中等屏幕 (992px - 1199px) */
@media (max-width: 1199px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .about-content {
        gap: 2rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 1rem;
    }
}

/* 平板设备 (768px - 991px) */
@media (max-width: 991px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 120px 0 50px;
    }
    
    .hero-content {
        max-width: 100%;
        margin-bottom: 2rem;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-image {
        order: -1;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* 平板设备轮播高度 */
    .hero-slider {
        height: 400px;
    }
    
    /* 移动端轮播图片优化 */
    .hero-slider .slide img {
        object-fit: cover;
        object-position: center;
    }
    
    /* 移动端显示移动端图片，隐藏桌面端图片 */
    .hero-slider .mobile-banner {
        display: block;
    }
    
    .hero-slider .desktop-banner {
        display: none;
    }
}

/* 手机设备 (576px - 767px) */
@media (max-width: 767px) {
    body {
        padding-top: 70px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--background);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .contact-info {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-top: 1rem;
        margin-top: 1rem;
        min-width: auto;
        width: 100%;
        align-items: center;
    }

    .contact-line {
        font-size: 1rem;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero {
        padding: 100px 0 30px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about,
    .services,
    .products,
    .clients,
    .contact {
        padding: 60px 0;
    }

    .stats {
        flex-direction: row;
        justify-content: space-around;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 20px;
    }

    .client-item {
        padding: 1.5rem;
        min-height: 100px;
    }

    .client-item img {
        max-height: 60px;
    }

    /* 轮播高度响应式调整 */
    .hero-slider {
        height: 400px;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
    }
    
    .slider-prev {
        left: 15px;
    }
    
    .slider-next {
        right: 15px;
    }
}

/* 小屏手机 (480px以下) */
@media (max-width: 480px) {
    body {
        padding-top: 60px;
    }
    
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .cta-button {
        padding: 10px 24px;
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .service-card,
    .product-card {
        padding: 1.5rem;
    }

    .clients-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 15px;
    }

    .client-item {
        padding: 1rem;
        min-height: 80px;
    }

    .client-item img {
        max-height: 50px;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* 小屏设备轮播高度 */
    .hero-slider {
        height: 280px;
    }
    
    .slider-arrow {
        width: 35px;
        height: 35px;
    }
    
    .slider-prev {
        left: 10px;
    }
    
    .slider-next {
        right: 10px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

/* 超大屏设备 (1400px以上) */
@media (min-width: 1400px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 3rem;
    }
}

/* 横向模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 30px;
    }

    .hero-content {
        max-width: 50%;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover,
    .product-card:hover {
        transform: none;
    }

    .nav-link:hover {
        color: var(--text-color);
    }

    .nav-link.active:hover {
        color: var(--primary-color);
    }
}

/* 打印样式 */
@media print {
    .header,
    .footer,
    .cta-button,
    .btn-primary {
        display: none;
    }

    .hero {
        min-height: auto;
        page-break-after: always;
    }

    .section {
        page-break-inside: avoid;
    }
}



/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --text-color: #000000;
        --text-light: #333333;
        --background: #ffffff;
        --border-color: #000000;
        --primary-color: #0000ff;
    }
}