/* ═══════════════════════════════════════════════════════
   MESILOT HATORA — Main Stylesheet
   Colors: Jerusalem Blue #1B3A6B | Gold #C9A84C | Parchment #F7F3E9
════════════════════════════════════════════════════════ */

:root {
  --blue:       #1B3A6B;
  --blue-dark:  #122848;
  --blue-light: #2a548a;
  --gold:       #C9A84C;
  --gold-light: #e0c06a;
  --parchment:  #F7F3E9;
  --parchment2: #EDE8DA;
  --brown:      #3d2b1f;
  --text:       #2C1810;
  --text-light: #6b5748;
  --white:      #ffffff;
  --shadow:     0 4px 24px rgba(27,58,107,.12);
  --shadow-lg:  0 8px 48px rgba(27,58,107,.18);
  --radius:     12px;
  --transition: .3s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Heebo', 'Frank Ruhl Libre', sans-serif;
  background: var(--parchment);
  color: var(--text);
  line-height: 1.7;
}
body[lang="en"], body[lang="es"] {
  font-family: 'Lato', sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Scroll bar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--parchment); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

/* ═══ TOP BAR ══════════════════════════════════════════ */
.topbar {
  background: var(--blue-dark);
  color: var(--parchment);
  font-size: .85rem;
  padding: .5rem 0;
  position: relative;
  z-index: 1000;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.topbar-contact { display: flex; gap: 1.5rem; }
.topbar-contact a {
  color: var(--parchment);
  opacity: .85;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: opacity var(--transition);
}
.topbar-contact a:hover { opacity: 1; color: var(--gold-light); }
.topbar-contact i { color: var(--gold); font-size: .8rem; }

/* Language switcher — flag icons */
.lang-switcher,
.header-lang-switcher { display: flex; gap: .45rem; align-items: center; }

.lang-flag {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: none;
  padding: 0;
  cursor: pointer;
  opacity: .55;
  transition: all .25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lang-flag svg,
.lang-flag img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}
.lang-flag:hover {
  opacity: .85;
  transform: scale(1.1);
}
.lang-flag.active {
  opacity: 1;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,168,76,.35);
  transform: scale(1.05);
}

/* Header flag switcher (slightly smaller, hidden on desktop) */
.header-lang-switcher {
  display: none;
}
.header-lang-switcher .lang-flag {
  width: 26px;
  height: 26px;
}
@media (max-width: 768px) {
  .header-lang-switcher { display: flex; }
}

/* Topbar flags are brighter on dark bg */
.lang-switcher .lang-flag { opacity: .6; }
.lang-switcher .lang-flag:hover { opacity: .9; }
.lang-switcher .lang-flag.active {
  opacity: 1;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,168,76,.4);
}

/* ═══ HEADER ════════════════════════════════════════════ */
.header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: var(--shadow);
  transition: background .3s ease, box-shadow .3s ease;
}
.header.scrolled {
  background: var(--parchment);
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.header.scrolled .header-inner { height: 56px; }
.header.scrolled .logo-img { width: 40px; height: 40px; }
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  transition: height .3s ease, padding .3s ease;
}

/* Logo */
.logo { display: flex; align-items: center; gap: .75rem; }
.logo-img {
  width: 52px; height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(27,58,107,.25));
  transition: width .3s ease, height .3s ease;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-main {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue);
}
.logo-sub { font-size: .72rem; color: var(--text-light); }

/* Nav */
.nav { display: flex; gap: .25rem; }
.nav-link {
  padding: .5rem .9rem;
  border-radius: 6px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--gold);
  transition: all var(--transition);
  border-radius: 1px;
}
.nav-link:hover, .nav-link.active {
  color: var(--blue);
  background: var(--parchment);
}
.nav-link:hover::after, .nav-link.active::after { left: 10%; right: 10%; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.hamburger span {
  display: block;
  width: 25px; height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ═══ HERO ══════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--blue-dark);
}

/* ── Slideshow ── */
.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  will-change: opacity;
  transform: scale(1);
}
.hero-slide.active {
  opacity: 1;
  animation: kenBurns 6s ease-in-out forwards;
}
@keyframes kenBurns {
  0%   { transform: scale(1); }
  100% { transform: scale(1.08); }
}
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(18,40,72,.55) 0%,
    rgba(18,40,72,.35) 40%,
    rgba(18,40,72,.50) 70%,
    rgba(18,40,72,.75) 100%
  );
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

/* Decorative Hebrew letters */
.hero::after {
  content: 'תורה';
  position: absolute;
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 30vw;
  font-weight: 900;
  color: rgba(255,255,255,.03);
  right: -5%;
  bottom: -10%;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201,168,76,.1) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(201,168,76,.06) 0%, transparent 50%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 2rem;
}
.hero-content .hero-title {
  animation: heroFadeIn 1s ease .2s both;
}
.hero-content .hero-subtitle {
  animation: heroFadeIn 1s ease .5s both;
}
.hero-content .hero-quote {
  animation: heroFadeIn 1s ease .8s both;
}
.hero-content .hero-actions {
  animation: heroFadeIn 1s ease 1.1s both;
}
.hero-badge {
  display: inline-block;
  background: rgba(201,168,76,.15);
  border: 1px solid rgba(201,168,76,.4);
  color: var(--gold-light);
  padding: .4rem 1.2rem;
  border-radius: 20px;
  font-size: .85rem;
  letter-spacing: .1em;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.4), 0 4px 40px rgba(0,0,0,.2);
}
.hero-subtitle {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  color: rgba(247,243,233,.9);
  margin-bottom: 2rem;
  font-weight: 400;
  text-shadow: 0 1px 10px rgba(0,0,0,.3);
}
.hero-quote {
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(201,168,76,.35);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 0 auto 2.5rem;
  max-width: 680px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hero-quote p {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--parchment);
  font-style: italic;
  margin-bottom: .5rem;
  text-shadow: 0 1px 6px rgba(0,0,0,.3);
}
.hero-quote cite {
  color: var(--gold-light);
  font-size: .85rem;
  font-style: normal;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--blue-dark);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(201,168,76,.4);
}
.hero-actions .btn-primary {
  animation: gentlePulse 3s ease-in-out 2s infinite;
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.4);
}
.btn-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.7);
  transform: translateY(-2px);
}
.btn-blue {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-blue:hover { background: var(--blue-light); transform: translateY(-2px); }
.btn-sm { padding: .55rem 1.2rem; font-size: .875rem; }

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.5);
  font-size: 1.2rem;
  animation: bounce 2s infinite;
  cursor: pointer;
  z-index: 2;
}

/* ═══ SECTIONS ══════════════════════════════════════════ */
.section { padding: 6rem 0; }
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-tag {
  display: inline-block;
  color: var(--gold);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.section-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--blue);
  font-weight: 700;
  line-height: 1.2;
}
.section-divider {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--gold);
  font-size: 1rem;
}
.section-divider::before, .section-divider::after {
  content: '';
  width: 60px;
  height: 1px;
  background: var(--gold);
  opacity: .4;
  transition: width .6s ease;
}
.section-header.visible .section-divider::before,
.section-header.visible .section-divider::after {
  width: 80px;
}

