/* ===================================================================
   ЕГЭ-Драйв · Academy Modern (зелёная палитра)
   Аккцентный цвет заменён с #FFD60A → #06D6A0
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Unbounded:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&family=Onest:wght@400;500;600;700;800&display=swap');

/* --- Сброс --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* --- Палитра --- */
:root {
  --navy:        #1E4A8C;
  --navy-dark:   #12305C;
  --navy-light:  #2E6FD1;
  --accent:      #06D6A0;   /* было #FFD60A */
  --accent-dark: #04A57A;   /* было #FFAA00 */
  --bg:          #FAFAF7;
  --ink:         #0B1B3A;
  --slate:       #5A6784;
  --line:        #E7E7DE;
}

/* --- Базовые элементы --- */
body {
  font-family: 'Onest', 'Manrope', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* --- Контейнер --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* --- Плейсхолдер картинок --- */
.ph-img {
  position: relative;
  overflow: hidden;
  background: repeating-linear-gradient(
    135deg,
    var(--ph-a, #e5e7eb) 0 12px,
    var(--ph-b, #f3f4f6) 12px 24px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ph-fg, #6b7280);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  height: 100%;
}
.ph-img::after {
  content: attr(data-label);
  background: rgba(255,255,255,0.9);
  padding: 6px 10px;
  border-radius: 4px;
}

/* =================================================================
   Объявление (announce-bar)
   ================================================================= */
.announce {
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  padding: 10px 0;
  text-align: center;
  letter-spacing: 0.01em;
}
.announce b { color: var(--accent); }

/* =================================================================
   Навигация
   ================================================================= */
.nav {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.2s, box-shadow 0.2s, border-bottom-color 0.2s;
}
.nav.is-scrolled {
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(15,27,58,0.06);
  border-bottom-color: transparent;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  transition: height 0.2s ease-out;
}
.nav.is-scrolled .nav-inner { height: 64px; }
.logo-wrap { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.logo-img { height: 64px; width: auto; transition: height 0.2s ease-out; }
.nav.is-scrolled .logo-img { height: 48px; }
.nav.is-scrolled .nav-links > a,
.nav.is-scrolled .nav-links > .has-sub { padding: 20px 0; }

.nav-links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; align-items: center; }
.nav-links > a,
.nav-links > .has-sub {
  color: var(--ink);
  transition: color 0.15s;
  position: relative;
  padding: 28px 0;
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  user-select: none;
  white-space: nowrap;
}
.nav-links > a:hover,
.nav-links > a.is-active,
.nav-links > .has-sub:hover,
.nav-links > .has-sub.is-active { color: var(--navy); }
.nav-links > a.is-active::after,
.nav-links > .has-sub.is-active::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}
/* убираем общий ::after у has-sub если он стоит для активного, иначе он перепутается с мостом */

.nav-links .chev { font-size: 10px; margin-left: 2px; opacity: 0.6; }
.nav-links .has-sub { position: relative; }
/* Невидимый "мост" между ссылкой и подменю — чтобы hover не разрывался */
.nav-links .has-sub::after {
  content: '';
  position: absolute;
  left: -16px;
  right: -16px;
  top: 100%;
  height: 14px;
  display: none;
}
.nav-links .has-sub:hover::after,
.nav-links .has-sub.is-open::after { display: block; }

.nav-links .submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: -16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  min-width: 280px;
  box-shadow: 0 12px 40px rgba(15,27,58,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 110;
}
.nav-links .submenu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
}
.nav-links .submenu a:hover { background: var(--bg); color: var(--navy); }
.nav-links .has-sub:hover .submenu,
.nav-links .has-sub:focus-within .submenu,
.nav-links .has-sub.is-open .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Широкое подменю с 2 колонками */
.nav-links .submenu-wide {
  flex-direction: row;
  min-width: 480px;
  padding: 16px;
  gap: 8px;
}
.nav-links .submenu-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 200px;
}
.nav-links .submenu-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  padding: 8px 12px 4px;
}

.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-phone { font-weight: 700; font-size: 15px; color: var(--ink); }

/* Бургер для мобильных */
.nav-burger {
  display: none;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 20px;
  align-items: center;
  justify-content: center;
}
.nav-burger:hover { background: var(--navy); }

/* =================================================================
   Кнопки
   ================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); transform: translateY(-1px); }

.btn-accent {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--accent-dark);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--accent-dark); }
.btn-accent:active { transform: translateY(0); box-shadow: 0 2px 0 var(--accent-dark); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; }

.btn-lg { padding: 16px 28px; font-size: 16px; }

/* =================================================================
   HERO
   ================================================================= */
