/* ══════════════════════════════════════════
   ЛОКАЛЬНІ ШРИФТИ
   ══════════════════════════════════════════ */
@font-face {
  font-family: 'Cinzel';
  src: url('fonts/cinzel-v26-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cinzel';
  src: url('fonts/cinzel-v26-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cinzel Decorative';
  src: url('fonts/cinzel-decorative-v19-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cinzel Decorative';
  src: url('fonts/cinzel-decorative-v19-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('fonts/nunito-v32-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('fonts/nunito-v32-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('fonts/nunito-v32-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('fonts/nunito-v32-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   ROYAL SCHOOL — STYLE.CSS
   Sofiyivska Gymnasium "Korolivska Shkola"
   ============================================================
   СТРУКТУРА:
     1.  CSS-змінні
     2.  Reset & Base
     3.  Утиліти (container, кнопки, section-header, ornament, reveal, pill-badge)
     4.  Декоративний фон (stars, shapes, particles)
     5.  Навігація
     6.  Hero
     7.  About (книга + цінності)
     8.  Teachers (вчителі)
     9.  Pillars (три кити)
    10.  Programs (освітні програми)
    10.5 Directions (напрямки послуг)
    11.  Clubs (гуртки)
    12.  MoveIT (партнерство)
    13.  Subjects (предмети)
    14.  News (новини)
    15.  Admissions (вступ)
    16.  Contact (контакти)
    17.  Footer
    18.  Scroll-to-top
    19.  Keyframes (всі разом)
    20.  Media queries (один консолідований блок)
   ============================================================ */


/* ══════════════════════════════════════════
   1. CSS ЗМІННІ
   ══════════════════════════════════════════ */
:root {
  /* Основна палітра */
  --crimson:       #8B0000;
  --crimson-light: #B52A2A;
  --crimson-dark:  #5C0000;
  --gold:          #C9A84C;
  --gold-light:    #F0D060;
  --gold-dark:     #A07820;

  /* Фони */
  --cream:         #FDF6E8;
  --cream-dark:    #F5E9D0;
  --parchment:     #EDD9A3;
  --warm-white:    #FFFBF2;
  --light-section: #FFF8EE;
  --alt-section:   #F7EFE0;

  /* Текст */
  --dark:          #2A1200;
  --dark-soft:     #3D1A08;
  --text-main:     #3A1A08;
  --text-soft:     #6B4020;
  --text-muted:    #9A6840;
  --text-dark:     #1a0808;   /* для заголовків на світлому фоні */
  --text-warm:     #2e1e10;   /* для основного тексту на картках */
  --text-earth:    #4a3020;   /* для додаткового тексту */

  /* Кордони та тіні */
  --border-light:  rgba(139, 0, 0, 0.15);
  --shadow-warm:   rgba(139, 0, 0, 0.12);
  --shadow-gold:   rgba(201, 168, 76, 0.25);

  /* Радіальні градієнти для фонів секцій */
  --radial-gold:    rgba(212, 175, 55, 0.07);
  --radial-crimson: rgba(139, 0, 0, 0.05);
}


/* ══════════════════════════════════════════
   2. RESET & BASE
   ══════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html  { scroll-behavior: smooth; }
body  {
  font-family: 'Nunito', sans-serif;
  background-color: var(--cream);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.7;
}
a   { text-decoration: none; color: inherit; }
img { max-width: 100%; }
section { position: relative; z-index: 1; }


/* ══════════════════════════════════════════
   3. УТИЛІТИ
   ══════════════════════════════════════════ */

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

/* ── Кнопки ── */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-light));
  border: 2px solid var(--gold);
  color: var(--gold-light);
  padding: 13px 32px;
  font-family: 'Cinzel', serif;
  font-size: 12.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.4s;
}
.btn-primary:hover::before { transform: translateX(0); }
.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(139, 0, 0, 0.4), 0 0 15px var(--shadow-gold);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold-light);
  padding: 13px 32px;
  font-family: 'Cinzel', serif;
  font-size: 12.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 3px;
}
.btn-secondary:hover {
  background: rgba(201, 168, 76, 0.15);
  box-shadow: 0 0 20px var(--shadow-gold);
  transform: translateY(-2px);
}

.btn-large { padding: 16px 45px; font-size: 14px; }
.btn-full  { width: 100%; text-align: center; }

/* ── Заголовок секції ── */
.section-header {
  text-align: center;
  margin-bottom: 55px;
}
.section-label {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  color: var(--crimson);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}
.section-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(22px, 3.5vw, 38px);
  color: var(--crimson-dark);
  line-height: 1.3;
  margin-bottom: 18px;
}
.section-subtitle {
  font-size: 16px;
  color: var(--text-soft);
  font-style: italic;
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ── Орнамент (лінія + іконка + лінія) ── */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px 0;
}
.ornament-line {
  height: 1px;
  width: 70px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}
.ornament-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* ── Reveal-анімація при скролі ── */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.animate-pending {
  opacity: 0;
  transform: translateY(28px);
}
.reveal.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ── Спільний декоративний верхній бордер (::before) для секцій ── */
:is(.programs-section, .clubs-section, .moveit-section, .pillars-header)::before {
  content: '✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦';
  position: absolute;
  top: 0; left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 6px;
  color: rgba(212, 175, 55, 0.35);
  padding: 14px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  pointer-events: none;
}


/* ── Pill-бейджі (crimson) — спільна база для 3 елементів ── */
:is(.tc-director-values span, .club-meta span, .moveit-card-age) {
  font-family: 'Cinzel', serif;
  color: var(--crimson-dark);
  background: rgba(139, 0, 0, 0.06);
  border: 1px solid var(--border-light);
  border-radius: 20px;
}
/* Індивідуальні розміри — font-size/padding у кожному класі нижче */


/* ══════════════════════════════════════════
   4. ДЕКОРАТИВНИЙ ФОН
   ══════════════════════════════════════════ */
.stars-container,
.shapes-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  display: none;
}
.float-shape {
  position: absolute;
  border-radius: 50%;
  animation: floatShape var(--dur, 20s) ease-in-out infinite;
  opacity: 0.07;
}
.magic-particle {
  position: absolute;
  border-radius: 50%;
  background: var(--gold-light);
  animation: magicFloat var(--dur, 12s) linear infinite;
  opacity: 0;
}


/* ══════════════════════════════════════════
   5. НАВІГАЦІЯ
   ══════════════════════════════════════════ */
nav {
  position: fixed;
  top: 28px; left: 0; right: 0;
  z-index: 1000;
  background: rgba(253, 246, 232, 0.97);
  border-bottom: 2px solid var(--crimson);
  height: 64px;
  display: flex;
  align-items: stretch;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px var(--shadow-warm);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.3s,
              box-shadow 0.3s;
}
.nav-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
nav.scrolled    { box-shadow: 0 4px 30px var(--shadow-warm); }
nav.nav-hidden  { transform: translateY(calc(-100% - 28px)); }

/* ── Тікер (біжучий рядок) ── */
.ticker-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1001;
  height: 28px;
  background: var(--crimson-dark);
  border-bottom: 1px solid rgba(201, 168, 76, 0.3);
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.ticker-bar.nav-hidden { transform: translateY(-100%); }

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: tickerScroll 28s linear infinite;
  gap: 0;
}
.ticker-track:hover { animation-play-state: paused; }

.ticker-item {
  font-family: 'Cinzel', serif;
  font-size: 13.5px;
  letter-spacing: 0.8px;
  color: var(--gold-light);
  padding: 0 60px;
  flex-shrink: 0;
}
.ticker-item a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}
.ticker-item a:hover { color: #fff; }
.ticker-sep {
  color: rgba(201, 168, 76, 0.5);
  flex-shrink: 0;
  font-size: 16px;
  line-height: 28px;
}

@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo-img { height: 40px; width: auto; object-fit: contain; border: none; background: transparent; }
.nav-logo-text .name {
  display: block;
  font-family: 'Cinzel Decorative', serif;
  font-size: 12px;
  color: var(--crimson);
  letter-spacing: 0.5px;
  line-height: 1.3;
}
.nav-logo-text .sub {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  color: var(--gold-dark);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  font-family: 'Cinzel', serif;
  font-size: 11.5px;
  color: var(--dark-soft);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px;
  background: var(--crimson);
  transform: scaleX(0);
  transition: transform 0.3s;
  border-radius: 1px;
}
.nav-links a:hover           { color: var(--crimson); }
.nav-links a:hover::after    { transform: scaleX(1); }

.nav-cta {
  background: var(--crimson) !important;
  color: var(--gold-light) !important;
  padding: 7px 18px;
  border-radius: 3px;
  transition: background 0.3s, transform 0.3s !important;
}
.nav-cta::after          { display: none !important; }
.nav-cta:hover           { background: var(--crimson-dark) !important; transform: translateY(-1px); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--crimson);
  border-radius: 2px;
  transition: all 0.3s;
}


