/* 响应式设计 - 移动端、平板、桌面 */

/* ===== Tablet (768px - 1024px) ===== */
@media (max-width: 1024px) {
    :root {
        --font-size-h1: 32px;
        --font-size-h2: 24px;
        --font-size-h3: 18px;
        --spacing-lg: 16px;
        --spacing-xl: 20px;
        --spacing-2xl: 24px;
    }

    .container {
        padding: 0 var(--spacing-base);
    }

    /* Header */
    .header-content {
        padding: var(--spacing-base) 0;
        height: 60px;
    }

    .logo-text {
        font-size: 16px;
    }

    .nav-menu > ul {
        gap: var(--spacing-lg);
    }

    .nav-menu a {
        font-size: 12px;
    }

    /* Hero */
    .hero {
        padding: 80px var(--spacing-lg) 60px;
        min-height: 500px;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: var(--font-size-h3);
    }

    /* Grid 布局 */
    .advantages-grid,
    .products-grid,
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .partners-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* 间距调整 */
    .advantages,
    .products-preview,
    .services-highlight,
    .cases-preview,
    .team-preview,
    .partners,
    .news-preview {
        padding: var(--spacing-3xl) var(--spacing-lg);
    }

    /* CTA 按钮 */
    .cta-buttons {
        gap: var(--spacing-base);
        flex-wrap: wrap;
    }

    .cta-buttons .btn {
        min-width: 200px;
    }
}