/* ═══ ABOUT ═════════════════════════════════════════════ */
.about-section { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.9;
  margin-bottom: 2rem;
}
.about-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-value {
  display: block;
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  transition: transform .3s ease;
}
.stat-item:hover .stat-value {
  transform: scale(1.1);
}
.stat-label {
  display: block;
  font-size: .82rem;
  color: var(--text-light);
  margin-top: .25rem;
}
.about-visual {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.about-card {
  background: var(--parchment);
  border: 1px solid var(--parchment2);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all var(--transition);
}
.about-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateX(-4px);
}
.about-card-icon {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform .3s ease, box-shadow .3s ease;
}
.about-card:hover .about-card-icon {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(27,58,107,.25);
}
.about-card h3 {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: .2rem;
}
.about-card p { font-size: .88rem; color: var(--text-light); }

/* ═══ CLASSES ═══════════════════════════════════════════ */
.classes-section { background: var(--parchment); }

/* Classes main tabs (regular / recorded) */
.classes-main-tabs {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
  background: var(--parchment2);
  border-radius: 50px;
  padding: .3rem;
  width: fit-content;
  margin-inline: auto;
  margin-bottom: 2.5rem;
}
.classes-main-tab {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.8rem;
  border-radius: 50px;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.classes-main-tab.active {
  background: var(--white);
  color: var(--blue);
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(27,58,107,.12);
}
.classes-main-tab i { color: var(--gold); font-size: .9rem; }
.classes-main-tab.active i { color: var(--blue); }
.classes-pane { transition: opacity .3s ease; }
.classes-pane.hidden { display: none; }

/* Sub-section headers inside pane */
.classes-sub-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1.75rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--parchment2);
}
.classes-sub-header h3 {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.classes-sub-header h3 i { color: var(--gold); font-size: 1rem; }
.classes-sub-header-alt {
  margin-top: 3rem;
}
/* Reusable carousel wrapper */
.carousel-wrapper {
  overflow: hidden;
  position: relative;
  margin-bottom: 1.5rem;
}
.carousel-wrapper::before,
.carousel-wrapper::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}
.carousel-wrapper::before { left: 0; background: linear-gradient(to right, var(--parchment) 0%, transparent 100%); }
.carousel-wrapper::after  { right: 0; background: linear-gradient(to left, var(--parchment) 0%, transparent 100%); }
.classes-section .carousel-wrapper::before { background: linear-gradient(to right, var(--parchment) 0%, transparent 100%); }
.classes-section .carousel-wrapper::after  { background: linear-gradient(to left, var(--parchment) 0%, transparent 100%); }

.carousel-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: carouselScroll var(--carousel-duration, 30s) linear infinite;
  padding: .5rem 0;
}
.carousel-track:hover { animation-play-state: paused; }

/* Static carousel — few items, no animation, centered on desktop */
.carousel-track.carousel-static {
  animation: none !important;
}
@media (min-width: 769px) {
  .carousel-track.carousel-static {
    width: 100%;
    justify-content: center;
  }
}
.carousel-wrapper:active .carousel-track,
.gallery-carousel-wrapper:active .gallery-carousel { user-select: none; }

@keyframes carouselScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
html[dir="rtl"] .carousel-track {
  animation-name: carouselScrollRTL;
}
@keyframes carouselScrollRTL {
  0%   { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

.carousel-track .upcoming-card,
.carousel-track .class-card {
  flex-shrink: 0;
  width: 340px;
}
.carousel-track .media-cat-card {
  flex-shrink: 0;
  width: 300px;
}

@media (max-width: 480px) {
  .carousel-track .upcoming-card,
  .carousel-track .class-card { width: 290px; }
  .carousel-track .media-cat-card { width: 260px; }
}

.classes-grid {
  display: flex;
  gap: 1.25rem;
}
.class-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.class-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.class-card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.class-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.class-card-img-icon {
  font-size: 3rem;
  color: rgba(201,168,76,.4);
}
.class-lang-badge {
  position: absolute;
  top: .75rem;
  inset-inline-end: .75rem;
  background: var(--gold);
  color: var(--blue-dark);
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
}
.class-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.class-card-level {
  color: var(--gold);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .5rem;
}
.class-card-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .75rem;
  line-height: 1.3;
}
.class-card-desc {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1.25rem;
}
.class-card-meta {
  border-top: 1px solid var(--parchment2);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.class-meta-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text-light);
}
.class-meta-item i { color: var(--blue); width: 16px; text-align: center; }

/* ═══ UPCOMING ══════════════════════════════════════════ */
.upcoming-section { background: var(--white); }
.upcoming-grid {
  display: flex;
  gap: 1.25rem;
}
.upcoming-card {
  display: flex;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--parchment2);
  transition: all var(--transition);
}
.upcoming-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201,168,76,.3);
}
.upcoming-date-block {
  background: linear-gradient(160deg, var(--blue), var(--blue-light));
  color: var(--white);
  padding: 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  text-align: center;
  flex-shrink: 0;
}
.upcoming-day   { font-size: 2rem; font-weight: 900; line-height: 1; color: var(--gold-light); font-family: 'Frank Ruhl Libre', serif; }
.upcoming-month { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; opacity: .85; margin-top: .2rem; }
.upcoming-year  { font-size: .68rem; opacity: .6; margin-top: .1rem; }
.upcoming-body  { padding: 1.25rem; flex: 1; min-width: 0; }
.upcoming-type-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .18rem .65rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  margin-bottom: .6rem;
}
.upcoming-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .5rem;
  line-height: 1.3;
}
.upcoming-desc {
  font-size: .85rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: .85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.upcoming-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  font-size: .78rem;
  color: var(--text-light);
}
.upcoming-meta span {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.upcoming-meta i { color: var(--blue); }
.upcoming-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-light);
}
.upcoming-empty i { font-size: 3rem; color: var(--parchment2); display: block; margin-bottom: 1rem; }

/* ═══ SCHEDULE ══════════════════════════════════════════ */
.schedule-section { background: var(--blue-dark); color: var(--parchment); }
.schedule-section .section-title { color: var(--gold-light); }
.schedule-section .section-tag { color: rgba(201,168,76,.7); }
.schedule-section .section-divider { color: var(--gold); }
.schedule-section .section-divider::before,
.schedule-section .section-divider::after { background: var(--gold); }

.schedule-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}
.schedule-tab {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(201,168,76,.25);
  color: rgba(247,243,233,.7);
  padding: .5rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: .88rem;
  font-family: inherit;
  transition: all var(--transition);
}
.schedule-tab:hover, .schedule-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--blue-dark);
  font-weight: 700;
}

/* Schedule cards grid */
.schedule-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

.schedule-card {
  display: flex;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(201,168,76,.12);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  backdrop-filter: blur(6px);
}
.schedule-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201,168,76,.35);
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
}

/* Time column (left/right accent) */
.schedule-card-time-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem .85rem;
  min-width: 72px;
  background: rgba(201,168,76,.1);
  border-inline-end: 1px solid rgba(201,168,76,.15);
  gap: .2rem;
}
.schedule-card-time {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}
.schedule-card-day {
  font-size: .72rem;
  color: rgba(247,243,233,.55);
  font-weight: 500;
}
.schedule-card-special-badge {
  margin-top: .25rem;
  font-size: .6rem;
  color: var(--gold);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .2rem;
}
.schedule-card-special-badge i { font-size: .5rem; }
.schedule-card-special {
  border-inline-start: 3px solid var(--gold) !important;
  background: rgba(201,168,76,.08);
}
.schedule-card-recur {
  font-size: .6rem;
  color: rgba(201,168,76,.45);
  margin-top: .15rem;
}