/* ══════════════════════════════════════════
   6. HERO
   ══════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 92px 30px 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #3D1A08 0%, #2A1200 40%, #1A0A00 100%);
  overflow: hidden;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(20, 5, 0, 0.55)  0%,
    rgba(42, 18, 0, 0.35) 50%,
    rgba(20, 5, 0, 0.65) 100%
  );
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 820px;
}
.hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(30px, 6vw, 64px);
  color: var(--gold-light);
  line-height: 1.15;
  margin-bottom: 12px;
  text-shadow: 2px 3px 0 rgba(92, 0, 0, 0.6), 0 0 40px rgba(201, 168, 76, 0.4);
}
.hero-subtitle {
  font-family: 'Cinzel', serif;
  font-size: clamp(13px, 2.2vw, 20px);
  color: var(--parchment);
  letter-spacing: 5px;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 16px;
}
.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 12px 0;
}
.divider-line {
  height: 1px;
  width: 90px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.divider-logo {
  width: 64px; height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(201, 168, 76, 0.7));
  animation: emblemFloat 4s ease-in-out infinite;
}
.hero-desc {
  font-size: clamp(14px, 1.8vw, 17px);
  color: var(--parchment);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto 38px;
  font-style: italic;
  opacity: 0.9;
}
.hero-buttons {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hero-scroll-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(237, 217, 163, 0.5);
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 3;
}
.scroll-arrow { animation: bounceDown 1.5s ease-in-out infinite; font-size: 16px; }


/* ══════════════════════════════════════════
   7. ABOUT — КНИГА + ЦІННОСТІ
   ══════════════════════════════════════════ */
.about {
  padding: 80px 0 100px;
  background:
    radial-gradient(ellipse 70% 60% at 30% 55%, var(--radial-gold) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 75% 40%, var(--radial-crimson) 0%, transparent 65%),
    var(--light-section);
  border-top: 3px solid var(--crimson);
  overflow: hidden;
  position: relative;
}

/* Patronus canvas */
#patronusCanvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* CSS-іскри */
.about-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.sparkle {
  position: absolute;
  color: var(--gold);
  font-size: 10px;
  animation: sparkleFade 4s ease-in-out infinite;
  opacity: 0;
}
.s1  { left:  5%; top: 15%; font-size: 12px; animation-delay: 0s;    animation-duration: 3.8s; }
.s2  { left: 12%; top: 65%; font-size:  8px; animation-delay: 1.2s;  animation-duration: 4.5s; }
.s3  { left: 18%; top: 35%; font-size: 14px; animation-delay: 2.1s;  animation-duration: 3.2s; }
.s4  { left: 82%; top: 20%; font-size: 10px; animation-delay: 0.7s;  animation-duration: 4.1s; }
.s5  { left: 88%; top: 55%; font-size: 13px; animation-delay: 1.9s;  animation-duration: 3.6s; }
.s6  { left: 75%; top: 78%; font-size:  9px; animation-delay: 3.0s;  animation-duration: 4.8s; }
.s7  { left: 92%; top: 38%; font-size: 11px; animation-delay: 0.4s;  animation-duration: 3.4s; }
.s8  { left:  8%; top: 82%; font-size:  9px; animation-delay: 2.6s;  animation-duration: 4.2s; }
.s9  { left: 50%; top:  8%; font-size: 12px; animation-delay: 1.5s;  animation-duration: 3.9s; }
.s10 { left: 60%; top: 88%; font-size:  8px; animation-delay: 3.4s;  animation-duration: 4.6s; }

/* Двоколонковий лейаут */
.about-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 340px);
  gap: 40px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Ліва колонка: заголовок + книга */
.about-book-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  position: relative;
  z-index: 2;
}
.about-book-label          { margin-bottom: 24px; }
.about-book-label .section-label  { display: block; margin-bottom: 8px; }

/* ── Мобільний блок "Про школу" — реалістичні сторінки книги ── */
.about-mobile { display: none; }

.about-mobile {
  padding: 40px 0 0;
}

/* Обгортка однієї сторінки */
.mob-book {
  display: flex;
  margin: 0 8px 28px;
  border-radius: 4px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.22));
}

/* Корінець */
.mob-spine {
  width: 14px;
  flex-shrink: 0;
  background:
    linear-gradient(180deg,
      #6B0000 0%, #9B1010 15%, #5C0000 30%,
      #8B0000 50%, #5C0000 70%, #9B1010 85%, #6B0000 100%);
  position: relative;
}
.mob-spine::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; width: 3px;
  background: linear-gradient(90deg, rgba(0,0,0,0.3), rgba(0,0,0,0.05));
}
.mob-spine::after {
  content: '';
  position: absolute;
  top: 0; left: 4px; bottom: 0; width: 2px;
  background: rgba(212,175,55,0.35);
}

/* Ліва сторінка — корінець справа (spine last in HTML) */
/* Ліва сторінка: корінець зправа, округлення зліва */
.mob-book--left .mob-spine {
  border-radius: 0 3px 3px 0;
  order: 2;
}
.mob-book--left .mob-spine::before {
  right: auto; left: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.05), rgba(0,0,0,0.35));
}
/* Права сторінка: корінець зліва, округлення зправа */
.mob-book--right .mob-spine {
  border-radius: 3px 0 0 3px;
}

/* Сама сторінка */
.mob-page {
  flex: 1;
  background:
    linear-gradient(105deg, #fffef9 0%, #fffcf0 40%, #fff8e8 100%);
  padding: 22px 20px 28px;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

/* Тінь від корінця на сторінці */
.mob-book--left .mob-page {
  /* Друга сторінка: корінець справа, тінь зліва */
  border-radius: 0 4px 4px 0;
  box-shadow: inset 8px 0 20px rgba(0,0,0,0.12), inset 1px 0 0 rgba(0,0,0,0.1);
}
.mob-book--right .mob-page {
  border-radius: 0 4px 4px 0;
  box-shadow: inset 8px 0 20px rgba(0,0,0,0.12), inset 1px 0 0 rgba(0,0,0,0.1);
}

/* Тонкі горизонтальні лінійки як у зошиті — ледь помітні */
.mob-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent, transparent 27px,
    rgba(139,0,0,0.04) 27px, rgba(139,0,0,0.04) 28px
  );
  pointer-events: none;
}

.mob-page-top-bar {
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--crimson), var(--gold), var(--crimson));
}

.mob-folio {
  font-family: Georgia, serif;
  font-size: 10px; font-style: italic;
  color: rgba(139,0,0,0.4);
  text-align: center;
  margin: 0 0 10px;
}

.mob-label {
  font-family: 'Cinzel', serif;
  font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--crimson);
  margin: 0 0 10px;
  position: relative; z-index: 1;
}

.mob-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 20px; line-height: 1.2;
  color: var(--text-dark);
  margin: 0 0 14px;
  position: relative; z-index: 1;
}

/* Дзеркальне оформлення першої сторінки: корінець зліва, тінь справа */
.mob-book--mirror { flex-direction: row; }
.mob-book--mirror .mob-spine {
  border-radius: 3px 0 0 3px;
  order: 0;
}
.mob-book--mirror .mob-spine::before {
  left: auto; right: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.35), rgba(0,0,0,0.05));
}
.mob-book--mirror .mob-spine::after {
  left: auto; right: 4px;
}
.mob-book--mirror .mob-page {
  border-radius: 0 4px 4px 0;
  /* тінь справа — від вільного краю сторінки */
  box-shadow: inset -8px 0 20px rgba(0,0,0,0.12), inset -1px 0 0 rgba(0,0,0,0.1);
}

/* mob-title-center */
.mob-title--center {
  text-align: center;
  font-size: 24px;
  color: var(--crimson-dark);
}

  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; position: relative; z-index: 1;
}
.mob-rule span:not(.mob-rule-icon) {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,0,0,0.3));
}
.mob-rule span:last-child {
  background: linear-gradient(90deg, rgba(139,0,0,0.3), transparent);
}
.mob-rule-icon { font-size: 14px; }

.mob-text {
  font-family: Georgia, serif;
  font-size: 13.5px; line-height: 1.75;
  color: var(--text-warm);
  margin: 0 0 8px;
  position: relative; z-index: 1;
}

.mob-btn {
  font-size: 9px; padding: 9px 16px;
  margin-top: 14px; position: relative; z-index: 1;
  display: inline-flex;
}

/* Фото на правій сторінці */
.mob-img-wrap {
  margin: 0 0 14px;
  position: relative; z-index: 1;
}
.mob-img {
  width: 100%; height: 160px;
  object-fit: cover; object-position: center;
  border-radius: 4px;
  border: 1px solid rgba(212,175,55,0.3);
  display: block;
}
.mob-img-caption {
  font-family: Georgia, serif;
  font-size: 11px; font-style: italic;
  color: rgba(139,0,0,0.5);
  text-align: center;
  margin: 6px 0 0;
}



.about-book-label .section-title  { text-align: left; margin: 0; line-height: 1.2; }
.about-title-nowrap {
  font-size: clamp(18px, 2.4vw, 38px);
}

/* Права колонка: цінності */
.about-values-col { display: flex; flex-direction: column; gap: 0; min-width: 0; position: relative; z-index: 1; }
.about-values-col > .section-label { display: block; margin-bottom: 6px; }

