/* ============================================
   ALATAU TRACK — Адаптивные стили
   Обновлено для светлой темы (Geotab)
   ============================================ */

/* ---- Планшет (до 1024px) ---- */
@media (max-width: 1024px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-partners {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
    }

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

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

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

    .wialon-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .wialon-features {
        grid-template-columns: 1fr 1fr;
    }

    .calculator-wrapper {
        grid-template-columns: 1fr;
    }

    .geography-content {
        grid-template-columns: 1fr;
    }

    .kz-map-svg {
        max-width: 100%;
        margin: 0 auto;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
    }

    .header-nav {
        display: none;
    }

    .header-phone {
        display: none;
    }

    .header-login span {
        display: none;
    }

    .header-login {
        padding: 7px;
    }

    .burger {
        display: flex;
    }
}

/* ---- Мобильная навигация (планшет и мобильный) ---- */
@media (max-width: 1024px) {
    .header-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85%;
        height: 100vh;
        background: var(--color-primary-dark, #0B2239);
        flex-direction: column;
        padding: 80px var(--space-xl) var(--space-xl);
        gap: var(--space-lg);
        transition: right var(--transition-slow);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .header-nav.open {
        display: flex;
        right: 0;
    }

    .header-nav a {
        color: var(--color-white) !important;
        font-size: 1.1rem;
        padding: var(--space-sm) 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition-slow);
    }

    .mobile-overlay.active {
        opacity: 1;
        pointer-events: all;
    }
}

/* ---- Мобильный (до 768px) ---- */
@media (max-width: 768px) {
    .section {
        padding: var(--space-3xl) 0;
    }

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

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

    .hero {
        min-height: auto;
        padding: 120px 0 80px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

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

    .hero-visual {
        max-width: 100%;
    }

    /* На мобильных скрываем sidebar, показываем только detail */
    .dash-sidebar {
        display: none;
    }

    .dash-body {
        min-height: auto;
    }

    .dash-detail {
        padding: 12px;
        gap: 10px;
    }

    .dash-metrics {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .dash-metric {
        padding: 8px;
    }

    .dash-metric-value {
        font-size: 1rem;
    }

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

    .dash-fstat {
        padding: 8px 6px;
    }

    .hero-partners {
        flex-direction: column;
        gap: var(--space-md);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

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

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

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

    .wialon-features {
        grid-template-columns: 1fr;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
}

/* ---- Маленький мобильный (до 480px) ---- */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

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

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-lg {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .stat-card {
        padding: var(--space-lg);
    }

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

    .calculator-form,
    .calculator-result {
        padding: var(--space-lg);
    }

    .radio-group {
        flex-direction: column;
    }
}