/* Card body */
.schedule-card-body {
  flex: 1;
  padding: .9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.schedule-card-top {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.schedule-card-topic {
  font-size: 1rem;
  font-weight: 600;
  color: var(--parchment);
  margin: 0;
  line-height: 1.35;
}
.schedule-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: auto;
}
.schedule-card-meta-item {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  color: rgba(247,243,233,.5);
}
.schedule-card-meta-item i {
  font-size: .7rem;
  color: rgba(201,168,76,.55);
}
.schedule-card-teacher-photo {
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(201,168,76,.35);
}

/* Colored left accent per type */
.type-prayer-card     { border-inline-start: 3px solid rgba(100,140,220,.6); }
.type-class-card      { border-inline-start: 3px solid rgba(201,168,76,.6); }
.type-event-card      { border-inline-start: 3px solid rgba(16,185,129,.6); }
.type-conference-card { border-inline-start: 3px solid rgba(168,85,247,.6); }

.type-prayer-card .schedule-card-time-col     { background: rgba(100,140,220,.08); }
.type-class-card .schedule-card-time-col      { background: rgba(201,168,76,.08); }
.type-event-card .schedule-card-time-col      { background: rgba(16,185,129,.08); }
.type-conference-card .schedule-card-time-col { background: rgba(168,85,247,.08); }

/* Language badge */
.schedule-card-lang {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 600;
  color: rgba(247,243,233,.5);
  background: rgba(255,255,255,.07);
  padding: .15rem .55rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  margin-inline-start: auto;
}
.schedule-card-lang-flag { font-size: .8rem; }

/* Empty state */
.schedule-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(247,243,233,.4);
}
.schedule-empty i { font-size: 3rem; margin-bottom: 1rem; display: block; color: rgba(201,168,76,.3); }

.loading-cell { text-align: center; padding: 3rem; color: var(--gold); font-size: 1.5rem; }

/* ═══ CATEGORY BLOCKS GRID (video/audio) ══════ */
.cat-blocks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 1.5rem 1rem;
}
.cat-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(201,168,76,.15);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.cat-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  border-color: rgba(201,168,76,.4);
}
.cat-block-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: transform .3s ease;
}
.cat-block:hover .cat-block-icon {
  transform: scale(1.1);
}
.cat-block-info {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  flex: 1;
  min-width: 0;
}
.cat-block-name {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
}
.cat-block-count {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
}
.cat-block-arrow {
  color: rgba(201,168,76,.3);
  font-size: .9rem;
  transition: color .3s ease, transform .3s ease;
}
.cat-block:hover .cat-block-arrow {
  color: var(--gold);
  transform: translateX(-3px);
}
html[dir="ltr"] .cat-block-arrow {
  transform: scaleX(-1);
}
html[dir="ltr"] .cat-block:hover .cat-block-arrow {
  transform: scaleX(-1) translateX(-3px);
}
@media (max-width: 600px) {
  .cat-blocks-grid {
    grid-template-columns: 1fr;
    padding: 1rem .5rem;
  }
}

/* Media category page grid */
.media-cat-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  padding: 2rem;
  flex: 1;
}
@media (max-width: 480px) {
  .media-cat-page-grid { grid-template-columns: 1fr; padding: 1rem; }
}

/* ═══ VIDEOS ════════════════════════════════════════════ */
.videos-section { background: var(--blue-dark); }
.videos-section .section-title { color: var(--gold-light); }
.videos-section .section-tag   { color: rgba(201,168,76,.7); }
.videos-section .section-divider { color: var(--gold); }
.videos-section .section-divider::before,
.videos-section .section-divider::after { background: var(--gold); }

/* Category filter */
.video-categories {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.video-cat-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--white);
  border: 1.5px solid rgba(27,58,107,.18);
  color: var(--blue);
  padding: .5rem 1.25rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: .88rem;
  font-family: inherit;
  transition: all var(--transition);
}
.video-cat-btn:hover,
.video-cat-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--blue-dark);
  font-weight: 700;
}
.video-cat-btn i { font-size: .82rem; }

/* Videos grid */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.video-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}
.video-card:hover {
  transform: translateY(-5px);
  border-color: rgba(201,168,76,.4);
  background: rgba(255,255,255,.08);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--blue);
  overflow: hidden;
}
.video-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.video-card:hover .video-thumb img { transform: scale(1.04); }
.video-thumb-fallback {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue), #0f2040);
}
.video-thumb-fallback i { font-size: 3rem; color: rgba(201,168,76,.3); }
.video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  transition: background var(--transition);
}
.video-card:hover .video-play-btn { background: rgba(0,0,0,.2); }
.video-play-circle {
  width: 60px; height: 60px;
  background: rgba(201,168,76,.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-dark);
  font-size: 1.4rem;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.video-card:hover .video-play-circle {
  background: var(--gold);
  transform: scale(1.1);
}
.video-cat-badge {
  position: absolute;
  top: .75rem;
  inset-inline-start: .75rem;
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}
.video-card-body { padding: 1.25rem; }
.video-card-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: .5rem;
  line-height: 1.35;
}
.video-card-desc {
  font-size: .83rem;
  color: rgba(247,243,233,.6);
  line-height: 1.6;
  margin-bottom: .85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  color: rgba(201,168,76,.75);
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: .85rem;
  flex-wrap: wrap;
  gap: .35rem;
}
.video-card-meta span { display: flex; align-items: center; gap: .3rem; }
.video-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(247,243,233,.4);
}
.video-empty i { font-size: 3.5rem; margin-bottom: 1rem; display: block; }

/* Video Player Modal */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.video-modal.active { display: flex; }
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(6px);
  cursor: pointer;
}
.video-modal-box {
  position: relative;
  z-index: 1;
  background: #0d1f3c;
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  padding: 1.5rem;
  box-shadow: 0 16px 64px rgba(0,0,0,.6);
  animation: modalFadeIn .25s ease;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(.96) translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.video-modal-close-btn {
  position: absolute;
  top: 1rem; inset-inline-end: 1rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--parchment);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: .95rem;
  transition: all var(--transition);
  z-index: 2;
}
.video-modal-close-btn:hover { background: var(--gold); color: var(--blue-dark); }
.video-modal-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.15rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
  padding-inline-end: 2.5rem;
  line-height: 1.3;
}
.video-embed-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}
.video-modal-desc {
  color: rgba(247,243,233,.65);
  font-size: .88rem;
  margin-top: 1rem;
  line-height: 1.6;
}

/* ═══ GALLERY ═══════════════════════════════════════════ */
.gallery-section { background: var(--white); }

/* Gallery Carousel */
/* ── Infinite Carousel ── */
.gallery-carousel-wrapper {
  overflow: hidden;
  position: relative;
  margin-bottom: 1rem;
}
.gallery-carousel-wrapper::before,
.gallery-carousel-wrapper::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
.gallery-carousel-wrapper::before { left: 0; background: linear-gradient(to right, var(--parchment) 0%, transparent 100%); }
.gallery-carousel-wrapper::after  { right: 0; background: linear-gradient(to left, var(--parchment) 0%, transparent 100%); }

.gallery-carousel {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: galleryScroll var(--scroll-duration, 30s) linear infinite;
  padding: .5rem 0;
}
.gallery-carousel:hover { animation-play-state: paused; }

