/* ===== Токени ===== */
:root {
  --ink: #151327;
  --ink-soft: #4a4766;
  --muted: #807ca0;

  --bg: #FFFDF9;
  --surface: #FFFFFF;
  --surface-2: #F4F1FF;

  --accent: #6C4CF1;
  --accent-dark: #5636D8;
  --accent-2: #FF7A45;
  --accent-2-dark: #EF6530;
  --accent-3: #FFC531;

  --deep: #141126;
  --deep-2: #1E1A38;
  --tg: #2AABEE;
  --tg-dark: #1E96D6;

  --border: #E8E4F5;
  --border-dark: rgba(255, 255, 255, .14);

  --radius: 20px;
  --radius-sm: 14px;
  --shadow-sm: 0 2px 12px rgba(21, 19, 39, .06);
  --shadow: 0 16px 40px rgba(21, 19, 39, .10);
  --shadow-lg: 0 26px 70px rgba(76, 46, 180, .22);
  --container: 1180px;
}

/* ===== База ===== */
* { box-sizing: border-box; }

/* Атрибут hidden має ховати елемент завжди. Без цього правила будь-який
   display: flex/grid у класі перебиває hidden — так банер cookies не зникав. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -.025em;
  font-weight: 800;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.2rem; }

p { margin: 0; }
img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.accent { color: var(--accent); }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(108, 76, 241, .28);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-accent {
  background: linear-gradient(120deg, var(--accent-2), #FF9D3D);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 122, 69, .34);
}
.btn-accent:hover { background: linear-gradient(120deg, var(--accent-2-dark), #F58A23); }

.btn-tg {
  background: var(--tg);
  color: #fff;
  box-shadow: 0 8px 20px rgba(42, 171, 238, .3);
}
.btn-tg:hover { background: var(--tg-dark); }

.btn-soft {
  background: var(--surface-2);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--border);
}
.btn-soft:hover { background: #EAE4FF; }

.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.ico-tg { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* ===== Шапка ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 253, 249, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 74px;
}

.logo { display: inline-flex; align-items: center; gap: 11px; flex: none; }

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .04em;
  box-shadow: 0 8px 18px rgba(108, 76, 241, .3);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-weight: 800;
  font-size: 1.02rem;
}
.logo-text em {
  font-style: normal;
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.main-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-weight: 600;
  font-size: .95rem;
}
.main-nav a { color: var(--ink-soft); transition: color .18s ease; }
.main-nav a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.header-tg { padding: 10px 18px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  cursor: pointer;
}
.nav-toggle span {
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 36px 0 72px;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  pointer-events: none;
}
.blob-1 {
  width: 520px; height: 520px;
  top: -190px; right: -140px;
  background: radial-gradient(circle, rgba(108, 76, 241, .55), transparent 68%);
}
.blob-2 {
  width: 440px; height: 440px;
  bottom: -220px; left: -160px;
  background: radial-gradient(circle, rgba(255, 122, 69, .45), transparent 68%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px;
  /* start, а не center: права колонка вища за ліву, і центрування
     віддавало порожню смугу над заголовком */
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-sm);
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.eyebrow-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(255, 122, 69, .18);
  flex: none;
}

.hero h1 { margin: 20px 0 18px; }
.hero h1 span { display: block; }

.hero-lead {
  max-width: 540px;
  color: var(--ink-soft);
  font-size: 1.07rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 32px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.trust-item { display: flex; flex-direction: column; }
.trust-item strong {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--accent);
}
.trust-item span { font-size: .87rem; color: var(--muted); }

/* Візуал з учителем */
.hero-visual { position: relative; }

.hero-note {
  font-family: 'Caveat', cursive;
  font-size: 1.45rem;
  line-height: 1.25;
  color: var(--accent-2);
  transform: rotate(-2.5deg);
  max-width: 300px;
  margin: 0 auto 12px;
  text-align: center;
}

