/**
 * Планшет: 576px — 991px (+ шапка 992–1199px)
 * Мобилку (≤575px) трогаем отдельно.
 */
@media (min-width: 576px) and (max-width: 991px) {
    :root {
        --tablet-gutter: 20px;
        --tablet-section-y: 60px;
        --tablet-title-size: 36px;
        --tablet-title-lh: 44px;
        --tablet-subtitle-size: 20px;
        --tablet-subtitle-lh: 28px;
    }

    /* ------------------------------------------------------------------ */
    /* Мобильная шапка на главной (576–991)                              */
    /* ------------------------------------------------------------------ */
    .hero-mobile-header {
        padding: 12px 8px;
        gap: 12px;
        min-height: 72px;
        height: 72px;
    }

    .hero-mobile-header__left {
        gap: 6px;
    }

    .hero-mobile-header__logo-img,
    .hero-mobile-header__logo .logo img {
        width: 150px;
        height: 46px;
        max-height: 46px;
    }

    .hero-mobile-header__contacts {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }

    .hero-mobile-header__phone-link {
        font-size: 15px;
        line-height: 20px;
    }

    .hero-mobile-header__callback {
        font-size: 12px;
        line-height: 14px;
    }

    /* ------------------------------------------------------------------ */
    /* Hero + баннер (главная)                                           */
    /* ------------------------------------------------------------------ */
    .hero {
        --hero-gutter: var(--tablet-gutter);
        --hero-height: 640px;
        --hero-radius: 32px;
    }

    .hero-header {
        padding: 20px var(--tablet-gutter);
        gap: 12px;
    }

    .hero-header__topbar {
        flex-wrap: wrap;
        gap: 12px 16px;
    }

    .hero-header__address,
    .hero-header__schedule-item {
        font-size: 14px;
    }

    .hero-header__email {
        display: none;
    }

    .hero-header__btn--secondary {
        width: auto;
        min-width: 0;
        padding: 12px 16px;
        font-size: 14px;
    }

    .hero-header__nav-row {
        gap: 20px;
    }

    .hero-header__logo-link img {
        height: 52px;
        width: auto;
    }

    .hero .banners-big .maxwidth-theme {
        padding-left: var(--tablet-gutter);
        padding-right: var(--tablet-gutter);
        padding-bottom: 40px;
    }

    .hero .banners-big .hero-slide__content,
    .hero .banners-big .col-md-6.text {
        max-width: 100%;
    }

    .hero .banners-big .hero-slide__content .title,
    .hero .banners-big .title {
        margin-bottom: 20px;
        font-size: 40px;
        line-height: 46px;
    }

    .hero .banners-big .hero-slide__content .text-block,
    .hero .banners-big .text-block {
        max-width: 100%;
        margin-bottom: 32px;
        font-size: var(--tablet-subtitle-size);
        line-height: var(--tablet-subtitle-lh);
    }

    .hero .banners-big .slides .btn.hero-slide__btn,
    .hero .banners-big .hero-slide__btn {
        width: auto;
        min-width: 220px;
        height: 48px;
        padding: 12px 18px 12px 20px;
        font-size: 16px;
    }

    .hero .banners-big .hero-slide__btn-icon svg {
        width: 9px;
        height: 9px;
    }

    /* ------------------------------------------------------------------ */
    /* Блоки главной — вертикальные отступы 60px, боковые 20px            */
    /* ------------------------------------------------------------------ */
    .drag-block.container[data-class='SCHOOL_ADVANTAGES_MAIN_drag'] {
        padding-top: 60px;
    }

    .about-main,
    .advantages-main,
    .team-main,
    .reviews-main,
    .faq-main,
    .journal-main,
    .news-main,
    .contacts-main,
    .seo-main,
    .directions-main,
    .offers-main,
    .seminars-main,
    .consult-form {
        padding-top: var(--tablet-section-y);
        padding-bottom: var(--tablet-section-y);
    }

    .about-main,
    .advantages-main,
    .directions-main,
    .offers-main,
    .seminars-main,
    .consult-form,
    .team-main,
    .news-main,
    .contacts-main,
    .seo-main,
    .faq-main {
        padding-left: var(--tablet-gutter);
        padding-right: var(--tablet-gutter);
    }

    .school-advantages__inner,
    .works-main__inner,
    .reviews-main__inner,
    .faq-main__inner,
    .journal-main__inner,
    .news-main__inner,
    .contacts-main__inner,
    .seo-main__inner,
    .directions-main__inner,
    .offers-main__inner,
    .seminars-main__inner,
    .consult-form__inner,
    .advantages-main__inner,
    .about-main__inner {
        padding-left: 0;
        padding-right: 0;
    }

    .journal-main {
        padding-left: var(--tablet-gutter);
        padding-right: var(--tablet-gutter);
    }

    .advantages-main__title {
        font-size: var(--tablet-title-size);
        line-height: var(--tablet-title-lh);
    }

    .about-main__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }

    .about-main__title {
        width: 100%;
        flex: none;
        font-size: var(--tablet-title-size);
        line-height: var(--tablet-title-lh);
    }

    .about-main__body {
        width: 100%;
        flex: none;
    }

    .about-main__body p {
        font-size: 18px;
        line-height: 26px;
    }

    .advantages-main__card {
        padding: 28px 24px;
    }

    .advantages-main__card-title {
        font-size: 24px;
        line-height: 32px;
    }

    .school-advantages__inner {
        padding-left: var(--tablet-gutter);
        padding-right: var(--tablet-gutter);
    }

    .school-advantages__title,
    .team-main__title,
    .works-main__title,
    .reviews-main__title,
    .faq-main__title,
    .journal-main__title,
    .news-main__title,
    .contacts-main__title,
    .directions-main__title,
    .offers-main__title,
    .seminars-main__title {
        font-size: var(--tablet-title-size);
        line-height: var(--tablet-title-lh);
    }

    .seminars-main__title {
        font-size: var(--tablet-title-size);
        line-height: var(--tablet-title-lh);
    }

    .seminars-main__subtitle {
        font-size: var(--tablet-subtitle-size);
        line-height: var(--tablet-subtitle-lh);
    }

    .seminars-main__card,
    .seminars-main__card.is-active {
        flex: 0 0 320px;
        width: 320px;
        min-height: 480px;
        height: 480px;
    }

    .school-advantages__feature-title {
        font-size: 24px;
        line-height: 32px;
    }

    .team-main__stage {
        min-height: 520px;
    }

    .team-main__panels {
        max-width: min(420px, calc(100% - 120px));
    }

    .team-main__thumb-photo {
        width: 88px;
        height: 88px;
    }

    .works-main__subtitle {
        font-size: var(--tablet-subtitle-size);
        line-height: var(--tablet-subtitle-lh);
    }

    :root {
        --works-slide-width: 360px;
        --works-slide-height: 240px;
        --works-gap-section-bottom: 60px;
        --works-gap-block: 48px;
    }

    .works-main {
        padding: var(--works-gap-section-top) 0 var(--works-gap-section-bottom);
    }

    .works-main__head {
        padding: 0;
    }

    .works-main__cta-wrap {
        padding: 0;
    }

    .works-main__cta {
        gap: 48px;
        padding: 40px 32px;
    }

    .works-main__cta-title,
    .works-main__cta-success-title {
        font-size: 36px;
        line-height: 44px;
    }

    .reviews-main {
        border-radius: 32px;
    }

    .reviews-main__card {
        flex: 0 0 380px;
        width: 380px;
    }

    .faq-main__aside {
        padding: 28px 24px;
    }

    .faq-main__question {
        font-size: 18px;
        line-height: 26px;
    }

    .journal-main__card {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .journal-main__content {
        align-items: center;
        text-align: center;
    }

    .journal-main__text {
        align-items: center;
    }

    .journal-main__visual {
        position: relative;
        top: auto;
        right: auto;
        width: min(100%, 560px);
        max-width: 560px;
        height: auto;
        margin: 8px auto -32px;
        margin-right: 0px;
        transform: rotate(0.83deg) translate3d(2px, 3.5px, 0);
    }

    .journal-main__visual-img {
        width: 100%;
        height: auto;
        object-fit: contain;
        object-position: center;
    }

    .news-main__card,
    .news-main__more {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        min-height: 380px;
    }

    .contacts-main__title {
        font-size: var(--tablet-title-size);
        line-height: var(--tablet-title-lh);
    }

    .contacts-main__map-wrap {
        min-height: 320px;
        height: 320px;
    }

    .contacts-main__card {
        padding: 24px;
    }

    .contacts-main__city,
    .contacts-main__city-sep {
        font-size: 48px;
        line-height: 56px;
    }

    .directions-main__cta {
        padding: 40px 32px;
    }

    .directions-main__cta-title {
        font-size: 40px;
        line-height: 48px;
    }

    .offers-main__title {
        font-size: var(--tablet-title-size);
        line-height: var(--tablet-title-lh);
    }

    :root {
        --offers-card-width: 360px;
        --offers-card-height: 460px;
        --offers-card-active-width: 380px;
        --offers-card-active-height: 500px;
    }

    .consult-form__inner {
        flex-direction: row;
        align-items: stretch;
        min-height: 480px;
    }

    .consult-form__promo,
    .consult-form__panel {
        flex: 1 1 50%;
        min-height: 480px;
    }

    .consult-form__promo-title {
        font-size: 32px;
        line-height: 40px;
    }

    .consult-form__promo-picture {
        width: 320px;
        height: 320px;
        top: -40px;
        right: -32px;
        left: auto;
    }

    .consult-form__panel {
        padding: 32px 24px;
    }
}

