/* 响应式设计增强 - 补充优化 */

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    /* 增大触摸目标 */
    .nav-link {
        padding: 14px 16px;
        min-height: 44px;
    }

    .btn-primary, .btn-secondary {
        min-height: 48px;
        padding: 14px 36px;
    }

    .social-icon {
        width: 48px;
        height: 48px;
        line-height: 48px;
    }

    /* 禁用悬停效果，使用点击效果 */
    .service-card:hover,
    .portfolio-item:hover {
        transform: none;
    }

    .service-card:active,
    .portfolio-item:active {
        transform: scale(0.98);
    }
}

/* 平板横屏优化 (768px - 1024px) */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero {
        min-height: 80vh;
        padding: 70px 20px 40px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* iPad Pro 竖屏优化 */
@media screen and (min-width: 768px) and (max-width: 834px) {
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* 小屏平板优化 (600px - 768px) */
@media screen and (min-width: 600px) and (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .stat-item {
        flex: 0 0 calc(50% - 20px);
    }
}

/* 性能优化 - 减少动画 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-title,
    .section-title,
    .nav-logo h2 {
        animation: none !important;
    }
}

/* 打印样式优化 */
@media print {
    .navbar,
    .nav-toggle,
    .hero-buttons,
    .contact-form,
    .footer-social {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .hero,
    .about,
    .services,
    .portfolio,
    .contact {
        page-break-inside: avoid;
        background: white !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .nav-link,
    .service-title,
    .portfolio-title,
    .contact-info h3 {
        text-shadow: none;
        filter: none;
    }

    .service-card,
    .portfolio-item,
    .contact-item {
        border-width: 3px;
    }
}

/* 暗色模式优化（已经是暗色主题，这里添加更深的暗色选项） */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #050510 0%, #0f0520 50%, #050510 100%);
    }

    .service-card,
    .portfolio-item,
    .contact-item {
        background: rgba(10, 10, 20, 0.8);
    }
}