@keyframes galleryScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
html[dir="rtl"] .gallery-carousel {
  animation-name: galleryScrollRTL;
}
@keyframes galleryScrollRTL {
  0%   { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

.gallery-carousel-slide {
  position: relative;
  width: 340px;
  flex-shrink: 0;
  aspect-ratio: 16/10;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .4s ease, box-shadow .4s ease;
}
.gallery-carousel-slide:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.gallery-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.gallery-carousel-slide:hover img {
  transform: scale(1.06);
}

/* Glass overlay with category name */
.gallery-carousel-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem 1.25rem 1.1rem;
  background: linear-gradient(to top, rgba(18,40,72,.82) 0%, rgba(18,40,72,.45) 60%, transparent 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  transition: padding .35s ease;
}
.gallery-carousel-slide:hover .gallery-carousel-overlay {
  padding-bottom: 1.4rem;
}
.gallery-carousel-name {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
  transition: font-size .35s ease;
}
.gallery-carousel-slide:hover .gallery-carousel-name {
  font-size: 1.45rem;
}
.gallery-carousel-count {
  font-size: .78rem;
  color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.12);
  padding: .25rem .65rem;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.15);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .gallery-carousel-slide { width: 280px; }
  .gallery-carousel-name { font-size: 1.15rem; }
  .gallery-carousel-slide:hover .gallery-carousel-name { font-size: 1.2rem; }
}

/* Hide tabs & grid — images shown only via category page */
.gallery-cat-tabs { display: none !important; }
.gallery-grid    { display: none !important; }

/* ── Gallery Category Page (fullscreen overlay) ── */
.gallery-cat-page {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--parchment);
  display: none;
  flex-direction: column;
  overflow-y: auto;
}
.gallery-cat-page.active { display: flex; }

.gallery-cat-page-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.gallery-cat-page-back {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all .2s ease;
  flex-shrink: 0;
}
.gallery-cat-page-back:hover {
  background: rgba(255,255,255,.25);
}
html[dir="rtl"] .gallery-cat-page-back i { transform: rotate(180deg); }

.gallery-cat-page-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}
.gallery-cat-page-count {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  margin-inline-start: auto;
}

.gallery-cat-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 2rem;
  flex: 1;
}
.gallery-cat-page-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow);
}
.gallery-cat-page-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery-cat-page-item:hover img { transform: scale(1.05); }
.gallery-cat-page-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27,58,107,.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.gallery-cat-page-item:hover .gallery-cat-page-item-overlay { opacity: 1; }
.gallery-cat-page-item-caption { color: var(--white); font-size: .88rem; }

.gallery-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-light);
}
.gallery-empty i { font-size: 4rem; color: var(--parchment2); margin-bottom: 1rem; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--white);
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
  z-index: 1;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: var(--gold);
  color: var(--blue-dark);
  border-color: var(--gold);
}
.lightbox-close { top: 1.5rem; inset-inline-end: 1.5rem; }
.lightbox-prev  { inset-inline-start: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { inset-inline-end: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-content { max-width: 90vw; max-height: 90vh; text-align: center; }
.lightbox-content img { max-height: 80vh; border-radius: var(--radius); }
.lightbox-content p { color: rgba(255,255,255,.8); margin-top: .75rem; font-size: .9rem; }

/* ═══ CONTACT ═══════════════════════════════════════════ */
.contact-section { background: var(--parchment); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}
.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: .75rem;
  border-radius: var(--radius);
  transition: background .3s ease, transform .3s ease;
}
.contact-item:hover {
  background: rgba(27,58,107,.04);
  transform: translateX(-4px);
}
html[dir="ltr"] .contact-item:hover {
  transform: translateX(4px);
}
.contact-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: .9rem;
  flex-shrink: 0;
  margin-top: .1rem;
}
.contact-item h4 {
  font-size: .8rem;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .2rem;
}
.contact-item p, .contact-item a {
  font-size: .95rem;
  color: var(--text-light);
}
.contact-item a:hover { color: var(--blue); }
.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.contact-map iframe { display: block; }

/* ═══ BUILDING TOUR ════════════════════════════════════ */
.tour-section { background: var(--parchment); }

.tour-interactive {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.tour-building-wrap {
  position: relative;
  display: inline-block;
  max-width: 520px;
  width: 100%;
}
.tour-building-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 32px rgba(27,58,107,.18));
}

/* Floor zones – invisible hover areas positioned over each floor */
.tour-floor-zone {
  position: absolute;
  left: 10%;
  right: 10%;
  cursor: pointer;
  transition: .3s ease;
  z-index: 2;
}
.tour-floor-zone[data-floor="beit_midrash"] { bottom: 33%; height: 15%; }
.tour-floor-zone[data-floor="events_hall"]  { bottom: 48%; height: 15%; }
.tour-floor-zone[data-floor="synagogue"]    { bottom: 63%; height: 13%; }
.tour-floor-zone[data-floor="ezrat_nashim"] { bottom: 76%; height: 15%; }

.tour-floor-glow {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  opacity: 0;
  background: radial-gradient(ellipse at center, rgba(201,168,76,.35) 0%, rgba(201,168,76,.12) 40%, transparent 70%);
  transition: opacity .5s ease;
  pointer-events: none;
}
.tour-floor-zone:hover .tour-floor-glow,
.tour-floor-zone.active .tour-floor-glow {
  opacity: 1;
}
.tour-floor-zone:hover {
  background: rgba(201,168,76,.06);
}

/* Hotspots – gold dots with pulse */
.tour-hotspot {
  position: absolute;
  z-index: 3;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0;
}
.tour-hotspot[data-floor="beit_midrash"] { top: 56%; right: 4%; }
.tour-hotspot[data-floor="events_hall"]  { top: 40%; right: 3.5%; }
.tour-hotspot[data-floor="synagogue"]    { top: 31%; right: 4%; }
.tour-hotspot[data-floor="ezrat_nashim"] { top: 17%; right: 6%; }

