/* ============================================================
   Дополнения: иллюстрации, мобильный CTA, освежение кабинета.
   Загружается после style.css; для кабинета переопределяет
   его встроенные стили более специфичными селекторами.
   ============================================================ */

/* ---------- Мобильная кнопка «Записаться» ---------- */
.mobile-cta {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(251, 246, 239, .94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.mobile-cta .btn { width: 100%; }
@media (max-width: 760px) { .mobile-cta { display: block; } }

/* ---------- Иллюстративные плейсхолдеры под фото ---------- */
.card-photo {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong);
  background:
    radial-gradient(circle at 28% 30%, rgba(201, 123, 74, .22) 0 15%, transparent 16%),
    radial-gradient(circle at 74% 72%, rgba(31, 75, 67, .16) 0 20%, transparent 21%),
    linear-gradient(150deg, #fffdfa 0%, var(--bg-tint) 100%);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: #9c8a78;
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.card-photo span { opacity: .9; }

/* ---------- Дни недели в анкете ---------- */
.days-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.days-grid .check {
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  padding: 8px 16px; min-width: 64px; justify-content: center;
}
.days-grid .check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- Кабинет: общий тон ---------- */
body { font-size: 17px; }

.cab-head h1 { font-family: var(--font-display); }
.cab-head .chip { font-size: .78rem; }

/* вкладки */
.tabs .tab {
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-soft);
  border-radius: var(--radius-pill); padding: 8px 16px; font-weight: 600;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.tabs .tab:hover { border-color: var(--brand); color: var(--brand); }
.tabs .tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* занятия в списке «Сегодня» */
.lesson {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); padding: 12px 16px;
}
.lesson time { font-family: var(--font-display); font-size: 1.05rem; }
.lesson .who b { font-weight: 600; }

/* карточки детей, материалов, программ */
.child-card, #materials .card, #pay .card, .card {
  border-radius: var(--radius-sm);
}
#materials .card { border-color: var(--line); }

/* слоты дня */
.slot-row { border-radius: 12px; }
.slot-row.slot-taken { font-weight: 600; }
.slot-row.slot-free { border-style: dashed; color: var(--brand); }
.slot-row.slot-free:hover { background: var(--brand-soft); }

/* календарь */
.cal-cell { border-radius: 12px; }
.cal-cell.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cal-slot.free { background: rgba(31, 75, 67, .12); color: var(--brand); }
.cal-slot.free:hover { background: rgba(31, 75, 67, .22); }
.cal-slot.taken { background: var(--accent); }
.cal-slot.taken:hover { background: var(--accent-dark); }
.cal-slot.taken.done { background: #2f6b45; }
.cal-slot.summary { background: rgba(201, 123, 74, .16); color: var(--accent-dark); font-weight: 700; }
.cal-slot.summary:hover { background: rgba(201, 123, 74, .3); }

/* таблицы оплат */
.pay-table th { background: var(--bg-soft); }
.pay-table td, .pay-table th { border-color: var(--line); }
.pay-table tr:last-child td { border-bottom: 0; }

/* модальные окна и уведомления */
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.modal h2 { font-family: var(--font-display); font-weight: 400; }
.overlay { background: rgba(35, 32, 29, .48); }
.toast { background: var(--brand-dark); border-radius: var(--radius-pill); }

/* кнопки в кабинете наследуют общий стиль */
.btn { border-radius: var(--radius-pill); }
.btn.mini { padding: 8px 16px; }

/* отчёт/сводка */
.report {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px; white-space: pre-wrap; font-family: var(--font-body);
}

/* печать программы/сводки */
@media print {
  .modal { border: 0; box-shadow: none; }
  .report { background: #fff; border-color: #ccc; }
}

/* ---------- Бейджи и чипы ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center;
  padding: 8px 12px; border-radius: var(--radius-pill);
  background: var(--card); border: 1px solid var(--line-strong);
  color: var(--ink-soft); font-size: .84rem;
}

/* ---------- Внутренние страницы ---------- */
.page-head { position: relative; }
.page-head h1 { margin-bottom: 12px; }
.page-narrow { padding-bottom: 64px; }

@media (max-width: 760px) {
  .btn.mini { width: auto; }
  .hero-visual { display: none; }
}

/* ---------- MOBILE-BURGER: бургер и мобильное меню ---------- */
[hidden] { display: none !important; }

.burger { display: none; }

@media (max-width: 760px) {
  .header-cta { display: none; }

  .burger {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, .62);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    cursor: pointer;
  }
  .burger span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
  }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 95;
    padding: 64px 24px 24px;
    overflow-y: auto;
    background: rgba(251, 246, 239, .94);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
  }
  .mobile-menu-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 440px;
    margin: 0 auto;
  }
  .mobile-menu-inner a {
    padding: 16px 4px;
    font-size: 1.06rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .mobile-menu-inner a.btn {
    margin-top: 16px;
    border-bottom: 0;
    color: #fff;
  }
  body.menu-open { overflow: hidden; }

  /* калькулятор в футере на телефоне не показываем */
  .footer-calc { display: none; }
}