.about-values-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(20px, 2vw, 28px);
  color: var(--crimson-dark);
  line-height: 1.15;
  margin: 0 0 20px;
  white-space: nowrap;
}
.about-value-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}
.about-val-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  padding: 14px 18px;
  transition: transform 0.25s, box-shadow 0.25s;
  backdrop-filter: blur(4px);
}
.about-val-card:hover {
  transform: translateX(6px);
  box-shadow: -4px 0 0 var(--crimson), 0 4px 20px rgba(139, 0, 0, 0.1);
}
.about-val-icon {
  width: 44px; height: 36px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.about-val-icon img  { width: 44px; height: 36px; object-fit: contain; }
.about-val-body h3 {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--crimson);
  margin: 0 0 3px;
}
.about-val-body p {
  font-family: Georgia, serif;
  font-size: 12.5px;
  color: var(--text-earth);
  margin: 0;
  line-height: 1.5;
}

/* ── ROYAL BOOK ── */
.rb-scene {
  display: flex;
  width: 100%;
  height: 54vw;
  justify-content: center;
  align-items: stretch;
  perspective: 4000px;
  perspective-origin: 50% 0%;
}
.about-book-col .rb-scene {
  width: 100%;
  height: 46vw;
  max-height: 640px;
  perspective-origin: 50% 20%;
}

.rb-wrap {
  position: relative;
  display: flex;
  width: 65vw;
  margin-top: 6vw;
  margin-bottom: 6vw;
  padding: 0 1%;
  justify-content: center;
  perspective: 4000px;
  perspective-origin: 50% 50%;
  transform: translate3d(0px, 5%, -264px) rotateX(27deg) rotateY(0deg) rotateZ(-10deg);
  transition: transform 2000ms cubic-bezier(.165, .84, .44, 1);
  transform-style: preserve-3d;
}
.rb-wrap:hover { transform: translate3d(0px, 5%, -264px) rotateX(13deg) rotateY(0deg) rotateZ(-3deg); }
.about-book-col .rb-wrap { width: 100%; margin-top: 3vw; margin-bottom: 3vw; }

.book-cover-left {
  flex: 1;
  border-top-left-radius: 4%;
  border-bottom-left-radius: 4%;
  background: linear-gradient(135deg, #5a0000, #8B0000 50%, #6a0808);
  box-shadow: inset 4px -4px 4px 1px rgba(180, 60, 60, 0.4), inset 7px -7px 4px 0 rgba(30, 0, 0, 0.6);
  transform: translate3d(0, 0, -1px);
  transform-style: preserve-3d;
}
.book-cover-right {
  flex: 1;
  border-top-right-radius: 4%;
  border-bottom-right-radius: 4%;
  background: linear-gradient(225deg, #5a0000, #8B0000 50%, #6a0808);
  box-shadow: inset -4px -4px 4px 1px rgba(180, 60, 60, 0.4), inset -7px -7px 4px 0 rgba(30, 0, 0, 0.6);
}

.layer1 {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  display: flex;
  margin: 20px 10px 10px;
  width: calc(100% - 20px);
  height: calc(100% - 30px);
  justify-content: flex-start;
  transform: translate3d(0, 0, 5px);
  transform-style: preserve-3d;
}
.layer2 {
  position: absolute; left: 0; top: 0;
  display: flex;
  margin: 20px 10px 13px;
  width: calc(100% - 20px);
  height: calc(100% - 33px);
  justify-content: flex-start;
  transform: translate3d(2px, 0, 10px);
  transform-style: preserve-3d;
}
.layer2.right { transform: translate3d(-5px, 0, 10px); }
.layer3 {
  position: absolute; left: 0; top: 0;
  display: flex;
  margin: 20px 10px 13px;
  width: calc(100% - 20px);
  height: calc(100% - 33px);
  justify-content: flex-start;
  transform: translate3d(4px, 0, 20px);
  transform-style: preserve-3d;
}
.layer3.right { transform: translate3d(-10px, 0, 20px); }
.layer4 {
  position: absolute; left: 0; top: 0;
  display: flex;
  margin: 20px 10px 15px;
  width: calc(100% - 20px);
  height: calc(100% - 35px);
  justify-content: flex-start;
  transform: translate3d(6px, 0, 30px);
  transform-style: preserve-3d;
}
.layer4.right { transform: translate3d(-15px, 0, 30px); }

.page-left {
  flex: 1; border-top-left-radius: 1%; border-bottom-left-radius: 1%;
  background: #FEFCF3;
  box-shadow: inset 0 0 26px 2px #d8cccc, -1px 1px 13px 0 rgba(34, 27, 20, .81);
}
.page-right {
  flex: 1; border-top-right-radius: 1%; border-bottom-right-radius: 1%;
  background: #FEFCF3;
  box-shadow: inset 0 0 26px 2px #d8cccc, 1px 1px 13px 0 rgba(34, 27, 20, .81);
}

.layer-text {
  position: absolute; left: 0; top: 0;
  display: flex;
  width: calc(97% - 10px);
  height: calc(100% - 38px);
  margin: 20px 10px 18px;
  justify-content: flex-start;
  backface-visibility: hidden;
  perspective: 4000px; perspective-origin: 50% 50%;
  transform: translate3d(0, 0, 32px);
  transform-style: preserve-3d;
}
.layer-text.right { transform: translate3d(-37px, 0, 32px); }

.page-left-2 {
  position: relative; flex: 1;
  border-top-left-radius: 18%; border-bottom-left-radius: 1%;
  background: #FEFCF3;
  box-shadow: inset 0 0 7px 4px rgba(216, 204, 204, .43), -1px 1px 13px 0 rgba(34, 27, 20, .49);
  backface-visibility: hidden;
  transform: rotateY(17deg);
  transform-origin: 100% 50%;
  transition: transform 650ms cubic-bezier(.165, .84, .44, 1);
  transform-style: preserve-3d;
  overflow: hidden;
}
.page-left-2:hover { transform: rotateY(7deg); }

.page-right-2 {
  position: relative; flex: 1;
  border-top-right-radius: 1%; border-bottom-right-radius: 1%;
  background: #FEFCF3;
  box-shadow: inset 0 0 7px 4px rgba(216, 204, 204, .43), 1px 1px 13px 0 rgba(34, 27, 20, .49);
  backface-visibility: hidden;
  transform: rotateY(-3deg);
  transform-origin: 0% 50%;
  transition: transform 850ms ease;
  transform-style: preserve-3d;
  overflow: hidden;
}
.page-right-2:hover { transform: rotateY(-17deg); }

.left-side {
  position: relative; display: flex; width: 49%;
  backface-visibility: hidden;
  perspective: 4000px; perspective-origin: 0% 50%;
  transform: rotateY(20deg);
  transform-origin: 100% 50%;
  transform-style: preserve-3d;
}
.right-side {
  position: relative; display: flex; width: 49%;
  perspective: 4000px; perspective-origin: 0% 50%;
  transform: rotateY(-1deg);
  transform-style: preserve-3d;
}
.center {
  width: 3%;
  background-image:
    radial-gradient(circle farthest-corner at 56% -8%, rgba(255, 255, 255, 0.3) 8%, transparent 0),
    radial-gradient(circle farthest-corner at 50% 108%, rgba(255, 255, 255, 0.3) 8%, transparent 0),
    linear-gradient(90deg, rgba(180, 60, 60, 0.8), #3a0000 21%, rgba(180, 60, 60, 0.8) 30%, #3a0000 48%, rgba(180, 60, 60, 0.8) 68%, #3a0000 79%, rgba(180, 60, 60, 0.8));
}

.corner-fold {
  position: absolute; left: 0; top: 0; width: 30px; height: 30px;
  border-right: 1px solid rgba(216, 204, 204, .55);
  border-bottom: 1px solid rgba(216, 204, 204, .55);
  background: linear-gradient(135deg, transparent 47%, #f0f0f0 48%, #fff 55%, #f6f6f6);
  box-shadow: 6px 6px 9px -4px rgba(216, 204, 204, .53);
  z-index: 2;
}
.corner  { position: absolute; left: 0; top: 27px; width: 5vw; height: 5vw;
  background: linear-gradient(135deg, #FEFCF3 30%, transparent);
  box-shadow: inset 13px 0 17px -12px rgba(216, 204, 204, .43); }
.corner2 { position: absolute; left: 28px; top: 0; width: 5vw; height: 5vw;
  background: linear-gradient(135deg, #FEFCF3 31%, transparent);
  box-shadow: inset 0 13px 17px -12px rgba(216, 204, 204, .43); }

.page-text {
  position: relative; display: flex; flex-direction: column;
  width: 80%; height: calc(100% - 50px);
  margin: 25px auto 0;
  font-family: Georgia, 'Times New Roman', serif;
}
.rbp-label {
  font-family: 'Cinzel', serif; font-size: 0.9vw;
  letter-spacing: 0.2vw; text-transform: uppercase;
  color: var(--crimson); margin-bottom: 0.4vw;
}
.rbp-title {
  font-family: 'Cinzel Decorative', serif; font-size: 2.0vw;
  color: var(--text-dark); line-height: 1.3; margin: 0 0 0.5vw; font-weight: bold;
}
.rbp-rule {
  display: flex; align-items: center; gap: 0.4vw;
  font-size: 1vw; color: #b8902a; margin-bottom: 0.6vw;
}
.rbp-rule span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #b8902a, transparent); }
.rbp-text  { font-size: 1.05vw; line-height: 1.6; color: var(--text-warm); margin-bottom: 0.4vw; }
.rbp-btn   { margin-top: auto; align-self: flex-start; font-size: 0.9vw !important; padding: 0.6vw 1.2vw !important; }
.rbp-folio {
  position: absolute; bottom: -1.5vw; left: 50%; transform: translateX(-50%);
  font-family: 'Cinzel', serif; font-size: 0.6vw; color: rgba(80, 50, 30, .4);
  letter-spacing: 0.15vw; white-space: nowrap;
}
.rbp-imgwrap {
  width: 100%; height: 45%; border-radius: 3px; overflow: hidden;
  margin-bottom: 0.5vw; background: #2a0a0a;
}
.rbp-img        { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.rbp-imgfallback { width: 100%; height: 45%; background: linear-gradient(135deg, #3a0808, #6a1010); border-radius: 3px; }
.rbp-caption {
  font-family: 'Cinzel', serif; font-size: 0.75vw; letter-spacing: 0.2vw;
  text-transform: uppercase; color: var(--crimson); text-align: center; margin-bottom: 0.5vw;
}

/* Page curl shadow */
.tbface-front::after,
.tbface-back::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0);
  pointer-events: none; z-index: 10;
  transition: background 0.45s ease;
  border-radius: 0 6px 6px 0;
}
.tbflipper.shadowing .tbface-front::after  { background: rgba(0, 0, 0, 0.18); }
.tbflipper:hover .tbface-front::before {
  content: '';
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.06), transparent);
  pointer-events: none; z-index: 5;
  border-radius: 0 6px 6px 0;
}


/* ══════════════════════════════════════════
   8. TEACHERS — ВЧИТЕЛІ
   ══════════════════════════════════════════ */
.teachers-section {
  padding: 100px 0;
  background:
    linear-gradient(rgba(10, 2, 2, 0.72), rgba(10, 2, 2, 0.72)),
    url('img/bg_t.webp') center center / cover no-repeat fixed;
}

/* Текст адаптується до темного фону */
.teachers-section .section-title {
  color: #f5e6c0;
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.4), 0 2px 8px rgba(0, 0, 0, 0.8);
  font-size: clamp(36px, 5vw, 64px);
}
.teachers-section .section-subtitle { color: #f5e6c0; }
.teachers-section .section-label    { color: var(--gold); }
.teachers-section .ornament-line    { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.teachers-section .section-header   { padding-bottom: 20px; }

/* Директор */
.tc-director {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 50px;
  align-items: center;
  background: #fdf6e8;
  border-left: 5px solid var(--gold);
  border-radius: 16px;
  padding: 44px 50px;
  margin-bottom: 60px;
  box-shadow: 0 12px 55px rgba(0, 0, 0, 0.6), 0 0 50px rgba(212, 175, 55, 0.18);
  position: relative;
  overflow: hidden;
}
.tc-director::before {
  content: '👑';
  position: absolute;
  right: 40px; top: 24px;
  font-size: 100px;
  opacity: 0.05;
  pointer-events: none;
}
.tc-director-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(139, 0, 0, 0.2);
}
.tc-director-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.tc-director-badge {
  position: absolute;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  background: var(--crimson);
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 11px; letter-spacing: 1.5px;
  padding: 6px 18px;
  border-radius: 20px;
  white-space: nowrap;
}
.tc-director-body { display: flex; flex-direction: column; justify-content: center; }

.tc-director-label {
  font-family: 'Cinzel', serif;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--crimson); margin-bottom: 8px;
}
.tc-director-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(28px, 3vw, 42px);
  color: var(--text-dark); margin: 0 0 4px; line-height: 1.1;
}
.tc-director-tagline {
  font-family: Georgia, serif;
  font-size: 15px; font-style: italic;
  color: var(--gold-dark); margin: 0 0 18px;
}
.tc-director-rule {
  width: 80px; height: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
  margin-bottom: 18px; border-radius: 2px;
}
.tc-director-text {
  font-family: Georgia, serif;
  font-size: 14px; color: var(--text-warm); line-height: 1.75; margin-bottom: 10px;
}
.tc-director-values { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tc-director-values span {
  font-size: 11px; letter-spacing: 0.5px;
  padding: 6px 14px;
}

/* Сітка вчителів */
.tc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.tc-card {
  display: flex;
  align-items: stretch;
  background: #fdf6e8;
  border-left: 4px solid var(--crimson);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.55), 0 0 22px rgba(212, 175, 55, 0.12);
  transition: transform 0.35s, box-shadow 0.35s;
  position: relative;
}
.tc-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--crimson), rgba(212, 175, 55, 0.6), transparent);
  pointer-events: none;
}
.tc-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(212, 175, 55, 0.22);
}