.tour-hotspot-dot {
  width: 16px;
  height: 16px;
  background: var(--gold);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(201,168,76,.5);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.tour-hotspot-pulse {
  position: absolute;
  width: 16px;
  height: 16px;
  top: 0;
  right: 0;
  border-radius: 50%;
  background: rgba(201,168,76,.4);
  animation: tourPulse 2.5s ease-out infinite;
  z-index: 1;
}
@keyframes tourPulse {
  0%   { transform: scale(1); opacity: .7; }
  100% { transform: scale(3); opacity: 0; }
}

.tour-hotspot-line {
  width: 40px;
  height: 2px;
  background: linear-gradient(to left, var(--gold), transparent);
  margin-right: -2px;
}
.tour-hotspot-label {
  background: rgba(27,58,107,.85);
  color: var(--gold-light);
  padding: .3rem .75rem;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(201,168,76,.25);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
html[dir="rtl"] .tour-hotspot { flex-direction: row-reverse; }
html[dir="rtl"] .tour-hotspot-line { background: linear-gradient(to right, var(--gold), transparent); }
html[dir="ltr"] .tour-hotspot-label { transform: translateX(-8px); }

/* Preview bubble */
.tour-hotspot-preview {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(201,168,76,.5);
  box-shadow: 0 4px 16px rgba(27,58,107,.25), inset 0 0 12px rgba(255,255,255,.15);
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex-shrink: 0;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.tour-hotspot-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tour-hotspot:hover .tour-hotspot-preview,
.tour-hotspot.hovered .tour-hotspot-preview {
  opacity: 1;
  transform: scale(1);
}
/* Show preview also when zone is hovered */
.tour-floor-zone[data-floor="beit_midrash"]:hover ~ .tour-hotspot[data-floor="beit_midrash"] .tour-hotspot-preview,
.tour-floor-zone[data-floor="events_hall"]:hover ~ .tour-hotspot[data-floor="events_hall"] .tour-hotspot-preview,
.tour-floor-zone[data-floor="synagogue"]:hover ~ .tour-hotspot[data-floor="synagogue"] .tour-hotspot-preview,
.tour-floor-zone[data-floor="ezrat_nashim"]:hover ~ .tour-hotspot[data-floor="ezrat_nashim"] .tour-hotspot-preview {
  opacity: 1;
  transform: scale(1);
}

.tour-hotspot.hovered .tour-hotspot-dot {
  background: #fff;
  box-shadow: 0 0 20px rgba(201,168,76,.8);
  transform: scale(1.3);
}
.tour-hotspot:hover .tour-hotspot-label,
.tour-hotspot.hovered .tour-hotspot-label,
.tour-floor-zone:hover ~ .tour-hotspot .tour-hotspot-label {
  opacity: 1;
  transform: translateX(0);
}

/* Highlight matching hotspot when zone is hovered */
.tour-floor-zone[data-floor="beit_midrash"]:hover ~ .tour-hotspot[data-floor="beit_midrash"] .tour-hotspot-dot,
.tour-floor-zone[data-floor="events_hall"]:hover ~ .tour-hotspot[data-floor="events_hall"] .tour-hotspot-dot,
.tour-floor-zone[data-floor="synagogue"]:hover ~ .tour-hotspot[data-floor="synagogue"] .tour-hotspot-dot,
.tour-floor-zone[data-floor="ezrat_nashim"]:hover ~ .tour-hotspot[data-floor="ezrat_nashim"] .tour-hotspot-dot {
  background: #fff;
  box-shadow: 0 0 20px rgba(201,168,76,.8);
  transform: scale(1.3);
}
.tour-floor-zone[data-floor="beit_midrash"]:hover ~ .tour-hotspot[data-floor="beit_midrash"] .tour-hotspot-label,
.tour-floor-zone[data-floor="events_hall"]:hover ~ .tour-hotspot[data-floor="events_hall"] .tour-hotspot-label,
.tour-floor-zone[data-floor="synagogue"]:hover ~ .tour-hotspot[data-floor="synagogue"] .tour-hotspot-label,
.tour-floor-zone[data-floor="ezrat_nashim"]:hover ~ .tour-hotspot[data-floor="ezrat_nashim"] .tour-hotspot-label {
  opacity: 1;
  transform: translateX(0);
}
.tour-hotspot-dot { transition: all .3s ease; }

/* Tour Modal */
.tour-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18,40,72,.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9500;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
.tour-modal-overlay.active { display: flex; }

.tour-modal {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(201,168,76,.3);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem;
  box-shadow: 0 16px 64px rgba(18,40,72,.25), 0 0 0 1px rgba(201,168,76,.1);
  animation: tourModalIn .35s ease;
  position: relative;
  text-align: center;
}
@keyframes tourModalIn {
  from { opacity: 0; transform: scale(.94) translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.tour-modal-close {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-light);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s ease;
}
.tour-modal-close:hover { background: rgba(0,0,0,.06); color: #ef4444; }

.tour-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: var(--gold-light);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 16px rgba(27,58,107,.25);
}

.tour-modal-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .75rem;
}
.tour-modal-desc {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* Tour modal — infinite carousel */
.tour-modal-carousel-wrapper {
  overflow: hidden;
  position: relative;
  margin-top: .5rem;
  border-radius: 10px;
}
.tour-modal-carousel-wrapper::before,
.tour-modal-carousel-wrapper::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 30px;
  z-index: 2;
  pointer-events: none;
}
.tour-modal-carousel-wrapper::before { left: 0; background: linear-gradient(to right, rgba(255,255,255,.9), transparent); }
.tour-modal-carousel-wrapper::after  { right: 0; background: linear-gradient(to left, rgba(255,255,255,.9), transparent); }

.tour-modal-carousel {
  display: flex;
  gap: .75rem;
  width: max-content;
  animation: tourCarouselScroll var(--tour-scroll-duration, 20s) linear infinite;
}
.tour-modal-carousel:hover { animation-play-state: paused; }

@keyframes tourCarouselScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
html[dir="rtl"] .tour-modal-carousel { animation-name: tourCarouselScrollRTL; }
@keyframes tourCarouselScrollRTL {
  0%   { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

.tour-modal-carousel-item {
  flex-shrink: 0;
  width: 180px;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.tour-modal-carousel-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(27,58,107,.2);
}
.tour-modal-carousel-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.tour-modal-carousel-hint {
  text-align: center;
  font-size: .78rem;
  color: var(--gold);
  margin-top: .6rem;
  opacity: .7;
}
.tour-modal-carousel-hint i { margin-inline-end: .3rem; }

/* Tour modal — grid fallback */
.tour-modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
}
.tour-modal-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
  border: 2px solid transparent;
}
.tour-modal-gallery img:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(27,58,107,.15);
  border-color: var(--gold);
}

/* Tour Image Lightbox */
.tour-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 10500;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  cursor: zoom-out;
}
.tour-lightbox.active { display: flex; }
.tour-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 8px 48px rgba(0,0,0,.5);
  animation: tourModalIn .25s ease;
}
.tour-lightbox-close {
  position: absolute;
  top: 1.2rem;
  inset-inline-end: 1.5rem;
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  font-size: 1.5rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s ease;
}
.tour-lightbox-close:hover { color: var(--gold); background: rgba(255,255,255,.1); }

/* Tour Responsive */
@media (max-width: 768px) {
  .tour-building-wrap { max-width: 100%; }

  .tour-hotspot-line { width: 24px; }
  .tour-hotspot-label {
    font-size: .7rem;
    padding: .25rem .5rem;
    opacity: 1;
    transform: none;
  }
  .tour-hotspot-dot { width: 12px; height: 12px; }
  .tour-hotspot-pulse { width: 12px; height: 12px; }
  .tour-hotspot-preview { width: 42px; height: 42px; }

  .tour-modal { padding: 1.5rem; max-height: 90vh; }
  .tour-modal-title { font-size: 1.3rem; }
  .tour-modal-gallery { grid-template-columns: repeat(2, 1fr); }
  .tour-modal-carousel-item { width: 150px; }
}
@media (max-width: 480px) {
  .tour-hotspot-label { display: none; }
  .tour-hotspot-line { display: none; }
  .tour-hotspot-preview { width: 36px; height: 36px; opacity: 1; transform: scale(1); }
  .tour-modal { padding: 1.25rem; }
  .tour-modal-icon { width: 52px; height: 52px; font-size: 1.2rem; }
  .tour-modal-gallery { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
}

/* ═══ SCROLL TIMELINE ═══════════════════════════════════ */
.scroll-timeline {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  right: 22px;
  z-index: 500;
  height: 45vh;
  display: flex;
  align-items: stretch;
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.scroll-timeline.visible {
  opacity: 1;
  pointer-events: auto;
}
html[dir="ltr"] .scroll-timeline {
  right: auto;
  left: 22px;
}

/* Track & fill */
.scroll-timeline-track {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(201,168,76,.2);
  border-radius: 2px;
}
.scroll-timeline-fill {
  position: absolute;
  top: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--gold), #e0c06a);
  border-radius: 2px;
  transition: height .15s ease-out;
  box-shadow: 0 0 6px rgba(201,168,76,.3);
}

/* Dots container */
.scroll-timeline-dots {
  position: relative;
  width: 36px;
  height: 100%;
}

/* Individual dot — hidden by default, revealed dynamically */
.scroll-timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) scale(0.5);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--parchment, #F7F3E9);
  border: 2px solid rgba(201,168,76,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: transform .45s cubic-bezier(.34,1.56,.64,1),
              opacity .35s ease,
              background .3s ease,
              border-color .3s ease,
              box-shadow .3s ease;
}
.scroll-timeline-dot i {
  font-size: .78rem;
  color: var(--gold);
  transition: color .3s ease;
}

