/* ==========================================================================
   Адвокат Алексей Барчуков — адаптивные стили
   ========================================================================== */

/* 1. НОУТБУК (до 1439px) */
@media (max-width: 1439px) {
    .header__nav a { padding: 5px 9px; font-size: 13.5px; }
    .header__contacts { max-width: 245px; font-size: 12px; }
    .layout { gap: 22px; }
}

/* 2. ПЛАНШЕТ ВЕРТИКАЛЬНО / МОБИЛЬНАЯ ШАПКА (до 1023px) */
@media (max-width: 1023px) {
    .header {
        height: auto;
        padding-bottom: 12px;
        background: url('/files/5.webp') center top / 1920px auto no-repeat;
    }
    .header__inner {
        height: auto;
        padding-top: 10px;
        padding-bottom: 0;
    }
    .header__nav,
    .header__contacts { display: none; }
    .header__row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }
    .header__title { font-size: clamp(18px, 4.2vw, 26px); }
    .header__burger { display: block; }
    .header__strip { display: block; }
    .mobile-menu.is-open { display: flex; }

    .layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        margin: 22px auto 36px;
    }
    .content {
        grid-column: auto;
        grid-row: auto;
        padding: 0 0 30px;
    }
    .sidebar {
        grid-column: auto;
        grid-row: auto;
        top: 0;
        margin-bottom: 0;
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr);
        gap: 18px;
        align-items: start;
    }
    .sidebar__statue { max-width: none; }
    .about-photo { float: none; width: 100%; max-width: 100%; margin: 0 0 20px; }
    .map-wrap iframe { height: 340px; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .footer__brand { grid-column: 1 / -1; }
}

/* 3. ТЕЛЕФОН-БОЛЬШОЙ (до 767px) */
@media (max-width: 767px) {
    .container { padding: 0 18px; }
    .header__inner { padding-top: 8px; }
    .header__title { font-size: clamp(17px, 4.4vw, 22px); }
    .content { padding: 0 0 26px; }
    .content h1 { font-size: 26px; }
    .content h2 { font-size: 22px; }
    .content h3 { font-size: 19px; }
    .content p, .content li { font-size: 16px; }
    .content .home-quote { font-size: 17px; }
    .sidebar { grid-template-columns: minmax(0, 1fr); }
    .sidebar__statue { max-width: 280px; margin: 0 auto; }
    .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .footer__brand { grid-column: auto; }
    .footer__dev { text-align: left; }
    .map-wrap iframe { height: 320px; }
    .scroll-up { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}

/* 4. ТЕЛЕФОН (до 640px) */
@media (max-width: 640px) {
    .container { padding: 0 14px; }
    .header__inner { padding-top: 8px; }
    .header__title { font-size: 18px; }
    .header__burger { width: 40px; height: 40px; padding: 8px; }
    .mobile-menu { padding: 18px 18px 28px; }
    .mobile-menu__nav a { padding: 12px 0; font-size: 17px; }
    .content { padding: 0 0 24px; }
    .content h1 { font-size: 24px; }
    .content p, .content li { font-size: 15.5px; }
    .content blockquote { padding: 14px 16px; font-size: 17px; }
    .post-preview h2 { font-size: 20px; }
    .accordion__question { font-size: 16px; padding: 15px 0; }
    .accordion__answer { font-size: 15.5px; }
    .content .contacts-list { font-size: 16px; }
    .map-wrap iframe { height: 300px; }
    .footer { padding: 30px 0 20px; }
}

/* 5. МЕЛКИЙ ТЕЛЕФОН (до 480px) */
@media (max-width: 480px) {
    .header__title { font-size: 17px; }
    .header__burger { width: 38px; height: 38px; padding: 7px; }
    .content h1 { font-size: 22px; }
    .content h2 { font-size: 20px; }
    .sidebar__statue { max-width: 240px; }
    .breadcrumbs { font-size: 12px; }
    .scroll-up { width: 38px; height: 38px; }
}

/* 6. УМЕНЬШЕННОЕ ДВИЖЕНИЕ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