/* Staggered reveal */
.tc-grid .tc-card:nth-child(1) { transition-delay: 0.05s; }
.tc-grid .tc-card:nth-child(2) { transition-delay: 0.15s; }
.tc-grid .tc-card:nth-child(3) { transition-delay: 0.10s; }
.tc-grid .tc-card:nth-child(4) { transition-delay: 0.20s; }
.tc-grid .tc-card:nth-child(5) { transition-delay: 0.15s; }
.tc-grid .tc-card:nth-child(6) { transition-delay: 0.25s; }
.tc-grid .tc-card:nth-child(odd).animate-pending  { transform: translateX(-30px); opacity: 0; }
.tc-grid .tc-card:nth-child(even).animate-pending { transform: translateX(30px);  opacity: 0; }
.tc-grid .tc-card.visible { transform: translateX(0) translateY(0) !important; opacity: 1 !important; }

.tc-photo-wrap {
  width: 130px; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, #3a0808, #8B0000);
}
.tc-photo-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
@media (max-width: 768px) {
  .tc-photo-wrap img { object-fit: contain; object-position: center; background: linear-gradient(135deg, #3a0808, #8B0000); }
}
.tc-body {
  padding: 18px 20px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; z-index: 1;
}
.tc-role {
  font-family: 'Cinzel', serif;
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--crimson); margin: 0 0 4px;
}
.tc-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(14px, 1.2vw, 18px);
  color: var(--text-dark); margin: 0 0 8px;
}
.tc-quote {
  font-family: Georgia, serif;
  font-size: 12px; font-style: italic;
  color: var(--gold-dark); line-height: 1.5; margin: 0 0 8px;
  border-left: 2px solid var(--gold); padding-left: 10px;
}
.tc-desc {
  font-family: Georgia, serif;
  font-size: 12.5px; color: var(--text-earth); line-height: 1.6; margin: 0;
}


/* ══════════════════════════════════════════
   8.5. SCHEDULE — РОЗПОРЯДОК ДНЯ
   ══════════════════════════════════════════ */
.schedule-section {
  padding: 100px 0 110px;
  background:
    radial-gradient(ellipse at 80% 20%, var(--radial-gold) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, var(--radial-crimson) 0%, transparent 55%),
    var(--light-section);
  position: relative;
}

/* Pill-switcher */
.schedule-switcher {
  display: flex;
  background: rgba(139, 0, 0, 0.06);
  border: 1.5px solid var(--border-light);
  border-radius: 30px;
  padding: 4px;
  gap: 2px;
  width: fit-content;
  margin: 0 auto 52px;
}
.schedule-switcher button {
  font-family: 'Cinzel', serif;
  font-size: 11.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 28px;
  border: none;
  border-radius: 26px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  color: var(--text-soft);
}
.schedule-switcher button.sch-active {
  background: var(--crimson);
  color: var(--gold-light);
  box-shadow: 0 3px 14px rgba(139, 0, 0, 0.3);
}

/* Two-column grid */
.schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.schedule-grid.sch-switching {
  opacity: 0;
  transform: translateY(6px);
}

.schedule-col-header {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-dark);
  text-align: center;
  padding: 0 0 16px 106px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.3);
  margin-bottom: 4px;
}

/* Timeline row */
.sch-row {
  display: flex;
  align-items: flex-start;
}
.sch-time {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 0.3px;
  color: var(--gold-light);
  background: var(--crimson);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  width: 94px;
  text-align: center;
  margin-top: 10px;
  margin-right: 8px;
}
.sch-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 18px;
  flex-shrink: 0;
}
.sch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 14px;
  border: 2px solid var(--warm-white);
}
.sch-line {
  width: 1.5px;
  flex: 1;
  min-height: 14px;
  background: linear-gradient(to bottom, rgba(201, 168, 76, 0.35), rgba(201, 168, 76, 0.08));
}
.sch-label {
  font-family: 'Nunito', sans-serif;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.45;
  padding: 8px 0 10px 8px;
  flex: 1;
}

/* ── Кольори за типом ── */
.sch-lesson .sch-time  { background: var(--crimson); }
.sch-lesson .sch-dot   { background: var(--crimson); box-shadow: 0 0 0 3px rgba(139,0,0,0.12); }