/* ===== Mobile (≤ 768px) ===== */
@media (max-width: 768px) {
    :root {
        --font-size-h1: 28px;
        --font-size-h2: 20px;
        --font-size-h3: 16px;
        --spacing-base: 12px;
        --spacing-lg: 12px;
        --spacing-xl: 16px;
        --spacing-2xl: 20px;
        --spacing-3xl: 24px;
    }

    .container {
        padding: 0 var(--spacing-base);
    }

    /* Header */
    .header {
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .header-content {
        padding: var(--spacing-base) 0;
        height: auto;
        min-height: 56px;
    }

    .logo {
        flex-shrink: 0;
    }

    .logo-text {
        font-size: 14px;
    }

    .logo-subtitle {
        font-size: 9px;
    }

    /* 移动端菜单 */
    .menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .nav-menu {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--color-white);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-base);
        border-bottom: 1px solid var(--color-light);
        margin-left: 0;
    }

    .nav-menu.active {
        max-height: 500px;
    }

    .nav-menu > ul {
        flex-direction: column;
        gap: 0;
        padding: var(--spacing-base);
    }

    .nav-menu li {
        border-bottom: 1px solid var(--color-light);
    }

    .nav-menu a {
        display: block;
        padding: var(--spacing-lg) var(--spacing-base);
        font-size: 14px;
    }

    .dropdown-menu {
        position: static;
        background: var(--color-light);
        border: none;
        box-shadow: none;
        padding: 0;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
    }

    .dropdown:hover .dropdown-menu {
        max-height: 300px;
    }

    .dropdown-menu li {
        border-bottom: 1px solid var(--color-gray-light);
    }

    .dropdown-menu a {
        padding: var(--spacing-base) var(--spacing-lg);
        padding-left: var(--spacing-2xl);
    }

    .header-actions {
        gap: var(--spacing-base);
    }

    .btn-contact {
        display: none;
    }

    /* Hero */
    .hero {
        padding: 60px var(--spacing-base) 40px;
        min-height: 400px;
    }

    .hero-title {
        font-size: 24px;
        margin-bottom: var(--spacing-base);
    }

    .hero-subtitle {
        font-size: 14px;
        margin-bottom: var(--spacing-base);
    }

    .hero-description {
        font-size: 13px;
        margin-bottom: var(--spacing-lg);
    }

    /* Grid 布局 - 全部单列 */
    .advantages-grid,
    .products-grid,
    .services-grid,
    .cases-grid,
    .team-grid,
    .news-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-base);
    }

    /* 卡片调整 */
    .advantage-card,
    .product-card,
    .case-card,
    .team-card,
    .news-card {
        padding: var(--spacing-lg);
    }

    .advantage-number {
        font-size: 28px;
    }

    .service-num {
        font-size: 20px;
    }

    .team-avatar {
        width: 100%;
        height: 100%;
    }

    .team-avatar-wrapper {
        height: auto;
        aspect-ratio: 3 / 4;
    }

    /* 间距 */
    .section-header {
        margin-bottom: var(--spacing-2xl);
    }

    .section-header h2 {
        font-size: var(--font-size-h2);
        margin-bottom: var(--spacing-base);
    }

    .advantages,
    .products-preview,
    .services-highlight,
    .cases-preview,
    .team-preview,
    .partners,
    .news-preview {
        padding: var(--spacing-2xl) var(--spacing-base);
    }

    .cta-section {
        padding: var(--spacing-2xl) var(--spacing-base);
    }

    .cta-main h2 {
        font-size: var(--font-size-h2);
    }

    .cta-main p {
        font-size: var(--font-size-base);
    }

    .cta-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .cta-features {
        margin-top: var(--spacing-lg);
    }

    .cta-feature-item {
        padding: var(--spacing-base) var(--spacing-lg);
    }

    /* Page Header 响应式 */
    .page-header {
        padding: 60px var(--spacing-base) 40px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .page-header p {
        font-size: 14px;
    }

    .cta-deco-1,
    .cta-deco-2,
    .cta-deco-3 {
        display: none;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .footer-section h4 {
        font-size: 14px;
    }

    .footer-section p,
    .footer-section a {
        font-size: 12px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .footer-links {
        flex-direction: column;
        gap: var(--spacing-base);
    }

    /* 浮动按钮 */
    #floatingContact {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .back-to-top {
        width: 36px;
        height: 36px;
        font-size: 16px;
        right: var(--spacing-base);
        bottom: calc(var(--spacing-base) + 68px);
    }

    /* 按钮 */
    .btn {
        padding: var(--spacing-base) var(--spacing-lg);
        font-size: 12px;
    }

    .btn-large {
        padding: var(--spacing-lg) var(--spacing-lg);
        font-size: 14px;
    }

    .btn-text {
        font-size: 12px;
    }

    /* 文本 */
    .news-card h3 {
        font-size: 14px;
    }

    .product-card h3,
    .service-item h3,
    .case-card h3,
    .team-card h3 {
        font-size: 16px;
    }

    .product-card p,
    .service-item p,
    .case-card p,
    .team-card p,
    .news-card p {
        font-size: 12px;
    }
}

/* ===== 超小屏幕 (< 480px) ===== */
@media (max-width: 480px) {
    :root {
        --font-size-h1: 22px;
        --font-size-h2: 18px;
        --font-size-h3: 14px;
        --spacing-base: 8px;
    }

    .logo-text {
        font-size: 12px;
    }

    .hero-title {
        font-size: 20px;
    }

    .hero-description {
        font-size: 12px;
    }

    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header h2 {
        font-size: 18px;
    }

    .section-header p {
        font-size: 12px;
    }

    .advantage-number {
        font-size: 24px;
    }

    .product-icon {
        font-size: 36px;
    }

    .team-avatar {
        width: 100%;
        height: 100%;
        font-size: 28px;
    }

    .footer-section h4 {
        font-size: 13px;
    }

    .cta-section h2 {
        font-size: 18px;
    }
}

/* ===== 横屏模式 ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 40px var(--spacing-lg);
    }

    .hero-title {
        font-size: 28px;
        margin-bottom: var(--spacing-base);
    }

    .hero-subtitle {
        margin-bottom: var(--spacing-base);
    }
}

/* ===== 打印样式 ===== */
@media print {
    .header,
    .footer,
    .floating-contact,
    .back-to-top,
    .btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .card,
    .advantage-card,
    .product-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* ===== 高分辨率屏幕 ===== */
@media (min-width: 1440px) {
    :root {
        --font-size-h1: 48px;
        --max-width: 1400px;
    }

    .hero-title {
        font-size: 64px;
    }
}
