/* =========================================================
   SEIYA — публичный сайт
   Чёрный фон, белый текст, красный (основной акцент) + оранжевый
   (огненный, для градиентов/ховеров). Заголовки — Oswald (широкий,
   с разрядкой, как у référence-сайтов), текст — Montserrat.
   ========================================================= */

:root {
  --bg: #0a0908;
  --bg-alt: #141210;
  --bg-card: #1a1715;
  --line: #2a2622;

  --text: #f5f2ee;
  --text-dim: #b8b2aa;
  --text-faint: #7d766d;

  --red: #e8342a;
  --red-dark: #b81f17;
  --orange: #ff7a1a;
  --white: #ffffff;

  --gradient-fire: linear-gradient(90deg, var(--red) 0%, var(--orange) 100%);
  --gradient-overlay: linear-gradient(180deg, rgba(10, 9, 8, 0) 0%, rgba(10, 9, 8, 0.55) 55%, rgba(10, 9, 8, 0.95) 100%);

  /* Тепла тонка "рамка" для фотографій (мініатюри, галерея, фото команди) —
     ледь тепліший за чорне тло контур + м'яка тінь для глибини. Навмисно
     тонко й приглушено, без товстих контрастних ліній — щоб виглядало
     стильно, а не як позолочена рамка. */
  --photo-frame: 0 0 0 1px rgba(255, 154, 61, 0.22), 0 6px 16px rgba(0, 0, 0, 0.35);
  --photo-frame-hover: 0 0 0 1px rgba(255, 154, 61, 0.45), 0 8px 22px rgba(0, 0, 0, 0.45);

  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Montserrat', -apple-system, Segoe UI, Roboto, sans-serif;

  --radius: 10px;
  --radius-lg: 18px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
  margin: 0 0 0.5em;
  line-height: 1.15;
}

.section {
  padding: 88px 0;
}
.section--tight { padding: 56px 0; }
.section--alt { background: var(--bg-alt); }

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  text-align: center;
  margin-bottom: 12px;
}
.section-title--accent {
  color: var(--red);
}
.gallery-group-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--red);
  text-align: center;
  margin: 0 0 16px;
}
.section-intro {
  text-align: center;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 48px;
  font-size: 16px;
}

.divider {
  width: 64px;
  height: 3px;
  background: var(--gradient-fire);
  margin: 0 auto 32px;
  border-radius: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 34px;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn:hover { background: var(--orange); transform: translateY(-1px); }
.btn--outline {
  background: transparent;
  border: 1.5px solid var(--red);
}
.btn--outline:hover { background: var(--red); }
.btn--sm { padding: 10px 22px; font-size: 12px; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 9, 8, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.brand-tag {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--red);
  margin-top: 4px;
}
.main-nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  font-family: var(--font-head);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--white); border-color: var(--red); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.lang-switch a {
  padding: 4px 8px;
  border-radius: 5px;
  color: var(--text-faint);
}
.lang-switch a.active { color: var(--white); background: var(--bg-card); }
.lang-switch a:hover { color: var(--white); }
.lang-sep { color: var(--line); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

/* ---------- Hero (главная) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  background: var(--bg-alt) center/cover no-repeat;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1; /* поверх .photo-fill (z-index:0) — фото под затемнением, как и раньше */
  background: var(--gradient-overlay);
}

/* ---------- Фото як справжній <img> поверх фонового background-image ---------- */
/* Сама картинка й раніше малювалась через background-image (зручно для
   center/cover-кропу), але для такого div Google Images і скрінрідери її
   не бачать — немає alt. Тому поверх додаємо невидимий (той самий кадр)
   <img> з alt: візуально нічого не змінюється, але тепер є справжнє фото
   з описом для пошуковиків і людей, які користуються скрінрідером. */
.photo-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: block;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  padding-bottom: 80px;
}
.hero-name {
  font-size: clamp(52px, 11vw, 128px);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}