.sch-food .sch-time    { background: var(--gold-dark); }
.sch-food .sch-dot     { background: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.2); }

.sch-break .sch-time   { background: #4a7c59; }
.sch-break .sch-dot    { background: #6aab7a; box-shadow: 0 0 0 3px rgba(106,171,122,0.18); }

.sch-club .sch-time    { background: #2a5080; }
.sch-club .sch-dot     { background: #3d7fa0; box-shadow: 0 0 0 3px rgba(61,127,160,0.18); }

.sch-morning .sch-time { background: var(--crimson-dark); }
.sch-morning .sch-dot  { background: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.2); }

.sch-study .sch-time   { background: var(--text-soft); }
.sch-study .sch-dot    { background: var(--parchment); box-shadow: 0 0 0 3px rgba(107,64,32,0.12); }

.sch-evening .sch-time { background: var(--crimson-dark); }
.sch-evening .sch-dot  { background: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.2); }

/* Легенда */
.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(201, 168, 76, 0.2);
}
.sch-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Cinzel', serif;
  font-size: 9.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-soft);
}
.sch-legend-item::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.sch-legend-lesson::before { background: var(--crimson); }
.sch-legend-food::before   { background: var(--gold); }
.sch-legend-break::before  { background: #6aab7a; }
.sch-legend-club::before   { background: #3d7fa0; }
.sch-legend-study::before  { background: var(--parchment); border: 1px solid var(--text-soft); }


/* ══════════════════════════════════════════
   9. PILLARS — ТРИ КИТИ
   ══════════════════════════════════════════ */
.pillars-section {
  width: 100%;
  overflow: hidden;
  background: #000;
  overflow-anchor: none;
}
.pillars-header {
  text-align: center;
  padding: 80px 30px 60px;
  background: var(--warm-white);
  position: relative;
}

.scroll-container {
  display: flex;
  width: 100%;
  height: 80vh;
  min-height: 500px;
  max-height: 700px;
  overflow: hidden;
  overflow-anchor: none;
}
.scroll-card {
  position: relative;
  flex: 1;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  padding: 10px 40px 18px;
  border-right: 1px solid rgba(212, 175, 55, 0.15);
  overflow: hidden;
  min-height: 0;
}
.scroll-card:last-child   { border-right: none; }
.scroll-card:nth-child(1) { background-color: #8B0000; }
.scroll-card:nth-child(2) { background-color: #5C3000; }
.scroll-card:nth-child(3) { background-color: #4A3800; }

.scroll-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.72) 100%);
  transition: background 0.5s ease;
  z-index: 1; pointer-events: none;
}
.scroll-card:hover::after {
  background: linear-gradient(to bottom, transparent 30%, rgba(0, 0, 0, 0.82) 100%);
}

.card-content {
  color: #fff;
  width: 100%;
  position: relative; z-index: 3;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  max-height: 100%;
}
.card-hint { z-index: 3; position: relative; }

.card-header { display: flex; align-items: center; gap: 18px; margin-bottom: 0; }
.card-number {
  font-family: 'Cinzel', serif;
  font-size: 13px; font-weight: 700;
  color: var(--gold); opacity: 0.7;
  letter-spacing: 2px; flex-shrink: 0;
  transition: opacity 0.4s;
}
.scroll-card:hover .card-number,
.scroll-card.active .card-number { opacity: 1; }
.card-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 20px; font-weight: 700;
  color: #fff; margin: 0;
  text-transform: uppercase; letter-spacing: 2px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  line-height: 1.2;
}
.card-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin-top: 16px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity 0.4s 0.1s ease, transform 0.45s 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}
.scroll-card:hover .card-divider,
.scroll-card.active .card-divider { opacity: 1; transform: scaleX(1); }

.card-details {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.5s 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s 0.2s ease,
              margin-top 0.4s 0.1s ease;
  margin-top: 0;
}
.scroll-card:hover .card-details,
.scroll-card.active .card-details { grid-template-rows: 1fr; opacity: 1; margin-top: 18px; }
.card-details ul {
  list-style: none; padding: 0; margin: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
}
.card-details li {
  font-family: Georgia, serif;
  font-size: 13.5px; color: rgba(255, 255, 255, 0.88);
  line-height: 1.5; padding-left: 16px;
  border-left: 2px solid var(--gold);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}


/* ══════════════════════════════════════════
   10. PROGRAMS — ОСВІТНІ ПРОГРАМИ
   ══════════════════════════════════════════ */
.programs-section {
  padding: 100px 0 110px;
  background:
    radial-gradient(ellipse at 15% 50%, var(--radial-gold) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 30%, var(--radial-crimson) 0%, transparent 55%),
    var(--alt-section);
  position: relative;
}

.programs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}
.program-card {
  background: #fff;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 20px;
  overflow: visible;
  box-shadow: 0 4px 28px rgba(139, 0, 0, 0.07);
  transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.35s;
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: 80px;
}
.program-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 52px rgba(139, 0, 0, 0.12);
}
.program-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, var(--crimson), var(--gold), var(--crimson));
  opacity: 0; transition: opacity 0.35s;
}
.program-card:hover::after { opacity: 1; }

.program-logo-float {
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 160px; height: 160px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid rgba(212, 175, 55, 0.35);
  box-shadow:
    0 8px 32px rgba(139, 0, 0, 0.15),
    0 0 0 6px rgba(255, 255, 255, 0.9),
    0 0 0 7px rgba(212, 175, 55, 0.2);
  transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.4s;
  z-index: 2; overflow: hidden;
}
.program-card:hover .program-logo-float {
  transform: translateX(-50%) translateY(-6px);
  box-shadow:
    0 14px 42px rgba(139, 0, 0, 0.2),
    0 0 0 6px rgba(255, 255, 255, 0.9),
    0 0 0 7px rgba(212, 175, 55, 0.3);
}
.program-logo-float img {
  width: 130px; height: 130px;
  object-fit: contain; border-radius: 50%;
}
.program-logo-placeholder {
  font-family: 'Cinzel', serif;
  font-size: 28px; font-weight: 700;
  color: var(--crimson); letter-spacing: 1px;
}
.program-badge {
  position: absolute; top: 16px; right: 20px;
  font-family: 'Cinzel', serif;
  font-size: 10px; letter-spacing: 3px; font-weight: 700;
  color: var(--gold-dark); opacity: 0.6; z-index: 1;
}
.program-body {
  padding: 96px 32px 36px;
  flex: 1; display: flex; flex-direction: column;
}
.program-title {
  font-family: 'Cinzel', serif;
  font-size: 24px; font-weight: 700;
  line-height: 1.15; margin-bottom: 6px; text-align: center;
}
.program-card--nush .program-title     { color: #1A4A8A; }
.program-card--intellect .program-title { color: var(--crimson); }

.program-subtitle {
  font-family: Georgia, serif;
  font-size: 13px; font-style: italic;
  color: var(--text-muted); margin-bottom: 22px; text-align: center;
}
.program-divider { height: 1px; margin-bottom: 22px; }
.program-card--nush .program-divider     { background: linear-gradient(90deg, transparent, #1A4A8A, transparent); }
.program-card--intellect .program-divider { background: linear-gradient(90deg, transparent, var(--crimson), transparent); }

.program-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 16px; flex: 1;
}
.program-list li {
  display: flex; flex-direction: column; gap: 3px;
  padding-left: 18px; position: relative;
}
.program-list li::before {
  content: '✦';
  position: absolute; left: 0; top: 2px;
  font-size: 8px; color: var(--gold);
}
.program-item-label {
  font-family: 'Cinzel', serif;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase;
}
.program-card--nush .program-item-label     { color: #1A4A8A; }
.program-card--intellect .program-item-label { color: var(--crimson); }
.program-item-text {
  font-family: Georgia, serif;
  font-size: 13.5px; color: var(--text-soft); line-height: 1.65;
}

/* Розгортання */
.program-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.program-list--extra { margin-top: 12px; }

.program-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 6px 18px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--crimson);
  cursor: pointer;
  transition: all 0.25s;
}
.program-toggle:hover { background: rgba(139,0,0,0.05); border-color: var(--crimson); }
.prog-toggle-icon { font-size: 14px; transition: transform 0.35s; display: inline-block; }


/* ══════════════════════════════════════════
   10.5. DIRECTIONS — НАПРЯМКИ ПОСЛУГ
   ══════════════════════════════════════════ */
.directions-section {
  padding: 100px 0 110px;
  background: var(--alt-section);
  position: relative;
}

/* Сітка трьох карток — розгортання зліва */
.dir-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
  overflow: visible;
  margin-top: 110px;
}
.dir-grid::before { display: none; }

