/* ====================
   元凯3D打印 - 响应式样式表 V2.0
   ==================== */

/* 大屏桌面 (1200px+) */
@media (max-width: 1280px) {
    .container {
        padding: 0 2rem;
    }
}

/* 桌面 (992px - 1199px) */
@media (max-width: 1199px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cases-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 240px);
    }

    .case-card.large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .news-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .news-card.featured {
        grid-row: span 1;
        flex-direction: row;
    }

    .news-card.featured .news-image {
        width: 50%;
        height: auto;
    }

    .materials-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cases-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .clients-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .process-flow {
        flex-wrap: wrap;
    }

    .process-step:not(:last-child)::after {
        display: none;
    }
}

/* 平板 (768px - 991px) */
@media (max-width: 991px) {
    .section {
        padding: 4rem 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    /* 导航栏 */
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        gap: 0;
        box-shadow: var(--shadow-2xl);
        transition: right 0.3s ease;
        z-index: 999;
        align-items: flex-start;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 1rem 0;
        color: var(--text-dark) !important;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.125rem;
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-cta {
        margin-top: 1rem;
        text-align: center;
    }

    /* Hero 区域 */
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .trust-bar-content {
        gap: 1.5rem;
        padding: 0 1rem;
    }

    /* 统计数据 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1rem;
    }

    .stat-item h3 {
        font-size: 2.5rem;
    }

    /* 为什么选择我们 */
    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .why-us-image {
        order: -1;
    }

    .experience-badge {
        left: 20px;
        bottom: 20px;
    }

    /* 案例展示 */
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .case-card {
        height: 240px;
    }

    .case-card.large {
        grid-column: span 2;
        grid-row: span 1;
        height: 300px;
    }

    /* 新闻 */
    .news-card.featured {
        flex-direction: column;
    }

    .news-card.featured .news-image {
        width: 100%;
        height: 200px;
    }

    /* 页脚 */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* 页面横幅 */
    .page-banner-content h1 {
        font-size: 2.25rem;
    }

    /* 关于我们 */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-images {
        order: -1;
    }

    .about-img-secondary {
        display: none;
    }

    /* 时间线 */
    .timeline-container::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px !important;
        padding-right: 0 !important;
        text-align: left !important;
        margin-left: 0 !important;
    }

    .timeline-dot {
        left: 10px !important;
        right: auto !important;
    }

    /* 服务详情 */
    .service-detail-card {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-detail-card:nth-child(even) .service-detail-image,
    .service-detail-card:nth-child(even) .service-detail-content {
        order: unset;
    }

    .service-detail-image img {
        height: 280px;
    }

    .materials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 联系页面 */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    /* 团队 */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 客户 */
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 表单 */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* 浮动按钮 */
    .floating-actions {
        right: 1rem;
        bottom: 5rem;
    }

    .floating-btn.quote {
        display: none;
    }

    /* 移动端底部栏 */
    .mobile-bottom-bar {
        display: flex;
    }

    /* 实时通知 */
    .live-notification {
        left: 1rem;
        right: 1rem;
        bottom: 5rem;
        max-width: none;
    }

    /* 报价计算器 */
    .quote-calculator {
        padding: 1.5rem;
    }

    .calculator-row {
        grid-template-columns: 1fr;
    }

    /* 工艺流程 */
    .process-flow {
        flex-direction: column;
        gap: 2rem;
    }

    .process-step {
        width: 100%;
    }
}

/* 手机横屏 (576px - 767px) */
@media (max-width: 767px) {
    .section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    /* Hero */
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-content .lead {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .hero-stat-value {
        font-size: 1.75rem;
    }

    .trust-bar {
        display: none;
    }

    /* 服务 */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* 统计数据 */
    .stats-section {
        padding: 3rem 0;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .stat-item i {
        font-size: 2rem;
    }

    /* 特性列表 */
    .feature-item {
        flex-direction: column;
        text-align: center;
    }

    .feature-icon {
        margin: 0 auto;
    }

    /* 案例 */
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .case-card.large {
        grid-column: span 1;
        height: 280px;
    }

    .case-card {
        height: 200px;
    }

    .case-overlay p {
        display: none;
    }

    .cases-list {
        grid-template-columns: 1fr;
    }

    .case-data {
        flex-wrap: wrap;
    }

    /* 客户评价 */
    .testimonial-content {
        padding: 2rem 1.5rem;
    }

    .testimonial-content p {
        font-size: 1rem;
    }

    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }

    /* 新闻 */
    .news-list {
        grid-template-columns: 1fr;
    }

    /* CTA */
    .cta-content h2 {
        font-size: 1.75rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    /* 页脚 */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-contact li {
        justify-content: center;
    }

    /* 页面横幅 */
    .page-banner {
        min-height: 300px;
    }

    .page-banner-content h1 {
        font-size: 1.875rem;
    }

    /* 服务页面 */
    .service-features {
        grid-template-columns: 1fr;
    }

    .cases-filter {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.875rem;
    }

    /* 团队 */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .team-member-image {
        height: 200px;
    }

    /* 客户 */
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .client-logo {
        height: 70px;
    }

    /* 联系表单 */
    .contact-form-wrapper {
        padding: 1.5rem;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
    }

    .contact-method-icon {
        margin: 0 auto;
    }

    /* 关于页面 */
    .about-content h2 {
        font-size: 1.75rem;
    }

    .service-detail-content h3 {
        font-size: 1.5rem;
    }

    /* 时间线 */
    .timeline-item {
        padding-left: 50px !important;
    }

    .timeline-content h3 {
        font-size: 1.125rem;
    }

    /* FAQ */
    .faq-question {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
    }

    .faq-answer p {
        padding: 0 1.25rem 1rem;
        font-size: 0.9rem;
    }

    /* Logo墙 */
    .logo-wall-item {
        font-size: 1.25rem;
    }

    /* 行业卡片 */
    .industry-card {
        height: 300px;
    }
}

/* 手机竖屏 (< 576px) */
@media (max-width: 575px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo i {
        font-size: 1.5rem;
    }

    /* Hero */
    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    /* 统计数据 */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-item h3 {
        font-size: 1.75rem;
    }

    /* 团队 */
    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-member-image {
        height: 280px;
    }

    /* 材料 */
    .materials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .material-card {
        padding: 1rem;
    }

    .material-icon {
        width: 48px;
        height: 48px;
    }

    .material-icon i {
        font-size: 1.25rem;
    }

    /* 案例筛选 */
    .cases-filter {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 100%;
        max-width: 200px;
    }

    /* 客户 */
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 回到顶部按钮 */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 5rem;
        right: 1rem;
    }

    /* 页脚 */
    .footer {
        padding: 3rem 0 8rem;
    }

    .footer-bottom p {
        font-size: 0.75rem;
    }

    /* 浮动按钮 */
    .floating-actions {
        bottom: 5rem;
        right: 0.5rem;
        gap: 0.5rem;
    }

    .floating-btn {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

/* 超小屏幕 (< 375px) */
@media (max-width: 374px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .service-icon {
        width: 56px;
        height: 56px;
    }

    .service-icon i {
        font-size: 1.5rem;
    }

    .mobile-bottom-bar {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .mobile-bottom-bar .btn {
        padding: 0.6rem;
        font-size: 0.875rem;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .scroll-indicator,
    .back-to-top,
    .hero-buttons,
    .cta-section,
    .footer,
    .floating-actions,
    .mobile-bottom-bar,
    .trust-bar,
    .live-notification {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
        background: none;
        color: var(--text-dark);
    }

    .hero-content {
        color: var(--text-dark);
    }

    .section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }

    .service-card,
    .case-card,
    .news-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    /* 如需深色模式可取消注释
    :root {
        --text-dark: #f1f5f9;
        --text-light: #94a3b8;
        --bg-white: #0f172a;
        --bg-light: #1e293b;
    }
    */
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid currentColor;
    }

    .service-card,
    .case-card,
    .news-card {
        border: 2px solid currentColor;
    }
}