.teacher-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.teacher-placeholder,
.teacher-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Обрізаємо знизу, щоб голова на портреті ніколи не зрізалась */
  object-position: center top;
}
/* ===== Секції ===== */
.section { padding: 84px 0; }
.section-muted { background: var(--surface-2); }

.section-head {
  max-width: 720px;
  margin: 0 auto 46px;
  text-align: center;
}

.chip {
  display: inline-block;
  padding: 7px 16px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: rgba(108, 76, 241, .1);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.section-head h2 span { display: block; }

.section-sub {
  margin-top: 14px;
  color: var(--ink-soft);
}

/* ===== Мови ===== */
.langs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.lang-card {
  position: relative;
  padding: 30px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.lang-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.lang-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.lang-card p { color: var(--ink-soft); margin: 10px 0 20px; }

.lang-flag {
  display: block;
  width: 52px;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(21, 19, 39, .18);
}
.lang-flag svg { display: block; width: 100%; height: auto; }
.lang-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.lang-meta {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: .76rem;
  font-weight: 800;
}

/* ===== Кому підходить / результат ===== */
.how-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.how-col {
  padding: 34px 30px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-sm);
}
/* Права колонка — інверсія лівої: тонований фон, а пункти білі.
   Раніше і фон, і пункти були майже білі, і плашки не читались. */
.how-col-accent {
  background: linear-gradient(170deg, #F2ECFF, #E9E0FF);
  box-shadow: inset 0 0 0 1px #DCD2FA, var(--shadow-sm);
}

.how-head { text-align: center; margin-bottom: 24px; }
.how-head h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
.how-head .section-sub { font-size: .92rem; margin-top: 10px; }

.how-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.how-icon svg { width: 26px; height: 26px; }

.how-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.how-list li {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.how-col-accent .how-list li {
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(76, 46, 180, .07);
}
.how-col-accent .how-bullet { background: var(--surface-2); }
.how-list strong { display: block; font-size: .98rem; }
.how-list span { font-size: .89rem; color: var(--ink-soft); }

.how-bullet {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.how-bullet svg { width: 20px; height: 20px; }

/* ===== Рівні ===== */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.level-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 24px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.level-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.level-card-featured {
  background: linear-gradient(175deg, #fff, #F4EFFF);
  box-shadow: inset 0 0 0 2px var(--accent), var(--shadow);
}

.level-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), #9366F8);
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
}

.level-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 18px;
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--accent);
}
.level-icon svg { width: 25px; height: 25px; }

.level-card > p {
  margin: 10px 0 0;
  font-size: .92rem;
  color: var(--ink-soft);
}

.level-learn {
  margin-top: 20px !important;
  font-size: .78rem !important;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted) !important;
}