/* Шапка на узком desktop / iPad landscape (992–1199) */
@media (min-width: 992px) and (max-width: 1199px) {
    .inner-header,
    .hero-header {
        padding-left: 20px;
        padding-right: 20px;
    }

    .inner-header__topbar,
    .hero-header__topbar {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .inner-header__contacts-left,
    .hero-header__contacts-left {
        gap: 12px;
        min-width: 0;
    }

    .inner-header__schedule,
    .hero-header__schedule {
        display: none;
    }

    .inner-header__contacts-right,
    .hero-header__contacts-right {
        gap: 12px;
        flex-shrink: 0;
        flex-wrap: nowrap;
    }

    .as-phone-drop__link {
        font-size: 16px;
        line-height: 20px;
        white-space: nowrap;
    }

    .inner-header__nav-row,
    .hero-header__nav-row,
    .sticky-header__inner {
        gap: 24px;
    }

    .inner-header__logo,
    .inner-header__logo-link,
    .inner-header__logo-link img,
    .hero-header__logo-link img {
        width: auto;
        max-width: 180px;
        height: auto;
        max-height: 56px;
    }

    .inner-header .hero__menu-item > a,
    .sticky-header .hero__menu-item > a,
    .hero__menu-item > a {
        font-size: 15px;
        padding: 0 8px;
    }

    .inner-header__btn--secondary,
    .hero-header__btn--secondary {
        min-width: 0;
        height: 44px;
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    .hero__menu-dropdown {
        min-width: 420px;
        max-width: calc(100vw - 40px);
        padding: 20px;
    }

    .hero__menu-dropdown--compact {
        width: 300px;
        min-width: 300px;
        max-width: min(300px, calc(100vw - 40px));
        padding: 8px 0;
    }

    .hero__menu-dropdown--compact .hero__menu-dropdown-col {
        flex: none;
        width: 100%;
        max-width: 100%;
    }

    .hero__menu-dropdown-col {
        width: auto;
        flex: 1 1 calc(50% - 4px);
        max-width: calc(50% - 4px);
    }

    .hero-header .hero__menu-dropdown-item > a,
    .inner-header .hero__menu-dropdown-item > a,
    .sticky-header .hero__menu-dropdown-item > a {
        font-size: 16px;
        padding: 10px 16px;
    }
}

/* Ноутбук / узкий desktop (1200–1532, в т.ч. 1366) */
@media (min-width: 1200px) and (max-width: 1532px) {
    .inner-header__nav-row,
    .hero-header__nav-row,
    .sticky-header__inner {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 20px;
    }

    .inner-header__logo,
    .inner-header__logo-link {
        flex: 0 0 auto;
        width: auto;
        max-width: 170px;
        height: auto;
    }

    .sticky-header__logo,
    .sticky-header__logo-link {
        flex: 0 0 auto;
        width: auto;
        max-width: 170px;
        height: auto;
    }

    .inner-header__logo-link img,
    .hero-header__logo-link img,
    .sticky-header__logo-link img {
        width: auto;
        max-width: 170px;
        height: auto;
        max-height: 52px;
        object-fit: contain;
    }

    .inner-header .hero__menu,
    .hero-header .hero__menu,
    .sticky-header .hero__menu {
        min-width: 0;
        justify-content: flex-end;
    }

    .inner-header .hero__menu-item > a,
    .sticky-header .hero__menu-item > a,
    .hero__menu-item > a {
        font-size: 14px;
        line-height: 20px;
        padding: 0 6px;
    }

    .inner-header .hero__menu-item:last-child > a,
    .hero__menu-item:last-child > a,
    .sticky-header .hero__menu-item:last-child > a {
        padding-right: 0;
    }
}