.hero-tagline {
  font-family: var(--font-head);
  font-size: clamp(14px, 2vw, 20px);
  letter-spacing: 0.35em;
  color: var(--red);
  margin: 8px 0 6px;
}
.hero-subtitle {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 32px;
}
/* ---------- Page hero (внутренние страницы) ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 160px 0 64px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(232, 52, 42, 0.14), transparent 60%);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { position: relative; z-index: 2; font-size: clamp(32px, 5vw, 56px); }

/* ---------- Угольки/искры — лёгкий CSS-only эффект в тему фаер-шоу ----------
   Только transform и opacity — анимация целиком на композиторе видеокарты,
   без JS и без canvas, поэтому не нагружает даже слабые телефоны. */

.embers {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.ember {
  position: absolute;
  bottom: -20px;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, #fff6da 0%, var(--orange) 45%, transparent 75%);
  box-shadow: 0 0 6px 1px rgba(255, 140, 40, 0.65);
  opacity: 0;
  animation: ember-rise var(--duration) ease-in var(--delay) infinite;
  will-change: transform, opacity;
}
@keyframes ember-rise {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: 1; }
  75% { opacity: 0.75; }
  100% { transform: translate(var(--drift), -340px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ember { animation: none; opacity: 0; }
}

/* ---------- Канвас-эффект (насыщенное тёплое свечение с настоящим блендингом) ----------
   Отдельно от угольков выше: тяжелее их, поэтому с возможностью отключения
   посетителем — кнопка .fx-toggle, состояние в localStorage (см. effects.js). */

.fx-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55; /* приглушено по фидбеку — эффект был слишком заметным */
}
.fx-toggle {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(10, 9, 8, 0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-dim);
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.fx-toggle:hover { background: rgba(10, 9, 8, 0.8); color: var(--white); }
.fx-toggle--off { opacity: 0.6; }
.fx-toggle-icon { font-size: 13px; }

/* ---------- Карточки-плитки (программы / доп. услуги) ---------- */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card) center/cover no-repeat;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.tile:hover { transform: translateY(-4px); border-color: var(--red); }
.tile::before {
  /* Лёгкое затемнение всей плитки для общего настроения — основную работу по
     читаемости текста делает не оно, а собственная плотная подложка .tile-label ниже. */
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1; /* поверх .photo-fill (z-index:0) */
  background: linear-gradient(180deg, rgba(10,9,8,0) 0%, rgba(10,9,8,0.35) 55%, rgba(10,9,8,0.55) 100%);
}
.tile-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 34px 22px 20px;
  z-index: 2;
  /* Своя плотная тёмная подложка прямо под текстом — не зависит от того, что
     именно на фото в этом месте (яркие искры, светлое небо и т.п.), поэтому
     держит текст читаемым гарантированно, а не "в среднем". */
  background: linear-gradient(180deg, rgba(10,9,8,0) 0%, rgba(10,9,8,0.85) 35%, rgba(10,9,8,0.97) 100%);
}
.tile-label h3 {
  font-size: 20px;
  margin-bottom: 6px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9), 0 2px 10px rgba(0, 0, 0, 0.7);
}
.tile-label p {
  color: #ded8d0;
  font-size: 13px;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.95), 0 1px 6px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-price {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  background: rgba(10, 9, 8, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 122, 26, 0.5);
  color: var(--orange);
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: 999px;
}
.tile-noimg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  z-index: 1;
}

.section-footer-link {
  text-align: center;
  margin-top: 40px;
}

/* ---------- Команда ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--photo-frame);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.team-card:hover { transform: translateY(-3px); box-shadow: var(--photo-frame-hover); }
.team-photo {
  aspect-ratio: 1 / 1;
  background: var(--bg-alt) center/cover no-repeat;
  position: relative;
}
.team-photo .tile-noimg { font-size: 11px; }
.team-info { padding: 20px; }
.team-info h3 { font-size: 17px; margin-bottom: 4px; }
.team-role {
  color: var(--red);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.team-bio { color: var(--text-dim); font-size: 13.5px; margin: 0; }

/* ---------- Галерея ---------- */