/* Visible (section is in viewport) — faded, small */
.scroll-timeline-dot.in-view {
  opacity: .1;
  transform: translateX(-50%) scale(0.75);
  pointer-events: auto;
}
.scroll-timeline-dot.in-view:hover {
  opacity: .6;
  transform: translateX(-50%) scale(0.9);
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(201,168,76,.2);
}

/* Active dot — full opacity, scale up, gold fill */
.scroll-timeline-dot.active {
  opacity: 1 !important;
  transform: translateX(-50%) scale(1.15);
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(201,168,76,.5);
  pointer-events: auto;
}
.scroll-timeline-dot.active i {
  color: var(--white, #fff);
}

/* Passed dots — slightly visible */
.scroll-timeline-dot.passed {
  opacity: .1;
  transform: translateX(-50%) scale(0.7);
  border-color: var(--gold);
  pointer-events: auto;
}

/* Label tooltip */
.scroll-timeline-label {
  position: absolute;
  white-space: nowrap;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gold);
  background: rgba(27,58,107,.92);
  padding: .3rem .7rem;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  right: calc(100% + 10px);
  transform: translateX(4px);
}
html[dir="ltr"] .scroll-timeline-label {
  right: auto;
  left: calc(100% + 10px);
  transform: translateX(-4px);
}
.scroll-timeline-dot:hover .scroll-timeline-label {
  opacity: 1;
  transform: translateX(0);
}

/* Hide on mobile */
@media (max-width: 768px) {
  .scroll-timeline { display: none !important; }
}

/* ═══ FOOTER ════════════════════════════════════════════ */
.footer {
  background: var(--blue-dark);
  color: rgba(247,243,233,.8);
  padding: 4rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.footer-logo-img {
  width: 48px; height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.3)) brightness(1.1);
}
.footer-brand .footer-logo span {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-light);
}
.footer-brand p { font-size: .88rem; line-height: 1.7; }
.footer-links h4, .footer-contact h4 {
  color: var(--gold-light);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .1em;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}
.footer-links ul li { margin-bottom: .6rem; }
.footer-links a { font-size: .88rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--gold-light); }
.footer-contact p {
  font-size: .88rem;
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.footer-contact i { color: var(--gold); width: 14px; }
.footer-contact a:hover { color: var(--gold-light); }
.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  font-size: .82rem;
  opacity: .6;
}
.footer-legal-links {
  margin-top: .5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
}
.footer-legal-btn {
  background: none;
  border: none;
  color: rgba(247,243,233,.8);
  font-family: inherit;
  font-size: .78rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  transition: color var(--transition);
}
.footer-legal-btn:hover { color: var(--gold-light); }
.footer-legal-sep { color: rgba(247,243,233,.3); font-size: .7rem; }

