/* ============================================================
   LANDING — the Hebrew program pages (/jiu-jitsu, /mma, /kickboxing,
   /kids) and the 404 page, built by scripts/build_static.py.

   Hebrew-only pages, so the Heebo rules that css/i18n.css applies under
   html[lang="he"] are applied here directly.
   ============================================================ */
body,
.nav-logo span,
.nav-cta,
.btn-primary,
.btn-secondary,
.section-label {
  font-family: 'Heebo', sans-serif;
}
.nav-cta, .btn-primary, .btn-secondary, .section-label { letter-spacing: normal; }

.landing { padding-top: 72px; }

/* ─── Hero ───
   A program page's hero carries its background photo (chosen in the admin's
   Gallery tab) in --hero-photo-sm / --hero-photo-lg, set by
   scripts/build_static.py; with no photo chosen they are a transparent
   pixel, and the 404 page has none. The shade keeps the text readable over
   any photo — over a white one the faintest text still has 4.5:1 contrast —
   and over the plain background it is invisible. */
.landing-hero {
  --hero-shade:
    radial-gradient(ellipse at 85% 0%, rgba(245,200,0,0.10), transparent 60%),
    linear-gradient(rgba(17,17,17,0.76), rgba(17,17,17,0.88));
  padding: 72px 5% 56px;
  background-color: var(--dark);
  background-image: var(--hero-shade), var(--hero-photo-lg, none);
  background-position: center, center, center 30%;
  background-size: auto, auto, cover;
  background-repeat: no-repeat;
  border-bottom: 1px solid rgba(245,200,0,0.15);
}
/* Must match the preload media queries in scripts/build_static.py. */
@media (max-width: 760px) {
  .landing-hero { background-image: var(--hero-shade), var(--hero-photo-sm, none); }
}
body[data-a11y-contrast="on"] .landing-hero { background-image: none; }
.landing-hero > * { max-width: 860px; margin-inline: auto; }
.landing-crumbs {
  font-size: 0.85rem; color: rgba(240,240,240,0.7); margin-bottom: 28px;
}
.landing-crumbs a { color: inherit; text-decoration: none; }
.landing-crumbs a:hover { color: var(--yellow); text-decoration: underline; }
.landing-hero .section-label { display: flex; }
.landing-hero h1 {
  font-family: 'Heebo', sans-serif; font-weight: 900;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem); line-height: 1.1;
  color: var(--white); margin-bottom: 20px;
}
.landing-lead {
  font-size: 1.15rem; line-height: 1.75; color: rgba(240,240,240,0.82);
}

.landing-actions {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px;
}

/* ─── Body ─── */
.landing-body {
  max-width: 860px; margin: 0 auto; padding: 24px 5% 80px;
}
/* base.css pads every <section> for the full-width home page; these sit in
   a reading column instead. */
.landing-body section:not(.hero):not(.schedule) {
  padding: 40px 0 0; background: none;
}
.landing-body h2 {
  font-family: 'Heebo', sans-serif; font-weight: 800;
  font-size: clamp(1.5rem, 3.2vw, 2rem); line-height: 1.25;
  color: var(--white); margin-bottom: 16px;
}
.landing-body p, .landing-body li {
  font-size: 1.05rem; line-height: 1.8; color: rgba(240,240,240,0.78);
}
.landing-body p + p { margin-top: 14px; }
.landing-body ul { padding-inline-start: 1.3em; margin: 6px 0 14px; }
.landing-body li { margin-bottom: 6px; }
.landing-body li::marker { color: var(--yellow); }
/* Links in running text; the buttons keep their own colours. */
.landing-body a:not(.btn-primary):not(.btn-secondary) { color: var(--yellow); }