.gallery-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
.gallery-viewport {
  overflow: hidden;
  flex: 1;
}
.gallery-track {
  display: flex;
  transition: transform 0.4s ease;
}
.gallery-page {
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 14px;
}
.gallery-item {
  aspect-ratio: 1 / 1;
  background: var(--bg-card) center/cover no-repeat;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  box-shadow: var(--photo-frame);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-item:hover { transform: scale(1.03); box-shadow: var(--photo-frame-hover); }
.gallery-item--video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--white);
  background: rgba(10, 9, 8, 0.28);
  pointer-events: none;
}
.gallery-play::before {
  content: '';
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(10, 9, 8, 0.55);
  z-index: -1;
}
.gallery-arrow {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.gallery-arrow:hover { background: var(--red); border-color: var(--red); }
.gallery-arrow[disabled] { opacity: 0.3; cursor: default; pointer-events: none; }
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.gallery-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--line);
  cursor: pointer;
  padding: 0;
}
.gallery-dots button.active { background: var(--red); width: 22px; border-radius: 4px; }
.gallery-empty {
  text-align: center;
  color: var(--text-faint);
  padding: 40px 0;
}

/* ---------- Блок контактов (повторяется внизу каждой страницы) ---------- */

.contact-section {
  position: relative;
  padding: 120px 0;
  background: var(--bg-alt) center/cover no-repeat;
}
.contact-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 7, 6, 0.55);
}
.contact-card {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin: 0 auto;
  background: var(--white);
  color: #14110f;
  border-radius: var(--radius-lg);
  padding: 44px 48px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.45);
}
.contact-card h2 {
  color: var(--red);
  text-align: left;
  font-size: 28px;
}
.contact-body {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 20px;
}
.contact-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #ece7e0 center/cover no-repeat;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.contact-photo .tile-noimg { font-size: 8px; color: #a49c90; }
.contact-details p {
  margin: 0 0 4px;
  font-weight: 600;
}
.contact-details .muted { color: #6b6459; font-weight: 400; font-size: 14px; }
.contact-icons {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.contact-icons a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #14110f;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.contact-icons a:hover { background: var(--red); }
.contact-icons svg { width: 18px; height: 18px; }

/* ---------- Отзывы ---------- */
/* Раніше тут була карусель на одну картку — тепер, коли відгуки може
   надсилати будь-хто відвідувач (форма нижче, після модерації в адмінці),
   їх зазвичай стає більше, і "стіна" карток одразу показує соціальний
   доказ (багато відгуків одразу видно), а не ховає їх по одному. */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--photo-frame);
}
.review-stars { margin-bottom: 14px; font-size: 17px; letter-spacing: 3px; }
.review-star { color: var(--line); }
.review-star.is-filled { color: var(--orange); }
.review-text { color: var(--text-dim); font-size: 15.5px; line-height: 1.6; }
.review-author { font-family: var(--font-head); font-size: 16px; margin: 18px 0 2px; }
.review-role { color: var(--red); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Форма "Залишити відгук" ---------- */

.review-form-wrap { max-width: 560px; margin: 0 auto; text-align: center; }
.review-form-wrap .section-intro { margin-bottom: 32px; }
.review-form { text-align: left; }
.review-form .field { margin-bottom: 18px; }
.review-form label {
  display: block;
  font-family: var(--font-head);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.review-form input[type="text"],
.review-form textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
}
.review-form input[type="text"]:focus,
.review-form textarea:focus { outline: none; border-color: var(--red); }
.review-form textarea { min-height: 120px; resize: vertical; }
/* Пастка для ботів — приховано стилями (не type="hidden": прості боти
   найчастіше все одно заповнюють усі звичайні поля форми підряд). */
.review-form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Зірки-перемикач без жодного JS: чисто на радіо-кнопках + порядку в DOM
   (від 5 до 1) + flex-direction:row-reverse, щоб на екрані це виглядало
   зліва направо як 1★→5★, а заливка йшла через ~ (наступні по DOM = ліворуч
   по екрану, тобто рахунок "від 1 до вибраної"). */
.star-picker { position: relative; display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-picker label {
  font-size: 32px;
  line-height: 1;
  color: var(--line);
  cursor: pointer;
  transition: color 0.15s ease;
}
.star-picker input:checked ~ label { color: var(--orange); }
.star-picker:hover label { color: var(--line); }
.star-picker label:hover,
.star-picker label:hover ~ label { color: var(--orange); }
.star-picker input:focus-visible + label { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.review-form-notice { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 24px; text-align: center; }
.review-form-notice--ok { background: rgba(255, 122, 26, 0.1); border: 1px solid rgba(255, 122, 26, 0.3); }
.review-form-notice--ok b { display: block; margin-bottom: 6px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.04em; color: var(--orange); }
.review-form-notice--ok p { color: var(--text-dim); margin: 0; }
.review-form-notice--error { background: rgba(232, 52, 42, 0.12); border: 1px solid rgba(232, 52, 42, 0.35); color: var(--text); }

/* ---------- Простые текстовые страницы (О нас, Школа, Райдер, Доп.) ---------- */

.prose {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 16px;
  white-space: pre-line;
}
.prose strong { color: var(--text); }
mark { background: transparent; color: inherit; padding: 0 0.15em; border-radius: 3px; }

/* ---------- Модалка программы (notebook popup) ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 5, 4, 0.88);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  max-width: 1040px;
  width: 100%;
  padding: 32px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--red); }
.modal-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
}
.modal-media {
  position: relative;
  /* Без цього grid-колонка НЕ стискається нижче ширини свого вмісту: коли
     в програми багато фото/відео, стрічка мініатюр (навіть з overflow-x:auto)
     штовхає всю колонку ширше за задані grid-template-columns, і опис
     праворуч стискається в нитку. min-width:0 дозволяє колонці стати вужчою
     за контент — тоді overflow-x:auto на .modal-thumbs нарешті працює
     як прокрутка, а не як "розпирання" сітки. */
  min-width: 0;
}
.modal-preview-wrap {
  /* Позиційний контекст саме для стрілок ‹ › — щоб top:50% рахувався від
     висоти самого прев'ю, а не від прев'ю+мініатюр разом (інакше стрілки
     "падають" на рядок мініатюр, коли їх багато). */
  position: relative;
}
.modal-preview {
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.modal-preview img, .modal-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.modal-preview--video video {
  /* Відео майже завжди ширококадрове (16:9), а превʼю — під формат фото
     (4:3): cover обрізав би кадр зверху/знизу. contain показує відео
     цілком, з невеликими чорними смугами замість обрізки. */
  object-fit: contain;
  background: #000;
}
.modal-preview--clickable img { cursor: zoom-in; }
.modal-preview--clickable::after {
  /* Іконка-підказка "можна розкрити на весь екран", з'являється при наведенні. */
  content: '🔍';
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 9, 8, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.modal-preview--clickable:hover::after { opacity: 1; }
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(10, 9, 8, 0.6);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.modal-nav:hover { background: var(--red); }
.modal-nav--prev { left: 12px; }
.modal-nav--next { right: 12px; }
.modal-thumb-group { margin-top: 10px; }
.modal-thumb-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.modal-thumbs {
  /* Сітка замість однієї горизонтальної стрічки — коли фото багато, видно
     відразу декілька рядів, а не тільки те, що влізло в один рядок.
     Свою прокрутку тут навмисно НЕ робимо (це виглядало як недоречний
     сірий системний скролбар) — попап і так прокручується цілком
     (.modal-overlay), тож рядів може бути скільки завгодно. */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  padding: 2px;
}
.modal-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--bg-alt);
  padding: 0;
  cursor: pointer;
  position: relative;
  /* Тонка тепла рамка + м'яка тінь — та сама "красива обробка", що й у
     .gallery-item/.team-photo нижче, для однакового відчуття по всьому сайту. */
  box-shadow: var(--photo-frame);
  transition: border-color 0.15s ease, transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.modal-thumb:hover { transform: scale(1.04); filter: brightness(1.12); box-shadow: var(--photo-frame-hover); }
.modal-thumb img, .modal-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-thumb.active { border-color: var(--red); }
.modal-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--white);
  background: rgba(10, 9, 8, 0.35);
}
.modal-info h3 { font-size: 26px; }
.modal-meta {
  display: flex;
  gap: 24px;
  margin: 14px 0 18px;
  font-size: 13px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.modal-meta b { color: var(--orange); display: block; font-size: 15px; text-transform: none; letter-spacing: 0; }
.modal-desc { color: var(--text-dim); white-space: pre-line; font-size: 14.5px; }

/* ---------- Модалка артиста (картка команди, клік по .team-card) ---------- */

.team-modal-box {
  max-width: 480px;
  text-align: center;
}
/* Прев'ю фото артиста — раніше тут була маленька кругла аватарка на одне
   фото; тепер це справжня галерея (до 5 фото, задається в адмінці), тому
   прев'ю більше й прямокутне — щоб фото було зручно розглядати, а не
   тільки впізнати обличчя. .modal-nav/.modal-thumbs — ті самі спільні
   класи, що й у попапі шоу-програми (partials/program-modal.ejs). */
.team-modal-preview-wrap {
  position: relative;
  width: 240px;
  margin: 8px auto 12px;
}
.team-modal-preview {
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-alt);
  box-shadow: var(--photo-frame);
}
.team-modal-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-modal-box .modal-thumbs { max-width: 320px; margin: 0 auto 20px; }
.team-modal-name { font-size: 24px; margin-bottom: 4px; }
.team-modal-role {
  color: var(--red);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}
.team-modal-bio { color: var(--text-dim); font-size: 14.5px; text-align: left; white-space: pre-line; }
.team-modal-details { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 4px; text-align: left; }
.team-modal-details:empty { display: none; }
.team-modal-detail {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.team-modal-detail:last-child { border-bottom: none; }
.team-modal-detail-label {
  color: var(--text-faint);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.team-modal-detail-value { color: var(--text); font-size: 14px; text-align: right; }

/* ---------- Лайтбокс (полноэкранный просмотр фото/видео из галереи) ---------- */

.lightbox-overlay {
  align-items: center;
  padding: 20px;
}
.lightbox-preview {
  max-width: 1100px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-preview img, .lightbox-preview video {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius);
  object-fit: contain;
}
.lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  color: var(--white);
  font-size: 32px;
  z-index: 1002;
}
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  z-index: 1002;
}
.lightbox-nav.modal-nav--prev { left: 20px; }
.lightbox-nav.modal-nav--next { right: 20px; }

/* ---------- Футер ---------- */

.site-footer {
  padding: 28px 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 12.5px;
  border-top: 1px solid var(--line);
}

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

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    top: 76px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: center;
    padding: 18px 0;
    gap: 4px;
    transform: translateY(-130%);
    transition: transform 0.25s ease;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 12px 0; width: 100%; text-align: center; }
  .nav-toggle { display: flex; }
  .tile-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-page { grid-template-columns: repeat(2, 1fr); }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-box { padding: 22px; }
  .contact-card { padding: 30px 24px; }
  .contact-body { flex-direction: column; text-align: center; }
  .lightbox-nav { width: 42px; height: 42px; font-size: 16px; }
  .lightbox-nav.modal-nav--prev { left: 8px; }
  .lightbox-nav.modal-nav--next { right: 8px; }
  .lightbox-close { top: 14px; right: 16px; font-size: 26px; }
}

@media (max-width: 560px) {
  .tile-grid, .team-grid { grid-template-columns: 1fr; }
  .gallery-page { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .tile-price { top: 12px; right: 12px; font-size: 11.5px; padding: 5px 10px; }
  .modal-thumbs { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
  .fx-toggle { right: 12px; bottom: 12px; padding: 7px 12px; font-size: 10px; }
}
