:root {
  --bg: #0E1626;
  --bg-2: #0B111E;
  --card: #16213A;
  --card-2: #1B2946;
  --text: #F4ECDC;
  --muted: #B9C0CE;
  --accent: #C9A24B;
  --accent-2: #E4C878;
  --cream: #F7F1E3;
  --border: #2A3654;
  --border-gold: rgba(201, 162, 75, 0.28);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --maxw: 1180px;
  --serif: "Frank Ruhl Libre", "Times New Roman", serif;
  --sans: "Assistant", "Segoe UI", system-ui, sans-serif;
  --display: "Secular One", "Frank Ruhl Libre", serif;   /* signage-style digits for zmanim */
  --stam: "David Libre", "Frank Ruhl Libre", serif;       /* verse / scripture voice */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* the HTML `hidden` attribute must always win over component display rules */
[hidden] { display: none !important; }

/* ---------- Icon system (Lucide SVG sprite) ---------- */
.icon { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.18em; stroke: currentColor; fill: none; flex-shrink: 0; }
.icon-lg { width: 1.9rem; height: 1.9rem; }
.icon-gold { color: var(--accent); }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.15; }

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

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }

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

.skip-link {
  position: absolute; right: -999px; top: 0; z-index: 200;
  background: var(--accent); color: #1a1205; padding: 12px 20px; border-radius: 0 0 10px 10px; font-weight: 600;
}
.skip-link:focus { right: 20px; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 30px; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  min-height: 48px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #1a1205; box-shadow: 0 10px 30px rgba(201, 162, 75, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(201, 162, 75, 0.4); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-gold); }
.btn-ghost:hover { background: rgba(201, 162, 75, 0.1); border-color: var(--accent); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
/* fixed stack that holds the thin minyan bar + the nav */
.header-stack { position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 100; }

.site-header {
  position: static;
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease;
  padding: 18px 0;
  /* permanent gradient so nav links never fall on bright hero rays */
  background: linear-gradient(180deg, rgba(8, 12, 22, 0.85) 0%, rgba(8, 12, 22, 0.45) 65%, transparent 100%);
}
.nav-links a, .brand-name, .brand-sub { text-shadow: 0 1px 10px rgba(0, 0, 0, .7); }
.site-header.scrolled {
  background: rgba(11, 17, 30, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
  padding: 12px 0;
}
.nav {
  max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand-mark { color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.28rem; }
.brand-sub { font-size: .72rem; color: var(--muted); letter-spacing: .04em; display: flex; flex-direction: column; }
#hebDate { color: var(--accent-2); font-weight: 600; }
#hebDate:empty { display: none; }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; font-size: .96rem; color: var(--text);
  transition: background .2s ease, color .2s ease; position: relative;
}
.nav-links a:not(.nav-cta):hover { color: var(--accent-2); }
.nav-cta {
  background: rgba(201, 162, 75, 0.12); border: 1px solid var(--border-gold);
  color: var(--accent-2) !important; margin-inline-start: 6px;
}
.nav-cta:hover { background: rgba(201, 162, 75, 0.22); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-video, .hero-media img { width: 100%; height: 100%; object-fit: cover; }
/* dim the video slightly so any bright frame still holds text */
.hero-video, .hero-fallback { filter: brightness(0.7) saturate(1.05); }
/* Full-screen scrim — covers the ENTIRE hero, darker on the RTL text side, so copy is
   readable across the whole width (per Donatelo: the treatment must span the full screen). */
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(270deg, rgba(8, 12, 22, 0.90) 0%, rgba(8, 12, 22, 0.72) 42%, rgba(8, 12, 22, 0.50) 100%),
    linear-gradient(180deg, rgba(8, 12, 22, 0.55) 0%, rgba(8, 12, 22, 0.45) 45%, rgba(8, 12, 22, 0.96) 100%);
}
.hero-content {
  position: relative; z-index: 2; width: 100%; max-width: var(--maxw);
  margin: 0 auto; padding: 130px clamp(20px, 5vw, 56px) 90px;
}
/* glass panel behind ALL hero copy (text + full prayer times) — lets the video breathe through */
.hero-copy {
  display: inline-block; max-width: 760px;
  padding: 32px 36px 30px;
  background: rgba(14, 22, 38, 0.25);
  border: 1px solid rgba(201, 162, 75, 0.2);
  border-radius: 24px;
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  will-change: backdrop-filter;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
}
/* safety belt: browsers without backdrop-filter (old Firefox/some WebViews)
   fall back to a solid-enough panel so hero text never sits on bare video */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero-copy { background: rgba(14, 22, 38, 0.82); }
}
.hero-copy .hero-actions { margin-bottom: 24px; }
.hero-copy .hero-verse { margin: 4px 0 20px; }
/* verse + action buttons removed from hero: tighten so the card hugs its content */
.hero-copy .hero-lead { margin-bottom: 22px; }
.hero-copy .hero-times-full { margin-top: 0; }
/* push hero card hard to the right edge so the ark/heichal shows on the left */
@media (min-width: 900px) {
  .hero-content { max-width: 100%; display: flex; justify-content: flex-start; padding-right: clamp(24px, 4vw, 64px); padding-left: 0; }
  .hero-copy { max-width: 620px; }
}
/* full prayer-times grid inside the hero glass panel (compact) */
.hero-times-full .times-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0; }
.hero-times-full .time-card { padding: 12px 8px; border-radius: 14px; background: rgba(11, 17, 30, 0.34); border: 1px solid rgba(201,162,75,.16); text-align: center; }
.hero-times-full .tc-icon { display: block; margin-bottom: 6px; }
.hero-times-full .tc-icon .icon { width: 1.4rem; height: 1.4rem; }
.hero-times-full .time-card h3 { font-size: .78rem; color: var(--muted); font-family: var(--sans); font-weight: 600; margin-bottom: 8px; line-height: 1.3; min-height: 2.1em; display: flex; align-items: center; justify-content: center; }
.hero-times-full .time-value { font-family: var(--display); font-size: 1.6rem; font-weight: 400; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; margin-bottom: 6px; letter-spacing: .01em; }
.hero-times-full .time-note { font-size: .68rem; color: var(--muted); line-height: 1.3; }
.hero-times-full .time-card.is-next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.hero-times-full .time-card.is-next h3 { color: var(--accent-2); }
.hero-times-full .times-status { font-size: .72rem; margin-top: 12px; }
.hero-times-full .times-actions { margin-top: 14px; gap: 10px; }
.hero-times-full .times-actions .btn { font-size: .8rem; padding: 8px 14px; }
.hero-times-full .week-times { margin-top: 14px; max-width: 100%; }
@media (max-width: 720px) {
  .hero-times-full .times-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .hero-times-full .time-value { font-size: 1.4rem; }
  .hero-times-full .time-card h3 { font-size: .74rem; min-height: 0; margin-bottom: 6px; }
  .hero-times-full .time-note { font-size: .64rem; }
}
/* inside the glass panel the badges/next-prayer no longer need their own heavy cards */
.hero-copy .next-prayer { margin: 0 0 22px; background: rgba(11, 17, 30, 0.22); border-color: rgba(201,162,75,.16); box-shadow: none; }
.hero-copy .hero-badges { margin-bottom: 0; padding-top: 22px; max-width: 100%; }
.hero-eyebrow {
  color: var(--accent-2); letter-spacing: .12em; font-size: .82rem; font-weight: 600;
  text-transform: none; margin-bottom: 18px; text-shadow: 0 1px 12px rgba(0, 0, 0, .55);
}
.hero-title { font-size: clamp(2.8rem, 8vw, 5.6rem); font-weight: 900; margin-bottom: 22px; letter-spacing: -0.01em; text-shadow: 0 2px 24px rgba(0, 0, 0, .6), 0 1px 3px rgba(0, 0, 0, .5); }
.hero-lead { font-size: clamp(1.08rem, 2.4vw, 1.38rem); color: #F4EFE3; max-width: 620px; margin-bottom: 34px; text-shadow: 0 1px 16px rgba(0, 0, 0, .7); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 54px; }
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 14px; list-style: none;
  border-top: 1px solid var(--border-gold); padding-top: 28px; max-width: 760px;
}
.hero-badges li {
  display: flex; flex-direction: column; padding-inline-end: 28px;
  border-inline-end: 1px solid var(--border); flex: 1 1 180px;
}
.hero-badges li:last-child { border-inline-end: none; }
.badge-title { font-family: var(--serif); font-size: 1.15rem; color: var(--accent-2); text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }
.badge-sub { font-size: .86rem; color: #D8D2C4; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }

.scroll-cue {
  position: absolute; inset-block-end: 26px; inset-inline-start: 50%; transform: translateX(50%);
  z-index: 3; width: 26px; height: 42px; border: 2px solid var(--border-gold); border-radius: 14px;
  display: grid; place-items: start center;
}
.scroll-cue span { width: 4px; height: 8px; background: var(--accent); border-radius: 2px; margin-top: 7px; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 120px) 0; position: relative; }

/* ---------- Section background video (shabbat / learning / donate) ---------- */
.section.has-bg-video { overflow: hidden; }
.section-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.section-bg img, .section-bg video { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.85) saturate(1.05); }
.section-bg::after {
  content: ""; position: absolute; inset: 0;
  /* lighter overlay (~58%) so the imagery is felt; text protected by per-element shadows + card bg */
  background: linear-gradient(180deg, rgba(11,17,30,0.62), rgba(11,17,30,0.52) 50%, rgba(11,17,30,0.72));
}
.section.has-bg-video .container { position: relative; z-index: 1; }
/* lift cards off the video for clear separation */
.has-bg-video .shabbat-card, .has-bg-video .learn-col { box-shadow: 0 20px 50px rgba(0,0,0,.5); }
/* protect free-floating text (section heads, notes, statuses) over the lighter video */
.has-bg-video .section-title,
.has-bg-video .section-sub,
.has-bg-video .section-eyebrow,
.has-bg-video .times-status,
.has-bg-video .shabbat-schedule-title,
.has-bg-video .shabbat-note,
.has-bg-video .donate-lead,
.has-bg-video .donate-secure { text-shadow: 0 2px 14px rgba(0,0,0,.85), 0 1px 4px rgba(0,0,0,.7); }
.section-head { max-width: 680px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
/* Signature ark-arch motif above centered section eyebrows */
.section-head { position: relative; }
.section-head::before {
  content: ""; display: block; width: 46px; height: 24px; margin: 0 auto 16px;
  border: 2px solid var(--border-gold); border-bottom: none;
  border-radius: 46px 46px 0 0; opacity: .8;
}
.section-eyebrow { display: inline-block; color: var(--accent); letter-spacing: .14em; font-size: .8rem; font-weight: 600; margin-bottom: 12px; }
.section-title { font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 16px; letter-spacing: .02em; }
/* gate ornament divider above each section head */
.section-head { position: relative; }
.section-head::before {
  content: ""; display: block; width: min(240px, 40%); height: 1px; margin: 0 auto 26px;
  background: linear-gradient(90deg, transparent, rgba(201,162,75,.55), transparent);
}
.section-head::after {
  content: ""; position: absolute; top: -5px; inset-inline-start: 50%; transform: translateX(50%) rotate(45deg);
  width: 9px; height: 9px; border: 1px solid var(--accent); background: var(--bg);
}
.section-sub { color: var(--muted); font-size: 1.08rem; }

/* Prayer times */
.times { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
/* micro-interaction: cards lift gently on hover */
.time-card:hover, .hero-times-full .time-card:hover, .news-card:hover, .learn-col:hover, .shabbat-card:hover {
  transform: translateY(-3px); border-color: var(--accent);
}
.hero-times-full .time-card { transition: transform .3s ease, border-color .3s ease; }
.shabbat-card { transition: transform .3s ease, border-color .3s ease; }
.times-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.time-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 24px; text-align: center; position: relative; overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.time-card::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .7; }
.time-card:hover { transform: translateY(-6px); border-color: var(--border-gold); box-shadow: var(--shadow); }
.tc-icon { display: block; margin-bottom: 10px; }
.time-card h3 { font-size: 1.05rem; color: var(--muted); font-family: var(--sans); font-weight: 600; margin-bottom: 14px; }
/* highlight the next upcoming prayer */
.time-card.is-next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 16px 40px rgba(201,162,75,.22); }
.time-card.is-next::after { content: "התפילה הבאה"; position: absolute; inset-block-start: 10px; inset-inline-start: 10px; font-size: .66rem; color: var(--accent-2); background: rgba(201,162,75,.14); padding: 3px 9px; border-radius: 999px; }
.time-value { font-family: var(--display); font-size: 2.6rem; font-weight: 400; color: var(--accent-2); margin-bottom: 8px; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.time-note { font-size: .82rem; color: var(--muted); }
.times-status { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 28px; }
.times-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.times-actions .btn { font-size: .92rem; padding: 11px 22px; }
.week-times { max-width: 640px; margin: 24px auto 0; }
.week-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.week-table th, .week-table td { padding: 11px 14px; text-align: center; font-variant-numeric: tabular-nums; }
.week-table thead th { background: rgba(201,162,75,.12); color: var(--accent-2); font-family: var(--sans); font-weight: 600; font-size: .9rem; }
.week-table tbody tr { border-top: 1px solid var(--border); }
.week-table tbody td:first-child { color: var(--muted); }
.week-note { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 12px; }

/* Shabbat */
.shabbat { background: radial-gradient(120% 100% at 50% 0%, rgba(201, 162, 75, 0.08), transparent 60%), var(--bg-2); }
.shabbat-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; }
.shabbat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 26px; text-align: center; position: relative; overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.shabbat-card::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 3px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); opacity: .7; }
.shabbat-card:hover { transform: translateY(-6px); border-color: var(--border-gold); box-shadow: var(--shadow); }
.sh-icon { font-size: 1.9rem; display: block; margin-bottom: 10px; }
.shabbat-card h3 { font-size: 1.05rem; color: var(--muted); font-family: var(--sans); font-weight: 600; margin-bottom: 12px; }
.sh-value { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; color: var(--accent-2); font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.shabbat-card-wide .sh-value { font-size: 1.7rem; line-height: 1.25; }
.sh-note { font-size: .82rem; color: var(--muted); }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border-gold); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.about-text .section-head::before { display: none; }
.about-text .section-eyebrow, .about-text .section-title { text-align: start; }
.about-text .section-title { margin-bottom: 20px; }
.about-text p { color: var(--muted); margin-bottom: 16px; }
/* when the about section has a bg video, back the text with a soft panel */
.about.has-bg-video .about-text {
  background: rgba(11,17,30,0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-gold); border-radius: var(--radius); padding: clamp(28px,4vw,40px);
}
.about.has-bg-video .about-text p { color: #E9E1D0; }
.about.has-bg-video .about-text .feature-list li { color: var(--text); }
.feature-list { list-style: none; margin-top: 26px; display: grid; gap: 14px; }
.feature-list li { display: flex; align-items: center; gap: 14px; color: var(--text); }
.fi { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(201, 162, 75, 0.16); }

/* Learning */
.learning { background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%); }
.learning-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.learn-col { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; transition: border-color .3s ease, transform .3s ease; }
.learn-col:hover { border-color: var(--border-gold); transform: translateY(-4px); }
.learn-col-title { font-size: 1.5rem; color: var(--accent-2); margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.schedule { list-style: none; display: grid; gap: 16px; }
.schedule li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.s-name { color: var(--text); }
.s-time { font-family: var(--serif); color: var(--accent-2); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.news-card:hover { transform: translateY(-6px); border-color: var(--border-gold); box-shadow: var(--shadow); }
.news-tag { display: inline-block; background: rgba(201, 162, 75, 0.14); color: var(--accent-2); font-size: .78rem; font-weight: 600; padding: 5px 14px; border-radius: 999px; margin-bottom: 16px; }
.news-card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.news-card p { color: var(--muted); font-size: .98rem; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; grid-auto-rows: 1fr; }
.g-item { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-gold); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; aspect-ratio: 4 / 3; }
/* crop from the top (empty ceiling) so subjects at the bottom of the frame stay visible */
.g-item img.g-pos-bottom { object-position: center bottom; }
.g-tall { grid-row: span 2; }
.g-tall img { aspect-ratio: 3 / 4; }
.g-item:hover img { transform: scale(1.06); }
.g-item img[data-lightbox] { cursor: zoom-in; }

/* Ambient music toggle */
.music-toggle {
  position: fixed; inset-block-end: calc(22px + env(safe-area-inset-bottom, 0px)); inset-inline-start: 22px; z-index: 120;
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  background: rgba(11,17,30,.82); border: 1px solid var(--border-gold);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: grid; place-items: center; font-size: 1.3rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .2s ease, background .2s ease;
}
.music-toggle:hover { transform: translateY(-2px) scale(1.05); background: rgba(201,162,75,.18); }
.music-toggle .mt-off {
  position: absolute; width: 30px; height: 2px; background: var(--accent-2);
  transform: rotate(-45deg); opacity: 1; transition: opacity .2s ease; border-radius: 2px;
}
.music-toggle[aria-pressed="true"] .mt-off { opacity: 0; }
.music-toggle[aria-pressed="true"] { background: rgba(201,162,75,.22); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 24px;
  background: rgba(6, 9, 16, 0.92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lb-img { max-width: min(92vw, 1100px); max-height: 86vh; border-radius: 12px; border: 1px solid var(--border-gold); box-shadow: 0 40px 100px rgba(0,0,0,.6); }
.lb-close { position: absolute; inset-block-start: 20px; inset-inline-end: 24px; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid var(--border-gold); color: var(--text); font-size: 1.8rem; line-height: 1; cursor: pointer; transition: background .2s ease; }
.lb-close:hover { background: rgba(201,162,75,.2); }
.g-item figcaption {
  position: absolute; inset-block-end: 0; inset-inline: 0; padding: 24px 20px 16px;
  background: linear-gradient(180deg, transparent, rgba(11, 17, 30, 0.9));
  font-family: var(--serif); color: var(--cream); font-size: 1.1rem;
}

/* Memorials */
.memorials { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.memorial-list { list-style: none; max-width: 780px; margin: 0 auto; display: grid; gap: 2px; }
.memorial-list li {
  display: grid; grid-template-columns: 1.4fr .8fr 1fr; gap: 20px; align-items: center;
  padding: 22px 26px; background: var(--card); border: 1px solid var(--border);
}
.memorial-list li:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.memorial-list li:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.m-name { font-family: var(--serif); font-size: 1.1rem; color: var(--text); }
.m-date { color: var(--accent-2); font-weight: 600; }
.m-note { color: var(--muted); font-size: .92rem; text-align: end; }

/* Donate */
.donate { background: radial-gradient(120% 100% at 50% 0%, rgba(201, 162, 75, 0.1), transparent 60%), var(--bg-2); }
.donate-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.donate-lead { color: var(--muted); font-size: 1.1rem; margin: 8px auto 32px; max-width: 620px; }
.donate-amounts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 32px; }
.amount {
  min-width: 92px; padding: 14px 22px; border-radius: 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  font-family: var(--serif); font-size: 1.25rem; font-weight: 500;
  transition: all .2s ease; min-height: 48px;
}
.amount:hover, .amount.active { border-color: var(--accent); background: rgba(201, 162, 75, 0.12); color: var(--accent-2); transform: translateY(-3px); }
.amount-other { font-family: var(--sans); font-size: 1rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.contact-text .section-head::before { display: none; }
.contact-text .section-eyebrow, .contact-text .section-title { text-align: start; }
.contact-text .section-title { margin-bottom: 18px; }
.contact-text > p { color: var(--muted); margin-bottom: 26px; }
.contact-list { list-style: none; display: grid; gap: 20px; }
.contact-list li { display: flex; flex-direction: column; gap: 4px; }
.c-label { font-size: .78rem; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; }
.c-value { color: var(--text); font-size: 1.1rem; }
.contact-list a { color: var(--text); font-size: 1.1rem; transition: color .2s ease; width: fit-content; }
.contact-list a:hover { color: var(--accent-2); }
.contact-card { background: var(--card); border: 1px solid var(--border-gold); border-radius: var(--radius); padding: 38px; box-shadow: var(--shadow); }
.contact-card h3 { font-size: 1.5rem; color: var(--accent-2); margin-bottom: 14px; }
.contact-card p { color: var(--muted); margin-bottom: 26px; }

/* Footer */
/* ===================== MEGA FOOTER — "התחנה האחרונה" ===================== */
.site-footer {
  position: relative;
  background:
    radial-gradient(1200px 300px at 50% 0%, rgba(201,162,75,.06), transparent 70%),
    var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 0 0 0;
  overflow: hidden;
}
/* subtle jerusalem-stone / lattice texture at ~3% */
.site-footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .035;
  background-image:
    repeating-linear-gradient(45deg, var(--accent) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(-45deg, var(--accent) 0 1px, transparent 1px 14px);
  background-size: 28px 28px;
}

/* ornamental top rail */
.footer-rail { position: relative; height: 34px; display: flex; align-items: center; justify-content: center; }
.footer-rail::before { content: ""; position: absolute; inset-inline: 8%; top: 50%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 20%, var(--accent) 80%, transparent);
  box-shadow: 0 0 14px rgba(201,162,75,.5); }
.footer-rail-mark { position: relative; z-index: 1; color: var(--accent); background: var(--bg-2); padding: 0 14px; display: inline-flex; }

.footer-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 40px;
  padding: 40px clamp(16px,4vw,40px) 44px; text-align: start;
}
.foot-title { font-family: var(--sans); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 18px; font-weight: 600; }

/* col 1 identity */
.foot-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.foot-mark { color: var(--accent); display: inline-flex; }
.foot-brand-name { font-family: var(--serif); font-size: 1.25rem; color: var(--text); line-height: 1.2; }
.foot-nusach { color: var(--accent-2); font-size: .9rem; margin: 4px 0 10px; letter-spacing: .02em; }
.foot-verse { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; color: var(--accent); margin: 6px 0 10px; display: flex; align-items: center; gap: 8px; }
.foot-verse-flame { color: var(--accent); }
.foot-desc { color: var(--muted); font-size: .95rem; margin-bottom: 20px; line-height: 1.6; }
.foot-wa-group { display: inline-flex; align-items: center; gap: 9px; background: rgba(201,162,75,.1); border: 1px solid var(--border-gold); color: var(--accent-2); border-radius: 12px; padding: 11px 15px; font-size: .88rem; line-height: 1.35; transition: all .2s ease; }
.foot-wa-group:hover { background: rgba(201,162,75,.2); border-color: var(--accent); }
.foot-wa-group svg { color: var(--accent); flex-shrink: 0; }

/* col 2 nav */
.foot-nav-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
.foot-nav-cols ul { list-style: none; display: grid; gap: 11px; align-content: start; }
.foot-nav-cols a { color: var(--muted); font-size: .95rem; transition: color .18s ease; }
.foot-nav-cols a:hover { color: var(--accent-2); }

/* col 3 contact */
.foot-contact-list { list-style: none; display: grid; gap: 14px; }
.foot-contact-list li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .95rem; }
.foot-contact-list a { display: flex; align-items: center; gap: 10px; color: var(--muted); transition: color .18s ease; }
.foot-contact-list a:hover { color: var(--accent-2); }
.foot-contact-list .wa-inline { color: var(--accent); flex-shrink: 0; }

/* col 4 action */
.foot-mini-times { list-style: none; display: grid; gap: 9px; margin-bottom: 16px; }
.foot-mini-times li { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .92rem; border-bottom: 1px dashed var(--border); padding-bottom: 8px; }
.foot-mini-times .fmt-time { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.foot-mini-times li.is-next { color: var(--accent-2); }
.foot-mini-times li.is-next .fmt-time { color: var(--accent); }
.foot-map { position: relative; display: block; height: 130px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-gold); margin-bottom: 16px; }
.foot-map-frame { width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(.92) contrast(.9) hue-rotate(180deg) brightness(.9); pointer-events: none; }
.foot-map-pin { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--accent); pointer-events: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.foot-map-pin .icon { width: 2rem; height: 2rem; }
.foot-donate { width: 100%; justify-content: center; }

/* bottom strip */
.footer-bottom { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 18px clamp(16px,4vw,40px) 30px; text-align: center; }
.footer-copy { color: var(--muted); font-size: .84rem; line-height: 1.7; }
.footer-copy a { color: var(--accent-2); }
.footer-hebdate { display: inline; color: var(--accent-2); font-family: var(--serif); }
.footer-hebdate::before { content: "· "; color: var(--muted); }

/* night: gently flickering flame by the verse */
[data-mode="night"] .foot-verse-flame, .a11y-contrast .foot-verse-flame { animation: footFlicker 2.6s ease-in-out infinite; }
@keyframes footFlicker { 0%,100% { opacity: 1; } 45% { opacity: .55; } 70% { opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .foot-verse-flame { animation: none !important; } }

/* ---------- Print: clean weekly zmanim board for the gabbai ---------- */
@media print {
  body { background: #fff !important; color: #000 !important; font-size: 12pt; }
  .hero-media, .hero-overlay, video, audio, .site-footer .foot-map,
  .music-toggle, .a11y-toggle, .minyan-bar, .nav-toggle, .skip-link,
  .gallery, .memorials, .donate, .contact, .news, .learning, .about,
  .shabbat-bg, .section video, .btn, .scroll-cue { display: none !important; }
  .hero, .section { min-height: 0 !important; padding: 12pt 0 !important; background: none !important; }
  .hero-copy { background: none !important; border: none !important; box-shadow: none !important; backdrop-filter: none !important; padding: 0 !important; }
  .hero-title, .section-title, .time-value, .hero-verse { color: #000 !important; text-shadow: none !important; }
  .time-card { border: 1pt solid #999 !important; background: #fff !important; box-shadow: none !important; }
  .times-grid, .hero-times-full .times-grid { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 8pt !important; }
  .week-times, .week-times table { display: block !important; width: 100% !important; color: #000 !important; }
  .site-header { position: static !important; background: none !important; }
  .site-footer { border-top: 1pt solid #999; color: #000 !important; background: none !important; }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 28px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: start; }
  .foot-nav-cols { grid-template-columns: 1fr 1fr; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Signature: next-prayer countdown widget ---------- */
.next-prayer {
  display: inline-flex; align-items: center; gap: 14px; margin: 0 0 34px;
  padding: 14px 22px; border-radius: 16px;
  background: rgba(11, 17, 30, 0.55); border: 1px solid var(--border-gold);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.np-pulse { width: 11px; height: 11px; border-radius: 50%; background: var(--accent-2); flex-shrink: 0; box-shadow: 0 0 0 0 rgba(228, 200, 120, .6); animation: npPulse 2s infinite; }
@keyframes npPulse { 0% { box-shadow: 0 0 0 0 rgba(228, 200, 120, .55); } 70% { box-shadow: 0 0 0 12px rgba(228, 200, 120, 0); } 100% { box-shadow: 0 0 0 0 rgba(228, 200, 120, 0); } }
.np-body { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.np-label { font-size: .72rem; letter-spacing: .12em; color: var(--accent); }
.np-line { font-size: 1.05rem; color: var(--text); }
.np-line strong { color: var(--accent-2); font-family: var(--serif); }
.np-count { font-variant-numeric: tabular-nums; font-weight: 600; color: #fff; }
.np-at { font-size: .78rem; color: var(--muted); }

/* ---------- Signature: daily verse (calligraphy) ---------- */
.hero-verse {
  font-family: var(--serif); font-size: clamp(1.15rem, 2.6vw, 1.6rem); font-weight: 500;
  color: var(--accent-2); margin: 0 0 28px; max-width: 620px; line-height: 1.6;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(10px);
  transition: opacity 1.1s ease .3s, transform 1.1s ease .3s;
}
.hero-verse.verse-in { opacity: .95; transform: none; }

/* ---------- Signature: Shabbat mode overlay ---------- */
body.is-shabbat { overflow: hidden; }
.shabbat-mode {
  position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% 20%, rgba(201,162,75,.14), transparent 55%), #0B111E;
  text-align: center;
}
.sm-inner { max-width: 560px; animation: smFade 1.2s ease; }
@keyframes smFade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.sm-flame { font-size: 3.4rem; display: block; margin-bottom: 20px; animation: smFlicker 2.4s ease-in-out infinite; }
@keyframes smFlicker { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .82; transform: scale(1.06); } }
.sm-title { font-family: var(--serif); font-size: clamp(3rem, 10vw, 5rem); font-weight: 900; color: var(--accent-2); margin-bottom: 16px; }
.sm-sub { color: var(--text); font-size: 1.2rem; margin-bottom: 12px; }
.sm-note { color: var(--muted); font-size: .95rem; margin-bottom: 30px; }
.sm-enter { background: transparent; color: var(--muted); border: 1px solid var(--border); padding: 11px 24px; border-radius: 999px; cursor: pointer; font-family: var(--sans); font-size: .9rem; transition: all .2s ease; }
.sm-enter:hover { color: var(--accent-2); border-color: var(--border-gold); }

/* ---------- Hero fallback (mobile / no-video) ---------- */
.hero-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: opacity .6s ease; }
.hero-video { position: relative; z-index: 1; }

/* ---------- Shabbat prayer schedule ---------- */
.shabbat-schedule { margin-top: clamp(36px, 6vw, 56px); }
.shabbat-schedule-title { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--accent-2); text-align: center; margin-bottom: 28px; }
.shabbat-note { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 24px; }

/* ---------- News / memorials empty states ---------- */
.section-note { text-align: center; color: var(--muted); font-size: .95rem; margin-top: 20px; }
.section-note code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .85em; color: var(--accent-2); background: rgba(201,162,75,.1); padding: 2px 7px; border-radius: 6px; }
.memorials.is-empty .section-head { margin-bottom: 24px; }

/* ---------- Donate ---------- */
.donate-secure { color: var(--muted); font-size: .86rem; margin-top: 18px; }

/* ---------- Contact: WhatsApp / phone / map ---------- */
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
/* .btn-whatsapp retired — all WhatsApp buttons unified to the gold language */
.contact-placeholder-note { color: var(--accent-2); font-size: .8rem; margin-top: 16px; opacity: .85; }
.contact-card { padding: 0; overflow: hidden; }
.contact-map { width: 100%; aspect-ratio: 16 / 10; background: var(--card-2); }
.contact-map iframe { display: block; filter: grayscale(.2) brightness(.95); }
.contact-card-body { padding: 30px 32px 34px; }

/* ---------- Donate purpose selector ---------- */
.donate-purpose { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 22px; }
.purpose { display: inline-flex; align-items: center; gap: 7px; background: var(--card); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 9px 16px; cursor: pointer; font-family: var(--sans); font-size: .9rem; transition: all .2s ease; }
.purpose[aria-pressed="true"] { border-color: var(--accent); background: rgba(201,162,75,.14); color: var(--accent-2); }
.purpose:hover { border-color: var(--border-gold); }

/* ---------- Special-days banner ---------- */
.special-banner { background: linear-gradient(90deg, rgba(201,162,75,.16), rgba(201,162,75,.08)); border-bottom: 1px solid var(--border-gold); }
.sb-inner { max-width: var(--maxw); margin: 0 auto; padding: 9px clamp(16px,4vw,40px); display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--accent-2); font-family: var(--serif); font-size: .98rem; text-align: center; }

/* ---------- Candle share ---------- */
.candle-share { margin-top: 18px; text-align: center; }
.candle-share .btn { font-size: .9rem; }

/* ---------- Shaar HaTefilot — virtual candles ---------- */
.candles { background: radial-gradient(120% 100% at 50% 0%, rgba(201,162,75,.10), transparent 60%), var(--bg-2); }
.memorial-cta { text-align: center; margin-top: 28px; }
.candles-wrap { max-width: 820px; margin: 0 auto; }
.candle-form { background: var(--card); border: 1px solid var(--border-gold); border-radius: var(--radius); padding: 28px; margin-bottom: 30px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.cf-field { display: flex; flex-direction: column; gap: 8px; text-align: start; }
.cf-field span { font-size: .82rem; color: var(--accent); letter-spacing: .06em; }
.cf-field input, .cf-field select {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  color: var(--text); font-family: var(--sans); font-size: 1rem; min-height: 46px;
}
.cf-field input:focus, .cf-field select:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; border-color: var(--accent); }
.candle-form .btn { width: 100%; }
.candle-count { text-align: center; color: var(--accent-2); font-family: var(--serif); font-size: 1.1rem; margin-bottom: 24px; }
.candle-count:empty { display: none; }
.candle-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.candle {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px 14px; text-align: center;
  animation: candleIn .5s ease;
}
@keyframes candleIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
.candle-flame { font-size: 1.8rem; display: block; margin-bottom: 8px; animation: flameFlick 2.6s ease-in-out infinite; transform-origin: center bottom; }
@keyframes flameFlick { 0%,100% { transform: scale(1) rotate(-1deg); opacity: 1; } 50% { transform: scale(1.08) rotate(1deg); opacity: .85; } }
.candle-name { font-family: var(--serif); color: var(--text); font-size: 1rem; margin-bottom: 3px; word-break: break-word; }
.candle-intent { font-size: .8rem; color: var(--accent-2); }
.candle-empty { text-align: center; color: var(--muted); font-size: .95rem; margin-top: 6px; }
.candle-empty[hidden] { display: none; }

/* ---------- Rich shiur schedule ---------- */
.schedule-rich li { display: block; padding: 16px 0; border-bottom: 1px solid var(--border); }
.schedule-rich li:last-child { border-bottom: none; }
.s-main { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.s-desc { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.s-magid { font-size: .82rem; color: var(--accent); margin-top: 4px; }
.s-magid em { color: var(--accent-2); font-style: italic; }

/* ---------- Dvar Torah ---------- */
.dvar { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.dvar-quote { max-width: 760px; margin: 0 auto; text-align: center; border-inline-start: 3px solid var(--accent); padding: 8px 28px; }
.dvar-quote p { font-family: var(--serif); font-size: clamp(1.05rem, 2.1vw, 1.35rem); color: var(--cream); line-height: 1.75; }
.dvar-quote cite { display: block; margin-top: 14px; color: var(--accent-2); font-size: .95rem; font-style: normal; }
.dvar-note { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 22px; }

/* ---------- Simcha / events ---------- */
.simcha { background: radial-gradient(120% 100% at 50% 0%, rgba(201,162,75,.1), transparent 60%), var(--bg); }
.simcha-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.simcha-lead { color: var(--muted); font-size: 1.1rem; margin: 8px auto 26px; max-width: 640px; }
.simcha-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px; margin-bottom: 32px; }
.simcha-list li { color: var(--text); font-size: 1.05rem; }

/* ---------- Live Minyan bar ---------- */
/* thin "news" bar sitting above the nav inside the fixed stack */
.minyan-bar { position: static; background: #0B111E; border-bottom: 1px solid var(--border-gold);
  overflow: hidden; max-height: 48px; transition: max-height .35s ease, opacity .3s ease, border-color .35s ease; }
.header-stack.bar-collapsed .minyan-bar { max-height: 0; opacity: 0; border-color: transparent; }
.minyan-inner { max-width: var(--maxw); margin: 0 auto; padding: 7px clamp(16px,4vw,40px); display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: nowrap; }
.minyan-status, .minyan-count { font-size: .85rem; }
.minyan-status { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: .95rem; }
.minyan-dot { width: 9px; height: 9px; border-radius: 50%; background: #e0483f; box-shadow: 0 0 0 0 rgba(224,72,63,.6); animation: npPulse 2s infinite; }
.minyan-bar.has-minyan .minyan-dot { background: #3fae5a; }
.minyan-count { color: var(--accent-2); font-weight: 600; font-size: .95rem; font-variant-numeric: tabular-nums; }
.minyan-btn { background: var(--accent); color: #1a1205; border: none; border-radius: 999px; padding: 5px 15px; font-weight: 600; font-family: var(--sans); cursor: pointer; font-size: .82rem; white-space: nowrap; transition: transform .2s ease, background .2s ease; }
.minyan-btn:hover { transform: translateY(-1px); background: var(--accent-2); }
.minyan-btn[disabled] { opacity: .6; cursor: default; transform: none; }

/* ---------- Accessibility widget ---------- */
.a11y { position: fixed; inset-block-end: calc(22px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 22px; z-index: 130; }
.a11y-toggle { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #1a1205; border: none; font-size: 1.5rem; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .2s ease; }
.a11y-toggle:hover { transform: translateY(-2px) scale(1.05); }
.a11y-panel { position: absolute; inset-block-end: 64px; inset-inline-end: 0; width: 250px; background: var(--card); border: 1px solid var(--border-gold); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.a11y-panel h3 { font-size: 1rem; color: var(--accent-2); margin-bottom: 4px; text-align: center; }
.a11y-panel button { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 9px; padding: 10px; cursor: pointer; font-family: var(--sans); font-size: .92rem; text-align: start; transition: background .2s ease; }
.a11y-panel button:hover { background: rgba(201,162,75,.12); border-color: var(--border-gold); }
.a11y-statement-link { text-align: center; font-size: .85rem; color: var(--accent-2); margin-top: 2px; }

/* Accessibility body states */
body.a11y-contrast { --bg: #000; --bg-2: #000; --card: #0a0a0a; --card-2: #111; --text: #fff; --muted: #e8e8e8; --accent-2: #ffe08a; }
body.a11y-contrast .section-bg { display: none !important; }
body.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; }

/* Accessibility statement */
.accessibility-statement { max-width: 760px; margin: 20px auto 0; text-align: start; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.accessibility-statement summary { cursor: pointer; padding: 14px 18px; color: var(--accent-2); font-family: var(--serif); background: var(--card); }
.as-body { padding: 16px 18px; }
.as-body p { color: var(--muted); font-size: .92rem; margin-bottom: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .times-grid { grid-template-columns: repeat(2, 1fr); }
  .shabbat-grid { grid-template-columns: 1fr; }
  .about-grid, .learning-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media { order: -1; }
  .news-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .g-tall { grid-row: span 1; }
  .g-tall img { aspect-ratio: 4 / 3; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset-block-start: 0; inset-inline-start: 0; height: 100dvh; width: min(82vw, 340px);
    background: var(--bg-2); flex-direction: column; align-items: stretch; justify-content: center;
    gap: 8px; padding: 40px 28px;
    /* RTL-safe: anchored to the start (right in RTL) and slid fully off-screen to the right when closed */
    transform: translateX(100%); transition: transform .35s ease, visibility .35s ease;
    visibility: hidden;
    box-shadow: -20px 0 60px rgba(0,0,0,.5); z-index: 90;
  }
  .nav-links.open { transform: translateX(0); visibility: visible; }
  .nav-links a { padding: 14px 18px; font-size: 1.1rem; border-radius: 12px; }
  .nav-links a:hover { background: rgba(201,162,75,.1); }
  .hero-badges li { flex: 1 1 100%; border-inline-end: none; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
  .hero-badges li:last-child { border-bottom: none; }
  .hero-content { padding: 104px 18px 64px; }
  .hero-copy { display: block; max-width: 100%; padding: 24px 20px 26px; border-radius: 18px; }
  .hero-title { font-size: clamp(2.2rem, 11vw, 3.4rem); }
  .hero-lead { font-size: 1.05rem; }
  /* thin minyan bar stays on its own row above the hamburger */
  .minyan-inner { gap: 10px; padding: 6px 14px; }
  .minyan-status, .minyan-count { font-size: .78rem; }
  #minyanText .mt-loc { display: none; } /* drop "· צירלסון 10" when tight */
  .minyan-btn { padding: 4px 12px; font-size: .78rem; }
  .next-prayer { display: flex; width: 100%; box-sizing: border-box; }
  .memorial-list li { grid-template-columns: 1fr; gap: 6px; text-align: start; }
  .m-note { text-align: start; }
}

@media (max-width: 460px) {
  .times-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue span { animation: none; }
  .hero-video { display: none; }
  .np-pulse, .sm-flame { animation: none; }
  .hero-verse { opacity: .95; transform: none; transition: none; }
}