.hero { padding: 56px 0 80px; position: relative; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--accent);
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 24px;
  color: var(--ink);
}
.hero-eyebrow .dot {
  width: 8px; height: 8px;
  background: var(--ink);
  border-radius: 50%;
}
.hero-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 68px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 24px;
}
.hero-title .mark {
  background: linear-gradient(180deg, transparent 60%, var(--accent) 60%);
  padding: 0 4px;
}
.hero-sub {
  font-size: 19px;
  color: var(--slate);
  margin-bottom: 36px;
  max-width: 520px;
  line-height: 1.55;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 520px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-stat-num {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: var(--navy);
  line-height: 1;
}
.hero-stat-lbl {
  font-size: 13px;
  color: var(--slate);
  margin-top: 6px;
  line-height: 1.3;
}

.hero-visual { position: relative; height: 560px; }
.hero-photo {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  overflow: hidden;
  --ph-a: var(--navy);
  --ph-b: var(--navy-light);
  --ph-fg: #fff;
}
.hero-badge {
  position: absolute;
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 10px 30px rgba(15,27,58,0.12);
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-badge-1 { top: 24px; left: -24px; }
.hero-badge-2 { bottom: 24px; right: -24px; }
.hero-badge-icon {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
}
.hero-badge-text b { display: block; font-size: 14px; font-weight: 700; }
.hero-badge-text span { font-size: 12px; color: var(--slate); }

/* =================================================================
   Лента вузов (logos-strip)
   ================================================================= */
.logos-strip {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}
.logos-row {
  display: flex;
  align-items: center;
  gap: 32px;
}
.logos-lbl {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--slate);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding-right: 24px;
  border-right: 1px solid var(--line);
}

/* --- Бегущая строка --- */
.logos-marquee {
  flex: 1;
  overflow: hidden;
  position: relative;
  /* мягкие края (fade-out по бокам) */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
}
.logos-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: logos-scroll 32s linear infinite;
}
.logos-track:hover { animation-play-state: paused; }
.logos-track span {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  color: var(--ink);
  font-size: 16px;
  opacity: 0.55;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.logos-track span:hover { opacity: 1; }

@keyframes logos-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* -50%, потому что список продублирован */
}
@media (prefers-reduced-motion: reduce) {
  .logos-track { animation: none; }
}

/* =================================================================
   Секции — общая шапка
   ================================================================= */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  gap: 32px;
}
.section-eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 680px;
}
.section-desc {
  font-size: 16px;
  color: var(--slate);
  max-width: 360px;
  line-height: 1.55;
}

/* =================================================================
   Предметы
   ================================================================= */
.subjects { padding: 96px 0; }
.tabs {
  display: flex;
  gap: 8px;
  background: #fff;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  width: fit-content;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.tab {
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  color: var(--slate);
  transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--ink); color: #fff; }

.subj-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.subj-card {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  display: block;
}
.subj-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15,27,58,0.08);
}
.subj-card:hover .subj-arrow { transform: translateX(4px); }
.subj-card.feat {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.subj-arrow { font-size: 18px; transition: transform 0.15s; }
.subj-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 20px;
}
.subj-name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 8px;
}
.subj-meta { font-size: 13px; opacity: 0.7; margin-bottom: 16px; }
.subj-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.subj-card.feat .subj-stat { border-top-color: rgba(255,255,255,0.15); }
.subj-stat b { font-family: 'Unbounded', sans-serif; font-size: 22px; }
.subj-stat span { font-size: 12px; opacity: 0.7; }

/* =================================================================
   «Почему мы» (тёмная секция)
   ================================================================= */