/* ---------- MOBILE-BURGER-DROPDOWN: компактное меню под бургером ---------- */
.menu-wrap { position: relative; }

@media (max-width: 760px) {
  .mobile-menu {
    position: absolute;
    inset: auto;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    width: min(300px, calc(100vw - 32px));
    max-height: 70vh;
    padding: 8px;
    overflow-y: auto;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(253, 249, 243, .97);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 24px 60px rgba(46, 36, 26, .18);
    z-index: 120;
  }
  .mobile-menu-inner { display: grid; gap: 2px; max-width: none; margin: 0; }
  .mobile-menu-inner a {
    display: block;
    padding: 12px 12px;
    border-bottom: 0;
    border-radius: 12px;
    font-size: .98rem;
    color: var(--ink);
  }
  .mobile-menu-inner a:hover,
  .mobile-menu-inner a:focus-visible { background: rgba(31, 75, 67, .08); }
  .mobile-menu-inner a.btn { margin-top: 8px; color: #fff; }
  body.menu-open { overflow: auto; }
}

/* ---------- MOBILE-BURGER-FIXED: панель поверх всего контента ---------- */
@media (max-width: 760px) {
  .mobile-menu {
    position: fixed !important;
    inset: auto;
    top: 76px;
    right: 16px;
    left: auto;
    bottom: auto;
    width: min(300px, calc(100vw - 32px));
    max-height: 70vh;
    padding: 8px;
    overflow-y: auto;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(253, 249, 243, .98);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 24px 60px rgba(46, 36, 26, .22);
    z-index: 100000 !important;
  }
  .mobile-menu-inner { display: grid; gap: 2px; }
  .mobile-menu-inner a {
    display: block;
    padding: 12px 12px;
    border-bottom: 0;
    border-radius: 12px;
    font-size: .98rem;
    color: var(--ink);
  }
  .mobile-menu-inner a.btn { margin-top: 8px; color: #fff; }
}

/* ---------- MOBILE-MENU-ANIM: плавное раскрытие ---------- */
.mobile-menu {
  display: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(.97);
  transform-origin: top right;
  transition: opacity .24s ease,
              transform .26s cubic-bezier(.22, .8, .24, 1),
              visibility .24s ease;
  will-change: opacity, transform;
}

@media (max-width: 760px) {
  .mobile-menu {
    display: block;
    pointer-events: none;
  }
  .mobile-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  .mobile-menu-inner a {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .2s ease, transform .24s cubic-bezier(.22, .8, .24, 1);
  }
  .mobile-menu.open .mobile-menu-inner a {
    opacity: 1;
    transform: translateY(0);
  }
  .mobile-menu.open .mobile-menu-inner a:nth-child(1) { transition-delay: .03s; }
  .mobile-menu.open .mobile-menu-inner a:nth-child(2) { transition-delay: .06s; }
  .mobile-menu.open .mobile-menu-inner a:nth-child(3) { transition-delay: .09s; }
  .mobile-menu.open .mobile-menu-inner a:nth-child(4) { transition-delay: .12s; }
  .mobile-menu.open .mobile-menu-inner a:nth-child(5) { transition-delay: .15s; }
  .mobile-menu.open .mobile-menu-inner a:nth-child(6) { transition-delay: .18s; }
  .mobile-menu.open .mobile-menu-inner a:nth-child(7) { transition-delay: .21s; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu,
  .mobile-menu-inner a { transition: none !important; }
  .mobile-menu { transform: none; }
}

/* ---------- MOBILE-MENU-SLIDE: выезжание панели справа ---------- */
@media (max-width: 760px) {
  .mobile-menu {
    transform: translateX(calc(100% + 24px));
    opacity: 1;
    transform-origin: center right;
    transition: transform .32s cubic-bezier(.22, .8, .24, 1),
                visibility .32s ease,
                opacity .22s ease;
    will-change: transform;
  }
  .mobile-menu.open {
    transform: translateX(0);
  }
  .mobile-menu-inner a {
    transform: none;
    opacity: 0;
    transition: opacity .18s ease;
  }
  .mobile-menu.open .mobile-menu-inner a { opacity: 1; }
  .mobile-menu.open .mobile-menu-inner a:nth-child(1) { transition-delay: .06s; }
  .mobile-menu.open .mobile-menu-inner a:nth-child(2) { transition-delay: .09s; }
  .mobile-menu.open .mobile-menu-inner a:nth-child(3) { transition-delay: .12s; }
  .mobile-menu.open .mobile-menu-inner a:nth-child(4) { transition-delay: .15s; }
  .mobile-menu.open .mobile-menu-inner a:nth-child(5) { transition-delay: .18s; }
  .mobile-menu.open .mobile-menu-inner a:nth-child(6) { transition-delay: .21s; }
  .mobile-menu.open .mobile-menu-inner a:nth-child(7) { transition-delay: .24s; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu { transform: none; transition: none !important; }
  .mobile-menu-inner a { transition: none !important; }
}

/* ---------- MOBILE-MENU-DESIGN: панель в стиле сайта ---------- */
@media (max-width: 760px) {
  .mobile-menu {
    width: min(312px, calc(100vw - 28px));
    padding: 4px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .78);
    background: linear-gradient(180deg, rgba(255, 253, 249, .99) 0%, rgba(251, 246, 239, .99) 100%);
    box-shadow: 0 24px 60px rgba(46, 36, 26, .22), 0 2px 8px rgba(46, 36, 26, .06);
  }
  .mobile-menu::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    top: 0;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--accent), var(--brand));
    opacity: .85;
    pointer-events: none;
  }
  .mobile-menu-inner { display: grid; gap: 2px; padding: 8px 4px 4px; }

  .mobile-menu-inner .mm-label {
    display: block;
    padding: 4px 12px 8px;
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent-dark);
  }
  .mobile-menu-inner .mm-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px;
    border-radius: 12px;
    border-bottom: 0;
    color: var(--ink);
    font-size: .97rem;
  }
  .mobile-menu-inner .mm-link:hover,
  .mobile-menu-inner .mm-link:focus-visible {
    background: rgba(31, 75, 67, .08);
    color: var(--brand-dark);
  }
  .mobile-menu-inner .mm-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand);
    border: 1px solid rgba(255, 255, 255, .8);
  }
  .mobile-menu-inner .mm-icon svg { width: 18px; height: 18px; }

  .mobile-menu-inner .mm-divider {
    display: block;
    height: 1px;
    margin: 8px;
    background: var(--line);
  }
  .mobile-menu-inner .mm-cta {
    width: calc(100% - 12px);
    margin: 4px 4px 4px;
  }
  .mobile-menu-inner .mm-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 0;
    color: var(--muted);
    font-size: .9rem;
  }
  .mobile-menu-inner .mm-phone .mm-icon.small {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: transparent;
    border: 0;
    color: var(--muted);
  }
  .mobile-menu-inner .mm-phone .mm-icon.small svg { width: 16px; height: 16px; }
  .mobile-menu-inner .mm-phone:hover { color: var(--brand); }
}