/* Legal Statement Modal */
.legal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18,40,72,.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9500;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
.legal-modal-overlay.active { display: flex; }
.legal-modal {
  background: var(--white);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem;
  box-shadow: 0 16px 64px rgba(18,40,72,.25);
  animation: modalFadeIn .25s ease;
  position: relative;
}
.legal-modal-close {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-light);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s ease;
}
.legal-modal-close:hover { background: rgba(0,0,0,.06); color: #ef4444; }
.legal-modal-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 1.25rem;
  padding-inline-end: 2rem;
}
.legal-modal-body {
  color: var(--text);
  font-size: .92rem;
  line-height: 1.85;
}
.legal-modal-body h4 {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue);
  margin: 1.25rem 0 .5rem;
}
.legal-modal-body ul {
  list-style: disc;
  padding-inline-start: 1.5rem;
  margin-bottom: .75rem;
}
.legal-modal-body ul li { margin-bottom: .3rem; }
.legal-modal-body p { margin-bottom: .75rem; }
.legal-modal-body a { color: var(--blue); text-decoration: underline; }
.legal-modal-body a:hover { color: var(--gold); }
.legal-modal-contact {
  background: var(--parchment);
  border: 1px solid var(--parchment2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}
.legal-modal-contact p { margin-bottom: .3rem; }
.legal-modal-contact i { color: var(--blue); width: 18px; margin-inline-end: .4rem; }
.legal-modal-date {
  font-size: .8rem;
  color: var(--text-light);
  margin-top: 1rem;
  border-top: 1px solid var(--parchment2);
  padding-top: .75rem;
}
@media (max-width: 768px) {
  .legal-modal-overlay { padding: .75rem; }
  .legal-modal { padding: 1.5rem; max-height: 90vh; border-radius: 12px; }
  .legal-modal-title { font-size: 1.25rem; }
}

/* ═══ ANIMATIONS ════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(25px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes gentlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,.3); }
  50%      { box-shadow: 0 0 0 12px rgba(201,168,76,0); }
}
.fade-in-up { animation: fadeInUp .6s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }

/* Intersection observer animation */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
.reveal.visible { opacity: 1; transform: none; }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
.reveal-left.visible { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
.reveal-right.visible { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(.85); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
.reveal-scale.visible { opacity: 1; transform: none; }

/* Loading spinner */
.loading-spinner {
  grid-column: 1/-1;
  text-align: center;
  padding: 4rem;
  color: var(--gold);
  font-size: 2rem;
}

/* Schedule type badges */
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .18rem .6rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
}
.type-prayer     { background: rgba(100,140,220,.25); color: #a8c4ff; }
.type-class      { background: rgba(201,168,76,.2);   color: #e8c96a; }
.type-event      { background: rgba(16,185,129,.2);   color: #6ee7b7; }
.type-conference { background: rgba(168,85,247,.2);   color: #d8b4fe; }

/* Type filter */
.schedule-type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.type-filter-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(201,168,76,.2);
  color: rgba(247,243,233,.65);
  padding: .4rem 1.1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: .85rem;
  font-family: inherit;
  transition: all var(--transition);
}
.type-filter-btn:hover,
.type-filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--blue-dark);
  font-weight: 700;
}

/* Teacher photo in schedule */
.schedule-teacher-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.schedule-teacher-photo {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(201,168,76,.4);
  flex-shrink: 0;
}

/* ═══ RTL / LTR adjustments ═════════════════════════════ */
[dir="rtl"] .about-card:hover { transform: translateX(4px); }
[dir="ltr"] .about-card:hover { transform: translateX(-4px); }

/* ═══ RESPONSIVE ════════════════════════════════════════ */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}

@media (max-width: 768px) {
  .header { position: relative; }
  .header-inner { padding: 0 1rem; height: 56px; }
  .nav {
    position: fixed;
    top: 56px; inset-inline-start: 0; inset-inline-end: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem;
    gap: .25rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    transition: transform var(--transition), top .3s ease;
    z-index: 998;
  }
  .nav.open { transform: translateY(0); }
  .hamburger { display: flex; }
  .topbar-inner { justify-content: center; }
  .topbar-contact { display: none; }
  .section { padding: 4rem 0; }
  .classes-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .schedule-tabs { gap: .3rem; }
  .schedule-tab { padding: .4rem .8rem; font-size: .8rem; }
  .schedule-cards { grid-template-columns: 1fr; }
  .schedule-card-time-col { min-width: 60px; padding: .75rem .6rem; }
  .schedule-card-time { font-size: 1.1rem; }
  .container { padding: 0 1rem; }
}

/* ═══ MOBILE FIXES ═════════════════════════════════════ */

/* Prevent horizontal overflow globally */
html { overflow-x: hidden; }
body { overflow-x: clip; max-width: 100%; }

/* "View all" button for mobile carousels */
.mobile-view-all-btn {
  display: none;
  margin: 1rem auto 0;
  padding: .7rem 2rem;
  border-radius: 25px;
  background: var(--blue);
  color: var(--white);
  border: none;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.mobile-view-all-btn i { margin-inline-end: .4rem; }
.mobile-view-all-btn:hover { background: var(--blue-light); transform: translateY(-2px); }

@media (max-width: 768px) {
  .mobile-view-all-btn { display: inline-flex; align-items: center; gap: .4rem; }

  /* ── Tour modal fix ── */
  .tour-modal-overlay { padding: .5rem; }
  .tour-modal { padding: 1.25rem; max-height: 92vh; max-width: 100%; border-radius: 12px; }
  .tour-modal-icon { width: 48px; height: 48px; font-size: 1.1rem; margin-bottom: .75rem; }
  .tour-modal-title { font-size: 1.2rem; }
  .tour-modal-desc { font-size: .88rem; margin-bottom: 1rem; }
  .tour-modal-carousel-wrapper { margin: 0 -.5rem; }
  .tour-modal-carousel-item { width: 130px; }
  .tour-modal-gallery { grid-template-columns: repeat(2, 1fr); gap: .5rem; }

  /* ── Carousels — touch swipeable on mobile ── */
  .carousel-wrapper { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .carousel-wrapper::-webkit-scrollbar { display: none; }
  .carousel-wrapper::before, .carousel-wrapper::after { display: none; }
  .carousel-track { animation: none !important; padding: 0.5rem 1rem; }
  .carousel-track > * { scroll-snap-align: center; }

  /* Gallery carousel — touch swipeable */
  .gallery-carousel-wrapper { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .gallery-carousel-wrapper::-webkit-scrollbar { display: none; }
  .gallery-carousel-wrapper::before, .gallery-carousel-wrapper::after { display: none; }
  .gallery-carousel { animation: none !important; padding: .5rem 1rem; }
  .gallery-carousel-slide { scroll-snap-align: center; }

  /* ── Hide topbar lang switcher on mobile (keep only header one) ── */
  .topbar .lang-switcher { display: none; }

  /* ── Hero ── */
  .hero { min-height: 85vh; }
  .hero-content { padding: 1.5rem 1rem; max-width: 100%; }
  .hero-title { font-size: clamp(2rem, 7vw, 3rem); }
  .hero-subtitle { font-size: 1rem; margin-bottom: 1.25rem; }
  .hero-badge { font-size: .75rem; padding: .3rem .9rem; margin-bottom: 1rem; }
  .hero-quote { padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
  .hero-quote p { font-size: .95rem; }
  .hero-actions .btn { padding: .75rem 1.5rem; font-size: .9rem; width: 100%; justify-content: center; }
  .hero-scroll { bottom: 1rem; }
  .hero::after { font-size: 40vw; } /* decorative text */

  /* ── Sections ── */
  .section { padding: 3rem 0; }
  .section-header { margin-bottom: 2rem; }
  .section-title { font-size: clamp(1.5rem, 5vw, 2rem); }
  .section-tag { font-size: .75rem; }

  /* ── About ── */
  .about-grid { gap: 1.5rem; }
  .about-text p { font-size: .95rem; }
  .about-stats { gap: 1.5rem; justify-content: center; }
  .stat-value { font-size: 2rem; }
  .about-card { padding: 1rem; gap: 1rem; }
  .about-card-icon { width: 42px; height: 42px; font-size: 1rem; }
  .about-card h3 { font-size: 1rem; }
  .about-card p { font-size: .82rem; }

  /* ── Classes tabs ── */
  .classes-main-tabs { width: 100%; box-sizing: border-box; }
  .classes-main-tab { padding: .55rem 1rem; font-size: .88rem; flex: 1; justify-content: center; text-align: center; }
  .classes-sub-header h3 { font-size: 1.05rem; }

  /* ── Carousel cards ── */
  .carousel-track .upcoming-card,
  .carousel-track .class-card { width: 280px; }
  .carousel-track .media-cat-card { width: 250px; }
  .carousel-wrapper::before,
  .carousel-wrapper::after { width: 20px; }

  /* ── Upcoming cards ── */
  .upcoming-date-block { min-width: 65px; padding: 1rem .75rem; }
  .upcoming-day { font-size: 1.6rem; }
  .upcoming-body { padding: 1rem; }
  .upcoming-title { font-size: 1rem; }
  .upcoming-desc { font-size: .8rem; }

  /* ── Schedule ── */
  .schedule-cards { grid-template-columns: 1fr; }
  .schedule-card-body { padding: .75rem .9rem; }
  .schedule-card-topic { font-size: .9rem; }

  /* ── Gallery ── */
  .gallery-carousel-slide { width: 260px; }
  .gallery-carousel-wrapper::before,
  .gallery-carousel-wrapper::after { width: 20px; }
  .gallery-carousel-name { font-size: 1rem; }
  .gallery-cat-page-header { padding: 1rem; gap: .75rem; }
  .gallery-cat-page-title { font-size: 1.15rem; }
  .gallery-cat-page-grid { padding: 1rem; gap: .75rem; grid-template-columns: repeat(2, 1fr); }

  /* ── Contact ── */
  .contact-grid { gap: 1.5rem; }
  .contact-item { padding: .5rem; }
  .contact-map iframe { height: 250px; }

  /* ── Footer ── */
  .footer { padding: 2.5rem 0 1.5rem; }
  .footer-grid { gap: 1.5rem; }

  /* ── Media category page ── */
  .media-cat-page-grid { grid-template-columns: 1fr; padding: 1rem; }

  /* ── Video modal ── */
  .video-modal-box { padding: 1rem; border-radius: 10px; }
  .video-modal-title { font-size: 1rem; }

  /* ── Tour ── */
  .tour-building-wrap { max-width: 100%; }
  .tour-hotspot-line { width: 24px; }
  .tour-hotspot-label { font-size: .7rem; }
  .tour-modal { padding: 1.5rem; max-height: 90vh; }
  .tour-modal-gallery { grid-template-columns: repeat(2, 1fr); }
  .tour-modal-carousel-item { width: 150px; }

  /* ── Lightbox ── */
  .lightbox-close { top: .75rem; inset-inline-end: .75rem; width: 36px; height: 36px; }
  .lightbox-prev, .lightbox-next { width: 36px; height: 36px; font-size: .85rem; }
  .lightbox-prev { inset-inline-start: .5rem; }
  .lightbox-next { inset-inline-end: .5rem; }
  .lightbox-content img { max-height: 70vh; border-radius: 8px; }

  /* ── Custom pages ── */
  .custom-page-text { font-size: .95rem; }
  .cp-library-item { flex-wrap: wrap; padding: .85rem 1rem; }
}

@media (max-width: 380px) {
  /* Ultra-small screens */
  .carousel-track .upcoming-card,
  .carousel-track .class-card { width: 260px; }
  .carousel-track .media-cat-card { width: 230px; }
  .gallery-carousel-slide { width: 230px; }
  .hero-title { font-size: 1.8rem; }
  .hero-actions .btn { padding: .65rem 1rem; font-size: .85rem; }
  .classes-main-tab { padding: .5rem .6rem; font-size: .8rem; }
  .schedule-tab { padding: .35rem .6rem; font-size: .75rem; }
  .upcoming-date-block { min-width: 55px; }
  .upcoming-day { font-size: 1.4rem; }
  .gallery-cat-page-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-icon { width: 36px; height: 36px; font-size: .8rem; }
}

/* ═══════════════════════════════════════════
   CUSTOM PAGES
═══════════════════════════════════════════ */

/* ═══ CUSTOM PAGES — Content Type Templates ═══ */

/* Shared */
.custom-page-text {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text);
}
.custom-page-text p { margin-bottom: 1rem; }
.cp-empty {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-light);
  font-size: 1rem;
}

/* ── Library / Files ─────────────────────── */
.cp-library-cat { margin-bottom: 2rem; }
.cp-library-cat-title {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--parchment2);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.cp-library-list { display: flex; flex-direction: column; gap: .5rem; }
.cp-library-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--parchment2);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
}
.cp-library-item:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.cp-library-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--gold-light);
  flex-shrink: 0;
}
.cp-library-info { flex: 1; min-width: 0; }
.cp-library-info strong {
  display: block;
  font-size: .95rem;
  color: var(--blue);
  margin-bottom: .15rem;
}
.cp-library-info small { font-size: .82rem; color: var(--text-light); }
.cp-library-dl {
  background: var(--gold);
  color: var(--blue-dark);
  padding: .4rem 1rem;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
}
.cp-library-item:hover .cp-library-dl {
  background: var(--gold-light);
  box-shadow: 0 2px 8px rgba(201,168,76,.4);
}