.why { padding: 96px 0; background: var(--ink); color: #fff; }
.why .section-title { color: #fff; }
.why .section-eyebrow { color: var(--accent); }
.why .section-desc { color: rgba(255,255,255,0.6); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.why-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 32px;
}
.why-card.highlight {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.why-num {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 14px;
  opacity: 0.5;
  margin-bottom: 40px;
}
.why-card.highlight .why-num { opacity: 0.7; }
.why-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.why-text { font-size: 15px; opacity: 0.75; line-height: 1.55; }
.why-card.highlight .why-text { opacity: 0.8; }

/* =================================================================
   Результаты
   ================================================================= */
.results { padding: 96px 0; }
.results-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.big-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.big-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.big-stat:nth-child(1) {
  background: var(--accent);
  border-color: var(--accent);
}
.big-stat-pct {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 64px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.big-stat-lbl {
  font-size: 14px;
  color: var(--slate);
  margin-top: 12px;
  line-height: 1.4;
}
.big-stat:nth-child(1) .big-stat-lbl {
  color: var(--ink);
  opacity: 0.7;
}

/* =================================================================
   Тарифы
   ================================================================= */
.pricing {
  padding: 96px 0;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.price-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.price-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  background: var(--bg);
}
.price-card.pop {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  position: relative;
}
.price-badge {
  position: absolute;
  top: 20px; right: 20px;
  background: var(--accent);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.price-name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 8px;
}
.price-who { font-size: 14px; opacity: 0.7; margin-bottom: 24px; }
.price-val {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.price-card.pop .price-val { border-bottom-color: rgba(255,255,255,0.15); }
.price-val b {
  font-family: 'Unbounded', sans-serif;
  font-size: 40px;
  font-weight: 800;
}
.price-val span { font-size: 14px; opacity: 0.6; }
.price-list { font-size: 14px; margin-bottom: 28px; }
.price-list li {
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.price-list li::before {
  content: '→';
  color: var(--navy);
  font-weight: 700;
}
.price-card.pop .price-list li::before { color: var(--accent); }

/* =================================================================
   Тьюторы
   ================================================================= */
.tutors { padding: 96px 0; }
.tut-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tut-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.tut-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15,27,58,0.08);
  border-color: var(--accent);
}
.tut-photo {
  aspect-ratio: 4/3;
  --ph-a: var(--navy-light);
  --ph-b: var(--navy);
  --ph-fg: #fff;
  position: relative;
  flex-shrink: 0;
}
.tut-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  z-index: 2;
}
.tut-info { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.tut-name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.tut-subj { font-size: 13px; color: var(--slate); margin-bottom: 12px; font-weight: 600; }
.tut-bio-mini {
  font-size: 13px;
  line-height: 1.5;
  color: var(--slate);
  margin-bottom: 14px;
  flex: 1;
}
.tut-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tut-tag {
  font-size: 11px;
  padding: 4px 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--slate);
  font-weight: 600;
}
.tut-mini-stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--slate);
}
.tut-mini-stats b {
  font-family: 'Unbounded', sans-serif;
  font-size: 16px;
  color: var(--ink);
  font-weight: 800;
  display: inline-block;
  margin-right: 4px;
}

/* =================================================================
   CTA-блок
   ================================================================= */
.cta-block { padding: 80px 0; }
.cta-inner {
  background: var(--navy);
  border-radius: 32px;
  padding: 72px 64px;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}
.cta-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 52px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.cta-sub { font-size: 17px; opacity: 0.75; margin-top: 16px; }
.cta-form {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  color: var(--ink);
}
.cta-form h4 {
  font-family: 'Unbounded', sans-serif;
  font-size: 16px;
  margin-bottom: 4px;
}
.cta-form > p { font-size: 13px; color: var(--slate); margin-bottom: 16px; }
.cta-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 10px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cta-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30,74,140,0.12);
}
.cta-input.is-error {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217,45,32,0.12);
}
.cta-form .btn-accent { width: 100%; justify-content: center; padding: 14px; }
.cta-perk {
  font-size: 12px;
  color: var(--slate);
  margin-top: 12px;
  text-align: center;
}
.cta-success {
  display: none;
  padding: 24px;
  text-align: center;
  background: rgba(6,214,160,0.12);
  border: 1px solid var(--accent);
  border-radius: 12px;
  color: var(--ink);
}
.cta-success.is-on { display: block; }
.cta-success b {
  display: block;
  font-family: 'Unbounded', sans-serif;
  font-size: 16px;
  margin-bottom: 6px;
}

/* =================================================================
   Футер
   ================================================================= */
.footer {
  background: var(--ink);
  color: #fff;
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer h5 {
  font-family: 'Unbounded', sans-serif;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 16px;
}
.footer ul { list-style: none; }
.footer li { padding: 6px 0; font-size: 14px; opacity: 0.85; }
.footer li a { transition: opacity 0.15s; }
.footer li a:hover { opacity: 1; color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  opacity: 0.5;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 16px;
}
.footer-desc {
  font-size: 14px;
  opacity: 0.7;
  line-height: 1.55;
  margin-bottom: 20px;
  max-width: 320px;
}
.footer-social { display: flex; gap: 8px; margin-bottom: 20px; }
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}
.footer-social a:hover { background: var(--accent); color: var(--ink); }
.footer-copy { font-size: 12px; opacity: 0.5; line-height: 1.5; }

/* =================================================================
   Универсальный hero для внутренних страниц
   ================================================================= */
.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
}
/* Узкая секция, идущая сразу после page-hero — с воздухом сверху */
.section-narrow {
  padding: 56px 0 96px;
}
.page-hero .breadcrumbs {
  font-size: 13px;
  color: var(--slate);
  margin-bottom: 16px;
}
.page-hero .breadcrumbs a:hover { color: var(--navy); }
.page-hero .breadcrumbs .sep { margin: 0 8px; opacity: 0.4; }
.page-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.page-lead {
  font-size: 18px;
  color: var(--slate);
  max-width: 720px;
  line-height: 1.55;
}

/* =================================================================
   Страница «Тьюторы» (расширенная)
   ================================================================= */
.tutors-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 32px 0 48px;
}

/* =================================================================
   Страница «Контакты»
   ================================================================= */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  margin: 64px 0;
}
.contacts-info {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 40px;
}
.contacts-block { margin-bottom: 32px; }
.contacts-block:last-child { margin-bottom: 0; }
.contacts-block h4 {
  font-family: 'Unbounded', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  margin-bottom: 12px;
}
.contacts-big {
  font-family: 'Unbounded', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}
.contacts-block p { font-size: 15px; color: var(--slate); line-height: 1.6; }
.contacts-block a { color: var(--navy); text-decoration: underline; text-decoration-color: rgba(30,74,140,0.3); text-underline-offset: 3px; }
.contacts-block a:hover { text-decoration-color: var(--navy); }

