/* Глобальні дизайн-токени, які використовуються на всій сторінці. */
:root {
  --bg: #fbfcff;
  --surface: #ffffff;
  --text: #18284d;
  --muted: #5e6882;
  --line: #e7edf8;
  --blue: #1661df;
  --blue-dark: #123b8e;
  --yellow: #ffc61f;
  --yellow-soft: #fff8de;
  --purple: #6b31d8;
  --purple-soft: #faf4ff;
  --kids-surface: #ffffff;
  --shadow: 0 8px 30px rgba(40, 70, 140, 0.08);
  --container: 1160px;
  --radius: 24px;
  --anchor-offset: 42px;
  --header-height: 78px;
}

/* Базове скидання стилів і типові налаштування елементів. */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--anchor-offset);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

#courses,
#kids,
#private-lessons,
#about,
#contact {
  scroll-margin-top: var(--anchor-offset);
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  overflow-x: hidden;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

body::before,
body::after {
  content: "";
  position: fixed;
  background-image: url("photo_2025-10-27 18.22.52.jpeg");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

body::before {
  top: var(--header-height);
  right: 0;
  width: 172px;
  height: 148px;
  background-position: top right;
  opacity: 0.82;
  transform: translate(8%, 0);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  z-index: 24;
  transition: transform 0.22s ease, top 0.22s ease;
}

body::after {
  left: 0;
  bottom: 0;
  width: 172px;
  height: 148px;
  background-position: bottom left;
  opacity: 0.82;
  transform: translate(-8%, 6%);
  clip-path: polygon(0 0, 0 100%, 100% 100%);
  z-index: 12;
}

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

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

/* Спільний контейнер для всіх основних секцій. */
.container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.site-header .container {
  width: 100%;
}

/* Липкий верхній хедер з навігацією та кнопкою дії. */
.site-header {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #eef2fa;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  width: 100%;
}

.nav {
  background: transparent;
}

.site-header::after {
  content: none;
}

/* Основний рядок навігації. */
.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: none;
  padding: 0 30px;
}

.nav-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex: 1 1 auto;
  min-width: 0;
}

.brand {
  flex: 0 0 auto;
  position: relative;
  z-index: 32;
}

.brand img {
  width: 154px;
}

