/* 响应式设计样式 - responsive.css */

/* ========================================
   平板设备 (768px - 1024px)
======================================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--space-lg);
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .diamond-animation {
        width: 300px;
        height: 200px;
    }
    
    .diamond {
        width: 60px;
        height: 60px;
    }
    
    .diamond-process {
        flex-wrap: wrap;
        gap: var(--space-lg);
        justify-content: center;
    }
    
    .diamond-step {
        width: 80px;
        height: 80px;
    }
    
    .step-arrow {
        display: none;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--space-md);
    }
    
    /* 新增组件响应式样式 */
    .execution-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .process-timeline {
        flex-direction: column;
        align-items: center;
    }
    
    .process-arrow {
        transform: rotate(90deg);
        margin: var(--space-sm) 0;
    }
    
    .ai-tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .matrix-table {
        grid-template-columns: 120px repeat(5, 1fr);
        font-size: var(--text-xs);
        gap: 1px;
    }
    
    .matrix-cell {
        padding: var(--space-sm);
        min-height: 45px;
        font-size: var(--text-xs);
    }
    
    .matrix-header .matrix-cell {
        font-size: var(--text-sm);
        font-weight: 600;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-marker {
        width: 40px;
        height: 40px;
        font-size: var(--text-sm);
    }
    
    .timeline-content {
        padding: var(--space-md);
    }
    
    /* 流程图平板适配 */
    .flow-stages {
        justify-content: center;
        padding: var(--space-md);
        flex-wrap: wrap;
        gap: var(--space-lg);
    }
    
    .flow-stage {
        min-width: 220px;
        flex: 1 1 220px;
        max-width: 300px;
        padding: var(--space-lg);
    }
    
    .level-title {
        font-size: var(--text-xl);
    }
    
    .level-arrow {
        font-size: 2rem;
        margin: var(--space-lg) 0;
    }
    
    .stage-header h4 {
        font-size: var(--text-lg);
    }
    
    .stage-icon {
        font-size: 2rem;
    }
    
    .principles-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* ========================================
   移动设备 (320px - 768px)
======================================== */
@media (max-width: 768px) {
    /* 基础布局调整 */
    .container {
        padding: 0 var(--space-md);
    }
    
    .section {
        padding: var(--space-xl) 0;
    }
    
    .section-title {
        font-size: var(--text-3xl);
        margin-bottom: var(--space-lg);
    }
    
    .section-subtitle {
        font-size: var(--text-lg);
        margin-bottom: var(--space-xl);
    }
    
    /* 导航栏移动端适配 */
    .navbar-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-lg);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-normal);
        z-index: 999;
    }
    
    .navbar-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .navbar-toggle {
        display: flex;
    }
    
    .navbar-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .navbar-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .navbar-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* 英雄区域移动端适配 */
    .hero {
        min-height: 100vh;
        padding: var(--space-2xl) 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .hero-title {
        font-size: var(--text-4xl);
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: var(--text-lg);
    }
    
    .hero-features {
        justify-content: center;
    }
    
    .feature-tag {
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-sm);
    }
    
    .cta-button {
        width: 100%;
        text-align: center;
        padding: var(--space-lg) var(--space-xl);
    }
    
    /* 钻石动画移动端适配 */
    .diamond-animation {
        width: 250px;
        height: 150px;
    }
    
    .diamond {
        width: 40px;
        height: 40px;
    }
    
    .step-label {
        font-size: var(--text-xs);
    }
    
    /* 架构图移动端适配 */
    .architecture-diagram {
        gap: var(--space-md);
    }
    
    .layer {
        padding: var(--space-lg);
    }
    
    .layer-title {
        font-size: var(--text-xl);
    }
    
    .layer-subtitle {
        font-size: var(--text-base);
    }
    
    .diamond-process {
        flex-direction: column;
        gap: var(--space-lg);
        align-items: center;
    }
    
    .diamond-step {
        width: 70px;
        height: 70px;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        margin: var(--space-sm) 0;
    }
    
    /* 卡片网格移动端适配 */
    .card-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .card {
        padding: var(--space-lg);
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: var(--text-xl);
    }
    
    .card-title {
        font-size: var(--text-lg);
    }
    
    /* 业务增强回路移动端适配 */
    .loop-description {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .loop-visual {
        order: -1;
    }
    
    .loop-step {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
    
    .step-number {
        align-self: center;
    }
    
    .loop-challenges {
        padding: var(--space-lg);
    }
    
    /* 里程碑网格移动端适配 */
    .milestones-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xs);
    }
    
    .milestone-name {
        font-size: 10px;
    }
    
    /* 模态框移动端适配 */
    .modal-dialog {
        width: 95%;
        max-height: 90vh;
        margin: var(--space-sm);
    }
    
    .modal-header {
        padding: var(--space-md);
    }
    
    .modal-title {
        font-size: var(--text-lg);
    }
    
    .modal-body {
        padding: var(--space-md);
        max-height: 70vh;
    }
    
    .modal-applications,
    .modal-tools {
        flex-direction: column;
        align-items: flex-start;
    }

    /* 页脚移动端适配 */
    .footer-links {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .footer-title {
        font-size: var(--text-lg);
    }
}