.contacts-map {
  background: var(--navy);
  border-radius: 24px;
  height: 100%;
  min-height: 480px;
  position: relative;
  overflow: hidden;
  --ph-a: var(--navy);
  --ph-b: var(--navy-light);
  --ph-fg: #fff;
}

/* =================================================================
   Страница «Новости»
   ================================================================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 48px 0;
}
.news-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15,27,58,0.08);
}
.news-cover {
  aspect-ratio: 16/9;
  --ph-a: var(--navy-light);
  --ph-b: var(--navy);
  --ph-fg: #fff;
}
.news-body { padding: 24px; }
.news-meta {
  font-size: 12px;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.news-tag {
  background: var(--accent);
  color: var(--ink);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.news-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.25;
  margin-bottom: 12px;
}
.news-excerpt {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.55;
}

/* =================================================================
   Страница «О нас»
   ================================================================= */
.about-mission {
  padding: 80px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.about-mission-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.about-mission p {
  font-size: 17px;
  color: var(--slate);
  line-height: 1.7;
  margin-bottom: 16px;
}
.about-mission .quote {
  font-family: 'Unbounded', sans-serif;
  font-size: 24px;
  line-height: 1.3;
  color: var(--ink);
  font-weight: 700;
  border-left: 4px solid var(--accent);
  padding-left: 24px;
  margin: 32px 0;
}

.timeline { padding: 96px 0; }
.timeline-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.timeline-item {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  position: relative;
}
.timeline-year {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 32px;
  color: var(--accent-dark);
  margin-bottom: 12px;
}
.timeline-text {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.55;
}

/* =================================================================
   Адаптив
   ================================================================= */
@media (max-width: 1100px) {
  .hero-title { font-size: 56px; }
  .section-title { font-size: 40px; }
  .cta-title { font-size: 42px; }
  .page-title { font-size: 44px; }
  .subj-grid { grid-template-columns: repeat(3, 1fr); }
  .tut-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline-list { grid-template-columns: repeat(2, 1fr); }
  .nav-links { gap: 20px; font-size: 14px; }
}

@media (max-width: 900px) {
  .container { padding: 0 20px; }
  .nav-links, .nav-phone { display: none; }
  .nav-burger { display: inline-flex; position: relative; z-index: 102; }
  .nav-inner { height: 70px; }
  .logo-img { height: 52px; }

  /* На время открытого меню скрываем "Пробное занятие" чтобы не дублировал бургер */
  body.menu-open .nav-right .btn-accent { display: none; }

  /* ===== Мобильное меню — выезжает сверху, на всю высоту ===== */
  .nav-links.is-open {
    display: flex;
    position: fixed;
    top: 70px; /* под шапкой (без announce, чтобы при скролле не было gap) */
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 70px);
    height: calc(100dvh - 70px); /* dvh — учитывает мобильный browser bar */
    background: #fff;
    flex-direction: column;
    padding: 0 0 24px;
    gap: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 101;
    text-align: left;
    align-items: stretch;
    animation: mob-menu-in 0.22s ease-out;
  }
  @keyframes mob-menu-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  /* Пункты верхнего уровня */
  .nav-links.is-open > a,
  .nav-links.is-open > .has-sub {
    display: block;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    white-space: normal;
    background: transparent;
  }
  .nav-links.is-open > a:active,
  .nav-links.is-open > .has-sub:active { background: var(--bg); }

  /* "О нас" — кликабельный заголовок */
  .nav-links.is-open > .has-sub {
    cursor: pointer;
    position: relative;
  }
  .nav-links.is-open > .has-sub > .has-sub-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .nav-links.is-open > .has-sub .chev {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 14px;
    opacity: 1;
    color: var(--accent-dark);
    margin-left: 12px;
  }
  .nav-links.is-open > .has-sub.is-open .chev { transform: rotate(180deg); }

  /* Подменю — закрыто по умолчанию на мобильном */
  .nav-links.is-open .submenu {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--bg);
    padding: 0;
    margin: 0;
    min-width: auto;
  }
  .nav-links.is-open .has-sub.is-open .submenu {
    display: block;
    margin-top: 14px;
    padding: 8px 0;
    border-radius: 12px;
  }
  .nav-links.is-open .submenu-wide {
    flex-direction: column;
    padding: 0;
    min-width: auto;
    gap: 0;
  }
  .nav-links.is-open .submenu-col { min-width: auto; padding: 4px 0; }
  .nav-links.is-open .submenu-title {
    margin-top: 4px;
    padding: 8px 16px 6px;
    color: var(--accent-dark);
    font-size: 11px;
  }
  .nav-links.is-open .submenu a {
    padding: 11px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    border-radius: 0;
    display: block;
  }
  .nav-links.is-open .submenu a:hover,
  .nav-links.is-open .submenu a:active { background: rgba(15,27,58,0.04); }

  /* Контактный блок снизу мобильного меню (через ::after - не работает) — сделаю через отдельный псевдоблок выше */
  .nav-links.is-open::before {
    content: '';
    flex: 1; /* пушит футер меню вниз */
    min-height: 12px;
    display: block;
    order: 99;
  }

  /* Большие табы и фильтры — горизонтальный скролл, не ломаются */
  .tabs,
  .tutors-filter,
  .album-cats {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    justify-content: flex-start;
  }
  .tabs::-webkit-scrollbar,
  .tutors-filter::-webkit-scrollbar,
  .album-cats::-webkit-scrollbar { display: none; }
  .tabs .tab,
  .tutors-filter .tab,
  .album-cats .tab {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .hero-grid, .results-grid, .cta-inner, .contacts-grid, .about-mission-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 360px; margin-top: 32px; }
  .hero-title { font-size: 44px; }
  .hero-stats { gap: 16px; }
  .hero-stat-num { font-size: 24px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-title, .cta-title { font-size: 32px; }
  .page-title { font-size: 36px; }
  .subj-grid, .tut-grid, .price-cards, .why-grid, .news-grid, .timeline-list {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cta-inner { padding: 40px 32px; }
  .tut-card-full { grid-template-columns: 1fr; }
  .tut-card-full .tut-photo { aspect-ratio: 16/10; min-height: 0; }
  .big-stat-pct { font-size: 48px; }
  .big-stats { grid-template-columns: 1fr; }
  .logos-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .logos-lbl { border-right: none; padding-right: 0; padding-bottom: 0; }
  .logos-marquee { width: 100%; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}

@media (max-width: 560px) {
  .hero-title { font-size: 36px; }
  .section-title, .cta-title { font-size: 26px; }
  .page-title { font-size: 28px; }
  .subj-grid, .tut-grid, .price-cards, .why-grid, .news-grid, .timeline-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-badge-1 { left: 0; }
  .hero-badge-2 { right: 0; }
  .cta-inner { padding: 32px 20px; }
  .section-head { gap: 16px; margin-bottom: 32px; }
  .subjects, .why, .results, .pricing, .tutors, .cta-block, .about-mission, .timeline { padding: 56px 0; }
  .announce { font-size: 12px; padding: 8px 12px; }
}

/* =================================================================
   Страница ПРЕДМЕТА (subject-detail)
   ================================================================= */
.subj-hero {
  padding: 48px 0 64px;
  border-bottom: 1px solid var(--line);
}
.subj-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
}
.subj-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 20px;
}
.subj-hero-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.subj-hero-title .mark {
  background: linear-gradient(180deg, transparent 60%, var(--accent) 60%);
  padding: 0 4px;
}
.subj-hero-text {
  font-size: 17px;
  color: var(--slate);
  line-height: 1.6;
  max-width: 560px;
  margin-bottom: 28px;
}
.subj-hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* Прайс-бокс справа */
.subj-pricebox {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  position: sticky;
  top: 100px;
}
.subj-pricebox-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.subj-pricebox-head span {
  font-size: 13px;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.subj-pricebox-head b {
  font-family: 'Unbounded', sans-serif;
  font-size: 32px;
  font-weight: 800;
}
.subj-pricebox-rows {
  margin: 16px 0 24px;
  border-top: 1px solid var(--line);
}
.subj-pricebox-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.subj-pricebox-row span:first-child { color: var(--slate); }
.subj-pricebox-row span:last-child  { color: var(--ink); font-weight: 600; }

/* Модули курса */
.subj-modules { padding: 96px 0; }
.modules-list { display: flex; flex-direction: column; gap: 8px; margin-top: 32px; }
.module-row {
  display: grid;
  grid-template-columns: 60px 280px 1fr auto;
  gap: 24px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.module-row:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(15,27,58,0.06);
}
.module-num {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--slate);
  letter-spacing: 0.02em;
}
.module-name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 18px;
}
.module-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.module-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--slate);
  font-weight: 600;
}
.module-btn {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.module-btn:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Карточка тьютора предмета */
.subj-tutor-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  margin-top: 32px;
}
.subj-tutor-photo { aspect-ratio: 1/1; --ph-a: var(--navy-light); --ph-b: var(--navy); --ph-fg: #fff; }
.subj-tutor-info { padding: 32px 36px; }
.subj-tutor-info .label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  margin-bottom: 8px;
}
.subj-tutor-info .name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.subj-tutor-info p {
  font-size: 15px;
  color: var(--slate);
  line-height: 1.6;
  margin-bottom: 20px;
}
.subj-tutor-stats {
  display: flex;
  gap: 32px;
  margin: 20px 0 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.subj-tutor-stats > div b {
  display: block;
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: var(--ink);
}
.subj-tutor-stats > div span {
  display: block;
  font-size: 12px;
  color: var(--slate);
  margin-top: 4px;
}

/* =================================================================
   Контакты — переработка
   ================================================================= */
.contacts-hero-map {
  height: 480px;
  border-radius: 0 0 24px 24px;
  background: #d9e3f5;
  --ph-a: #cfdbef;
  --ph-b: #e6ecf7;
  --ph-fg: var(--navy);
  position: relative;
  overflow: hidden;
  margin-bottom: -120px;  /* чтобы карточки наезжали */
}
.contacts-hero-map .ph-img { width: 100%; height: 100%; }
.contacts-hero-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.contacts-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  position: relative;
  z-index: 5;
}
.contacts-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 12px 40px rgba(15,27,58,0.08);
}
.contacts-card .ic {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
}
.contacts-card h4 {
  font-family: 'Unbounded', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  margin-bottom: 8px;
  font-weight: 700;
}
.contacts-card .big {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 6px;
  color: var(--ink);
  display: block;
  word-break: break-word;
}
.contacts-card p { font-size: 14px; color: var(--slate); line-height: 1.55; }
.contacts-card a { color: var(--navy); }
.contacts-card a:hover { color: var(--accent-dark); }