.level-list {
  list-style: none;
  margin: 12px 0 22px;
  padding: 0;
  display: grid;
  gap: 9px;
  flex: 1;
}
.level-list li {
  position: relative;
  padding-left: 27px;
  font-size: .9rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.level-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(108, 76, 241, .12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C4CF1' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ===== Telegram-банер ===== */
.tg-section { padding: 0 0 84px; }

.tg-banner {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 32px 36px;
  border-radius: 26px;
  background: linear-gradient(120deg, #1B8FD1, var(--tg) 55%, #57C2F5);
  color: #fff;
  box-shadow: 0 22px 50px rgba(42, 171, 238, .3);
}
.tg-banner h2 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.tg-banner p { margin-top: 8px; opacity: .92; font-size: .96rem; }
.tg-banner-copy { flex: 1; min-width: 0; }

.tg-banner-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 20px;
  background: rgba(255, 255, 255, .18);
}
.tg-banner-icon svg { width: 32px; height: 32px; fill: #fff; }

.tg-banner .btn-tg {
  background: #fff;
  color: var(--tg-dark);
  box-shadow: 0 10px 22px rgba(12, 74, 110, .22);
}
.tg-banner .btn-tg:hover { background: #F0FAFF; }

/* ===== Відгуки ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.review-card {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.review-card p {
  flex: 1;
  margin: 12px 0 20px;
  font-size: .95rem;
  color: var(--ink-soft);
}
.review-stars { color: var(--accent-3); letter-spacing: 3px; font-size: .95rem; }

.review-author { display: flex; align-items: center; gap: 12px; }
.review-author strong { display: block; font-size: .95rem; }
.review-author span { font-size: .82rem; color: var(--muted); }


.reviews-hint {
  display: none;
  margin-top: 16px;
  text-align: center;
  font-size: .82rem;
  color: var(--muted);
}

/* ===== Заявка ===== */
.booking {
  position: relative;
  padding: 88px 0;
  background: var(--deep);
  color: #fff;
  overflow: hidden;
}

.booking-glow {
  position: absolute;
  width: 760px;
  height: 760px;
  top: -320px;
  right: -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 76, 241, .55), transparent 65%);
  filter: blur(70px);
  pointer-events: none;
}

.booking-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.logo-dark .logo-text { color: #fff; }
.logo-dark .logo-text em { color: rgba(255, 255, 255, .6); }

.booking-info h2 {
  margin: 28px 0 16px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}
.booking-info h2 span { display: block; }
.booking-info .accent { color: var(--accent-3); }

.booking-text {
  color: rgba(255, 255, 255, .72);
  max-width: 460px;
}

.contact-card {
  margin-top: 30px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--deep-2);
  box-shadow: inset 0 0 0 1px var(--border-dark);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  transition: opacity .18s ease;
}
.contact-row:hover { opacity: .8; }

.contact-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: rgba(108, 76, 241, .22);
  color: var(--accent-3);
}
.contact-ico svg { width: 21px; height: 21px; }
.contact-ico-tg { background: rgba(42, 171, 238, .2); }
.contact-ico-tg svg { fill: var(--tg); }

.contact-copy { display: flex; flex-direction: column; min-width: 0; }
.contact-label { font-size: .78rem; color: rgba(255, 255, 255, .55); }
.contact-copy strong { font-size: 1rem; word-break: break-word; }


/* Форма */
.booking-form-wrap {
  padding: 32px;
  border-radius: 24px;
  background: var(--deep-2);
  box-shadow: inset 0 0 0 1px rgba(255, 197, 49, .28);
}

.booking-form-title { margin-bottom: 20px; font-size: 1.15rem; }

.field { display: block; margin-bottom: 14px; }
.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: .8rem;
  color: rgba(255, 255, 255, .6);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .05);
  color: #fff;
  font: inherit;
  font-size: .97rem;
  transition: border-color .18s ease, background .18s ease;
}
.field textarea { resize: vertical; min-height: 92px; }

.field input::placeholder,
.field textarea::placeholder { color: rgba(255, 255, 255, .45); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-3);
  background: rgba(255, 255, 255, .09);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
  padding-right: 40px;
}
.field select option { color: #151327; background: #fff; }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.field input.invalid,
.field select.invalid { border-color: #FF7A7A; }

.field-error {
  display: block;
  margin-top: 6px;
  font-size: .82rem;
  color: #FF9B9B;
}

/* Поле-пастка для ботів: прибране за межі екрана, а не display:none —
   частина ботів пропускає приховані поля */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-send-error {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 122, 122, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 122, .35);
  color: #FFB4B4;
  font-size: .88rem;
  line-height: 1.45;
}

#bookingSubmit[disabled] { opacity: .7; cursor: progress; transform: none; }

.form-note {
  margin-top: 12px;
  font-size: .78rem;
  color: rgba(255, 255, 255, .45);
  text-align: center;
}

#bookingSuccess { text-align: center; padding: 26px 8px; }
#bookingSuccess h3 { margin-bottom: 10px; }
#bookingSuccess p { color: rgba(255, 255, 255, .7); margin-bottom: 22px; }

.success-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(255, 197, 49, .16);
  color: var(--accent-3);
  font-size: 1.7rem;
  font-weight: 800;
}

