/* 响应式设计样式 */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 30px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .product-section-header {
        padding: 30px 20px;
    }
    
    .contact-content {
        gap: 40px;
    }
}

/* 手机设备 (最大768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    /* 导航栏响应式 */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 80px 20px 30px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 0;
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1000;
    }
    
    .nav-link {
        font-size: 18px;
        padding: 20px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        width: 100%;
        text-align: center;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link:hover {
        background: rgba(102, 126, 234, 0.1);
        color: #667eea;
    }
    
    .nav-link::after {
        display: none;
    }
    
    /* 首页横幅响应式 */
    .hero {
        height: auto;
        min-height: 100vh;
        padding-bottom: 40px;
    }
    
    .hero-content {
        padding: 140px 20px 80px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .hero-description p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-top: 40px;
    }
    
    .stat-item {
        padding: 15px 10px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    /* 服务项目响应式 */
    .services {
        padding: 80px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .service-card {
        padding: 35px 25px;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
    }
    
    .service-icon i {
        font-size: 30px;
    }
    
    /* 产品展示响应式 */
    .products {
        padding: 80px 0;
    }
    
    .product-section {
        margin-bottom: 60px;
    }
    
    .product-section-header {
        padding: 30px 20px;
        margin-bottom: 40px;
    }
    
    .product-logo {
        flex-direction: column;
        gap: 15px;
    }
    
    .product-logo-img {
        width: 55px; /* 调整宽度以适配非正方形logo */
        height: 40px; /* 调整高度以保持比例 */
        object-fit: contain;
        background: transparent;
    }
    
    .product-logo-text {
        font-size: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .product-card {
        border-radius: 15px;
    }
    
    .product-image {
        height: 220px;
        object-fit: contain;
        background: #f8f9fa;
        padding: 6px;
    }
    
    .product-title {
        padding: 20px 20px 10px;
        font-size: 1.2rem;
    }
    
    .product-description {
        padding: 0 20px 20px;
        font-size: 0.9rem;
    }
    
    /* 关于我们响应式 */
    .about {
        padding: 80px 0;
    }
    
    .about-content {
        padding: 0 20px;
    }
    
    /* 联系我们响应式 */
    .contact {
        padding: 80px 0;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-item {
        padding: 25px 20px;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
    }
    
    .contact-icon i {
        font-size: 20px;
    }
    
    .contact-form {
        padding: 30px 25px;
    }
    
    /* 页脚响应式 */
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-info {
        min-width: auto;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* 返回顶部按钮响应式 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

/* 小屏手机设备 (最大480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description p {
        font-size: 0.95rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-item {
        padding: 20px 15px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .service-card {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .service-icon i {
        font-size: 25px;
    }
    
    .service-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    
    .service-description {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
    
    .feature-tag {
        padding: 6px 15px;
        font-size: 0.85rem;
    }
    
    .product-section-header {
        padding: 25px 15px;
    }
    
    .product-logo-text {
        font-size: 1.3rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-card {
        border-radius: 15px;
    }
    
    .product-image {
        height: 200px;
        object-fit: contain;
        background: #f8f9fa;
        padding: 5px;
    }
    
    .product-title {
        padding: 18px 18px 8px;
        font-size: 1.1rem;
    }
    
    .product-description {
        padding: 0 18px 18px;
        font-size: 0.85rem;
    }
    
    .about-description {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .contact-item {
        padding: 20px 15px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
    }
    
    .contact-icon i {
        font-size: 18px;
    }
    
    .contact-details h3 {
        font-size: 1.2rem;
    }
    
    .contact-details p {
        font-size: 0.95rem;
    }
    
    .contact-form {
        padding: 25px 20px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .contact-form .btn {
        padding: 14px;
        font-size: 1rem;
    }
    
    .footer-info p {
        font-size: 0.9rem;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
    }
    
    .social-link i {
        font-size: 18px;
    }
}

/* 超小屏设备 (最大360px) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description p {
        font-size: 0.9rem;
    }
    
    .hero-buttons .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .service-card {
        padding: 25px 15px;
    }
    
    .product-card {
        border-radius: 12px;
    }
    
    .contact-form {
        padding: 20px 15px;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 20px 0;
    }
    
    .hero-content {
        padding: 100px 20px 40px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .hero-description {
        margin-bottom: 20px;
    }
    
    .hero-buttons {
        margin-bottom: 20px;
    }
    
    .hero-stats {
        margin-top: 20px;
    }
    
    .stat-item {
        padding: 10px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-img,
    .product-image,
    .about-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* iOS Safari 特殊优化 */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        .hero-content {
            padding-top: 160px; /* iOS Safari 需要更多顶部间距 */
            padding-bottom: 60px; /* iOS Safari 增加底部间距 */
        }
        
        .hero {
            padding-top: 100px;
            padding-bottom: 50px; /* iOS Safari 增加底部间距 */
        }
        
        .hero-stats {
            margin-bottom: 50px; /* iOS Safari 增加统计信息底部间距 */
        }
    }
}

/* 移动端导航优化 */
@media (max-width: 768px) {
    /* 防止页面滚动当导航菜单打开时 */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* 确保首页标题不被导航栏遮挡 */
    .hero {
        padding-top: 80px; /* 为固定导航栏预留空间 */
        overflow: visible; /* 确保内容不被截断 */
    }
    
    .hero-content {
        position: relative;
        z-index: 2;
        overflow: visible; /* 确保内容不被截断 */
    }
    
    /* 确保统计信息完整显示 */
    .hero-stats {
        margin-bottom: 40px; /* 增加底部间距，确保不被遮挡 */
    }
    
    /* 导航菜单背景遮罩 */
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
        z-index: -1;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .nav-menu.active::before {
        opacity: 1;
    }
    
    /* 汉堡菜单动画优化 */
    .nav-toggle .bar {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* 触摸设备优化 */
    .nav-link {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* 滚动条样式 */
    .nav-menu::-webkit-scrollbar {
        width: 4px;
    }
    
    .nav-menu::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .nav-menu::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.3);
        border-radius: 2px;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .hero-background,
    .back-to-top,
    .footer-social {
        display: none !important;
    }
    
    .hero {
        height: auto;
        min-height: auto;
    }
    
    .hero-content {
        position: static;
        color: #000;
    }
    
    .hero::before {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    .service-card,
    .product-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