.contacts-grid-bottom {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  margin-top: 64px;
}
.contacts-howto {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 40px;
}
.contacts-howto h3 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 28px;
  line-height: 1.15;
  margin-bottom: 24px;
}
.contacts-howto ol {
  list-style: none;
  counter-reset: howto;
}
.contacts-howto ol li {
  counter-increment: howto;
  padding: 14px 0 14px 56px;
  position: relative;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--slate);
  line-height: 1.55;
}
.contacts-howto ol li:first-child { border-top: none; }
.contacts-howto ol li::before {
  content: counter(howto, decimal-leading-zero);
  position: absolute;
  left: 0; top: 14px;
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--accent-dark);
  letter-spacing: 0.04em;
}
.contacts-howto ol li b { color: var(--ink); display: block; margin-bottom: 4px; font-size: 16px; }

.contacts-msgr {
  background: var(--ink);
  color: #fff;
  border-radius: 24px;
  padding: 32px;
}
.contacts-msgr h3 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 8px;
}
.contacts-msgr > p { font-size: 14px; opacity: 0.7; margin-bottom: 24px; line-height: 1.55; }
.contacts-msgr-list { display: flex; flex-direction: column; gap: 8px; }
.contacts-msgr-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s;
}
.contacts-msgr-list a:hover { background: rgba(6,214,160,0.18); border-color: var(--accent); }
.contacts-msgr-list .badge {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.contacts-msgr-list .arr { margin-left: auto; opacity: 0.5; }

/* Адаптив для нового */
@media (max-width: 1100px) {
  .subj-hero-grid { grid-template-columns: 1fr; }
  .subj-pricebox { position: static; }
  .module-row { grid-template-columns: 50px 1fr auto; }
  .module-row .module-tags { display: none; }
  .contacts-cards-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .subj-hero-title { font-size: 38px; }
  .subj-tutor-card { grid-template-columns: 1fr; }
  .subj-tutor-photo { aspect-ratio: 16/10; }
  .subj-tutor-info { padding: 24px; }
  .contacts-cards-grid { grid-template-columns: 1fr; }
  .contacts-grid-bottom { grid-template-columns: 1fr; }
  .contacts-hero-map { height: 340px; margin-bottom: -80px; }
  .contacts-howto { padding: 28px 24px; }
}
@media (max-width: 560px) {
  .subj-hero-title { font-size: 30px; }
  .module-row { grid-template-columns: 40px 1fr auto; gap: 12px; padding: 16px; }
  .module-name { font-size: 15px; }
  .module-btn { padding: 6px 10px; font-size: 12px; }
  .subj-tutor-info .name { font-size: 24px; }
  .subj-tutor-stats { flex-wrap: wrap; gap: 20px; }
}

/* =================================================================
   FAB — плавающая кнопка действий + Page Up
   ================================================================= */
.fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 90;
}

