/**
 * Адаптивные стили - Автомедиафасад
 */

/* Mobile-first подход */

/* Мобильные устройства (до 576px) */
@media (max-width: 575.98px) {
    :root {
        --font-size-5xl: 2rem;
        --font-size-4xl: 1.75rem;
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
        --spacing-3xl: 3rem;
        --spacing-2xl: 2rem;
    }
    
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    .section__title {
        font-size: var(--font-size-3xl);
    }
    
    .hero__title {
        font-size: var(--font-size-4xl);
    }
    
    .hero {
        min-height: auto;
        padding-top: calc(100px + var(--spacing-2xl));
        padding-bottom: 50px;
        overflow: visible;
        align-items: flex-start;
    }
    
    .header__inner {
        min-height: 90px;
    }
    
    .hero__image {
        display: none;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .header__inner {
        padding: var(--spacing-sm) 0;
    }
    
    .header__logo-text {
        font-size: var(--font-size-lg);
    }
}

/* Планшеты (от 576px) */
@media (min-width: 576px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    .hero__actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-md);
    }
    
    .cta-block__actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero__image {
        display: flex;
    }
}

/* Планшеты (от 768px) */
@media (min-width: 768px) {
    .header__nav {
        display: block;
    }
    
    .nav__list {
        flex-direction: row;
        gap: var(--spacing-xl);
    }
    
    .header__contacts {
        display: flex;
        align-items: center;
    }
    
    .header__burger {
        display: none;
    }
    
    .hero__inner {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    
    .hero__content {
        text-align: left;
    }
    
    .hero__actions {
        justify-content: flex-start;
    }
    
    .problem-solution {
        grid-template-columns: 1fr 1fr;
    }
    
    .problem-solution__text {
        text-align: left;
    }
    
    .benefits-main {
        grid-template-columns: 1fr 1fr;
    }
    
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .audiences-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .partners-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .news-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contacts-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer__inner {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer__bottom {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .footer__legal {
        flex-direction: row;
    }
    
    .region-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Десктопы (от 992px) */
@media (min-width: 992px) {
    .process-steps {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .why-us-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer__inner {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .modal__content {
        max-width: 700px;
    }
}

/* Большие десктопы (от 1200px) */
@media (min-width: 1200px) {
    .container {
        max-width: var(--container-width);
    }
    
    .hero__title {
        font-size: var(--font-size-5xl);
    }
    
    .section__title {
        font-size: var(--font-size-4xl);
    }
}

/* Очень большие экраны (от 1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Ориентация */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }
    
    .hero__title {
        font-size: var(--font-size-3xl);
    }
}

/* Принт стили */
@media print {
    .header,
    .footer,
    .modal,
    .btn,
    [data-modal],
    [data-calculator] {
        display: none !important;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    .section__title {
        page-break-after: avoid;
    }
}

/* Улучшение доступности */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Высокий контраст */
@media (prefers-contrast: high) {
    :root {
        --color-border: #000000;
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    }
    
    .btn {
        border-width: 3px;
    }
    
    .form__input,
    .form__textarea,
    .form__select {
        border-width: 2px;
    }
}

/* Темная тема (опционально, если понадобится в будущем) */
@media (prefers-color-scheme: dark) {
    /* Пока не применяем темную тему, оставляем заготовку */
}

/* Мобильное меню */
@media (max-width: 991.98px) {
    .header__nav {
        display: none;
        position: fixed;
        top: 74px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--color-bg);
        padding: var(--spacing-xl);
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        z-index: 999;
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }
    
    .header__nav.nav--open {
        display: block;
        transform: translateX(0);
    }
    
    .nav__list {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    .nav__link {
        font-size: var(--font-size-lg);
        padding: var(--spacing-md);
        border-bottom: 1px solid var(--color-border);
    }
    
    .header__burger {
        display: flex;
    }
}

