/* ========================================
   谷谷AI智影 - 响应式增强样式
   完美适配所有设备：手机、平板、电脑
   ======================================== */

/* ==========================================
   1. 超小屏幕 (手机竖屏, < 480px)
   ========================================== */
@media (max-width: 480px) {
    /* 导航栏 */
    .logo {
        font-size: 1.2rem !important;
    }
    
    .logo-icon {
        height: 35px !important;
    }
    
    /* Hero区域 */
    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
    }
    
    .hero-stats {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .stat-item {
        width: 100% !important;
    }
    
    /* 服务卡片 */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .service-card {
        padding: 1.5rem !important;
    }
    
    /* 选择我们的原因 */
    .choose-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    /* 页面标题 */
    .page-header h1 {
        font-size: 1.8rem !important;
    }
    
    .page-header p {
        font-size: 0.9rem !important;
    }
    
    /* 作品集网格 */
    .portfolio-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* 筛选按钮 */
    .filter-btn {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.85rem !important;
    }
    
    .filter-count {
        font-size: 0.75rem !important;
        padding: 2px 6px !important;
    }
    
    /* 分类标题 */
    .category-title {
        font-size: 1.5rem !important;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center !important;
    }
    
    .footer-col ul {
        text-align: center !important;
    }
    
    /* 联系表单 */
    .form-row {
        flex-direction: column !important;
    }
    
    .form-group {
        width: 100% !important;
    }
    
    /* 联系信息卡片 */
    .contact-info-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

/* ==========================================
   2. 小屏幕 (手机横屏 / 小平板, 481-768px)
   ========================================== */
@media (min-width: 481px) and (max-width: 768px) {
    /* Hero */
    .hero-title {
        font-size: 2.2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    /* 服务网格 */
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }
    
    /* 选择原因 */
    .choose-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* 作品集 */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* 联系信息 */
    .contact-info-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ==========================================
   3. 平板 (769-1024px)
   ========================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 90% !important;
        padding: 0 2rem !important;
    }
    
    /* Hero */
    .hero-title {
        font-size: 2.8rem !important;
    }
    
    /* 服务网格 */
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2.5rem !important;
    }
    
    /* 选择原因 */
    .choose-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    /* 作品集 */
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }
}

/* ==========================================
   4. 笔记本 (1025-1440px)
   ========================================== */
@media (min-width: 1025px) and (max-width: 1440px) {
    .container {
        max-width: 1200px !important;
    }
    
    /* 作品集 - 4列 */
    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ==========================================
   5. 大屏幕 (> 1440px)
   ========================================== */
@media (min-width: 1441px) {
    .container {
        max-width: 1400px !important;
    }
    
    /* Hero */
    .hero-title {
        font-size: 4rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.5rem !important;
    }
    
    /* 作品集 - 5列 */
    .portfolio-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* ==========================================
   6. 通用响应式优化
   ========================================== */

/* 确保图片自适应 */
img {
    max-width: 100%;
    height: auto;
}

/* 确保视频自适应 */
video {
    max-width: 100%;
    height: auto;
}

/* 防止横向滚动 */
body {
    overflow-x: hidden;
}

/* 触摸设备优化 */
@media (hover: none) {
    .service-card:hover,
    .portfolio-item:hover,
    .choose-card:hover {
        transform: none !important;
    }
    
    /* 增加触摸目标大小 */
    button,
    a,
    .filter-btn {
        min-height: 44px !important;
        min-width: 44px !important;
    }
}

/* ==========================================
   7. 横屏模式优化
   ========================================== */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        min-height: auto !important;
        padding: 4rem 0 !important;
    }
    
    .page-header {
        padding: 4rem 0 2rem !important;
    }
    
    .hero-stats {
        margin-top: 2rem !important;
    }
}

/* ==========================================
   8. 打印样式
   ========================================== */
@media print {
    .navbar,
    .hamburger,
    .lanyard-component,
    .video-sound-toggle,
    .floating-logos,
    .starry-background-canvas,
    .dynamic-watermark {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .page-header,
    .footer {
        background: white !important;
        color: black !important;
    }
}

/* ==========================================
   9. 高分辨率屏幕优化
   ========================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* 确保文字清晰 */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ==========================================
   10. 减少动画（节省电量/性能）
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