/* ── Links ───────────────────────────────── */
.cp-links-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.cp-link-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--parchment2);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
}
.cp-link-item:hover {
  border-color: rgba(16,185,129,.4);
  box-shadow: var(--shadow);
  transform: translateX(-4px);
}
[dir="ltr"] .cp-link-item:hover { transform: translateX(4px); }
.cp-link-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(16,185,129,.12);
  display: flex; align-items: center; justify-content: center;
  color: #047857;
  font-size: 1rem;
  flex-shrink: 0;
}
.cp-link-info { flex: 1; min-width: 0; }
.cp-link-info strong { display: block; font-size: .95rem; color: var(--blue); margin-bottom: .1rem; }
.cp-link-info small { font-size: .82rem; color: var(--text-light); }
.cp-link-arrow { color: var(--gold); font-size: .85rem; transition: transform var(--transition); }
[dir="ltr"] .cp-link-arrow { transform: rotate(180deg); }
.cp-link-item:hover .cp-link-arrow { transform: translateX(-4px); }
[dir="ltr"] .cp-link-item:hover .cp-link-arrow { transform: rotate(180deg) translateX(-4px); }

/* ── Team / People ───────────────────────── */
.cp-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
}
.cp-team-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--parchment2);
  transition: all var(--transition);
}
.cp-team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201,168,76,.3);
}
.cp-team-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--gold);
  box-shadow: 0 4px 16px rgba(27,58,107,.2);
}
.cp-team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cp-team-avatar i { font-size: 2.5rem; color: rgba(201,168,76,.5); }
.cp-team-name {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .25rem;
}
.cp-team-role {
  display: inline-block;
  color: var(--gold);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  margin-bottom: .75rem;
}
.cp-team-bio {
  font-size: .88rem;
  color: var(--text-light);
  line-height: 1.65;
}

/* ── Info Cards ──────────────────────────── */
.cp-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.cp-info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--parchment2);
  transition: all var(--transition);
}
.cp-info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.cp-info-card-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.4rem;
  color: var(--gold-light);
}
.cp-info-card h3 {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: .5rem;
}
.cp-info-card p {
  font-size: .9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ── FAQ / Accordion ─────────────────────── */
.cp-faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.cp-faq-item {
  background: var(--white);
  border: 1px solid var(--parchment2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.cp-faq-item.open { border-color: var(--gold); }
.cp-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  text-align: start;
}
.cp-faq-q i {
  color: var(--gold);
  transition: transform .25s ease;
  flex-shrink: 0;
}
.cp-faq-item.open .cp-faq-q i { transform: rotate(180deg); }
.cp-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 1.25rem;
}
.cp-faq-item.open .cp-faq-a {
  max-height: 500px;
  padding: 0 1.25rem 1.25rem;
}
.cp-faq-a p {
  font-size: .95rem;
  color: var(--text-light);
  line-height: 1.75;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 768px) {
  .cp-team-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.25rem; }
  .cp-cards-grid { grid-template-columns: 1fr; }
  .cp-library-item { flex-wrap: wrap; }
  .cp-library-dl { width: 100%; text-align: center; }
}

/* ═══ Audio Lessons ═══ */
.audio-section-title {
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: .25rem;
}
.audio-section-subtitle {
  font-size: .95rem;
  color: rgba(255,255,255,.6);
}
.audio-categories {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.audio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.audio-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(201,168,76,.12);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
}
.audio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,.3);
  border-color: rgba(201,168,76,.35);
}
.audio-card-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(139,92,246,.15), rgba(168,85,247,.08));
}
.audio-card-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(139,92,246,.4);
  transition: transform var(--tr);
}
.audio-card:hover .audio-card-circle {
  transform: scale(1.1);
}
.audio-card-has-text {
  font-size: .8rem;
  color: #a78bfa;
  margin-top: .4rem;
}
.audio-card-has-text i { margin-inline-end: .3rem; }

/* Audio Modal */
.audio-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.audio-modal.active { display: flex; }
.audio-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.85);
  cursor: pointer;
}
.audio-modal-box {
  position: relative;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(145deg, #0f1829, #162035);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 16px;
  padding: 2rem;
  z-index: 1;
}
.audio-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: .5rem;
}
.audio-modal-player-wrap {
  margin: 1rem 0;
}
.audio-modal-player-wrap audio {
  width: 100%;
  border-radius: 8px;
}
.audio-modal-desc {
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.audio-modal-text {
  margin-top: 1rem;
}
.audio-text-content {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(201,168,76,.15);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: rgba(255,255,255,.85);
  font-size: .95rem;
  line-height: 1.8;
  max-height: 400px;
  overflow-y: auto;
}

/* ═══ ACCESSIBILITY — WCAG 2.2 AA / IS 5568 ═══════════════ */

/* Skip navigation link — hidden until focused (clip method avoids RTL overflow) */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  z-index: 99999;
  background: var(--blue-dark);
  color: var(--gold-light);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
}
.skip-link:focus {
  position: fixed;
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  padding: .75rem 1.5rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  z-index: 99999;
  border: 2px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}

/* Focus indicators — visible outline on keyboard navigation */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
/* Focus on dark backgrounds */
.schedule-section :focus-visible,
.footer :focus-visible,
.video-modal :focus-visible,
.lightbox :focus-visible,
.tour-lightbox :focus-visible {
  outline-color: var(--gold-light);
}
/* Focus for round buttons */
.lang-flag:focus-visible,
.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible,
.tour-modal-close:focus-visible,
.tour-lightbox-close:focus-visible,
.video-modal-close-btn:focus-visible,
.gallery-cat-page-back:focus-visible,
.contact-icon:focus-visible {
  outline-offset: 3px;
  border-radius: 50%;
}
/* Remove default outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Color contrast fix — accessible gold for text on light backgrounds */
.section-tag {
  color: #996515;
}
.contact-item h4 {
  color: #996515;
}
.class-card-level {
  color: #996515;
}
.tour-modal-carousel-hint {
  color: #996515;
}
/* Keep original gold on dark backgrounds (schedule, footer, videos) */
.schedule-section .section-tag { color: rgba(201,168,76,.7); }
.videos-section .section-tag { color: rgba(201,168,76,.7); }

/* Reduced motion — respect user preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .hero-slide { transition: opacity 0.01ms !important; }
  .carousel-track,
  .gallery-carousel,
  .tour-modal-carousel { animation: none !important; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }
}
