/* ============================================
   效率工厂网站 - 响应式样式表
   适配所有设备：手机、平板、桌面
   ============================================ */

/* 1. 通用响应式调整 */
@media (max-width: 1600px) {
    .container {
        max-width: 1400px;
        padding: 0 40px;
    }
}

@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
        padding: 0 30px;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 25px;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
}

/* 2. 平板设备 (768px - 991px) */
@media (max-width: 991px) {
    /* 基础调整 */
    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* 导航栏响应式 */
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        padding: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        display: none;
        z-index: 999;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        display: block;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        padding: 1rem 0;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid #f1f1f1;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        background: #f8f9fa;
        color: #007bff;
    }
    
    .nav-links a.active::after {
        display: none;
    }
    
    .nav-links a.btn-nav {
        margin: 1rem 2rem;
        text-align: center;
        border: none;
    }
    
    /* Hero区域响应式 */
    .hero {
        padding: 140px 0 80px;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .dashboard-preview {
        transform: none;
        max-width: 500px;
        margin: 0 auto;
    }
    
    /* 价值主张卡片响应式 */
    .value-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    /* 解决方案卡片响应式 */
    .solution-cards {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    /* APP CTA响应式 */
    .app-cta .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .app-cta h2 {
        text-align: center;
    }
    
    .app-badges {
        justify-content: center;
    }
    
    /* 客户信任区响应式 */
    .client-logos {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }
    
    /* ROI计算器响应式 */
    .calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .calculator-info h2 {
        text-align: center;
    }
    
    /* 页脚响应式 */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* APP下载页面响应式 */
    .app-hero .container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .app-hero h1 {
        font-size: 2.5rem;
    }
    
    .app-tagline {
        font-size: 1.2rem;
    }
    
    .download-buttons {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .phone-mockup {
        margin-top: 2rem;
    }
    
    /* 功能特性网格响应式 */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    /* 平台支持响应式 */
    .platforms {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* 解决方案页面响应式 */
    .solutions-nav {
        top: 70px;
    }
    
    .solution-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .approach-steps,
    .systems-grid,
    .expertise-grid,
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 成功案例页面响应式 */
    .case-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .case-metrics {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    .result-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    /* 资源中心页面响应式 */
    .whitepapers-grid,
    .blog-grid,
    .tools-grid,
    .webinar-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .subscribe-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* 关于我们页面响应式 */
    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .intro-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .image-placeholder {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }
    
    .timeline:before {
        left: 40px;
    }
    
    .timeline-year {
        width: 80px;
        padding-right: 1rem;
    }
    
    .team-grid,
    .partners-grid,
    .certs-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    /* 联系我们页面响应式 */
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .booking-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .channels-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .solution-checkboxes {
        grid-template-columns: 1fr;
    }
    
    /* 聊天机器人响应式 */
    .chatbot-container {
        width: calc(100vw - 40px);
        right: 20px;
        bottom: 100px;
    }
    
    /* 模态框响应式 */
    .modal-content {
        width: 90%;
        max-width: 400px;
    }
    
    /* 表格响应式 */
    .comparison-table {
        font-size: 0.9rem;
    }
}

/* 3. 移动设备 (576px - 767px) */
@media (max-width: 767px) {
    /* 基础调整 */
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    /* 导航栏更小屏幕 */
    .nav-menu {
        top: 70px;
    }
    
    /* Hero区域 */
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }
    
    .hero-buttons .btn {
        text-align: center;
    }
    
    /* 卡片网格响应式 */
    .value-cards,
    .solution-cards,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .value-card,
    .solution-card,
    .feature-card {
        padding: 1.5rem;
    }
    
    /* APP CTA */
    .app-cta {
        padding: 60px 0;
    }
    
    .app-badges {
        flex-direction: column;
        align-items: stretch;
    }
    
    .app-badge {
        justify-content: center;
    }
    
    .phone-mockup-small {
        width: 200px;
        height: 400px;
    }
    
    /* 客户信任区 */
    .client-logos {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .client-logo {
        height: 80px;
        font-size: 1rem;
    }
    
    /* ROI计算器 */
    .roi-calculator {
        padding: 60px 0;
    }
    
    .calculator-form {
        padding: 1.5rem;
    }
    
    /* 页脚 */
    .footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-col {
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* APP下载页面 */
    .app-hero {
        padding: 120px 0 60px;
    }
    
    .app-hero h1 {
        font-size: 2rem;
    }
    
    .download-stats {
        justify-content: center;
    }
    
    .download-buttons .download-btn {
        padding: 0.8rem 1rem;
    }
    
    .download-btn i {
        font-size: 1.5rem;
        margin-right: 0.8rem;
    }
    
    .phone-mockup {
        width: 250px;
        height: 500px;
    }
    
    .phone-screen {
        width: 230px;
        height: 480px;
    }
    
    /* 版本日志 */
    .version-card {
        padding: 1rem;
    }
    
    /* 解决方案页面 */
    .solution-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .solution-tab {
        width: 100%;
        text-align: center;
    }
    
    .tools-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    /* 成功案例页面 */
    .cases-list {
        padding: 60px 0;
    }
    
    .case-card {
        margin-bottom: 2rem;
    }
    
    .case-content {
        padding: 1.5rem;
    }
    
    .case-metrics {
        grid-template-columns: 1fr;
    }
    
    .detail-section ul,
    .detail-section ol {
        padding-left: 1rem;
    }
    
    /* 资源中心页面 */
    .category-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .category-tab {
        width: 100%;
        text-align: center;
    }
    
    .whitepaper-card,
    .blog-card,
    .tool-card,
    .webinar-card {
        padding: 1.5rem;
    }
    
    /* 关于我们页面 */
    .timeline:before {
        left: 30px;
    }
    
    .timeline-year {
        width: 60px;
        font-size: 1.1rem;
        padding-right: 0.8rem;
    }
    
    .timeline-content {
        padding-left: 1.5rem;
    }
    
    .photo-placeholder {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }
    
    .partners-grid,
    .certs-grid {
        grid-template-columns: 1fr;
    }
    
    /* 联系我们页面 */
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .channels-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-placeholder {
        padding: 1rem;
    }
    
    .subscribe-form-small {
        flex-direction: column;
    }
    
    .subscribe-form-small button {
        width: 100%;
        padding: 0.5rem;
    }
    
    /* 支持按钮响应式 */
    .support-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .support-buttons .btn {
        text-align: center;
    }
}

/* 4. 小屏幕移动设备 (< 576px) */
@media (max-width: 575px) {
    /* 基础调整 */
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    /* 页面头部 */
    .page-header {
        padding: 120px 0 60px;
        margin-top: 70px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    /* 价值图标调整 */
    .value-icon,
    .solution-icon,
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* 仪表板预览 */
    .dashboard-preview {
        padding: 1.5rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    /* APP徽章 */
    .app-badge i {
        font-size: 1.5rem;
        margin-right: 0.8rem;
    }
    
    /* 下载按钮 */
    .download-btn {
        padding: 0.7rem 1rem;
    }
    
    .download-btn i {
        font-size: 1.3rem;
        margin-right: 0.6rem;
    }
    
    .btn-label {
        font-size: 0.9rem;
    }
    
    .btn-sub {
        font-size: 0.7rem;
    }
    
    /* 表单调整 */
    .calculator-form,
    .contact-form {
        padding: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* 模态框调整 */
    .modal-content {
        width: 95%;
        max-width: 350px;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* 滚动到顶部按钮 */
    .scroll-top-btn {
        bottom: 80px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* 表格完全响应式 */
    .comparison-table table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* 5. 超小屏幕设备 (< 400px) */
@media (max-width: 400px) {
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .download-btn {
        flex-direction: column;
        text-align: center;
        padding: 0.8rem;
    }
    
    .download-btn i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .btn-text {
        align-items: center;
    }
    
    /* 统计项 */
    .download-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-item {
        justify-content: center;
    }
    
    /* 二维码 */
    .qr-code {
        width: 120px;
        height: 120px;
    }
    
    /* 手机模拟器 */
    .phone-mockup {
        width: 200px;
        height: 400px;
    }
    
    .phone-screen {
        width: 180px;
        height: 380px;
    }
}

/* 6. 横屏手机设备 */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .page-header {
        padding: 100px 0 40px;
    }
    
    .nav-menu {
        max-height: calc(100vh - 70px);
    }
    
    .chatbot-body {
        height: 250px;
    }
}

/* 7. 平板横屏设备 */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .container {
        max-width: 900px;
    }
    
    .hero .container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

/* 8. 大屏幕桌面设备 (> 1600px) */
@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
        padding: 0 60px;
    }
    
    h1 {
        font-size: 4rem;
    }
    
    h2 {
        font-size: 3rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .value-cards,
    .solution-cards {
        gap: 3rem;
    }
    
    .value-card,
    .solution-card {
        padding: 3rem;
    }
}

/* 9. 打印样式 */
@media print {
    /* 隐藏不需要打印的元素 */
    .navbar,
    .chatbot-widget,
    .hero-buttons,
    .calculator-form,
    .footer-social,
    .chatbot-container,
    .btn,
    .solution-tabs,
    .filter-tabs,
    .category-tabs,
    .download-form,
    .subscribe-form,
    .contact-form,
    .booking-calendar,
    .contact-channels,
    .scroll-top-btn,
    .download-buttons {
        display: none !important;
    }
    
    /* 打印调整 */
    body {
        font-size: 12pt !important;
        line-height: 1.5 !important;
        color: #000 !important;
        background: white !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .page-header {
        margin-top: 0 !important;
        padding: 50px 0 !important;
        background: white !important;
        color: #000 !important;
    }
    
    .page-header h1 {
        color: #000 !important;
    }
    
    .page-subtitle {
        color: #666 !important;
    }
    
    /* 防止内容跨页中断 */
    .solution-detail,
    .case-card,
    .whitepaper-card,
    .blog-card,
    .team-member,
    .info-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    /* 链接显示URL */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.9em;
        color: #666;
    }
    
    /* 表格打印优化 */
    table {
        border-collapse: collapse !important;
        width: 100% !important;
    }
    
    th, td {
        border: 1px solid #ddd !important;
        padding: 8px !important;
    }
    
    /* 图片优化 */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* 10. 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .value-card,
    .solution-card,
    .calculator-form,
    .dashboard-preview,
    .feature-card,
    .tool-card,
    .blog-card,
    .whitepaper-card,
    .webinar-card,
    .case-card,
    .team-member,
    .partner-card,
    .cert-card,
    .info-card {
        background-color: #2d2d2d;
        color: #e0e0e0;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #ffffff;
    }
    
    p, .section-subtitle, .form-group label {
        color: #b0b0b0;
    }
    
    .client-logo {
        background-color: #2d2d2d;
        color: #b0b0b0;
    }
    
    .footer {
        background-color: #121212;
    }
    
    /* 表格暗色模式 */
    .comparison-table table {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .comparison-table th {
        background: linear-gradient(135deg, #0056b3, #0088ff);
    }
    
    .comparison-table td {
        border-bottom-color: #404040;
    }
    
    .comparison-table tr:hover {
        background: #3d3d3d;
    }
    
    /* 表单暗色模式 */
    input, select, textarea {
        background: #2d2d2d;
        color: #e0e0e0;
        border-color: #404040;
    }
    
    input:focus, select:focus, textarea:focus {
        border-color: #007bff;
    }
    
    /* 工具提示暗色模式 */
    .tooltip {
        background: #333;
        color: #fff;
    }
}

/* 11. 高对比度模式 */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #0056b3;
        color: #fff;
    }
    
    .btn-secondary {
        border-color: #0056b3;
        color: #0056b3;
    }
    
    .btn-secondary:hover {
        background: #0056b3;
        color: #fff;
    }
    
    a {
        text-decoration: underline;
    }
    
    .value-card, 
    .solution-card,
    .feature-card {
        border: 2px solid #000;
    }
}

/* 12. 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-buttons .btn:hover,
    .solution-card:hover,
    .value-card:hover,
    .feature-card:hover {
        transform: none !important;
    }
    
    .dashboard-preview:hover {
        transform: perspective(1000px) rotateY(-10deg) !important;
    }
}

/* 13. 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    /* 增加触摸目标尺寸 */
    .btn,
    .nav-links a,
    .category-tab,
    .solution-tab,
    .filter-tab {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    /* 移除悬停效果 */
    .nav-links a:hover::after {
        display: none;
    }
    
    .value-card:hover,
    .solution-card:hover,
    .feature-card:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }
    
    /* 增加表单元素间距 */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    /* 调整滑块 */
    .slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }
}

/* 14. 宽屏显示器优化 */
@media (min-width: 2000px) {
    .container {
        max-width: 1800px;
    }
    
    .hero .container,
    .app-hero .container,
    .app-cta .container,
    .calculator-wrapper {
        gap: 6rem;
    }
    
    .value-cards,
    .solution-cards,
    .features-grid,
    .platforms {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}