/* Картка — початковий стан (згорнута ліворуч) */
.dir-card {
  background: var(--warm-white);
  border: 1px solid var(--border-light);
  padding: 120px 28px 40px;
  position: relative;
  z-index: 1;
  overflow: visible;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s,
              opacity 0.5s ease;
}
/* Арка зверху — виступає над карткою */
.dir-card::before {
  content: '';
  position: absolute;
  top: -52px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 104px;
  background: var(--warm-white);
  border: 1px solid var(--border-light);
  border-bottom: none;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  z-index: 2;
  pointer-events: none;
}
.dir-card--collapsed {
  opacity: 0;
  transform: translateX(-24px);
}
.dir-card--open {
  opacity: 1;
  transform: translateX(0);
}
.dir-card:first-child { border-radius: 16px 0 0 16px; border-right: none; }
.dir-card:last-child  { border-radius: 0 16px 16px 0; border-left: none; }
.dir-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 52px rgba(139, 0, 0, 0.13);
  z-index: 3;
}
.dir-card:hover .dir-img-badge { transform: scale(1.05); }

/* Зображення — в арці зверху */
.dir-img-badge {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(201, 168, 76, 0.45);
  box-shadow:
    0 6px 20px rgba(139, 0, 0, 0.18),
    0 0 0 5px rgba(139, 0, 0, 0.04),
    0 0 0 6px rgba(201, 168, 76, 0.14);
  position: absolute;
  top: -62px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.35s;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-dark);
}
.dir-img-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dir-img-fallback {
  font-family: 'Cinzel Decorative', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--crimson);
}
.dir-card:hover .dir-img-badge {
  transform: translateX(-50%) scale(1.06);
  box-shadow:
    0 10px 28px rgba(139, 0, 0, 0.22),
    0 0 0 5px rgba(139, 0, 0, 0.05),
    0 0 0 6px rgba(201, 168, 76, 0.2);
}

/* Тексти */
.dir-stage {
  font-family: 'Cinzel', serif;
  font-size: 9.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dark);
  text-align: center;
  margin-bottom: 6px;
}
.dir-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(14px, 1.3vw, 18px);
  color: var(--crimson-dark);
  text-align: center;
  line-height: 1.25;
  margin-bottom: 4px;
}
.dir-en {
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
}
.dir-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
  margin-bottom: 20px;
}

/* Список */
.dir-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dir-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-family: Georgia, serif;
  font-size: 13px;
  color: var(--text-warm);
  line-height: 1.55;
}
.dir-list li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--crimson);
  flex-shrink: 0;
  margin-top: 6px;
}


/* ══════════════════════════════════════════
   11. CLUBS — ГУРТКИ
   ══════════════════════════════════════════ */
.clubs-section {
  padding: 100px 0 120px;
  background:
    radial-gradient(ellipse at 15% 40%, var(--radial-gold) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 60%, var(--radial-crimson) 0%, transparent 55%),
    var(--light-section);
  position: relative;
  overflow: hidden;
  /* Ізолюємо рендеринг секції — зупиняє layout recalc сусідів */
  contain: layout style;
}

/* Рівна сітка для всіх гуртків */
.clubs-grid--equal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.club-flip {
  min-height: 220px;
  /* perspective і 3D вмикаються лише через JS при наведенні */
}
.club-flip.club-big { min-height: 460px; }

.club-flip-inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
  /* preserve-3d вимкнено — вмикається класом .club-3d-active */
}

/* Клас додається JS при наведенні — вмикає 3D лише для цієї картки */
.club-flip.club-3d-active {
  perspective: 900px;
}
.club-flip.club-3d-active .club-flip-inner {
  transform-style: preserve-3d;
}
.club-flip.club-3d-active .club-flip-inner.club-flipped {
  transform: rotateY(180deg);
}

/* Лицеві сторони */
.club-front, .club-back {
  position: absolute; inset: 0;
  border-radius: 18px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* Front */
.club-front {
  background: linear-gradient(145deg, #fff8ee 0%, #fef0d6 100%);
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 6px 28px rgba(139, 0, 0, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; text-align: center;
  padding: 28px 24px;
  position: relative;
}
.club-front::before {
  content: ''; position: absolute; inset: 6px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 13px; pointer-events: none;
}
.club-front::after {
  content: '✦'; position: absolute; top: 10px; right: 14px;
  font-size: 11px; color: rgba(212, 175, 55, 0.5);
  animation: twinkleCorner 2.5s ease-in-out infinite;
}

.club-front-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--crimson) 0%, var(--gold) 50%, var(--crimson) 100%);
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
  border-radius: 18px 18px 0 0;
}

.club-icon { width: 90px; height: 90px; transition: transform 0.3s; }
.club-big .club-icon { width: 110px; height: 110px; }
.club-icon img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.18));
}
.club-flip:hover .club-icon { transform: scale(1.08); }

.club-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(14px, 1.2vw, 19px);
  color: var(--text-dark); margin: 0; line-height: 1.3;
}
.club-big .club-title { font-size: clamp(16px, 1.5vw, 22px); }

.club-tag {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase;
  color: #fff; background: var(--crimson);
  padding: 3px 10px; border-radius: 20px;
}
.club-hint {
  font-family: Georgia, serif;
  font-size: 12px; font-style: italic;
  color: rgba(139, 0, 0, 0.45); margin-top: 2px;
}

/* Back */
.club-back {
  background: linear-gradient(145deg, #fff8ee 0%, #fef0d6 100%);
  transform: rotateY(180deg);
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 12px 14px; gap: 6px;
  box-shadow: 0 6px 28px rgba(139, 0, 0, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
}
.club-back::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 10%, rgba(212, 175, 55, 0.08), transparent 50%);
  pointer-events: none;
}
.club-back::after {
  content: ''; position: absolute; inset: 6px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 13px; pointer-events: none;
}
.club-back .club-back-bar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--crimson) 0%, var(--gold) 50%, var(--crimson) 100%);
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
  border-radius: 0 0 18px 18px;
}
.club-back-title {
  font-family: 'Cinzel', serif;
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--crimson); margin: 0; position: relative; z-index: 1;
}
.club-desc {
  font-family: Georgia, serif;
  font-size: 13px; color: var(--text-warm); line-height: 1.7;
  margin: 0; flex: 1; position: relative; z-index: 1;
}
.club-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-top: 12px; border-top: 1px solid rgba(212, 175, 55, 0.25);
  position: relative; z-index: 1;
}
.club-meta span {
  font-size: 9px; letter-spacing: 0.5px;
  padding: 4px 10px;
}


/* ══════════════════════════════════════════
   12. MOVEIT EDUCATION
   ══════════════════════════════════════════ */
.moveit-section {
  padding: 100px 0 110px;
  background:
    radial-gradient(ellipse at 10% 50%, var(--radial-crimson) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 20%, var(--radial-gold) 0%, transparent 55%),
    var(--alt-section);
  position: relative;
  overflow: hidden;
}
.moveit-section::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--crimson), var(--gold), transparent);
}

.moveit-hero {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  margin-bottom: 28px;
}
/* Новий блок з описом і фічами */
.moveit-about {
  max-width: 820px;
  margin: 0 auto 36px;
  text-align: center;
}
.moveit-about-text {
  font-family: Georgia, serif;
  font-size: 14.5px;
  color: var(--text-warm);
  line-height: 1.8;
  margin-bottom: 24px;
  font-style: italic;
}
.moveit-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
  text-align: left;
}
.moveit-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: Georgia, serif;
  font-size: 13px;
  color: var(--text-warm);
  line-height: 1.5;
}
.moveit-feature-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.moveit-hero-logo {
  width: 110px; height: 110px;
  border-radius: 50%; overflow: hidden;
  border: 3px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 0 8px rgba(139, 0, 0, 0.05), 0 8px 32px rgba(139, 0, 0, 0.18);
  margin-bottom: 24px;
}
.moveit-hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.moveit-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Cinzel', serif;
  font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--gold-dark);
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.35);
  padding: 5px 18px; border-radius: 30px; margin-bottom: 16px;
}
.moveit-hero-title {
  font-family: 'Cinzel', serif;
  font-size: 32px; font-weight: 700;
  color: var(--dark); line-height: 1.2; margin-bottom: 14px;
}
.moveit-hero-desc {
  font-family: Georgia, serif;
  font-size: 15px; font-style: italic;
  color: var(--text-soft); line-height: 1.8; max-width: 620px;
}
.moveit-hero-desc strong { color: var(--crimson); font-style: normal; }

.moveit-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 32px auto 56px; max-width: 320px;
}
.moveit-divider::before,
.moveit-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5));
}
.moveit-divider::after { background: linear-gradient(90deg, rgba(212, 175, 55, 0.5), transparent); }
.moveit-divider-gem { font-size: 16px; color: var(--gold); }