/* ===== Підвал ===== */
.site-footer {
  padding: 26px 0;
  background: #0E0C1B;
  color: rgba(255, 255, 255, .55);
  font-size: .85rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.footer-top { color: var(--accent-3); font-weight: 700; }
.footer-links { display: flex; align-items: center; gap: 22px; }
.footer-cookies {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: rgba(255, 255, 255, .55);
  text-decoration: underline;
  cursor: pointer;
}
.footer-cookies:hover { color: #fff; }

/* ===== Банер згоди на cookies ===== */
.consent {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 80;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(21, 19, 39, .22), inset 0 0 0 1px var(--border);
}
.consent-text { flex: 1; font-size: .88rem; color: var(--ink-soft); line-height: 1.5; }
.consent-actions { display: flex; gap: 10px; flex: none; }
.consent-actions .btn { padding: 10px 18px; font-size: .88rem; }

/* Поки банер відкритий, плаваюча кнопка Telegram піднімається над ним */
body.consent-open .tg-float { bottom: calc(var(--consent-h, 0px) + 32px); }

/* ===== Плаваюча кнопка Telegram ===== */
.tg-float {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 999px;
  background: var(--tg);
  color: #fff;
  box-shadow: 0 12px 28px rgba(42, 171, 238, .45);
  overflow: hidden;
  transition: width .22s ease, padding .22s ease, background .18s ease;
}
.tg-float svg { width: 26px; height: 26px; fill: #fff; flex: none; margin: 0 15px; }
.tg-float-label {
  font-weight: 700;
  font-size: .92rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .18s ease;
}
.tg-float:hover,
.tg-float:focus-visible {
  width: 168px;
  background: var(--tg-dark);
}
.tg-float:hover .tg-float-label,
.tg-float:focus-visible .tg-float-label { opacity: 1; }

/* ===== Анімації =====
   Стани "до появи" застосовуються лише коли є JS (клас .js ставиться
   інлайн-скриптом у <head>) — без нього сторінка просто статична й видима. */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* Hero з'являється одразу при завантаженні, зі сходинкою */
.js .hero-copy > *,
.js .hero-visual { animation: fade-up .65s ease backwards; }
.js .hero-copy > *:nth-child(1) { animation-delay: .05s; }
.js .hero-copy > *:nth-child(2) { animation-delay: .12s; }
.js .hero-copy > *:nth-child(3) { animation-delay: .19s; }
.js .hero-copy > *:nth-child(4) { animation-delay: .26s; }
.js .hero-copy > *:nth-child(5) { animation-delay: .33s; }
.js .hero-visual { animation-delay: .22s; }

/* Решта блоків — при появі у вікні (IntersectionObserver в app.js) */
.js .section-head,
.js .lang-card,
.js .how-col,
.js .level-card,
.js .tg-banner,
.js .review-card,
.js .booking-info,
.js .booking-form-wrap {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .is-visible { opacity: 1; transform: none; }

/* Плавний дрейф кольорових плям у hero */
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(20px, -26px) scale(1.07); }
}
.blob-1 { animation: drift 17s ease-in-out infinite; }
.blob-2 { animation: drift 21s ease-in-out infinite reverse; }

/* Пульсація плаваючої кнопки Telegram (тінь не обрізається overflow) */
@keyframes tg-pulse {
  0%   { box-shadow: 0 12px 28px rgba(42, 171, 238, .45), 0 0 0 0 rgba(42, 171, 238, .45); }
  70%  { box-shadow: 0 12px 28px rgba(42, 171, 238, .45), 0 0 0 18px rgba(42, 171, 238, 0); }
  100% { box-shadow: 0 12px 28px rgba(42, 171, 238, .45), 0 0 0 0 rgba(42, 171, 238, 0); }
}
.tg-float { animation: tg-pulse 3.2s ease-out infinite; }
.tg-float:hover, .tg-float:focus-visible { animation-play-state: paused; }

/* Шапка трохи "відривається" від сторінки після скролу */
.site-header { transition: box-shadow .25s ease, background .25s ease; }
.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(21, 19, 39, .08);
  background: rgba(255, 253, 249, .96);
}

/* Дрібні акценти на наведення */
.level-icon, .how-bullet, .lang-flag { transition: transform .25s ease; }
.level-card:hover .level-icon,
.how-list li:hover .how-bullet { transform: scale(1.08) rotate(-4deg); }
.lang-card:hover .lang-flag { transform: scale(1.12); }
.logo-mark { transition: transform .25s ease; }
.logo:hover .logo-mark { transform: rotate(-6deg) scale(1.05); }

/* ===== Адаптив ===== */

/* Дотикові екрани: більші зони натискання */
@media (max-width: 980px), (pointer: coarse) {
  .main-nav a { padding-block: 10px; }
  .contact-row { padding: 12px 0; }
  /* На тачі кнопка одразу розгорнута — hover недоступний */
  .tg-float { width: 168px; }
  .tg-float .tg-float-label { opacity: 1; }
}

@media (max-width: 1080px) {
  .main-nav { gap: 16px; font-size: .9rem; }
  .header-tg span { display: none; }
  .header-tg { padding: 10px 14px; }
}

@media (max-width: 980px) {
  .section { padding: 68px 0; }
  .tg-section { padding: 0 0 68px; }

  .hero { padding: 48px 0 64px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 42px; }
  .hero-lead { max-width: none; }

  .langs-grid,
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .levels-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .booking-inner { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .booking-text { max-width: none; }

  .main-nav {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin-left: 0;
    padding: 8px 24px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 0; border-bottom: 1px solid var(--border); }
  .main-nav a:last-child { border-bottom: 0; }

  .nav-toggle { display: flex; }
  .header-actions { margin-left: auto; }
}

/* Планшети */
@media (min-width: 700px) and (max-width: 980px) {
  .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .how-col { padding: 26px 20px; }
  .langs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .tg-banner { flex-direction: column; text-align: center; padding: 30px 24px; }
  .tg-banner .btn-lg { width: 100%; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .section { padding: 56px 0; }
  .tg-section { padding: 0 0 56px; }

  .hero-actions .btn { width: 100%; }
  .hero-trust { gap: 18px 24px; }
  .hero-note { font-size: 1.3rem; }

  .levels-grid { grid-template-columns: minmax(0, 1fr); }
  .how-col { padding: 26px 20px; }

  /* Відгуки — горизонтальна стрічка зі snap-прокруткою */
  .reviews-grid {
    grid-template-columns: none;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    margin: 0 -18px;
    padding-inline: 18px;
    scrollbar-width: none;
  }
  .reviews-grid::-webkit-scrollbar { display: none; }
  .review-card {
    flex: 0 0 82%;
    scroll-snap-align: center;
  }
  .reviews-hint { display: block; }

  .booking { padding: 64px 0; }
  .booking-form-wrap { padding: 24px 20px; }
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }

  .footer-inner { flex-direction: column; text-align: center; }

  .consent { flex-direction: column; align-items: stretch; gap: 14px; bottom: 12px; padding: 16px; }
  .consent-actions .btn { flex: 1; }

  .tg-float { left: 16px; bottom: 16px; }
}

@media (max-width: 460px) {
  /* Тільки в шапці — у секції заявки місця вистачає */
  .site-header .logo-text { display: none; }
}

/* Телефони: у шапці лишаються мова, Telegram і бургер.
   Кнопка «Записатися» поруч із ними не вміщається вже на 390px і розпирала
   сторінку по горизонталі — у hero вона все одно є першим екраном. */
@media (max-width: 620px) {
  .header-cta { display: none; }
}

@media (max-width: 380px) {
  .header-inner { gap: 12px; }
  .hero-trust { gap: 14px 20px; }
  .trust-item strong { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  /* Анімації вимкнені — але контент має лишитись видимим, а не в стані "до появи" */
  .js .section-head,
  .js .lang-card,
  .js .how-col,
  .js .level-card,
  .js .tg-banner,
  .js .review-card,
  .js .booking-info,
  .js .booking-form-wrap,
  .js .hero-copy > *,
  .js .hero-visual {
    opacity: 1 !important;
    transform: none !important;
  }
}
