/* 响应式样式 - 适配不同屏幕尺寸 */

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    :root {
        --text-5xl: 40px;
        --text-4xl: 32px;
        --text-3xl: 26px;
    }
    
    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    
    /* 网格调整 */
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* 页脚调整 */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Hero区域 */
    .hero {
        height: 500px;
    }
    
    .hero-title {
        font-size: var(--text-4xl);
    }
}

/* 移动设备 (< 768px) */
@media (max-width: 768px) {
    :root {
        --navbar-height: var(--navbar-height-mobile);
        --text-5xl: 32px;
        --text-4xl: 28px;
        --text-3xl: 24px;
        --text-2xl: 20px;
    }
    
    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    
    /* 导航栏 */
    .nav-menu {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background-color: var(--color-bg);
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-md);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        width: 100%;
        padding: var(--space-md);
        /* border-bottom: 1px solid var(--color-border-light); */
    }
    
    .nav-link::after {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Logo */
    .logo-text .company-name {
        font-size: var(--text-base);
    }
    
    .logo-text .company-name-en {
        display: none;
    }
    
    /* 网格调整 */
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    /* 嵌套的grid-2保持两列 */
    .grid-2 .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: 1fr;
    }
    
    /* 页脚 */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    /* Hero区域 */
    .hero {
        height: 450px;
        margin-top: var(--navbar-height);
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-base);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 200px;
    }
    
    /* 页面横幅 */
    .page-banner {
        padding: var(--space-2xl) 0;
    }
    
    .page-banner h1 {
        font-size: var(--text-3xl);
    }
    
    /* 区块 */
    .section {
        padding: var(--space-2xl) 0;
    }
    
    .section-header h2 {
        font-size: var(--text-2xl);
    }
    
    /* 特性卡片 */
    .feature-card {
        padding: var(--space-lg);
    }
    
    /* 产品表格 */
    .product-table {
        font-size: var(--text-sm);
    }
    
    .product-table th,
    .product-table td {
        padding: var(--space-sm);
    }
    
    /* 时间轴 */
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-item::before {
        left: -24px;
    }
    
    /* 服务卡片 */
    .service-card {
        padding: var(--space-lg);
    }
    
    /* 可持续发展卡片 */
    .sustain-card {
        flex-direction: column;
        text-align: center;
        padding: var(--space-lg);
    }
    
    .sustain-icon {
        margin: 0 auto;
    }
    
    /* 返回顶部按钮 */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: var(--space-md);
        right: var(--space-md);
    }
    
    /* 联系信息 */
    .contact-info-card {
        padding: var(--space-lg);
    }
    
    /* 流程步骤 */
    .process-step {
        flex-direction: column;
        text-align: center;
    }
}

/* 小屏手机 (< 480px) */
@media (max-width: 480px) {
    :root {
        --text-3xl: 22px;
        --text-2xl: 18px;
    }
    
    .hero {
        height: 400px;
    }
    
    .hero-title {
        font-size: var(--text-2xl);
    }
    
    .section-header h2 {
        font-size: var(--text-xl);
    }
    
    .section-header h2::after {
        width: 40px;
        height: 3px;
    }
    
    /* 产品表格横向滚动 */
    .product-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .product-table {
        min-width: 600px;
    }
    
    /* 合作伙伴网格 */
    .partner-grid {
        gap: var(--space-sm);
    }
    
    .partner-item {
        padding: var(--space-sm);
        font-size: var(--text-xs);
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    .mobile-menu-btn {
        display: none !important;
    }
    
    .hero {
        height: auto;
        padding: var(--space-xl) 0;
        margin-top: 0;
    }
    
    .section {
        padding: var(--space-lg) 0;
        page-break-inside: avoid;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--color-border);
    }
}