/* Главная "пилюля" - всегда видна */
.fab-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(15,27,58,0.22), 0 0 0 0 rgba(6,214,160,0.5);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s, background 0.15s;
  position: relative;
  z-index: 2;
  animation: fab-pulse 2.4s ease-in-out infinite;
}
@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(15,27,58,0.22), 0 0 0 0 rgba(6,214,160,0.6); }
  50%      { box-shadow: 0 8px 24px rgba(15,27,58,0.22), 0 0 0 14px rgba(6,214,160,0); }
}
.fab.is-open .fab-toggle {
  transform: rotate(135deg);
  background: var(--ink);
  color: #fff;
  animation: none;
}
.fab-toggle:hover { transform: scale(1.06); }
.fab.is-open .fab-toggle:hover { transform: rotate(135deg) scale(1.06); }

/* Список доп.кнопок — прячется снизу, выезжает наверх */
.fab-menu {
  position: absolute;
  left: 0;
  bottom: 72px;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
}
.fab-menu .fab-item {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 10px 18px 10px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(15,27,58,0.10);
  transform: translateY(8px) scale(0.92);
  opacity: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.18s,
              background 0.15s, color 0.15s, border-color 0.15s;
  width: max-content;
  font-family: inherit;
}
.fab-menu .fab-item:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.fab-menu .fab-item .ic {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.fab-menu .fab-item:hover .ic { background: var(--accent-dark); color: #fff; }

.fab.is-open .fab-menu { pointer-events: auto; }
.fab.is-open .fab-menu .fab-item {
  opacity: 1;
  transform: translateY(0) scale(1);
}
/* Каскадная задержка появления */
.fab.is-open .fab-menu .fab-item:nth-child(1) { transition-delay: 0.04s; }
.fab.is-open .fab-menu .fab-item:nth-child(2) { transition-delay: 0.08s; }
.fab.is-open .fab-menu .fab-item:nth-child(3) { transition-delay: 0.12s; }
.fab.is-open .fab-menu .fab-item:nth-child(4) { transition-delay: 0.16s; }

/* Затемнение фона при открытом FAB */
.fab-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 58, 0.32);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 89;
}
.fab.is-open ~ .fab-overlay,
.fab.is-open .fab-overlay { opacity: 1; pointer-events: auto; }

