/* ==================== 
   响应式样式表
   ==================== */

/* ==================== 大屏幕 (≤ 1280px) ==================== */
@media (max-width: 1280px) {
    .container {
        max-width: 1024px;
    }
    
    .hero-title {
        font-size: var(--text-4xl);
    }
    
    .title-line {
        font-size: var(--text-2xl);
    }
    
    .architecture-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .value-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== 平板 (≤ 1024px) ==================== */
@media (max-width: 1024px) {
    .container {
        max-width: 768px;
    }
    
    /* 导航栏 */
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: var(--spacing-xl);
        gap: var(--spacing-md);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        padding: var(--spacing-md);
        border-bottom: 1px solid var(--border-light);
    }
    
    /* Hero */
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .avatar-frame {
        width: 220px;
        height: 220px;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    /* 个人简介 */
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .service-info {
        grid-template-columns: 1fr;
    }
    
    /* 项目介绍 */
    .architecture-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mode-cards {
        grid-template-columns: 1fr;
    }
    
    .value-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 合作案例 */
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    /* 商务咨询 */
    .consult-content {
        grid-template-columns: 1fr;
    }
    
    /* 留言互动 */
    .contact-content {
        grid-template-columns: 1fr;
    }
}

/* ==================== 小平板 (≤ 768px) ==================== */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2.25rem;
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
    }
    
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    section {
        padding: var(--spacing-2xl) 0;
    }
    
    /* Hero */
    .hero-container {
        padding: var(--spacing-2xl) var(--spacing-lg);
    }
    
    .avatar-frame {
        width: 180px;
        height: 180px;
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .title-line {
        font-size: var(--text-xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-base);
    }
    
    .hero-cta {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .btn {
        width: 100%;
    }
    
    /* 项目介绍 */
    .project-block {
        padding: var(--spacing-xl);
    }
    
    .architecture-grid {
        grid-template-columns: 1fr;
    }
    
    .value-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-item {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    /* 页脚 */
    .footer-content {
        flex-direction: column;
        gap: var(--spacing-xl);
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ==================== 手机 (≤ 640px) ==================== */
@media (max-width: 640px) {
    :root {
        --text-5xl: 1.875rem;
        --text-4xl: 1.5rem;
        --text-3xl: 1.25rem;
        --text-2xl: 1.125rem;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* 导航栏 */
    .nav-container {
        padding: var(--spacing-md);
    }
    
    .nav-logo {
        font-size: var(--text-base);
    }
    
    /* Hero */
    .hero {
        min-height: 100vh;
        padding-top: 80px;
    }
    
    .avatar-frame {
        width: 150px;
        height: 150px;
    }
    
    .hero-benchmark {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: var(--spacing-md);
    }
    
    /* 区块标题 */
    .section-title {
        font-size: var(--text-2xl);
    }
    
    .section-header {
        margin-bottom: var(--spacing-2xl);
    }
    
    /* 卡片 */
    .about-card {
        padding: var(--spacing-lg);
    }
    
    .case-image {
        height: 200px;
    }
    
    .case-content {
        padding: var(--spacing-lg);
    }
    
    /* 表单 */
    .consult-form-wrapper,
    .message-form-wrapper,
    .messages-display {
        padding: var(--spacing-lg);
    }
    
    /* 点赞 */
    .like-section {
        padding: var(--spacing-lg);
    }
    
    .like-content {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    /* 返回顶部 */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: var(--spacing-md);
        right: var(--spacing-md);
    }
}

/* ==================== 超小屏幕 (≤ 480px) ==================== */
@media (max-width: 480px) {
    :root {
        font-size: 14px;
    }
    
    .avatar-frame {
        width: 120px;
        height: 120px;
    }
    
    .hero-title {
        font-size: var(--text-2xl);
    }
    
    .title-line {
        font-size: var(--text-lg);
    }
    
    .block-number {
        font-size: var(--text-2xl);
    }
    
    .block-title {
        font-size: var(--text-xl);
    }
}

/* ==================== 打印样式 ==================== */
@media print {
    .navbar,
    .hero-scroll,
    .back-to-top,
    .like-section,
    .message-form-wrapper,
    .consult-form-wrapper {
        display: none;
    }
    
    .hero {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }
    
    section {
        page-break-inside: avoid;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* ==================== 高对比度模式 ==================== */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #000080;
        --text-primary: #000;
        --text-secondary: #333;
    }
}

/* ==================== 减少动画模式 ==================== */
@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;
    }
}