/* Двоколонковий layout: текст зліва, циліндр справа */
.moveit-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 36px;
}
.moveit-left {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.moveit-right {
  min-width: 0;
}

/* Циліндрична карусель Move IT */
.moveit-cyl-scene {
  overflow: hidden;
  perspective: 900px;
  mask: linear-gradient(90deg, #0000, red 18% 82%, #0000);
  -webkit-mask: linear-gradient(90deg, #0000, red 18% 82%, #0000);
  height: 280px;
  display: grid;
  margin-bottom: 36px;
}
.moveit-cyl {
  display: grid;
  place-self: center;
  transform-style: preserve-3d;
  animation: moveitSpin 18s linear infinite;
}
.moveit-cyl:hover { animation-play-state: running; }

@keyframes moveitSpin {
  to { rotate: y 1turn; }
}

.moveit-card {
  --w: 240px;
  --ba: 1turn / var(--n);
  grid-area: 1 / 1;
  width: var(--w);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 14px;
  padding: 22px 18px 18px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(139, 0, 0, 0.08);
  backface-visibility: hidden;
  pointer-events: none;
  transform:
    rotateY(calc(var(--i) * var(--ba)))
    translateZ(calc((.5 * var(--w) + .5em) / tan(.5 * var(--ba))));
  position: relative; overflow: hidden;
}
.moveit-icon-wrap {
  width: 96px; height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 0 6px var(--warm-white);
}
.moveit-card-icon {
  width: 100%; height: 100%; object-fit: contain;
  display: block;
}
.moveit-card-title {
  font-family: 'Cinzel', serif;
  font-size: 13px; font-weight: 700; color: var(--dark);
  margin-bottom: 4px; line-height: 1.3;
}
.moveit-card-desc {
  font-family: Georgia, serif;
  font-size: 10.5px; color: var(--text-soft); line-height: 1.5; margin-bottom: 0;
}
.moveit-card-age {
  display: inline-block;
  font-size: 8.5px; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 3px 12px;
}

/* (carousel buttons removed — cylinder approach) */

/* ══════════════════════════════════════════
   FAQ — ЧАСТІ ПИТАННЯ
   ══════════════════════════════════════════ */
.faq-section {
  padding: 100px 0;
  background: var(--light-section);
}
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--warm-white);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  color: var(--crimson-dark);
  letter-spacing: 0.3px;
  text-align: left;
  transition: background 0.2s;
}
.faq-q:hover { background: rgba(139,0,0,.03); }
.faq-icon {
  font-size: 22px;
  color: var(--crimson);
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.4,0,.2,1);
  line-height: 1;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,.2,1);
}
.faq-a-inner {
  padding: 0 24px 20px;
  font-family: Georgia, serif;
  font-size: 13.5px;
  color: var(--text-warm);
  line-height: 1.75;
}
.faq-a-inner p { margin: 0 0 8px; }
.faq-a-inner p:last-child { margin: 0; }
.faq-a-inner ul {
  margin: 6px 0 10px 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.faq-a-inner li { list-style: disc; }

.moveit-footer { text-align: center; }
.moveit-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Cinzel', serif;
  font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase;
  color: #fff; background: var(--crimson);
  border: 2px solid var(--crimson);
  padding: 14px 34px; border-radius: 6px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 4px 18px rgba(139, 0, 0, 0.22);
}
.moveit-btn:hover {
  background: transparent; color: var(--crimson);
  box-shadow: 0 6px 26px rgba(139, 0, 0, 0.18);
  transform: translateY(-2px);
}


/* ══════════════════════════════════════════
   12.5. GALLERY — ГАЛЕРЕЯ
   ══════════════════════════════════════════ */
.gallery-section {
  padding: 100px 0 0;
  background: var(--cream);
  overflow: hidden;
}

.gallery-scene {
  overflow: hidden;
  perspective: 35em;
  mask: linear-gradient(90deg, #0000, red 15% 85%, #0000);
  -webkit-mask: linear-gradient(90deg, #0000, red 15% 85%, #0000);
  margin-top: 48px;
  padding-bottom: 60px;
  display: grid;
}

.gallery-a3d {
  display: grid;
  place-self: center;
  transform-style: preserve-3d;
  animation: galleryRy 36s linear infinite;
}

@keyframes galleryRy {
  to { rotate: y 1turn; }
}

.gallery-card {
  --w: 17em;
  --ba: 1turn / var(--n);
  grid-area: 1 / 1;
  width: var(--w);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  backface-visibility: hidden;
  transform:
    rotateY(calc(var(--i) * var(--ba)))
    translateZ(calc(-1 * (.5 * var(--w) + .5em) / tan(.5 * var(--ba))));
  border: 3px solid rgba(201, 168, 76, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-a3d { animation-duration: 144s; }
}

@media (max-width: 768px) {
  .gallery-section { padding: 80px 0 0; }
  .gallery-card { --w: 13em; }
}


/* ══════════════════════════════════════════
   13. ADMISSIONS — ВСТУП
   ══════════════════════════════════════════ */
.admissions-section {
  padding: 100px 0;
  background: var(--cream);
}
.admissions-content {
  text-align: center;
  display: flex; flex-direction: column;
  align-items: center; gap: 32px;
}
.admissions-text {
  font-family: Georgia, serif;
  font-size: 16px; color: var(--text-soft);
  line-height: 1.8; font-style: italic;
  max-width: 600px;
}

/* Два блоки з документами */
.admissions-docs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
  max-width: 900px;
  text-align: left;
}
.admissions-doc-block {
  background: var(--warm-white);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--crimson);
  border-radius: 8px;
  padding: 24px 26px;
}
.admissions-doc-title {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--crimson-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.5;
}
.admissions-doc-icon { font-size: 14px; }
.admissions-doc-note {
  font-family: Georgia, serif;
  font-size: 10px;
  font-style: italic;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}
.admissions-doc-list {
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admissions-doc-list li {
  font-family: Georgia, serif;
  font-size: 13px;
  color: var(--text-warm);
  line-height: 1.55;
}
.admissions-doc-list li em {
  color: var(--text-muted);
  font-size: 12px;
}
@media (max-width: 768px) {
  .admissions-docs { grid-template-columns: 1fr; }
}


/* ══════════════════════════════════════════
   16. CONTACT — КОНТАКТИ
   ══════════════════════════════════════════ */
.contact-section {
  padding: 100px 0;
  background: var(--alt-section);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 55px;
}
.contact-info {
  display: flex; flex-direction: column; gap: 16px;
  font-size: 14px; color: var(--text-soft); line-height: 1.8;
}
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-input {
  background: var(--warm-white);
  border: 1.5px solid var(--border-light);
  color: var(--text-main);
  padding: 12px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  border-radius: 4px;
  width: 100%;
}
.form-input:focus {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.08);
}
.form-textarea { resize: none; }

.cf-status {
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1.6;
  min-height: 20px;
  text-align: center;
  transition: opacity 0.3s;
}
.cf-status--ok  { color: #2a6040; }
.cf-status--err { color: var(--crimson); }


/* ══════════════════════════════════════════
   16.4. SKY ANIMATION — небо над будиночками
   ══════════════════════════════════════════ */
.sky-animation {
  width: 100%;
  height: 90px;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

/* Хмаринки */
.sky-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  animation: skyDriftCloud linear infinite;
}
.sky-cloud::before,
.sky-cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.sky-cloud::before {
  width: 55%; height: 160%;
  top: -50%; left: 15%;
}
.sky-cloud::after {
  width: 40%; height: 130%;
  top: -35%; right: 18%;
}
@keyframes skyDriftCloud {
  from { transform: translateX(-200px); }
  to   { transform: translateX(calc(100vw + 200px)); }
}

/* Пташки */
.sky-bird {
  position: absolute;
  transform-origin: left center;
  animation: skyFlyBird linear infinite;
}
@keyframes skyFlyBird {
  from { transform: translateX(-60px); }
  to   { transform: translateX(calc(100vw + 60px)); }
}
.sky-bird svg path {
  animation: skyFlapWing 0.45s ease-in-out infinite alternate;
  transform-origin: 50% 50%;
}
@keyframes skyFlapWing {
  from { d: path("M1 9 Q5.5 2 11 5.5 Q16.5 2 21 9"); }
  to   { d: path("M1 5 Q5.5 9 11 5.5 Q16.5 9 21 5"); }
}


/* ══════════════════════════════════════════
   16.5. FOOTER STRIP + MAP
   ══════════════════════════════════════════ */
.footer-strip {
  width: 100%;
  height: 110px;
  overflow: hidden;
  line-height: 0;
}
.footer-strip-inner {
  width: 100%;
  height: 110px;
  background-image: url('img/footer-img.png');
  background-repeat: repeat-x;
  background-size: auto 110px;
  background-position: center;
  opacity: 0.9;
}

.map-fullwidth {
  width: 100%;
  line-height: 0;
}
.map-fullwidth iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
  filter: sepia(20%) saturate(80%);
}

/* Посилання в контактах */
.contact-info a {
  color: var(--crimson);
  text-decoration: none;
  transition: color 0.2s;
}
.contact-info a:hover { color: var(--gold-dark); }


/* ══════════════════════════════════════════
   TC SLIDE-IN ANIMATIONS (вчителі)
   ══════════════════════════════════════════ */
.tc-card {
  will-change: opacity, transform;
}

/* ══════════════════════════════════════════
   FIREFLIES (вогники у секції вчителів)
   ══════════════════════════════════════════ */
.fireflies-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.teachers-section { position: relative; overflow: hidden; }
.teachers-section .container { position: relative; z-index: 1; }


/* ══════════════════════════════════════════
   17. FOOTER
   ══════════════════════════════════════════ */
.footer {
  background: var(--dark);
  border-top: 3px solid var(--crimson);
  padding: 40px 0;
}
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-logo {
  display: flex; align-items: center; gap: 12px;
  color: var(--parchment);
}
.footer-logo img { height: 50px; width: auto; object-fit: contain; }
.footer-logo strong {
  font-family: 'Cinzel Decorative', serif;
  font-size: 14px; color: var(--gold-light);
}
.footer-logo span {
  font-family: 'Cinzel', serif;
  font-size: 10px; color: var(--parchment);
  letter-spacing: 2px; opacity: 0.6; text-transform: uppercase;
  display: block;
}
.footer-copy {
  font-family: 'Cinzel', serif;
  font-size: 10.5px; color: var(--parchment);
  opacity: 0.4; letter-spacing: 0.5px;
}


/* ══════════════════════════════════════════
   18. SCROLL TO TOP
   ══════════════════════════════════════════ */
.scroll-top {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 46px; height: 46px;
  background: var(--crimson);
  border: 2px solid var(--gold);
  color: var(--gold-light);
  font-size: 18px;
  cursor: pointer;
  z-index: 999;
  transition: all 0.3s;
  display: none;
  align-items: center; justify-content: center;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(139, 0, 0, 0.35);
}
.scroll-top.visible { display: flex; }
.scroll-top:hover {
  background: var(--crimson-dark);
  box-shadow: 0 8px 25px rgba(139, 0, 0, 0.5);
  transform: translateY(-3px);
}


/* ══════════════════════════════════════════
   19. KEYFRAMES
   ══════════════════════════════════════════ */
@keyframes floatShape {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%       { transform: translateY(-30px) rotate(120deg); }
  66%       { transform: translateY(20px) rotate(240deg); }
}
@keyframes magicFloat {
  0%   { opacity: 0;   transform: translateY(0) scale(0); }
  10%  { opacity: 0.8; transform: translateY(-5vh) scale(1); }
  90%  { opacity: 0.4; }
  100% { opacity: 0;   transform: translateY(-60vh) scale(0.5); }
}
@keyframes emblemFloat {
  0%, 100% { transform: translateY(0);    filter: drop-shadow(0 0 20px rgba(201, 168, 76, 0.5)); }
  50%       { transform: translateY(-10px); filter: drop-shadow(0 0 40px rgba(201, 168, 76, 0.9)); }
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}
@keyframes sparkleFade {
  0%, 100% { opacity: 0;   transform: scale(0.5) rotate(0deg);   }
  30%       { opacity: 1;   transform: scale(1.2) rotate(20deg);  }
  60%       { opacity: 0.6; transform: scale(1)   rotate(-10deg); }
}
@keyframes twinkleCorner {
  0%, 100% { opacity: 0.4; transform: scale(1);   }
  50%       { opacity: 1;   transform: scale(1.3); }
}
@keyframes shimmer {
  0%   { background-position: 0%   center; }
  100% { background-position: 200% center; }
}


/* ══════════════════════════════════════════
   20. MEDIA QUERIES
   ══════════════════════════════════════════ */

/* ── About layout: collapses earlier than other elements ── */
@media (max-width: 1180px) {
  .about-layout         { grid-template-columns: 1fr; gap: 50px; }
  .about-values-col     { max-width: 600px; margin: 0 auto; }
  .about-book-col .rb-scene { height: 54vw; max-height: none; }
  .about-book-col .rb-wrap  { width: 80vw; }
  /* "Чому нас обирають" — центр і колір заголовка */
  .about-values-col > .section-label { text-align: center; }
  .about-values-title   { color: var(--crimson-dark); text-align: center; white-space: normal; font-size: clamp(20px, 4vw, 28px); }
}

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
  /* Гамбургер на планшеті */
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--warm-white);
    border-bottom: 2px solid var(--crimson);
    padding: 20px;
    gap: 15px;
    box-shadow: 0 10px 30px var(--shadow-warm);
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-burger     { display: flex; }

  .tc-director          { grid-template-columns: 240px 1fr; gap: 36px; padding: 36px; }

  .programs-grid        { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .program-card         { margin-top: 70px; }
  .program-logo-float   { width: 140px; height: 140px; top: -70px; }
  .program-logo-float img { width: 114px; height: 114px; }

  .dir-grid             { grid-template-columns: 1fr; margin-top: 70px; }
  .dir-card             { opacity: 1 !important; transform: none !important; padding-top: 120px; }
  .dir-card:first-child { border-radius: 16px 16px 0 0; border-right: 1px solid var(--border-light); border-bottom: none; }
  .dir-card:last-child  { border-radius: 0 0 16px 16px; border-left: 1px solid var(--border-light); border-top: none; }

  .clubs-grid--equal      { grid-template-columns: 1fr 1fr; }
  .club-flip.club-big     { min-height: 300px; }

  .moveit-grid          { grid-template-columns: repeat(2, 1fr); }
  .moveit-layout        { grid-template-columns: 1fr; }
  .moveit-hero-title    { font-size: 26px; }
  .moveit-features      { grid-template-columns: 1fr; }
}