/* ========================================
   超小屏设备 (320px - 480px)
======================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-base);
    }
    
    .section-title {
        font-size: var(--text-2xl);
    }
    
    .diamond-animation {
        width: 200px;
        height: 120px;
    }
    
    .diamond {
        width: 30px;
        height: 30px;
    }
    
    .diamond:nth-child(1),
    .diamond:nth-child(2) {
        top: 10px;
    }
    
    .diamond:nth-child(3),
    .diamond:nth-child(4) {
        bottom: 10px;
    }
    
    .diamond:nth-child(1),
    .diamond:nth-child(3) {
        left: 30px;
    }
    
    .diamond:nth-child(2),
    .diamond:nth-child(4) {
        right: 30px;
    }
    
    .layer {
        padding: var(--space-md);
    }
    
    .diamond-step {
        width: 60px;
        height: 60px;
    }
    
    .card {
        padding: var(--space-md);
    }
    
    /* 移动端新增组件优化 */
    .methodology-tags {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }
    
    .execution-framework {
        padding: var(--space-md);
    }
    
    .process-step {
        min-width: auto;
        max-width: none;
        margin-bottom: var(--space-md);
    }
    
    .process-icon {
        width: 50px;
        height: 50px;
        font-size: var(--text-xl);
    }
    
    .process-methods {
        gap: var(--space-xs);
    }
    
    .method-badge {
        font-size: 10px;
        padding: 2px var(--space-xs);
    }
    
    .ai-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-tool-item {
        padding: var(--space-md);
    }
    
    .matrix-table {
        grid-template-columns: 100px repeat(5, 1fr);
        font-size: 10px;
        gap: 1px;
    }
    
    .matrix-cell {
        padding: var(--space-xs);
        min-height: 40px;
        font-size: 10px;
    }
    
    .matrix-header .matrix-cell {
        font-size: 11px;
        font-weight: 600;
        padding: var(--space-sm) var(--space-xs);
    }
    
    .matrix-legend {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .timeline {
        gap: var(--space-lg);
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline-marker {
        width: 30px;
        height: 30px;
        font-size: var(--text-xs);
        margin-bottom: var(--space-sm);
    }
    
    .collaboration-framework {
        gap: var(--space-xl);
    }
    
    /* 流程图移动端适配 */
    .flow-level {
        margin-bottom: var(--space-xl);
    }
    
    .level-title {
        font-size: var(--text-lg);
        margin-bottom: var(--space-md);
    }
    
    .level-arrow {
        font-size: 1.8rem;
        margin: var(--space-md) 0;
    }
    
    .flow-stages {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
        overflow-x: visible;
        min-height: auto;
        padding: var(--space-md) 0;
    }
    
    .flow-stage {
        min-width: auto;
        width: 100%;
        max-width: 350px;
        flex: none;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
        font-size: var(--text-2xl);
        margin: var(--space-sm) 0;
    }
    
    .principles-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    /* 视图切换移动端适配 */
    .view-toggle {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
        padding: var(--space-md);
    }
    
    .toggle-buttons {
        justify-self: center;
    }
    
    .toggle-btn {
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-sm);
    }
    
    /* 流程图超小屏优化 */
    .flow-description {
        font-size: var(--text-base);
        margin-bottom: var(--space-lg);
    }
    
    .flow-stage {
        padding: var(--space-md);
        margin-bottom: var(--space-sm);
    }
    
    .stage-header h4 {
        font-size: var(--text-lg);
    }
    
    .stage-icon {
        font-size: 1.8rem;
    }
    
    .stage-duration {
        font-size: 10px;
        padding: 2px var(--space-xs);
    }
    
    .role-departments {
        justify-content: center;
    }
    
    .dept-tag {
        font-size: 10px;
        padding: 2px var(--space-xs);
    }
    
    .collaboration-principles {
        padding: var(--space-md);
    }
    
    .principle-item {
        padding: var(--space-md);
    }
    
    .principle-icon {
        font-size: 2rem;
    }
}

/* ========================================
   高分辨率设备优化
======================================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
        padding: 0 var(--space-xl);
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* ========================================
   打印样式
======================================== */
@media print {
    * {
        color: black !important;
        background: white !important;
    }
    
    .navbar,
    .cta-button,
    .footer {
        display: none !important;
    }
    
    .hero {
        background: white !important;
        color: black !important;
        page-break-after: always;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    .card {
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }
}

/* ========================================
   可访问性增强
======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .diamond {
        animation: none;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #1a202c;
        --text-color: #e2e8f0;
        --text-light: #a0aec0;
        --white: #2d3748;
        --gray-100: #2d3748;
        --gray-200: #4a5568;
        --gray-300: #718096;
    }
    
    .navbar {
        background: rgba(45, 55, 72, 0.95);
    }
    
    .card,
    .layer {
        background: var(--gray-100);
        border-color: var(--gray-300);
    }
}