/* Page Up справа */
.float-pageup {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  border: none;
  box-shadow: 0 8px 24px rgba(15,27,58,0.18);
  transition: opacity 0.2s, transform 0.15s;
  opacity: 0;
  pointer-events: none;
  z-index: 90;
}
.float-pageup.is-on { opacity: 1; pointer-events: auto; }
.float-pageup:hover { transform: translateY(-3px); background: var(--navy); }

@media (max-width: 768px) {
  .fab { left: 12px; bottom: 12px; }
  .float-pageup { right: 12px; bottom: 12px; width: 44px; height: 44px; }
}

/* =================================================================
   Модальные окна
   ================================================================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 58, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal.is-on { display: flex; }
.modal-card {
  background: #fff;
  border-radius: 24px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  position: relative;
  padding: 36px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  animation: modal-in 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes modal-in {
  from { transform: scale(0.94) translateY(8px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
  z-index: 2;
}
.modal-close:hover { background: var(--ink); color: #fff; transform: rotate(90deg); }

.modal-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 24px;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.modal-subtitle { font-size: 14px; color: var(--slate); margin-bottom: 24px; }

.modal-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--ink);
  margin: 8px 0 16px;
}
.modal-video video,
.modal-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.modal-video .ph-img {
  position: absolute;
  inset: 0;
  --ph-a: var(--navy-light);
  --ph-b: var(--navy);
  --ph-fg: #fff;
}

/* =================================================================
   Страница НОВОСТИ (детальная)
   ================================================================= */
.news-detail-hero {
  padding: 40px 0 24px;
}
.news-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--slate);
  margin-bottom: 16px;
}
.news-detail-meta .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.news-detail-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  max-width: 920px;
}
.news-detail-lead {
  font-size: 19px;
  color: var(--slate);
  line-height: 1.55;
  max-width: 760px;
  margin-bottom: 32px;
}
.news-detail-cover {
  width: 100%;
  aspect-ratio: 16/8;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 48px;
  --ph-a: #5fbb95;
  --ph-b: #06d6a0;
  --ph-fg: #052e44;
  background: var(--accent);
}
.news-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}
.news-body > * + * { margin-top: 20px; }
.news-body p { margin-bottom: 0; }
.news-body strong { font-weight: 700; }
.news-body em { font-style: italic; color: var(--navy); }
.news-body h3 {
  font-family: 'Unbounded', sans-serif;
  font-size: 24px;
  font-weight: 800;
  margin-top: 40px;
  margin-bottom: 12px;
}
.news-body ul, .news-body ol {
  padding-left: 24px;
  list-style: disc;
}
.news-body ul li, .news-body ol li { margin-bottom: 8px; }
.news-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 16px 24px;
  background: var(--bg);
  border-radius: 12px;
  font-size: 18px;
  font-style: italic;
  color: var(--ink);
}
.news-body .news-cta {
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  margin-top: 40px;
}
.news-body .news-cta h4 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 24px;
  margin-bottom: 8px;
}
.news-body .news-cta p { color: rgba(255,255,255,0.7); margin-bottom: 16px; }

.news-author {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 48px;
}
.news-author-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: 'Unbounded', sans-serif;
  font-size: 16px;
  flex-shrink: 0;
}
.news-author-info { flex: 1; }
.news-author-name { font-weight: 700; font-size: 15px; }
.news-author-meta { font-size: 13px; color: var(--slate); }
.news-share { display: flex; gap: 8px; }
.news-share button {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.news-share button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Похожие новости */
.news-related { padding: 80px 0; }

/* =================================================================
   FAQ — аккордеон
   ================================================================= */
.faq-list {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.faq-item.is-open {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(6, 214, 160, 0.12);
}
.faq-q {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  line-height: 1.3;
}
.faq-q:hover { color: var(--navy); }
.faq-q .ic {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  transition: transform 0.2s, background 0.15s;
}
.faq-item.is-open .faq-q .ic { transform: rotate(45deg); background: var(--accent); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.faq-item.is-open .faq-a { max-height: 600px; }
.faq-a-inner {
  padding: 0 28px 28px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--slate);
}
.faq-a-inner p { margin-bottom: 12px; }
.faq-a-inner p:last-child { margin-bottom: 0; }

/* =================================================================
   ОТЗЫВЫ
   ================================================================= */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.review-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.review-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(15,27,58,0.08); }

.review-card.video {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  cursor: pointer;
  position: relative;
}
.review-media {
  aspect-ratio: 4/3;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  --ph-a: var(--navy-light);
  --ph-b: var(--navy);
  --ph-fg: #fff;
  background: var(--navy);
}
.review-media .ph-img { width: 100%; height: 100%; }
.review-media.has-video::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1;
}
.review-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  z-index: 2;
  transition: transform 0.15s;
}
.review-card:hover .review-play { transform: translate(-50%, -50%) scale(1.08); }

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}
.review-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: 'Unbounded', sans-serif;
  font-size: 14px;
  flex-shrink: 0;
}
.review-card.video .review-avatar { background: var(--accent); color: var(--ink); }
.review-name { font-weight: 700; font-size: 14px; }
.review-meta { font-size: 12px; color: var(--slate); }
.review-card.video .review-meta { color: rgba(255,255,255,0.6); }
.review-text {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.55;
  flex: 1;
}
.review-card.video .review-text { color: rgba(255,255,255,0.85); }