/* ---------- BURGER-BRAND: бургер в цветах логотипа ---------- */
@media (max-width: 760px) {
  .burger {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: linear-gradient(145deg, var(--brand), #2f6b5e 70%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18),
                0 2px 8px rgba(46, 36, 26, .05),
                0 10px 24px rgba(31, 75, 67, .22);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transition: transform .16s ease, box-shadow .16s ease;
  }
  .burger span {
    background: #fff;
    width: 18px;
  }
  .burger:hover {
    background: linear-gradient(145deg, var(--brand-dark), #2f6b5e 80%);
    transform: translateY(-1px);
  }
  .burger:active { transform: translateY(0); }
  .burger:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
  }
  .burger[aria-expanded="true"] {
    background: linear-gradient(145deg, var(--brand-dark), #245247 80%);
  }
}

/* ---------- EDU-REVIEWS: образование и отзывы ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.review {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.review p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.03rem;
  color: var(--ink);
  line-height: 1.55;
}
.review .author { font-size: .88rem; color: var(--muted); }
.review.placeholder {
  background: rgba(255, 255, 255, .55);
  border-style: dashed;
}
.review.placeholder p {
  font-family: var(--font-body);
  font-size: .95rem;
  font-style: italic;
  color: var(--muted);
}
.review.placeholder .author { font-style: italic; }

@media (max-width: 1000px) {
  .reviews { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .edu-grid, .reviews { grid-template-columns: 1fr; }
}

/* ---------- HEADER-FIT: шапка не разъезжается ---------- */
.header-inner { flex-wrap: nowrap; column-gap: 16px; }
.brand { flex: 0 0 auto; }
.brand-text strong,
.brand-text span { white-space: nowrap; }
.nav {
  flex-wrap: nowrap;
  gap: 12px;
  min-width: 0;
}
.nav a {
  white-space: nowrap;
  font-size: .88rem;
}
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.header-cta { flex: 0 0 auto; }

/* на средних экранах — вторая строка с пунктами, чтобы ничего не наезжало */
@media (max-width: 1180px) and (min-width: 761px) {
  .header-inner {
    flex-wrap: wrap;
    row-gap: 8px;
    column-gap: 16px;
    padding: 12px 0 8px;
  }
  .brand { margin-right: auto; }
  .header-cta { margin-left: auto; }
  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 16px;
  }
  .nav a { font-size: .86rem; }
}

/* на нешироких средних экранах убираем подпись под именем — больше места пунктам */
@media (max-width: 1180px) {
  .brand-text span { display: none; }
}

/* ---------- DOCS-GRID: дипломы и сертификаты ---------- */
.docs-title { margin: 32px 0 12px; font-size: 1.15rem; }
.docs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.doc-card { margin: 0; }
.doc-card figcaption {
  margin-top: 8px;
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
}
.doc-placeholder {
  aspect-ratio: 3 / 4;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 50% 35%, rgba(31, 75, 67, .07), transparent 60%),
    rgba(255, 255, 255, .55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  text-align: center;
  padding: 8px;
  transition: border-color .16s ease, background .16s ease;
}
.doc-placeholder svg { width: 30px; height: 30px; opacity: .8; margin-bottom: 4px; }
.doc-placeholder span { font-size: .9rem; color: var(--ink-soft); font-weight: 600; }
.doc-placeholder small { font-size: .76rem; }
.doc-placeholder:hover {
  border-color: var(--brand);
  background: rgba(228, 239, 235, .6);
}
.doc-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.doc-card a { display: block; border-radius: var(--radius-sm); }
.doc-card a:hover img { transform: translateY(-2px); box-shadow: var(--shadow); }
.doc-card figcaption small {
  display: block;
  margin-top: 2px;
  font-size: .76rem;
  color: var(--muted);
}

@media (max-width: 1000px) {
  .docs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .docs-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .doc-placeholder span { font-size: .82rem; }
}

/* ---------- EDU-LAYOUT: образование и опыт ---------- */
.edu-layout {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.edu-aside .card { position: sticky; top: 24px; }
.edu-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }

.edu-heading { margin: 0 0 12px; font-size: 1.1rem; }
.edu-main .edu-heading:not(:first-child) { margin-top: 32px; }

.edu-timeline { position: relative; padding-left: 32px; margin-bottom: 4px; }
.edu-timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--brand));
  opacity: .38;
}
.edu-step { position: relative; padding-bottom: 24px; }
.edu-step:last-child { padding-bottom: 0; }
.edu-step::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 75, 67, .08);
}
.edu-step h3 { font-size: 1.04rem; margin: 0 0 2px; }
.edu-meta { font-size: .84rem; color: var(--muted); margin-bottom: 4px; }
.edu-step p { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.edu-hint {
  display: inline-block;
  margin-top: 4px;
  font-size: .78rem;
  font-style: italic;
  color: var(--muted);
  opacity: .85;
}

.edu-chips { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 1000px) {
  .edu-layout { grid-template-columns: 1fr; }
  .edu-aside .card { position: static; }
}

/* ---------- PUBLIC-MOBILE-UX: поля и кнопки на телефоне ---------- */
@media (max-width: 760px) {
  .input, select, textarea, input[type="date"], input[type="time"] { font-size: 16px; }
  .btn { min-height: 46px; }
  .btn.mini { min-height: 38px; }
  .price-row, .card, .faq details { padding-left: 16px; padding-right: 16px; }
}

/* ---------- SPACING-PUBLIC-NORMALIZE: единые отступы лендинга ---------- */
.section-head { margin-bottom: 32px; }
.grid-2, .grid-3, .grid-4 { gap: 16px; }
.timeline { gap: 16px; }
.reviews { gap: 16px; }
.hero-stats { gap: 12px; }
.hero-actions { gap: 12px; }
.badges { gap: 8px; }
.price-list { gap: 12px; }
.faq { gap: 8px; }
form { gap: 16px; }
.field { gap: 4px; }
.checks-grid { gap: 8px; }
.contact-line { padding: 12px 0; }
.footer-grid { gap: 24px; }

@media (max-width: 760px) {
  .section-head { margin-bottom: 24px; }
  .grid-2, .grid-3, .grid-4, .timeline, .reviews { gap: 12px; }
  form { gap: 16px; }
}

/* ---------- NO-ZOOM-PUBLIC: масштаб на телефоне зафиксирован ---------- */
@media (max-width: 760px) {
  html, body { touch-action: manipulation; }
  input, select, textarea, button { touch-action: manipulation; }
}

/* ---------- THANKS-SCREEN: экран благодарности после анкеты ---------- */
.thanks-box {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 40px 16px;
}
.thanks-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  margin-bottom: 4px;
}
.thanks-box h2 { font-size: clamp(1.4rem, 4.5vw, 2rem); margin: 0; }
.thanks-box p { color: var(--ink-soft); max-width: 420px; margin: 0; }
.thanks-box .btn { margin-top: 8px; }

@media (max-width: 760px) {
  .thanks-box { min-height: 58vh; padding: 24px 12px; }
}

/* ---------- HERO-NARROW-FIT: герой не вылезает на узких Android ---------- */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .hero-grid > * {
    min-width: 0;
    max-width: 100%;
  }
  .hero h1 {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }
  .hero p, .hero-actions, .hero-stats {
    max-width: 100%;
    overflow-wrap: break-word;
  }
  .hero-actions .btn { max-width: 100%; }
}

@media (max-width: 430px) {
  .hero h1 { font-size: clamp(1.85rem, 8.6vw, 2.7rem); line-height: 1.12; }
  .hero p { font-size: .95rem; }
}
