/* ============================================
   VittelTech 官网响应式样式
   ============================================ */

/* ============================================
   大屏幕 (≤1280px)
   ============================================ */
@media (max-width: 1280px) {
    .container {
        max-width: 100%;
        padding: 0 var(--spacing-xl);
    }

    .business-grid {
        gap: var(--spacing-lg);
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    }

    .footer-grid > .footer-col:last-child {
        grid-column: span 2;
    }
}

/* ============================================
   平板端 (≤1024px)
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --header-height: 70px;
    }

    .slide-title {
        font-size: 2.75rem;
    }

    .slide-subtitle {
        font-size: 1.125rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .business-card:nth-child(3) {
        grid-column: span 2;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl) var(--spacing-lg);
    }

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

    .advantage-item:nth-child(5),
    .advantage-item:nth-child(6) {
        grid-column: span 1;
    }

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

    .news-card:nth-child(1) {
        grid-column: span 2;
    }

    .news-card.news-featured .news-image {
        height: 250px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-2xl);
    }

    .footer-col.footer-about {
        grid-column: span 2;
    }
}

/* ============================================
   平板竖屏/大手机 (≤768px)
   ============================================ */
@media (max-width: 768px) {
    /* 导航栏 */
    .header {
        height: var(--header-height);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        /* 移除bottom: 0，让高度根据内容自适应 */
        flex-direction: column;
        align-items: stretch;
        background: var(--bg-white);
        padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-2xl);
        gap: 0;
        transform: translateX(100%);
        transition: transform var(--transition-normal);
        overflow-y: auto;
        /* 设置最大高度，防止过长 */
        max-height: calc(100vh - var(--header-height));
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border-light);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

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

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--spacing-lg);
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-primary);
        transition: all var(--transition-fast);
    }

    .nav-link:hover {
        background: var(--bg-light);
        color: var(--primary-color);
    }

    .nav-link i {
        transition: transform var(--transition-fast);
        font-size: 0.875rem;
    }

    .nav-item.open .nav-link i {
        transform: rotate(180deg);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: var(--spacing-sm) 0 var(--spacing-md) var(--spacing-xl);
        display: none;
        background: rgba(243, 244, 246, 0.5);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        margin-top: 1px;
    }

    .nav-item.open .dropdown-menu {
        display: block;
        animation: fadeInUp 0.3s ease;
    }

    .dropdown-menu li a {
        display: flex;
        align-items: center;
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.875rem;
        color: var(--text-secondary);
        transition: all var(--transition-fast);
        border-left: 2px solid transparent;
    }

    .dropdown-menu li a:hover {
        color: var(--primary-color);
        background: rgba(255, 255, 255, 0.7);
        padding-left: var(--spacing-xl);
        border-left-color: var(--primary-color);
    }

    .dropdown-menu li:last-child a {
        border-bottom: none;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Banner */
    .hero-slider {
        height: auto;
        min-height: 100vh;
    }

    .slide-content {
        padding: calc(var(--header-height) + var(--spacing-2xl)) var(--spacing-lg) var(--spacing-3xl);
    }

    .slide-title {
        font-size: 2rem;
    }

    .slide-subtitle {
        font-size: 1rem;
    }

    .slide-desc {
        font-size: 1rem;
    }

    .slide-btns {
        flex-direction: column;
    }

    .slide-btns .btn {
        width: 100%;
    }

    .scroll-indicator {
        display: none;
    }

    /* Section */
    .section {
        padding: var(--spacing-2xl) 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* 核心业务 */
    .business-grid {
        grid-template-columns: 1fr;
    }

    .business-card:nth-child(3) {
        grid-column: span 1;
    }

    /* 产品 */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    /* 数据统计 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-suffix {
        font-size: 1.5rem;
    }

    /* 解决方案 */
    .solutions-grid {
        grid-template-columns: 1fr;
    }

    /* 优势 */
    .advantages-grid {
        grid-template-columns: 1fr;
    }

    /* 新闻 */
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card:nth-child(1) {
        grid-column: span 1;
    }

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

    .footer-col.footer-about {
        grid-column: span 1;
    }

    .footer-col.footer-contact {
        grid-column: span 1;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    /* 返回顶部 */
    .back-to-top {
        right: var(--spacing-md);
        bottom: var(--spacing-md);
        width: 44px;
        height: 44px;
    }
}

/* ============================================
   手机端 (≤480px)
   ============================================ */
@media (max-width: 480px) {
    :root {
        --header-height: 60px;
    }

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

    /* Logo */
    .logo-text {
        font-size: 1.25rem;
    }

    .logo-img {
        height: 32px;
    }

    /* 导航菜单优化 */
    .nav-menu {
        padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-xl);
    }

    .nav-link {
        padding: var(--spacing-md);
        font-size: 0.9375rem;
    }

    .dropdown-menu {
        padding-left: var(--spacing-lg);
    }

    .dropdown-menu li a {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.8125rem;
    }

    .nav-actions {
        gap: var(--spacing-sm);
    }

    .lang-switch {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.75rem;
    }

    .search-toggle {
        width: 36px;
        height: 36px;
    }

    /* Banner */
    .slide-title {
        font-size: 1.75rem;
    }

    .slide-desc {
        font-size: 0.9375rem;
    }

    /* Section */
    .section {
        padding: var(--spacing-xl) 0;
    }

    .section-header {
        margin-bottom: var(--spacing-xl);
    }

    .section-title {
        font-size: 1.5rem;
    }

    /* 核心业务 */
    .business-card {
        padding: var(--spacing-lg);
    }

    .card-icon {
        width: 56px;
        height: 56px;
    }

    .card-icon i {
        font-size: 1.5rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    /* 产品 */
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-info {
        padding: var(--spacing-md);
    }

    /* 数据统计 */
    .stats-section {
        padding: var(--spacing-xl) 0;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-suffix {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.875rem;
    }

    /* 优势 */
    .advantage-item {
        padding: var(--spacing-lg);
    }

    /* 新闻 */
    .news-image {
        height: 160px;
    }

    .news-content {
        padding: var(--spacing-md);
    }

    .news-title {
        font-size: 1rem;
    }

    /* 按钮 */
    .btn-lg {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 0.9375rem;
    }

    /* 页脚 */
    .footer-top {
        padding: var(--spacing-xl) 0;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-title {
        font-size: 0.9375rem;
    }
}

/* ============================================
   打印样式
   ============================================ */
@media print {
    .header,
    .hero-slider,
    .back-to-top,
    .partners-section {
        display: none;
    }

    .section {
        padding: var(--spacing-lg) 0;
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* ============================================
   深色模式支持 (可选)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* 如需支持深色模式，可在此添加样式 */
}

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