/* Посилання навігації в центральній частині хедера. */
.menu {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.9rem;
  color: #232b3d;
  flex-wrap: wrap;
  justify-content: space-evenly;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-toggle,
.nav-overlay,
.mobile-apply-bar {
  display: none;
}

.nav-close {
  display: none;
}

.mobile-socials {
  display: none;
}

.nav-toggle {
  position: relative;
  z-index: 32;
  border: 0;
  background: transparent;
  color: var(--text);
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

body.menu-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.menu a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.menu a:hover,
.menu a:focus-visible {
  color: var(--blue);
}

.menu .arrow {
  font-size: 0.7rem;
  color: #6b7488;
  transform: translateY(-1px);
}

.menu .pill {
  padding: 2px 7px 3px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-left: 3px;
}

/* Іконки контактів у хедері та головна кнопка дії. */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.socials {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #101114;
  font-size: 1.05rem;
  font-weight: 700;
  justify-content: space-between;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  opacity: 0.95;
  color: #111317;
}

.socials svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.mobile-socials a,
.mobile-socials svg {
  display: block;
}

/* Повторно використовувана система кнопок. */
.button {
  min-height: 44px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
  max-width: 100%;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(22, 97, 223, 0.18);
}

.button-primary {
  background: linear-gradient(180deg, #1d6eff, #1156d4);
  color: #fff;
}

.button-secondary {
  background: #fff;
  border-color: #dbe6fa;
  color: #2f3954;
}

.button-yellow {
  background: linear-gradient(180deg, #ffd33e, #ffbe07);
  color: #342700;
}

.button-purple {
  background: linear-gradient(180deg, #8c5cff, #6b31d8);
  color: #fff;
}

/* Відступи основного контенту під липким хедером. */
main {
  padding: calc(var(--header-height) + 18px) 0 36px;
  position: relative;
  z-index: 1;
}

/* Hero-блок відразу під хедером. */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
  justify-items: center;
  padding: 26px 0 8px;
}

/* Контейнер, який утримує логотип hero-блоку по центру. */
.hero-brand {
  min-height: clamp(220px, 34vw, 320px);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
}

.hero-brand::before {
  content: none;
}

.hero-brand::after {
  content: none;
}

/* Внутрішній блок логотипа із зображенням і підписом. */
.brand-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: min(100%, 560px);
  max-width: 560px;
  padding: clamp(18px, 4vw, 34px) clamp(10px, 3vw, 24px);
  margin: 0 auto;
  flex: 0 1 auto;
  position: relative;
  z-index: 1;
  left: 0;
  right: 0;
}

/* Розмір логотипа в hero-блоці. */
.brand-panel img {
  display: block;
  width: clamp(220px, 54vw, 420px);
  max-width: 100%;
  margin: 0 auto;
}

/* Підпис під логотипом у hero-блоці. */
.brand-panel p {
  margin: 12px 0 0;
  color: #4f5870;
  text-transform: uppercase;
  letter-spacing: clamp(0.14em, 0.6vw, 0.28em);
  font-size: clamp(0.68rem, 1.7vw, 0.82rem);
  line-height: 1.65;
  word-break: break-word;
}

/* Чотири короткі картки переваг під hero-блоком. */
.features-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.feature-box,
.course-card,
.apply-shell,
.kids-strip,
.bottom-card,
.footer-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

/* Стилі окремої картки з перевагою. */
.feature-box {
  padding: 18px 18px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #ebeff8;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: #303d63;
  flex: 0 0 48px;
}

.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Спільні стилі заголовків і текстів для карток. */
.feature-box h3,
.course-card h3,
.bottom-card h3 {
  margin: 0 0 4px;
  font-size: 1.08rem;
  line-height: 1.3;
}

.feature-box p,
.course-card p,
.bottom-card p,
.footer-shell p,
.footer-shell a,
.footer-shell li {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Стандартний блок заголовка секції. */
.section-title {
  padding: 20px 0 14px;
  text-align: center;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

/* Сітка курсів з адаптивними картками. */
.courses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.course-card {
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-width: 0;
}

.beginner-card {
  padding-top: 24px;
}

/* Виділений варіант картки курсу. */
.course-card.highlight {
  border-color: #f3db86;
  background: linear-gradient(180deg, #fffef6, #fff);
}

/* Верхня частина картки курсу з іконкою та назвою. */
.course-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.course-head-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.course-meta {
  flex: 0 0 auto;
  text-align: right;
  align-self: flex-start;
  position: relative;
  right: 14px;
}

.course-price {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 800;
}

.beginner-card .course-price,
.confident-card .course-price {
  color: #0d43c9;
}

.next-card .course-price {
  color: #f5b800;
}

.course-meta-line {
  margin: 8px 0 0;
  color: #4f5870;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 400;
}

.course-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: #2f4d99;
  flex: 0 0 58px;
  overflow: visible;
  filter: drop-shadow(0 5px 10px rgba(26, 72, 167, 0.08));
}

.course-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.02);
  border-radius: 50%;
}

.beginner-course-head {
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.beginner-course-mark {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  color: var(--blue);
  overflow: hidden;
  border-radius: 50%;
}

.beginner-course-mark img {
  object-fit: cover;
  transform: scale(1.46);
  transform-origin: center;
}

.beginner-course-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.beginner-course-copy h3 {
  color: #0d43c9;
  font-size: 1.08rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0;
}

.beginner-course-copy .course-subtitle {
  margin-top: 0;
  color: #5f6a82;
  font-size: 0.92rem;
  line-height: 1.35;
}

.beginner-card .course-divider {
  height: 2px;
  background: linear-gradient(90deg, #78a9ff, transparent);
  margin-bottom: 16px;
}

.next-course-head {
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.next-course-mark {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  color: #f5b800;
  filter: drop-shadow(0 5px 10px rgba(245, 184, 0, 0.1));
}

.next-course-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.next-course-copy h3 {
  color: #f5b800;
  font-size: 1.08rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0;
}

.next-course-copy .course-subtitle {
  margin-top: 0;
  color: #5f6a82;
  font-size: 0.92rem;
  line-height: 1.35;
}

.confident-course-head {
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.confident-course-mark {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  color: var(--blue);
}

.confident-course-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.confident-course-copy h3 {
  color: #0d43c9;
  font-size: 1.08rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0;
}

.confident-course-copy .course-subtitle {
  margin-top: 0;
  color: #5f6a82;
  font-size: 0.92rem;
  line-height: 1.35;
}

.confident-card .course-divider {
  background: linear-gradient(90deg, #78a9ff, transparent);
}

/* Спеціальні стилі для виділеної картки курсу. */
.course-card.highlight .course-mark {
  color: #d2a200;
}

.course-card.highlight .next-course-mark {
  color: #f5b800;
}

.course-subtitle {
  color: #5f6a82;
  font-size: 0.92rem;
  line-height: 1.35;
}

.course-divider {
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d0def8, transparent);
  margin: 14px 0 16px;
}

/* Альтернативний колір розділювача для виділеного курсу. */
.course-card.highlight .course-divider {
  background: linear-gradient(90deg, #f3de8b, transparent);
}

.course-card.highlight.next-card .course-divider {
  background: linear-gradient(90deg, #ffc61f, transparent);
}

.course-card h4 {
  margin: 0 0 10px;
  font-size: 0.98rem;
  color: #111f3f;
}

.course-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  min-height: 176px;
}

.course-list li {
  margin-bottom: 6px;
}

.course-note {
  margin-top: 16px;
  padding: 14px 14px;
  border-radius: 14px;
  background: #f2f6ff;
  font-size: 0.88rem;
  color: #54607a;
}

.beginner-course-note,
.next-course-note,
.confident-course-note {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  min-height: 168px;
  background: #edf3ff;
  color: #2d3544;
}

.next-course-note {
  background: #fff7de;
}

.confident-course-note {
  background: #edf3ff;
}

.course-note-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  filter: drop-shadow(0 4px 8px rgba(245, 184, 0, 0.08));
  background: transparent;
}

.course-note-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18);
}

.beginner-course-note .course-note-icon,
.confident-course-note .course-note-icon {
  background: rgb(234, 240, 254);
  filter: drop-shadow(0 4px 8px rgba(22, 97, 223, 0.08));
}

.next-course-note .course-note-icon {
  background: #fff7de;
}

.next-course-note-icon img {
  filter: saturate(1.18) brightness(0.98) contrast(1.03);
}

.beginner-course-note .course-note-icon img,
.confident-course-note .course-note-icon img {
  filter: none;
}

.beginner-course-note p,
.next-course-note p,
.confident-course-note p {
  margin: 0;
  color: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
}

.course-card.highlight .course-note {
  background: #fff7de;
}

/* Дії в картці курсу: головна кнопка і допоміжне посилання. */
.course-actions {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.course-actions .text-link {
  text-align: center;
  color: #35405c;
  font-weight: 600;
  font-size: 0.92rem;
}

.apply-section {
  margin-top: 18px;
}

.apply-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(22, 97, 223, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 198, 31, 0.14), transparent 30%),
    var(--bg);
}

.apply-page-main {
  padding: 34px 0 46px;
}

.apply-page-header {
  margin-bottom: 14px;
}

.apply-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #26407a;
  font-size: 0.95rem;
  font-weight: 700;
}

.apply-shell {
  display: grid;
  grid-template-columns: minmax(240px, 0.95fr) minmax(320px, 1.25fr);
  gap: 18px;
  padding: 26px;
  background: linear-gradient(135deg, #f7faff 0%, #ffffff 62%, #fff8de 100%);
}

.apply-copy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.apply-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e9f1ff;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.apply-copy h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.apply-copy p {
  margin: 0;
  max-width: 30rem;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

.apply-form {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e3ebfb;
  box-shadow: 0 18px 38px rgba(32, 72, 149, 0.08);
}

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

[hidden] {
  display: none !important;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field span {
  font-size: 0.88rem;
  font-weight: 700;
  color: #233251;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid #d7e2f7;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 14px 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 132px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #8ab0ff;
  box-shadow: 0 0 0 4px rgba(22, 97, 223, 0.1);
}

.form-field-full {
  grid-column: 1 / -1;
}

/* Спеціальна смуга для дитячого курсу. */
.kids-strip {
  margin-top: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(320px, 1fr) minmax(420px, 560px);
  background: var(--kids-surface);
}

/* Декоративна ілюстративна зона ліворуч у дитячій секції. */
.kids-visual {
  min-height: 184px;
  position: relative;
  background: var(--kids-surface);
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.kids-visual img {
  width: 100%;
  height: 100%;
  min-height: 184px;
  object-fit: cover;
  display: block;
}

/* Текстовий контент усередині дитячої промосекції. */
.kids-copy {
  padding: 22px 26px;
}

.kids-copy h3 {
  margin: 0;
  font-size: 1.7rem;
  color: #5a218f;
}

.new-pill {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  vertical-align: middle;
}

.kids-copy strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  color: #434f6d;
}

.kids-copy p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
  max-width: 570px;
}

/* Невеликий список переваг у дитячій секції. */
.kids-points {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 81px);
  justify-content: space-between;
  width: min(100%, 390px);
  gap: 0;
  font-size: 0.85rem;
  color: #4e5a76;
}

.kids-points span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kids-point-image img {
  width: 100%;
  max-width: 81px;
  height: auto;
  display: block;
  border-radius: 50%;
}

/* Правий стовпець із кнопкою та декоративною ілюстрацією. */
.kids-side {
  padding: 22px 24px 12px 0;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 10px;
  transform: translate(calc(-72px + 10%), calc(54px - 5%));
}

/* Контейнер декоративної ілюстрації під кнопкою. */
.flower-box {
  width: min(100%, 520px);
  transform: translate(8px, -6px);
}

.flower-box img {
  width: 100%;
  height: auto;
  display: block;
}

.bottom-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(340px, 1.18fr) minmax(280px, 1.02fr);
  gap: 18px;
}

.bottom-card {
  padding: 22px;
  min-height: 100%;
}

.about-card {
  display: flex;
}

/* Акцентні стилі для картки приватних уроків. */
.private-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.95fr);
  gap: 20px;
  align-items: start;
}

.private-card-copy {
  min-width: 0;
}

.private-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.private-card-heading {
  display: grid;
  gap: 6px;
}

.private-card h3 {
  margin: 0;
  color: #27324f;
  font-size: 1.65rem;
  line-height: 1.1;
}

.private-card .small-blue {
  color: var(--blue);
  font-size: 0.98rem;
  font-weight: 700;
  display: block;
  margin-top: 0;
}

.private-card .feature-icon {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  overflow: hidden;
}

.private-card .feature-icon img {
  object-fit: contain;
}

.private-copy {
  margin-top: 12px;
}

.private-details {
  margin-top: 14px;
}

.private-photo {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #ece3d6;
  box-shadow: 0 16px 36px rgba(83, 61, 28, 0.14);
  align-self: stretch;
}

.private-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.private-actions {
  margin-top: 18px;
}

/* Блок "Про мене" з портретом і текстом. */
.about-card h3 {
  font-size: 1.5rem;
  margin: 0 0 10px;
}

.about-layout {
  display: grid;
  grid-template-columns: 126px minmax(0, 1.45fr) minmax(180px, 0.72fr);
  gap: 22px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 100%;
  min-width: 0;
}

.about-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Портрет у блоці "Про мене". */
.portrait {
  width: 126px;
  height: 126px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #e8eef9;
  box-shadow: 0 12px 28px rgba(36, 66, 120, 0.12);
  margin: 8px auto 0;
  flex: 0 0 126px;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-profile .about-name {
  margin: 12px 0 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #000;
  text-align: center;
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: 10px 0 0 12px;
  min-width: 0;
}

.about-text p {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Відступи між абзацами в тексті блоку "Про мене". */
.about-text p + p {
  margin-top: 18px;
}

/* Невелика сітка фактів під текстом "Про мене". */
.about-facts {
  display: grid;
  align-content: space-between;
  gap: 24px;
  padding-left: 22px;
  padding-top: 6px;
  padding-bottom: 6px;
  border-left: 1px solid #e5ebf8;
  min-height: 100%;
  min-width: 0;
}

/* Окремий рядок факту з іконкою та текстом. */
.fact {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.98rem;
  color: #2158da;
  padding: 0;
  min-width: 0;
}

.fact-mark {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(180deg, #eef2ff, #e7ecff);
  display: grid;
  place-items: center;
  color: #2058df;
  flex: 0 0 74px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.fact-mark svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.fact span {
  max-width: none;
  line-height: 1.3;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Обгортка футера. */
.footer {
  margin-top: 18px;
}

/* Сітка колонок у футері. */
.footer-shell {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  align-items: start;
  justify-items: center;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.footer-socials a {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #1661df;
  box-shadow: 0 14px 30px rgba(52, 77, 128, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.footer-socials a:hover,
.footer-socials a:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(52, 77, 128, 0.18);
}

.footer-socials svg {
  width: 50px;
  height: 50px;
  fill: currentColor;
}

.footer-brand img {
  width: 148px;
  margin-bottom: 10px;
  transform-origin: center;
  animation: footer-heartbeat 2.2s ease-in-out infinite;
}

.footer-brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.footer-shell .footer-help-button {
  min-width: 170px;
  color: #fff;
}

@keyframes footer-heartbeat {
  0%,
  100% {
    transform: scale(1);
  }

  12% {
    transform: scale(1.06);
  }

  24% {
    transform: scale(0.98);
  }

  36% {
    transform: scale(1.1);
  }

  48% {
    transform: scale(1);
  }
}

@keyframes header-heartbeat {
  0%,
  100% {
    transform: scale(1);
  }

  14% {
    transform: scale(1.05);
  }

  28% {
    transform: scale(0.985);
  }

  42% {
    transform: scale(1.08);
  }

  58% {
    transform: scale(1);
  }
}

/* Заголовки блоків у футері. */
.footer-shell h4 {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: #27324f;
}

.footer-shell ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-shell li {
  margin-bottom: 6px;
}

/* Рядок з email-полем і кнопкою підписки. */
.subscribe {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.subscribe input {
  min-width: 0;
  flex: 1 1 auto;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #dfe7f5;
  border-radius: 10px;
  font: inherit;
}

.subscribe .button {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.86rem;
}

@media (pointer: coarse) {
  .button {
    min-height: 48px;
  }

  .menu a {
    min-height: 48px;
  }

  .socials a,
  .mobile-socials a {
    min-width: 32px;
    min-height: 32px;
  }
}

/* Адаптація для великих планшетів і невеликих ноутбуків. */
@media (max-width: 1120px) {
  :root {
    --anchor-offset: 126px;
    --header-height: 104px;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
    padding: 12px 20px 16px;
  }

  .hero,
  .bottom-grid,
  .apply-shell {
    grid-template-columns: 1fr 1fr;
  }

  .kids-strip {
    grid-template-columns: 220px 1fr;
  }

  .kids-side {
    grid-column: 1 / -1;
    padding: 4px 18px 18px;
    transform: none;
  }

  .menu {
    justify-content: center;
  }

  .about-layout {
    grid-template-columns: 126px minmax(0, 1fr);
    align-items: start;
  }

  .about-text {
    padding-left: 0;
  }

  .about-facts {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
    padding-left: 0;
    padding-top: 10px;
    border-left: 0;
    border-top: 1px solid #e5ebf8;
  }

  .fact {
    align-items: center;
  }
}

/* Адаптація для планшетів. */
@media (max-width: 900px) {
  :root {
    --anchor-offset: 136px;
    --header-height: 112px;
  }

  .nav {
    padding: 12px 18px;
  }

  .hero-brand {
    text-align: center;
  }

  .hero-brand {
    min-height: 240px;
  }

  .brand-panel {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    align-items: center;
  }

  .brand-panel img {
    margin-left: auto;
    margin-right: auto;
  }

  .brand-panel p {
    text-align: center;
  }

  body::before {
    width: 152px;
    height: 132px;
  }

  body::after {
    width: 152px;
    height: 132px;
  }
}

/* Адаптація для вузьких планшетів і телефонів у горизонталі. */
@media (max-width: 820px) {
  :root {
    --anchor-offset: 124px;
    --header-height: 72px;
  }

  body.menu-open {
    overflow: hidden;
  }

  .site-header {
    overflow: visible;
  }

  body.menu-open .site-header {
    background: #ffffff;
  }

  body.menu-open .nav {
    background: #ffffff;
  }

  body.menu-open::before {
    top: calc(var(--header-height) + 10px);
    transform: translate(-18%, 6%);
  }

  .site-header::after {
    content: none;
  }

  .brand,
  .mobile-socials,
  .nav-toggle {
    position: relative;
    z-index: 2;
  }

  body.menu-open .brand img {
    opacity: 1;
    filter: none;
    transform-origin: center;
    animation: header-heartbeat 2.1s ease-in-out infinite;
  }

  .nav {
    min-height: 72px;
    padding: 12px 16px;
    gap: 10px;
  }

  .brand img {
    width: 128px;
  }

  .mobile-socials {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    color: #111317;
  }

  .mobile-socials a {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 248, 255, 0.92);
  }

  .mobile-socials svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: 0;
    width: 40px;
    height: 40px;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background:
      linear-gradient(180deg, rgba(250, 252, 255, 0.6), rgba(250, 252, 255, 0.82)),
      url("photo_2025-10-27 18.22.52.jpeg");
    background-repeat: no-repeat;
    background-size: cover, 340px auto;
    background-position: center, right top;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 28;
  }

  .nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(86vw, 360px);
    height: 100dvh;
    padding: 92px 20px 28px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    box-shadow: -18px 0 42px rgba(24, 40, 77, 0.14);
    display: grid;
    align-content: start;
    gap: 22px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.22s ease;
    z-index: 30;
  }

  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #d9e5ff;
    border-radius: 999px;
    background: linear-gradient(180deg, #f7faff, #eef4ff);
    color: #1a4fbe;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
    margin-left: 0;
    cursor: pointer;
  }

  .nav-close:hover,
  .nav-close:focus-visible {
    background: linear-gradient(180deg, #eef5ff, #e4eeff);
    box-shadow: 0 8px 18px rgba(22, 97, 223, 0.12);
  }

  body.menu-open .nav-panel {
    transform: translateX(0);
  }

  body.menu-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .menu,
  .header-right {
    width: 100%;
    justify-content: flex-start;
  }

  .menu {
    display: grid;
    gap: 14px;
    font-size: 1rem;
  }

  .menu a {
    width: 100%;
    min-height: 46px;
    padding: 0 2px;
    border-bottom: 1px solid #edf1fa;
  }

  .header-right {
    display: grid;
    gap: 16px;
    margin-left: 0;
  }

  .header-right .socials {
    display: none;
  }

  .header-right .button-primary {
    display: inline-flex;
    width: 100%;
    min-height: 42px;
    font-size: 0.86rem;
    border-radius: 10px;
    box-shadow: 0 12px 20px rgba(22, 97, 223, 0.14);
  }

  .mobile-apply-bar {
    display: none;
  }

  .mobile-apply-bar .button {
    width: 100%;
    box-shadow: 0 16px 28px rgba(22, 97, 223, 0.14);
  }

  .features-row,
  .kids-strip,
  .bottom-grid,
  .footer-shell,
  .apply-shell {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .kids-strip {
    grid-template-columns: 1fr;
  }

  .kids-visual {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-facts {
    grid-template-columns: 1fr;
    padding-left: 0;
    border-left: 0;
    border-top: 0;
  }

  .private-card-layout {
    grid-template-columns: 1fr;
  }

  .portrait {
    margin: 0;
  }

  body::before {
    width: 128px;
    height: 110px;
    transform: translate(4%, 0);
  }

  body::after {
    width: 128px;
    height: 110px;
    transform: translate(-6%, 8%);
  }

  .footer-socials {
    gap: 18px;
  }

  .footer-socials a {
    width: 80px;
    height: 80px;
  }

  .footer-socials svg {
    width: 36px;
    height: 36px;
  }

}

/* Адаптація для маленьких телефонів. */
@media (max-width: 560px) {
  :root {
    --anchor-offset: 118px;
    --header-height: 72px;
  }

  .container {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .nav {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand img {
    width: 118px;
  }

  .mobile-socials {
    gap: 4px;
  }

  .mobile-socials a {
    width: 24px;
    height: 24px;
  }

  .mobile-socials svg {
    width: 12px;
    height: 12px;
  }

  .nav-panel {
    width: min(100vw, 340px);
    padding: 88px 16px 24px;
  }

  .subscribe {
    flex-direction: column;
  }

  .button,
  .subscribe input {
    width: 100%;
  }

  .hero {
    padding: 8px 0 0;
    gap: 8px;
  }

  .hero-brand {
    min-height: 148px;
  }

  .apply-page-main {
    padding-top: 18px;
  }

  body::before {
    width: 104px;
    height: 90px;
    top: var(--header-height);
    transform: translate(2%, 0);
  }

  body.menu-open::before {
    top: calc(var(--header-height) + 8px);
    transform: translate(-12%, 6%);
  }

  body::after {
    width: 104px;
    height: 90px;
    transform: translate(-10%, 10%);
  }

  .brand-panel {
    width: 100%;
    max-width: 320px;
    padding: 18px 14px 20px;
    align-items: center;
    text-align: center;
    margin: 0 auto;
  }

  .brand-panel img {
    width: min(250px, calc(100vw - 56px));
    margin: 0 auto;
  }

  .feature-box,
  .course-card,
  .apply-shell,
  .apply-form,
  .kids-copy,
  .bottom-card,
  .footer-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .course-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .course-head-main {
    width: 100%;
  }

  .course-meta {
    width: 100%;
    text-align: left;
    align-self: flex-start;
    right: 0;
    position: static;
  }

  .course-mark {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    font-size: 1.2rem;
  }

  .beginner-course-head {
    align-items: center;
  }

  .beginner-course-mark {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .beginner-course-copy h3 {
    font-size: 1.08rem;
  }

  .beginner-course-copy .course-subtitle {
    margin-top: 0;
    font-size: 0.92rem;
  }

  .course-price {
    font-size: 1.5rem;
  }

  .course-meta-line {
    margin-top: 4px;
  }

  .beginner-course-note,
  .next-course-note,
  .confident-course-note {
    gap: 12px;
    padding: 14px;
    min-height: 0;
  }

  .course-list {
    min-height: 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field input,
  .form-field select,
  .form-field textarea {
    font-size: 16px;
  }

  .form-field-full {
    grid-column: auto;
  }

  .course-note-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .kids-copy {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .kids-copy h3 {
    font-size: 1.45rem;
  }

  .kids-visual {
    min-height: 180px;
  }

  .kids-side {
    padding: 18px 16px 16px;
    gap: 14px;
  }

  .flower-box {
    width: min(100%, 300px);
    opacity: 0.88;
  }

  .kids-visual::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .kids-visual::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-shell {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .footer-socials {
    gap: 14px;
  }

  .footer-socials a {
    width: 68px;
    height: 68px;
  }

  .footer-socials svg {
    width: 30px;
    height: 30px;
  }

}

/* Адаптація для зовсім вузьких екранів. */
@media (max-width: 390px) {
  :root {
    --anchor-offset: 118px;
  }

  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav {
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav-panel {
    width: min(100vw, 320px);
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand img {
    width: 110px;
  }

  .mobile-socials a {
    width: 22px;
    height: 22px;
  }

  .mobile-socials svg {
    width: 11px;
    height: 11px;
  }

  .hero-brand {
    min-height: 138px;
  }

  .brand-panel {
    padding: 16px 10px 18px;
  }

  .brand-panel img {
    width: min(220px, calc(100vw - 40px));
    max-width: 220px;
  }

  body::before {
    width: 88px;
    height: 76px;
    top: var(--header-height);
    transform: translate(0, 0);
  }

  body.menu-open::before {
    top: calc(var(--header-height) + 8px);
    transform: translate(-10%, 6%);
  }

  body::after {
    width: 88px;
    height: 76px;
    transform: translate(-12%, 12%);
  }

  .feature-box,
  .course-card,
  .apply-shell,
  .apply-form,
  .kids-copy,
  .bottom-card,
  .footer-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .feature-box {
    gap: 10px;
  }

  .feature-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .course-mark,
  .beginner-course-mark,
  .next-course-mark,
  .confident-course-mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .beginner-course-mark img {
    transform: scale(1.28);
  }

  .private-card .feature-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .course-note-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .kids-copy h3 {
    font-size: 1.26rem;
  }

  .kids-copy strong {
    font-size: 0.94rem;
  }

  .kids-points {
    grid-template-columns: repeat(3, 81px);
    justify-content: space-between;
    width: min(100%, 390px);
    gap: 0;
  }

  .kids-point-image img {
    max-width: 81px;
  }

  .kids-visual {
    min-height: 150px;
  }

  .flower-box {
    width: min(100%, 250px);
    transform: none;
  }

  .about-layout {
    gap: 14px;
  }

  .portrait {
    width: 108px;
    height: 108px;
  }
}
