/* ==========================================================
   RESPONSIVE OVERRIDES
   Добавлено для планшетов и мобильных устройств
   ========================================================== */

/* Защита от горизонтального переполнения */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-width: 320px;
  overflow-x: hidden;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img,
video {
  height: auto;
}

input,
button,
textarea,
select {
  max-width: 100%;
}

/* Средние ноутбуки и планшеты */
@media (max-width: 1100px) {
  .wrap,
  .site-head__util,
  .site-menu__inner,
  .breadcrumb__inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .site-head__actions {
    gap: 14px;
  }

  .site-head__cta {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-grid {
    gap: 40px;
  }

  .section-head {
    gap: 36px;
  }

  .manifest-card {
    padding-left: 28px;
    padding-right: 28px;
  }

  .cta-card {
    gap: 36px;
  }

  .book-form__body {
    padding: 48px 40px;
  }
}

/* Планшеты */
@media (max-width: 900px) {
  body {
    font-size: 16px;
  }

  .site-head {
    position: relative;
  }

  .site-head__util {
    min-height: auto;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .site-head__actions {
    margin-left: auto;
  }

  .site-head__callback {
    display: none;
  }

  .site-menu__inner {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .site-menu__inner::-webkit-scrollbar {
    display: none;
  }

  .site-menu a {
    flex: 0 0 auto;
  }

  .hero {
    padding: 64px 0 80px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero h1 {
    max-width: 12ch;
  }

  .hero-mosaic {
    margin: 0;
  }

  section,
  .numbers,
  .cta {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .section-head {
    margin-bottom: 42px;
  }

  .manifest-card {
    min-height: auto;
  }

  .values-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-note {
    margin-top: 36px;
    padding: 30px 32px;
    font-size: 20px;
  }

  .cta-card {
    align-items: start;
  }

  .cta-card::after {
    width: 360px;
    height: 360px;
    right: -100px;
    bottom: -140px;
  }

  .book-form {
    padding-bottom: 80px;
  }

  .book-form__card {
    min-height: 0;
  }
}

/* Телефоны и небольшие планшеты */
@media (max-width: 760px) {
  .wrap,
  .site-head__util,
  .site-menu__inner,
  .breadcrumb__inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-head__util {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 16px;
  }

  .brand-logo--mini {
    align-items: flex-start;
  }

  .site-head__actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-end;
    gap: 10px;
  }

  .site-head__phone {
    font-size: 16px;
  }

  .site-head__cta {
    padding: 10px 14px;
    font-size: 11px;
  }

 

  .breadcrumb__inner {
    font-size: 12px;
    line-height: 1.4;
    gap: 10px;
  }

  .hero {
    padding: 50px 0 64px;
  }

  .eyebrow {
    margin-bottom: 20px;
  }

  .hero h1 {
    font-size: clamp(36px, 11vw, 58px);
    margin-bottom: 22px;
    overflow-wrap: anywhere;
  }

  .hero-lead {
    margin-bottom: 30px;
  }

  .hero-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-mosaic {
    max-width: 300px;
    gap: 4px;
  }

  section,
  .numbers,
  .cta {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 34px;
  }

  .section-head h2 {
    font-size: clamp(28px, 8vw, 40px);
    overflow-wrap: anywhere;
  }

  .section-head .sub {
    margin-top: 14px;
    font-size: 16px;
  }

  .manifest-card {
    padding: 34px 24px;
    gap: 14px;
  }

  .manifest-card h3 {
    font-size: 24px;
  }

  .num-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .num {
    padding: 28px 22px;
  }

  .num .big {
    font-size: clamp(38px, 10vw, 50px);
  }

  .values-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .value {
    padding: 30px 24px;
  }

  .guide {
    grid-template-columns: minmax(0, 1fr);
  }

  .award-grid,
  .team-grid,
  .equip-grid,
  .doc-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-cell {
    min-height: 0;
  }

  .doc-photo-cell {
    aspect-ratio: 4 / 5;
  }

  .team-note {
    padding: 26px 24px;
    border-left-width: 6px;
    font-size: 18px;
  }

  .equip-carousel {
    position: relative;
    gap: 10px;
  }

  .equip-arrow {
    width: 42px;
    height: 42px;
  }

  .cta-card {
    padding: 42px 26px;
    gap: 30px;
  }

  .cta-card h2 {
    font-size: clamp(30px, 9vw, 44px);
  }

  .book-form {
    padding-bottom: 64px;
  }

  .book-form__media {
    min-height: 220px;
  }

  .book-form__logo {
    top: 18px;
    left: 18px;
  }

  .book-form__body {
    padding: 36px 24px;
  }

  .book-form__body .lead {
    margin-bottom: 24px;
    font-size: 16px;
  }

  .book-form__fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .book-form__fields input {
    width: 100%;
    min-width: 0;
    padding: 16px;
  }

  .book-form__row {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 28px;
  }

  .book-form__submit {
    width: 100%;
    white-space: normal;
  }

  .book-form__contacts {
    align-items: flex-start;
    flex-direction: column;
  }

  .book-form__phone {
    font-size: clamp(18px, 6vw, 23px);
  }

  .foot-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Узкие телефоны */
@media (max-width: 520px) {
    .num .big {
        font-size: clamp(38px, 10vw, 50px);
        display: flex;
        width: 100%;
        align-items: center;
    }
    .num .cap {
        width: 100%;
    }
    .num .big sup{
        top: 0px;
    }
  .wrap,
  .site-head__util,
  .site-menu__inner,
  .breadcrumb__inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-head__util {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand-logo--mini {
    justify-self: start;
  }

  .site-head__actions {
    justify-content: space-between;
  }

  .site-head__phone {
    font-size: 15px;
  }

  .site-head__cta {
    padding: 9px 11px;
    font-size: 10px;
  }

  .breadcrumb .sep,
  .breadcrumb a:nth-of-type(2) {
    display: none;
  }

  .hero {
    padding-top: 42px;
  }

  .hero h1 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .btn {
    padding: 16px 20px;
    font-size: 13px;
  }

  section,
  .numbers,
  .cta {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .num-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .num {
    padding: 26px 20px;
  }

  .award,
  .doc-card,
  .equip-card {
    padding-left: 22px;
    padding-right: 22px;
  }

  .equip-carousel {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .equip-track {
    grid-auto-columns: 100%;
    gap: 16px;
  }

  .cta-card {
    padding: 36px 22px;
  }

  .cta-card::after {
    opacity: .35;
  }

  .book-form__media {
    min-height: 190px;
  }

  .book-form__body {
    padding: 30px 20px;
  }

  .book-form__consent {
    font-size: 11px;
  }
}

/* Самые узкие поддерживаемые экраны */
@media (max-width: 360px) {
  .site-head__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .site-head__phone,
  .site-head__cta {
    width: 100%;
    text-align: center;
  }

  .site-head__cta {
    display: block;
  }

  .hero h1 {
    font-size: 32px;
  }

  .section-head h2 {
    font-size: 27px;
  }

  .manifest-card,
  .value,
  .doc-card,
  .book-form__body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .equip-carousel {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .equip-arrow {
    width: 36px;
    height: 36px;
  }
}

/* Пользователям без анимации — без плавной прокрутки */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.site-menu__toggle {
  display: none;
}

@media (max-width: 760px) {
  .site-menu {
    position: relative;
    padding: 10px 16px;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);

    /* На случай ограничения в основном CSS */
    height: auto;
    overflow: visible;
  }

  .site-menu__toggle {
    display: flex;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    color: #1b1b1b;
    background: transparent;
    border: 0;
    border-radius: 8px;

    font: inherit;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }

  .site-menu__burger {
    display: flex;
    width: 24px;
    height: 18px;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
  }

  .site-menu__burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transition:
      transform 0.25s ease,
      opacity 0.25s ease;
  }

  .site-menu__inner {
    display: grid;
    grid-template-columns: 1fr;

    /* Важно: отменяем старые мобильные правила */
    width: 100%;
    height: 0;
    min-height: 0;
    max-height: 0;
    padding: 0;
    gap: 0;

    overflow: hidden;
    visibility: hidden;
    opacity: 0;

    transition:
      max-height 0.3s ease,
      opacity 0.2s ease,
      visibility 0.3s ease;
  }

  .site-menu__inner a {
    display: block;
    width: 100%;
    padding: 13px 14px;

    color: #1b1b1b;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);

    white-space: normal;
  }

  .site-menu.is-open .site-menu__inner {
    height: auto;
    max-height: 420px;
    padding-top: 8px;

    visibility: visible;
    opacity: 1;
  }

  .site-menu.is-open .site-menu__burger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .site-menu.is-open .site-menu__burger span:nth-child(2) {
    opacity: 0;
  }

  .site-menu.is-open .site-menu__burger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}