/* ─── Timetable ─── */
.landing-schedule {
  width: 100%; border-collapse: collapse; margin: 8px 0 14px;
  background: var(--dark2);
}
.landing-schedule th, .landing-schedule td {
  padding: 12px 16px; text-align: start;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.landing-schedule th {
  font-size: 0.85rem; font-weight: 700; color: var(--yellow);
  background: var(--dark3);
}
.landing-schedule td { font-size: 1rem; color: var(--white); }
/* Times are LTR inside the RTL table; keep them aligned with the column. */
.landing-schedule td[dir="ltr"] { text-align: end; unicode-bidi: isolate; white-space: nowrap; }
.landing-note { font-size: 0.95rem !important; color: var(--grey) !important; }

.landing-body .faq-list { margin-top: 8px; }
.landing-body .faq-q { font-family: 'Heebo', sans-serif; }

.landing-related {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ─── 404 ─── */
.landing-404-links { list-style: none; padding: 0 !important; }
.landing-404-links li { margin: 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.landing-404-links a {
  display: block; padding: 14px 4px; text-decoration: none; font-weight: 500;
}
.landing-404-links a:hover { text-decoration: underline; }

/* ─── Footer ─── */
.landing-footer {
  background: var(--black); border-top: 1px solid rgba(245,200,0,0.15);
  padding: 48px 5% 96px;
}
.landing-footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px;
}
.landing-footer-name { font-weight: 800; font-size: 1.15rem; margin-bottom: 14px; }
.landing-contact { list-style: none; }
.landing-contact li { font-size: 0.92rem; color: #888; padding: 5px 0; }
.landing-contact a { color: inherit; text-decoration: none; }
.landing-contact a:hover { color: var(--yellow); }
.landing-footer-links { display: flex; flex-direction: column; gap: 10px; }
.landing-footer-links a, .landing-legal a {
  color: var(--grey); font-size: 0.92rem; text-decoration: none;
}
.landing-footer-links a:hover, .landing-legal a:hover,
.landing-footer-links a[aria-current="page"] { color: var(--yellow); }
.landing-legal {
  max-width: 1100px; margin: 32px auto 0; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.landing-legal a { font-size: 0.82rem; }

@media (max-width: 760px) {
  .landing-hero { padding: 48px 6% 40px; }
  .landing-body { padding: 8px 6% 64px; }
  .landing-schedule th, .landing-schedule td { padding: 10px; }
  .landing-footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .landing-actions > a { flex: 1 1 100%; text-align: center; }
}

/* ─── Photos of this program (chosen in the admin's Gallery tab) ───
   The main photo spans the full width; the rest form a grid of squares.
   Hidden until js/landing.js fills it. */
.landing-photos[hidden] { display: none; }
.landing-photos-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.landing-photo {
  position: relative; display: block; padding: 0; border: 0; cursor: zoom-in;
  aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--dark2);
}
.landing-photo.is-main { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.landing-photo.is-video { cursor: pointer; }
.landing-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}
.landing-photo:hover img, .landing-photo:focus-visible img { transform: scale(1.04); }
.landing-photo:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.landing-photo-play {
  position: absolute; inset: 50% auto auto 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; background: var(--yellow);
}
.landing-photo-play::after {
  content: ''; position: absolute; inset: 50% auto auto 54%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent var(--black);
}
@media (max-width: 600px) {
  .landing-photos-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}

/* The full-screen viewer: a native <dialog>, so Esc closes it and focus is
   kept inside while it is open. */
.landing-viewer {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(0, 0, 0, 0.92); color: var(--white);
}
.landing-viewer::backdrop { background: rgba(0, 0, 0, 0.6); }
.landing-viewer[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
.lv-figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 64px 0 24px; min-width: 0; }
.lv-media { width: 100%; height: calc(100% - 40px); display: grid; place-items: center; }
.lv-media img { max-width: calc(100vw - 150px); max-height: calc(100vh - 130px); width: auto; height: auto; object-fit: contain; }
@media (max-width: 600px) { .lv-media img { max-width: calc(100vw - 24px); } .landing-viewer[open] { grid-template-columns: 1fr; } .lv-prev, .lv-next { position: absolute; inset: auto auto 18px auto; z-index: 1; } .lv-prev { right: 18px; } .lv-next { left: 18px; } }
.lv-media iframe { width: min(100%, 1000px); aspect-ratio: 16 / 9; border: 0; }
.lv-cap { color: rgba(240, 240, 240, 0.8); font-size: 0.95rem; text-align: center; padding: 0 16px; }
.lv-cap:empty { display: none; }
.lv-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); color: var(--white); font-size: 1.6rem; line-height: 1; margin: 0 10px;
}
.lv-btn:hover { background: var(--yellow); color: var(--black); }
.lv-btn[hidden] { visibility: hidden; display: block; }
.lv-close { position: absolute; inset: 14px 14px auto auto; font-size: 1.1rem; }