/* ── Book tablet (≤991px) ── */
@media (max-width: 991px) {
  .rb-scene             { height: 56vw; }
  .rb-wrap              { width: 70vw; }
  .page-left-2          { border-top-left-radius: 20%; }
  .rbp-title            { font-size: 2.2vw; }
  .rbp-text             { font-size: 1.1vw; }
  .page-right-2         { padding-left: 9%; }
}

/* ── Mobile landscape / large phone (≤768px) ── */
@media (max-width: 768px) {
  .ticker-bar           { display: none; }
  nav { padding: 0 20px; top: 0; }
  nav.nav-hidden        { transform: translateY(-100%); }
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--warm-white);
    border-bottom: 2px solid var(--crimson);
    padding: 20px;
    gap: 15px;
    box-shadow: 0 10px 30px var(--shadow-warm);
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-burger     { display: flex; }

  /* Зменшуємо відступи між секціями на мобільному */
  .programs-section   { padding: 60px 0 70px; }
  .directions-section { padding: 60px 0 70px; }

  /* Книга — ховаємо на мобільному, показуємо мобільний блок */
  .about-book-col       { display: none; }
  .about-mobile         { display: block; }
  .about-layout         { grid-template-columns: 1fr; padding: 0; }

  /* Три кити */
  .scroll-container     { flex-direction: column; height: auto; max-height: none; }
  .scroll-card          { flex: none; height: 200px; width: 100%; border-right: none; border-bottom: 1px solid rgba(212, 175, 55, 0.15); padding: 28px; transition: height 0.25s ease; overflow: hidden; }
  .scroll-card:hover    { height: 200px; }
  .scroll-card.active   { height: 420px; }
  .scroll-card.active .card-details { grid-template-rows: 1fr; opacity: 1; margin-top: 18px; }
  .scroll-card.active .card-number  { opacity: 1; }
  .scroll-card.active .card-divider { opacity: 1; transform: scaleX(1); }
  .card-header h3       { font-size: 16px; }

  /* Напрямки — одна колонка */
  .dir-grid             { grid-template-columns: 1fr; margin-top: 110px; gap: 80px; }
  .dir-card             { opacity: 1 !important; transform: none !important; padding-top: 100px;
                          border-radius: 16px !important; border: 1px solid var(--border-light) !important; }

  /* Вчителі */
  .tc-director          { grid-template-columns: 1fr; padding: 16px 16px 20px; gap: 12px; }
  .tc-director-photo    { max-width: 180px; margin: 0 auto; }
  .tc-director-body     { padding: 0; }
  .tc-director-text     { font-size: 13px; line-height: 1.6; }
  .tc-director-name     { font-size: 22px; }
  .tc-director-tagline  { font-size: 13px; margin-bottom: 12px; }
  .tc-director-rule     { margin-bottom: 12px; }
  .tc-grid              { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tc-card              { flex-direction: column; }
  .tc-photo-wrap        { width: 100%; height: 160px; }
  .tc-body              { padding: 12px 14px; }
  .tc-name              { font-size: 14px; }
  .tc-role              { font-size: 9px; }
  .tc-quote             { font-size: 12px; }
  .tc-bio               { font-size: 12px; display: none; }

  /* Розпорядок */
  .schedule-grid        { grid-template-columns: 1fr; gap: 32px 0; }
  .schedule-col-header  { padding-left: 106px; }

  .contact-grid         { grid-template-columns: 1fr; }
  .footer-content       { flex-direction: column; text-align: center; }
}

/* ── Mobile (≤600px) ── */
@media (max-width: 600px) {
  .clubs-grid--equal    { grid-template-columns: 1fr; }
  .club-flip            { min-height: 200px; }
  .club-flip.club-big   { min-height: 200px; }
  .tc-grid              { grid-template-columns: 1fr; }
}

/* ── Small phone (≤560px) ── */
@media (max-width: 560px) {
  .moveit-layout        { grid-template-columns: 1fr; }
  .moveit-hero-title    { font-size: 22px; }
  .moveit-icon-wrap     { width: 80px; height: 80px; }
  .moveit-card-icon     { width: 60px; height: 60px; }
}

/* ── Extra small (≤479px) ── */
@media (max-width: 479px) {
  .rb-scene             { height: 72vw; }
}