.review-stars { color: var(--accent); font-size: 14px; letter-spacing: 2px; }

/* Форма «оставить отзыв» */
.review-form {
  background: var(--ink);
  color: #fff;
  border-radius: 24px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.review-form-l { padding-right: 16px; }
.review-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.review-form .field label { font-size: 13px; opacity: 0.7; }
.review-form .field input,
.review-form .field textarea,
.review-form .field select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font: inherit;
}
.review-form .field input::placeholder,
.review-form .field textarea::placeholder { color: rgba(255,255,255,0.4); }
.review-form .field textarea { min-height: 100px; resize: vertical; }
.review-form .field input:focus,
.review-form .field textarea:focus,
.review-form .field select:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* =================================================================
   АЛЬБОМ — галерея
   ================================================================= */
.album-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.album-cell {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg);
  transition: transform 0.2s;
  aspect-ratio: 4/3;
}
.album-cell:hover { transform: scale(1.02); }
.album-cell.tall { grid-row: span 2; aspect-ratio: 4/6; }
.album-cell.wide { grid-column: span 2; aspect-ratio: 8/3; }
.album-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.album-cell:hover img { transform: scale(1.05); }
.album-cell .album-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}
.album-cell:hover .album-caption { opacity: 1; }

/* Категории альбома */
.album-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0 32px;
  justify-content: center;
}
.album-cats .tab { font-size: 13px; padding: 8px 16px; }

/* =================================================================
   Сведения об образовательной организации
   ================================================================= */
.svedeniya-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 920px;
  margin: 32px auto 0;
}
.sv-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color 0.15s, transform 0.15s;
  text-decoration: none;
  color: inherit;
}
.sv-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.sv-card .sv-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink);
}
.sv-card .sv-meta { font-size: 12px; color: var(--slate); margin-top: 2px; }
.sv-card .sv-arrow {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.sv-card:hover .sv-arrow { background: var(--accent); color: var(--ink); }

.sv-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  max-width: 920px;
  margin: 0 auto 16px;
}
.sv-section h3 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 16px;
}
.sv-section dl { display: grid; grid-template-columns: 220px 1fr; gap: 12px 24px; }
.sv-section dt { color: var(--slate); font-size: 14px; }
.sv-section dd { font-size: 15px; color: var(--ink); }

/* Адаптив для всего нового */
@media (max-width: 900px) {
  .reviews-grid { grid-template-columns: 1fr 1fr; }
  .album-grid { grid-template-columns: repeat(3, 1fr); }
  .review-form { grid-template-columns: 1fr; padding: 28px 24px; gap: 0; }
  .review-form-l { padding: 0 0 8px; }
  .news-detail-title { font-size: 32px; }
  .news-detail-lead { font-size: 16px; }
  .svedeniya-grid { grid-template-columns: 1fr; }
  .sv-section dl { grid-template-columns: 1fr; gap: 4px 0; }
  .sv-section dt { margin-top: 8px; }
}
@media (max-width: 600px) {
  .reviews-grid { grid-template-columns: 1fr; }
  .album-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .album-cell.wide { grid-column: span 2; aspect-ratio: 4/2; }
  .album-cell.tall { grid-row: span 1; aspect-ratio: 4/3; }
  .modal-card { padding: 24px 20px; border-radius: 18px; }
  .news-detail-title { font-size: 26px; }
  .faq-q { padding: 18px 20px; font-size: 15px; gap: 12px; }
  .faq-a-inner { padding: 0 20px 22px; font-size: 14px; }
}

/* =================================================================
   ФИНАЛЬНЫЕ переопределения (после всех других правил)
   ================================================================= */
@media (max-width: 900px) {
  /* Все горизонтальные ленты табов — скроллятся, не переносятся */
  .tabs,
  .tutors-filter,
  .album-cats {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    justify-content: flex-start !important;
    gap: 8px;
  }
  .tabs::-webkit-scrollbar,
  .tutors-filter::-webkit-scrollbar,
  .album-cats::-webkit-scrollbar { display: none; }
  .tabs > .tab,
  .tutors-filter > .tab,
  .album-cats > .tab,
  .tabs > button,
  .tutors-filter > button,
  .album-cats > button {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
}
