/*
Theme Name: Maayan Mobile v94
Description: A mobile-first WordPress theme for Maayan Torah Studies from the Sources. (v56)
Version: 94.0.0
Author: Maayan
Text Domain: maayan-mobile-v56
*/

/* ─── CSS VARIABLES ─────────────────────────────────────── */
:root {
  --teal:        #39bbb3;
  --teal-dark:   #00786f;
  --teal-light:  #4dccc4;
  --teal-pale:   #c6e6e3;
  --teal-xpale:  #edf8f7;
  --gold:        #c6e6e3;
  --gold-light:  #a8d4d0;
  --white:       #ffffff;
  --cream:       #fafaf8;
  --text:        #222222;
  --muted:       #5a6a6a;
  --border:      #c6e6e3;
  --radius:      10px;

  /* ── Warm accent palette ────────────────────────── */
  --warm-taupe:   #D8C7BE;   /* section bg tint       */
  --warm-taupe-lt:#ede4e0;   /* lighter taupe bg      */
  --burgundy:     #972D2C;   /* tags, dates, accents  */
  --burgundy-lt:  #b84342;   /* hover state           */
  --rose:         #D07971;   /* section-title borders */
  --silver:       #c9ced1;   /* header bottom border  */
}


/* ─── LOGO BACKGROUND PATTERNS ──────────────────────────── */
/* Ma'ayan N calligraphy watermark extracted from actual logo */

/* White N watermark on dark teal sections */
/* dark sections - no watermark */

/* Teal N watermark on light/cream sections */
/* light sections - no watermark */

/* ─── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── HEADER ────────────────────────────────────────────── */
.site-header {
  background: var(--teal-dark);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.site-branding { display: flex; align-items: center; flex-shrink: 0; }
.site-header .custom-logo { height: 75px; width: auto; object-fit: contain; flex-shrink: 0; margin: -10px 0; }
.site-header .custom-logo-link { display: flex; align-items: center; flex-shrink: 0; }
.site-header .logo-fallback {
  font-family: 'Playfair Display', serif;
  color: #fff;
  font-size: 1.45rem;
}
/* Desktop nav - hidden on mobile */
.desktop-nav { display: none; }
.desktop-menu { list-style: none; display: flex; align-items: center; gap: 4px; }
.desktop-menu li { position: relative; }
.desktop-menu li a {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 5px;
  transition: background .15s, color .15s;
}
.desktop-menu li a:hover,
.desktop-menu li.current-menu-item > a {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
/* Desktop dropdown */
.desktop-menu li .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--teal-dark);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  list-style: none;
  min-width: 180px;
  padding: 6px 0;
  margin-top: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  z-index: 300;
}
.desktop-menu li:hover > .sub-menu { display: block; }
.desktop-menu .sub-menu li a {
  display: block;
  padding: 8px 16px;
  font-size: 0.8rem;
  border-radius: 0;
  white-space: nowrap;
}
.desktop-menu .sub-menu li a:hover {
  background: rgba(255,255,255,0.1);
}
.header-right { display: flex; align-items: center; gap: 10px; }
.header-donate-btn {
  background: var(--gold);
  color: #00786f;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: background .2s;
}
.header-donate-btn:hover { background: var(--gold-light); color: #00786f; }
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  flex-shrink: 0;
  z-index: 10;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Header-right: keep donate + hamburger together, never let them overflow */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
/* On very narrow phones, shrink the donate button so hamburger always visible */
@media (max-width: 420px) {
  .header-donate-btn {
    font-size: 0.78rem !important;
    padding: 6px 10px !important;
  }
  .site-header .custom-logo {
    height: 60px !important;
  }
}

/* ─── DRAWER ─────────────────────────────────────────────── */
.nav-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.nav-overlay.open { opacity: 1; pointer-events: all; }
.nav-drawer {
  position: fixed;
  top: 0; left: -100%;
  width: min(290px, 85vw);
  height: 100vh;
  background: var(--teal-dark);
  z-index: 400;
  overflow-y: auto;
  transition: left .35s cubic-bezier(.4,0,.2,1);
}
.nav-drawer.open { left: 0; }
.drawer-header {
  background: var(--teal-dark);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-header img { height: 40px; width: auto; object-fit: contain; flex-shrink: 0; filter: brightness(1.1); }
.drawer-header .drawer-logo-text {
  font-family: 'Playfair Display', serif;
  color: #fff;
  font-size: 1.2rem;
}
.drawer-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}
.nav-group-label {
  padding: 11px 18px 8px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-top: 6px;
}
/* WordPress nav menu inside drawer */
.nav-drawer .menu { list-style: none; }
.nav-drawer .menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 14px 22px;
  color: rgba(255,255,255,0.88);
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background .15s, color .15s;
}
.nav-drawer .menu li a:hover,
.nav-drawer .menu li.current-menu-item > a {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
/* Drawer sub-menu (accordion dropdowns — collapsed by default) */
.nav-drawer .menu .menu-item-has-children { position: relative; }
.nav-drawer .menu .menu-item-has-children > a {
  /* Leave room on the right for the caret toggle button */
  padding-right: 56px;
}
.nav-drawer .submenu-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 49px; /* matches link row height (14+14 + 1.0rem + border) */
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  transition: background .15s;
}
.nav-drawer .submenu-toggle:hover {
  background: rgba(255,255,255,0.08);
}
.nav-drawer .submenu-caret {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(255,255,255,0.78);
  border-bottom: 2px solid rgba(255,255,255,0.78);
  transform: rotate(45deg);
  transition: transform .25s ease;
  margin-top: -4px;
}
.nav-drawer .menu-item-has-children.is-open > .submenu-toggle .submenu-caret {
  transform: rotate(-135deg);
  margin-top: 2px;
}
.nav-drawer .menu .sub-menu {
  list-style: none;
  background: rgba(0,0,0,0.15);
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.nav-drawer .menu-item-has-children.is-open > .sub-menu {
  max-height: 800px; /* large enough for any realistic submenu */
}
.nav-drawer .menu .sub-menu li a {
  padding-left: 40px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
}
.nav-drawer .menu .sub-menu li a:hover {
  color: #fff;
}
.drawer-donate-link {
  margin: 18px 16px 8px;
  display: block;
  background: var(--gold);
  color: #00786f !important;
  text-align: center;
  padding: 12px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  transition: background .2s;
}
.drawer-donate-link:hover { background: var(--gold-light) !important; color: #00786f !important; }

/* ─── MAIN CONTENT ───────────────────────────────────────── */
.site-main { padding-bottom: 20px; }

/* ─── HERO ───────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(160deg, var(--teal-dark) 0%, var(--teal) 100%);
  padding: 30px 20px 34px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* When image is present: ~2x taller than default, contained not cropped */
.hero-section.hero-has-image {
  background-color: var(--teal-dark);
  padding: 40px 20px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-section::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/svg%3E");
}
/* With image: soft bottom gradient for text legibility, no polka dots */
.hero-section.hero-has-image::after {
  background: linear-gradient(to bottom, rgba(0,120,111,0) 50%, rgba(0,120,111,0.75) 100%);
}
.hero-verse {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 12px;
  line-height: 1.6;
  position: relative; z-index: 1;
}
.hero-section h1 {
  font-family: 'Cormorant Garamond', serif;
  color: #fff;
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 14px;
  position: relative; z-index: 1;
  font-weight: 500;
  letter-spacing: 0.03em;
  font-style: italic;
}
.hero-section p {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 480px;
  margin: 0 auto 22px;
  position: relative; z-index: 1;
  font-family: 'Open Sans', sans-serif;
}
.hero-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative; z-index: 1;
}

/* ─── QUICK TILES ────────────────────────────────────────── */
.quick-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 18px 16px 0;
}
.quick-tile {
  background: var(--teal-pale);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--teal-dark);
}
.quick-tile:hover {
  background: var(--teal-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(0,120,111,0.2);
}
.quick-tile:hover .tile-icon svg { stroke: #fff; }
.quick-tile .tile-icon { font-size: 1.7rem; line-height: 1; }
.quick-tile .tile-icon svg { width: 28px; height: 28px; }
.quick-tile .tile-label { font-size: 0.78rem; font-weight: 700; line-height: 1.3; }

/* ─── SECTIONS ───────────────────────────────────────────── */
.content-section { padding: 20px 16px 0; }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--teal-dark);
  border-left: 5px solid var(--gold);
  padding-left: 14px;
  margin-bottom: 18px;
  line-height: 1.25;
  letter-spacing: 0.01em;
}
/* Warm-accented variant — used on Upcoming Classes & ESF Spotlight */
.content-section--warm {
  padding: 20px 16px 18px;
}
.content-section--warm .section-title {
  color: var(--burgundy);
  border-left-color: var(--rose);
}

/* ─── CARDS ──────────────────────────────────────────────── */
.maayan-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: box-shadow .2s;
}
.maayan-card:hover { box-shadow: 0 3px 16px rgba(42,125,123,0.12); }

/* Clickable variant — used by [spotlight] shortcode when url= is supplied */
a.maayan-card,
a.maayan-card--link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
a.maayan-card:hover,
a.maayan-card--link:hover {
  box-shadow: 0 6px 22px rgba(0,120,111,0.16);
  transform: translateY(-2px);
}
a.maayan-card h3,
a.maayan-card--link h3 {
  color: var(--teal-dark);
}
.card-tag {
  display: inline-block;
  background: var(--burgundy);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
}
.maayan-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  color: var(--teal-dark);
  margin-bottom: 4px;
  line-height: 1.35;
}
.maayan-card p { font-size: 0.78rem; color: var(--muted); line-height: 1.55; }
.card-date { margin-top: 8px; font-size: 0.75rem; font-weight: 700; color: var(--burgundy); }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal);
  border-bottom: 1px solid var(--teal);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.card-link:hover { color: var(--teal-dark); border-color: var(--teal-dark); }

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: all .2s;
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  border: none;
  position: relative;
  overflow: hidden;
}
/* Subtle logo watermark on gold/pale-teal buttons */
.btn-gold {
  background: var(--gold);
  color: #00786f;
}
.btn-gold:hover {
  background: var(--gold-light);
  color: #00786f;
}
/* Subtle logo watermark on teal buttons */
.btn-teal {
  background: var(--teal);
  color: #fff;
}
.btn-teal:hover {
  background: var(--teal-light);
  color: #fff;
}

.btn-outline { background: var(--teal-pale); border: 1px solid var(--border); color: var(--teal-dark); }
.btn-outline:hover { background: var(--teal-dark); color: #fff; border-color: var(--teal-dark); }
.btn-hero-outline {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 2px solid rgba(255,255,255,0.55);
  color: #fff;
  background: none;
  transition: all .2s;
  cursor: pointer;
}
.btn-hero-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); color: #fff; }

/* ─── CTA BOX ────────────────────────────────────────────── */
.cta-box {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px 18px;
  margin: 16px 16px 0;
  text-align: center;
}
.cta-box h3 { font-family: 'Playfair Display', serif; font-size: 1.05rem; margin-bottom: 8px; }
.cta-box p { font-size: 0.83rem; color: rgba(255,255,255,0.82); margin-bottom: 16px; line-height: 1.6; }

/* ─── YOUTUBE STRIP ──────────────────────────────────────── */
.yt-strip {
  background: var(--teal-pale);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 16px 16px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .2s, background .2s;
}
.yt-strip:hover,
.yt-strip:focus-visible {
  background: var(--teal-xpale);
  box-shadow: 0 4px 18px rgba(0,120,111,0.14);
  transform: translateY(-1px);
  outline: none;
}
.yt-icon {
  width: 46px; height: 46px;
  background: var(--teal-dark);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.yt-icon svg { width: 26px; height: 26px; fill: #fff; }
.yt-strip h4 { font-family: 'Playfair Display', serif; font-size: 0.95rem; color: var(--teal-dark); margin-bottom: 3px; }
.yt-strip .yt-cta { font-size: 0.8rem; color: var(--teal); font-weight: 700; }
.yt-strip:hover .yt-cta { color: var(--teal-dark); }

/* ─── PAGE HERO (inner pages) ────────────────────────────── */
.page-hero {
  background: linear-gradient(160deg, var(--teal-dark) 0%, var(--teal) 100%);
  padding: 30px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/svg%3E");
}
/* Hero with a background image — display the image only, no color tint/overlay.
   (Image now lives on the .page-hero-bg layer; this rule is kept for any legacy use.) */
.page-hero--image {
  background-image: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.page-hero--image::after { display: none; }

/* ─── Overlay hero with parallax background (homepage with image/video) ───
   Header sits transparent over the media at the top; the media is on its own
   layer that scrolls slower than the page (parallax). The header turns solid
   teal once the user scrolls past the top. */
.site-header--overlay {
  position: fixed;
  left: 0;
  right: 0;
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid rgba(255,255,255,0.35); /* soft silver over the image */
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.site-header--overlay.is-scrolled {
  background: var(--teal-dark);
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  border-bottom-color: var(--silver);
}
/* Stronger text shadow so nav/logo stay readable over the media while transparent */
.site-header--overlay .desktop-menu li a,
.site-header--overlay .logo-fallback {
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
.site-header--overlay.is-scrolled .desktop-menu li a,
.site-header--overlay.is-scrolled .logo-fallback {
  text-shadow: none;
}
/* Glass-style dropdowns when the header is overlaid on a hero image.
   Once scrolled to solid teal, dropdowns return to the solid look. */
.site-header--overlay .desktop-menu .sub-menu {
  background: rgba(0, 56, 52, 0.55);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.site-header--overlay .desktop-menu .sub-menu li a {
  text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.site-header--overlay .desktop-menu .sub-menu li a:hover {
  background: rgba(255,255,255,0.18);
}
.site-header--overlay.is-scrolled .desktop-menu .sub-menu {
  background: var(--teal-dark);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.site-header--overlay.is-scrolled .desktop-menu .sub-menu li a {
  text-shadow: none;
}

/* Hero starts at the top under the fixed header and shows the full media */
.page-hero--overlay {
  position: relative;
  background: #fff; /* white shows through as the media fades out on scroll */
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: calc(var(--header-h, 99px) + 24px);
  padding-bottom: 40px;
  overflow: hidden;
}
@media (min-width: 768px) {
  .page-hero--overlay { min-height: 82vh; }
}

/* Parallax media layer — taller than the hero so it can translate without
   exposing its edges as it scrolls. */
.page-hero-bg {
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 120%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  z-index: 0;
}
/* Neutral grey placeholder shown while the hero image preloads
   (Drisha-style — looks intentional, never an ugly flat flash). */
.page-hero--image .page-hero-bg,
.page-hero--inner .page-hero-bg {
  background-color: #aab0b3;
}
/* The hero image lives in this child and fades in all-at-once once the
   JS preloader confirms it's fully downloaded — no progressive paint. */
.page-hero-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 0;
}
.page-hero-bg-img.is-loaded {
  opacity: 1;
}
.page-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Readability scrim lives on the media layer so it fades out with the image */
.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.05) 35%, rgba(0,0,0,0.05) 65%, rgba(0,0,0,0.35) 100%);
}
/* Inner-page hero: gentle mute on the image — preserve color and vibrancy
   while keeping the headline and tagline highly readable via text-shadow. */
.page-hero--inner .page-hero-bg {
  filter: saturate(0.92) brightness(0.92);
}
.page-hero--inner .page-hero-bg::after {
  background: linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.30) 100%);
}
.page-hero--inner .page-hero-content h1 {
  font-size: 2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
@media (min-width: 768px) {
  .page-hero--inner .page-hero-content h1 { font-size: 2.6rem; }
}

/* Subtle top-and-bottom scrim now lives on .page-hero-bg::after (fades with media) */
.page-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Respect reduced-motion: disable parallax drift */
@media (prefers-reduced-motion: reduce) {
  .page-hero-bg { transform: none !important; }
}


.page-hero h1 { font-family: 'Playfair Display', serif; color: #fff; font-size: 1.5rem; margin: 0 0 8px; position: relative; z-index: 1; line-height: 1.2; letter-spacing: 0.03em; }
/* Tagline — Merriweather (serif), single line, scales down if too long */
.page-hero .subtitle {
  font-family: 'Merriweather', Georgia, serif;
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.4;
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 100%;
  /* Wrap onto multiple lines as needed (especially on mobile) */
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
@media (min-width: 768px) {
  .page-hero .subtitle { font-size: 1.1rem; }
}
.page-hero .hebrew { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1rem; color: rgba(255,255,255,0.7); margin-bottom: 6px; direction: rtl; position: relative; z-index: 1; }
.page-hero .esf-badge { position: relative; z-index: 1; }

/* Tagline treatment — ONLY on pages with a hero image or video.
   Pages without a hero image keep the plain default subtitle styling above. */
.page-hero--overlay .subtitle {
  color: rgba(255,255,255,0.92);
  font-weight: 400;
  /* Stronger shadow than v71 (0.5/12px) — slightly deeper alpha and a
     touch more blur to firmly separate text from complex backgrounds,
     without crossing into blur or "halo" territory. */
  text-shadow: 0 2px 14px rgba(0,0,0,0.65), 0 1px 3px rgba(0,0,0,0.5);
  -webkit-text-stroke: 0.3px rgba(255,255,255,0.4);
  paint-order: stroke fill;
  /* Standardize size to the homepage tagline size across all hero-media pages */
  font-size: 1.1rem;
}
@media (min-width: 768px) {
  .page-hero--overlay .subtitle { font-size: 1.25rem; }
}

/* Homepage banner tagline — already covered by .page-hero--overlay above,
   but kept here to preserve the exact homepage size as the canonical source. */
.page-hero--home .subtitle {
  font-size: 1.1rem;
}
@media (min-width: 768px) {
  .page-hero--home .subtitle {
    font-size: 1.25rem;
  }
}

/* Extra whitespace below hero on ESF pages (about/application/fellowship pages) */
.esf-about-page,
.esf-app-page,
.fellow-page {
  padding-top: 36px;
}
@media (min-width: 768px) {
  .esf-about-page,
  .esf-app-page,
  .fellow-page {
    padding-top: 48px;
  }
}

/* ─── ABOUT PAGE ─────────────────────────────────────────── */
.about-body { padding: 20px 16px; }
.about-body p { font-size: 0.88rem; line-height: 1.78; margin-bottom: 13px; color: var(--text); }
.about-body strong { color: var(--teal-dark); }
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
  margin-bottom: 10px;
}
.info-row .info-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.info-row .info-text { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }
.info-row .info-label { display: block; color: var(--teal-dark); font-size: 0.84rem; font-weight: 700; margin-bottom: 1px; }
.link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.link-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal-dark);
  transition: all .2s;
  display: block;
}
.link-tile:hover { border-color: var(--teal); color: var(--teal); box-shadow: 0 2px 8px rgba(42,125,123,0.1); }

/* ─── PROGRAMS PAGE ──────────────────────────────────────── */
.programs-list { padding: 18px 16px; }
.program-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  margin-bottom: 12px;
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.program-number {
  width: 33px; height: 33px;
  background: var(--teal-dark);
  color: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.program-item h4 { font-family: 'Playfair Display', serif; font-size: 0.97rem; color: var(--teal-dark); margin-bottom: 4px; }
.program-item p { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }
.program-item a { font-size: 0.79rem; color: var(--teal); font-weight: 700; display: inline-block; margin-top: 5px; }

/* ─── ESF PAGE ───────────────────────────────────────────── */
.esf-badge {
  display: inline-block;
  background: var(--burgundy);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.spotlight-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--rose);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 15px;
  margin-bottom: 12px;
}
.spotlight-card h4 { font-family: 'Playfair Display', serif; font-size: 0.95rem; color: var(--teal-dark); margin-bottom: 5px; }
.spotlight-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }
.spotlight-card a { font-size: 0.79rem; color: var(--teal); font-weight: 700; display: inline-block; margin-top: 6px; }
.esf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.esf-tile {
  background: var(--teal-pale);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal-dark);
  transition: all .2s;
  display: block;
}
.esf-tile:hover { background: var(--teal-dark); color: #fff; }

/* ─── GET INVOLVED PAGE ──────────────────────────────────── */
.involve-body { padding: 18px 16px; }
.newsletter-box {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px 18px;
  margin-bottom: 14px;
  text-align: center;
}
.newsletter-box h3 { font-family: 'Playfair Display', serif; font-size: 1.05rem; margin-bottom: 8px; }
.newsletter-box p { font-size: 0.82rem; color: rgba(255,255,255,0.82); margin-bottom: 16px; line-height: 1.6; }
.involve-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 17px;
  margin-bottom: 13px;
}
.involve-card-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.involve-icon {
  width: 42px; height: 42px;
  background: var(--teal-dark);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.involve-card h3 { font-family: 'Playfair Display', serif; font-size: 0.98rem; color: var(--teal-dark); margin-bottom: 3px; }
.involve-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }
.involve-card .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── PAGE FOOTER ────────────────────────────────────────── */
.page-footer {
  background: var(--teal-dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 22px 16px;
  font-size: 0.78rem;
  line-height: 1.9;
  margin-top: 22px;
}
.page-footer a { color: rgba(255,255,255,0.85); }
.page-footer .footer-name { font-family: 'Playfair Display', serif; color: #fff; font-size: 1.05rem; }

/* ─── WORDPRESS DEFAULT STYLES ───────────────────────────── */
.wp-block-image img { border-radius: var(--radius); }
.entry-content { padding: 20px 16px; font-size: 0.9rem; line-height: 1.75; }
.entry-content h2 { font-family: 'Playfair Display', serif; color: var(--teal-dark); margin: 20px 0 10px; font-size: 1.2rem; }
.entry-content p { margin-bottom: 12px; color: var(--text); }
.entry-content a { color: var(--teal); border-bottom: 1px solid var(--teal); }
.entry-content ul, .entry-content ol { padding-left: 20px; margin-bottom: 12px; }
.entry-content li { margin-bottom: 6px; font-size: 0.88rem; color: var(--muted); }

/* ─── FOOTER LOGOS ───────────────────────────────────────── */
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-direction: column; /* mobile default — text first, logos stack below */
  text-align: center;
}
.footer-text {
  flex: 1 1 auto;
  min-width: 0;
}
.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: none;
}
.footer-logo-item img {
  height: 70px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity .2s;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: column;
    gap: 24px;
    align-items: center;
    justify-content: center;
    max-width: 100%;
  }
  .footer-text { max-width: 700px; text-align: center; }
  .footer-logo-item img { height: 90px; }
  .page-footer { padding-left: 60px; padding-right: 60px; }
}
/* Circular logos with solid backgrounds show correctly without filter.
   For white/transparent logos on dark footer, add class .footer-logo-invert */
.footer-logo-item.footer-logo-invert img {
  filter: brightness(0) invert(1);
}
.footer-logo-item a:hover img { opacity: 1; }

/* ─── DESKTOP BREAKPOINT ────────────────────────────────── */
@media (min-width: 768px) {
  /* Show desktop nav, hide hamburger */
  .desktop-nav { display: flex; }
  .hamburger { display: none; }

  /* Bigger logo on desktop */
  .site-header .custom-logo { height: 95px; }
  .site-header { padding: 6px 24px; }

  /* Cards side by side */
  .content-section .maayan-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* Quick tiles 4 across */
  .quick-tiles {
    grid-template-columns: repeat(4, 1fr);
    max-width: 700px;
    margin: 0 auto;
    padding: 18px 24px 0;
  }

  /* Wider content sections */
  .content-section { padding: 20px 24px 0; }
  .content-section--warm { margin: 20px 24px 0; padding: 16px 20px 18px; }
  .hero-section { padding: 40px 24px 44px; }
  .hero-section.hero-has-image { padding: 50px 24px; min-height: 320px; }
  .cta-box { margin: 16px 24px 0; }
  .yt-strip { margin: 16px 24px 0; }
  .page-footer { padding: 22px 24px; }
}

/* ─── THE EVENTS CALENDAR OVERRIDES ─────────────────────── */
/* Override plugin accent colors with Ma'ayan brand */
:root {
  --tec-color-accent-primary: #00786f;
  --tec-color-accent-primary-hover: #39bbb3;
  --tec-color-accent-primary-multiday: rgba(0,120,111,0.24);
  --tec-color-accent-primary-multiday-hover: rgba(0,120,111,0.34);
  --tec-color-accent-primary-background: #c6e6e3;
  --tec-color-accent-primary-background-secondary: #edf8f7;
  --tec-color-background: #fafaf8;
  --tec-color-button-primary: #00786f;
  --tec-color-button-primary-hover: #39bbb3;
  --tec-color-link-primary: #00786f;
  --tec-color-link-primary-hover: #39bbb3;
  --tec-color-link-accent: #00786f;
  --tec-color-link-accent-hover: #39bbb3;
}

/* Calendar container */
.tribe-events {
  font-family: 'Open Sans', sans-serif;
}
.tribe-events .tribe-events-l-container {
  padding: 0 16px;
}

/* Headings */
.tribe-events .tribe-events-calendar-month__header-column h3,
.tribe-events .tribe-common-h6--min-medium,
.tribe-events .tribe-common-h3,
.tribe-events .tribe-common-h2 {
  font-family: 'Playfair Display', serif;
  color: var(--teal-dark);
}

/* Event titles */
.tribe-events .tribe-events-calendar-list__event-title a,
.tribe-events .tribe-events-calendar-month__calendar-event-tooltip-title a,
.tribe-events .tribe-events-calendar-latest-past__event-title a {
  color: var(--teal-dark) !important;
  font-family: 'Playfair Display', serif;
}
.tribe-events .tribe-events-calendar-list__event-title a:hover,
.tribe-events .tribe-events-calendar-month__calendar-event-tooltip-title a:hover {
  color: var(--teal) !important;
}

/* Month view day cells */
.tribe-events .tribe-events-calendar-month__day--current .tribe-events-calendar-month__day-date-daynum {
  background-color: var(--teal-dark);
  color: #fff;
}

/* Event bar / search */
.tribe-events .tribe-events-c-events-bar__search-button {
  color: var(--teal-dark);
}

/* Navigation buttons */
.tribe-events .tribe-events-c-top-bar__nav-list .tribe-common-c-btn-icon {
  color: var(--teal-dark);
}

/* View selector */
.tribe-events .tribe-events-c-view-selector__button {
  color: var(--teal-dark);
}

/* List view date headers */
.tribe-events .tribe-events-calendar-list__month-separator-text {
  font-family: 'Playfair Display', serif;
  color: var(--teal-dark);
}

/* Event detail meta */
.tribe-events .tribe-events-schedule,
.tribe-events .tribe-venue,
.tribe-events .tribe-events-calendar-list__event-datetime {
  color: var(--muted);
}

/* Buttons and links */
.tribe-events .tribe-common-c-btn-border {
  border-color: var(--teal-dark);
  color: var(--teal-dark);
}
.tribe-events .tribe-common-c-btn-border:hover {
  background-color: var(--teal-dark);
  color: #fff;
}

/* Single event page */
.tribe-events-single .tribe-events-schedule h2 {
  font-family: 'Playfair Display', serif;
  color: var(--teal-dark);
}
.tribe-events-single .tribe-events-back a {
  color: var(--teal-dark);
}
.tribe-events-single .tribe-events-back a:hover {
  color: var(--teal);
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .tribe-events .tribe-events-l-container {
    padding: 0 8px;
  }
}

/* Force month/year format in calendar top bar */
.tribe-events .tribe-events-c-top-bar__today-button {
  font-family: 'Playfair Display', serif;
}
.tribe-events .tribe-events-calendar-month__header-column-title {
  text-transform: capitalize;
}

/* ─── DONATE PAGE ────────────────────────────────────────── */
.donate-embed-wrapper {
  max-width: 640px;
  margin: 10px auto 0;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 8px;
  overflow: hidden;
}
.donate-embed-wrapper iframe {
  border-radius: calc(var(--radius) - 4px);
}
.donate-cta-card {
  max-width: 500px;
  margin: 20px auto 0;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 30px 24px;
  text-align: center;
}
.donate-cta-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--teal-dark);
  margin-bottom: 12px;
}
.donate-cta-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.donate-btn-large {
  display: inline-block;
  padding: 14px 40px;
  font-size: 1rem;
  letter-spacing: 0.05em;
}
.donate-note {
  font-size: 0.75rem !important;
  color: var(--muted) !important;
  margin-top: 14px;
  margin-bottom: 0 !important;
}

/* ─── OUR PEOPLE PAGE ───────────────────────────────────── */
.people-page { padding-bottom: 20px; }

/* Grid — mobile is always 1 col */
.person-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 10px;
}

/* Person card — same style as support-card, no button */
.person-card {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--rose);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow .2s, transform .2s, border-top-color .2s;
  padding-bottom: 20px;
}

/* Our People cards: use the same pale-teal header band as ESF cards */
.person-card--headerband {
  padding-bottom: 0;
  align-items: stretch;
  text-align: center;
  height: auto;  /* grow to fit content */
}
.person-card--headerband .fellow-card-header {
  background: var(--teal-xpale);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px 10px;
  text-align: center;
  width: 100%;
  flex-shrink: 0;
}
.person-card--headerband .fellow-card-header .person-name {
  margin: 0 0 4px;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--teal-dark);
  line-height: 1.2;
}
.person-card--headerband .fellow-card-header .person-role {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--burgundy);
}
.person-card--headerband .person-card-image {
  width: 100%;
  flex-shrink: 0;
}
/* Faculty (4-col) cards have less width — shrink the photo proportionally */
.person-grid--4 .person-card-image img {
  max-height: 160px;
}
.person-grid--4 .person-card-image:not(:has(img)) {
  max-height: 100px;
}
/* Staff (2-col) cards — slightly smaller photos */
.person-grid--2 .person-card-image img {
  max-height: 200px;
}
/* Bio text on the card, displayed under photo */
.person-card--headerband .person-bio {
  display: block;
  padding: 14px 18px 18px;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
  text-align: center;
  white-space: normal;
  overflow: visible;
}

/* Clickable variant — looks like button when hovered */
.person-card--clickable {
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.person-card--clickable:hover,
.person-card--clickable:focus-visible {
  box-shadow: 0 8px 24px rgba(0,120,111,0.18);
  transform: translateY(-3px);
  border-top-color: var(--burgundy);
  outline: none;
}
.person-card--clickable:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 2px;
}
.person-card--clickable:active {
  transform: translateY(-1px);
}
.person-card-readmore {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-dark);
  opacity: 0.55;
  transition: opacity .2s, color .2s;
}
.person-card--clickable:hover .person-card-readmore,
.person-card--clickable:focus-visible .person-card-readmore {
  opacity: 1;
  color: var(--burgundy);
}
.person-card:hover {
  box-shadow: 0 4px 18px rgba(0,120,111,0.14);
  transform: translateY(-1px);
}

/* Photo slot — sizes to the photo's natural dimensions, no cropping, no stretching */
.person-card-image {
  width: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}
.person-card-image img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
}
/* Empty slot (no photo uploaded) keeps a small placeholder strip */
.person-card-image:not(:has(img)) {
  aspect-ratio: 4 / 3;
  max-height: 130px;
}
.person-card-placeholder {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal-bright);
  opacity: 0.5;
}

/* Text */
.person-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--teal-dark);
  margin: 14px 16px 4px;
}
.person-role {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--burgundy);
  margin: 0 16px 8px;
}
.person-bio {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 16px;
}

.people-empty-msg {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  padding: 8px 4px;
}

/* Board section: full-width cards can fit a taller photo */
.person-grid--1 .person-card-image img {
  max-height: 360px;
}
.person-grid--1 .person-card-image:not(:has(img)) {
  max-height: 200px;
}

/* Desktop column counts */
@media (min-width: 768px) {
  .person-grid--1 { grid-template-columns: 1fr; }
  .person-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .person-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ─── PERSON MODAL (popup window) ────────────────────────── */
.person-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.person-modal.is-open {
  display: flex;
}
.person-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 30, 28, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: pointer;
  animation: personModalFade .18s ease-out;
}
.person-modal-window {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: var(--radius);
  border-top: 4px solid var(--rose);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  padding: 28px 26px 24px;
  animation: personModalPop .22s ease-out;
}
@keyframes personModalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes personModalPop {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.person-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--teal-dark);
  cursor: pointer;
  border-radius: 50%;
  transition: background .15s, color .15s;
  padding: 0;
}
.person-modal-close:hover,
.person-modal-close:focus-visible {
  background: var(--teal-xpale);
  color: var(--burgundy);
  outline: none;
}
.person-modal-image {
  text-align: center;
  margin: 4px 0 16px;
}
.person-modal-image img {
  max-width: 220px;
  max-height: 260px;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  display: inline-block;
}
.person-modal-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--teal-dark);
  text-align: center;
  margin: 0 0 4px;
}
.person-modal-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--burgundy);
  text-align: center;
  margin: 0 0 16px;
}
.person-modal-about {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.7;
}
.person-modal-about p { margin: 0 0 12px; }
.person-modal-about p:last-child { margin-bottom: 0; }
.person-modal-about a {
  color: var(--teal-dark);
  text-decoration: underline;
}

/* prevent body scroll when modal is open */
body.person-modal-open {
  overflow: hidden;
}

/* ─── FELLOWSHIP PAGES (Current Fellow / Past Fellows / Mentors) ─── */
.fellow-page {
  padding-bottom: 20px;
}
.fellow-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
}
.fellow-grid .fellow-card {
  width: 100%;
  max-width: 100%;
}
@media (min-width: 768px) {
  .fellow-grid .fellow-card {
    max-width: 50%;   /* half the screen on desktop */
  }
}
/* Single (current fellow): same half-width, just one card */
.fellow-page--single .fellow-grid {
  margin-top: 8px;
}

/* Horizontal variant — name+year on top centered, photo+bio side-by-side below */
.fellow-card--horizontal {
  padding-bottom: 0 !important;
  overflow: hidden;
}

/* Header band: name + year, centered, prominent */
.fellow-card-header {
  width: 100%;
  padding: 18px 20px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--teal-xpale);
}
.fellow-card-header .person-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1.15;
  margin: 0 0 4px;
}
.fellow-card-header .person-role {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--burgundy);
  margin: 0;
}

/* Body row: photo + bio (column on mobile, row on desktop) */
.fellow-card-body {
  display: flex;
  flex-direction: column;
  width: 100%;
}

@media (min-width: 640px) {
  .fellow-card-body {
    flex-direction: row;
    align-items: stretch;
  }
  .fellow-card--horizontal .person-card-image {
    width: 42%;
    flex-shrink: 0;
    align-self: stretch;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
  }
  .fellow-card--horizontal .person-card-image img {
    width: 100%;
    height: 100%;
    max-height: 380px;
    object-fit: cover;
  }
  .fellow-card--horizontal .person-card-image:not(:has(img)) {
    aspect-ratio: auto;
    max-height: none;
    min-height: 220px;
  }
  .fellow-card--horizontal .person-card-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px 22px 24px;
    text-align: left;
  }
  .fellow-card--horizontal .person-bio {
    margin: 0;
  }
}

/* Mobile: photo + bio stack vertically below header */
.fellow-card--horizontal .person-card-text {
  width: 100%;
  padding: 16px 18px 20px;
  text-align: center;
}

/* Read more label inside fellowship card body */
.fellow-card--horizontal .person-card-readmore {
  margin-top: 14px;
  display: inline-block;
  align-self: center;
}


/* ─── ESF APPLICATION PAGE ─────────────────────────────── */
.esf-app-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 32px;
}
@media (min-width: 768px) {
  .esf-app-page { padding-top: 56px; }
}

/* Status banner */
.esf-app-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.4;
  border-left: 5px solid;
}
.esf-app-banner-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.esf-app-banner-text { flex: 1; }

/* Open state — teal/green */
.esf-app-banner--open {
  background: var(--teal-xpale);
  border-left-color: var(--teal-bright);
  color: var(--teal-dark);
}
/* Closed state — burgundy/rose */
.esf-app-banner--closed {
  background: #fbe9e7;
  border-left-color: var(--burgundy);
  color: var(--burgundy);
}

/* Intro paragraph */
.esf-app-intro {
  margin-bottom: 24px;
}
.esf-app-intro p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 12px;
}
.esf-app-intro p:last-child { margin-bottom: 0; }

/* Sections + lists */
.esf-app-section {
  margin-bottom: 28px;
}
.esf-app-list {
  list-style: disc;
  padding-left: 22px;
  margin: 8px 0 0;
}
.esf-app-list li {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 10px;
}
.esf-app-list li:last-child { margin-bottom: 0; }
.esf-app-list a {
  color: var(--teal-dark);
  text-decoration: underline;
}

/* Submit section — highlighted */
.esf-app-submit {
  background: var(--teal-xpale);
  border-radius: var(--radius);
  padding: 18px 22px;
  border-left: 4px solid var(--teal-bright);
}
.esf-app-submit .esf-section-title {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 8px;
}
.esf-app-submit-text p {
  margin: 0;
  line-height: 1.65;
}
.esf-app-submit-text a {
  color: var(--teal-dark);
  text-decoration: underline;
  font-weight: 600;
}

/* Contact line */
.esf-app-contact {
  margin: 24px 0 8px;
  font-size: 0.95rem;
  color: var(--text);
  text-align: center;
}
.esf-app-contact p { margin: 0; }
.esf-app-contact a {
  color: var(--teal-dark);
  text-decoration: underline;
  font-weight: 600;
}


/* ─── ELUL LECTURE PAGE ────────────────────────────────── */
.elul-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 0 32px;
}
.elul-intro {
  margin-bottom: 24px;
}
.elul-intro p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 14px;
}
.elul-intro p:last-child { margin-bottom: 0; }

.elul-sponsor,
.elul-history,
.elul-past {
  margin-bottom: 32px;
}
.elul-sponsor-body p,
.elul-history-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 14px;
}
.elul-sponsor-body p:last-child,
.elul-history-body p:last-child { margin-bottom: 0; }
.elul-sponsor-body a,
.elul-history-body a,
.elul-playlist a,
.elul-past-sponsor a {
  color: var(--teal-dark);
  text-decoration: underline;
  font-weight: 600;
}

/* Sponsorship box stands out */
.elul-sponsor {
  background: var(--teal-pale);
  border-radius: var(--radius);
  border-left: 4px solid var(--teal-dark);
  padding: 20px 24px;
}
.elul-sponsor .esf-section-title {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 10px;
  text-align: left;
  color: var(--teal-dark);
}
.elul-sponsor .elul-sponsor-body p {
  color: var(--text);
}

/* Past lectures list */
.elul-playlist {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 18px;
  font-style: italic;
}
.elul-past-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.elul-past-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.elul-past-item:first-child { padding-top: 4px; }
.elul-past-item:last-child { border-bottom: none; padding-bottom: 4px; }
.elul-past-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.elul-past-year {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--burgundy);
  flex-shrink: 0;
}
.elul-past-speaker {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--teal-dark);
  font-weight: 600;
}
.elul-past-sponsor {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  font-style: italic;
  margin: 0;
  padding-left: 0;
}

.elul-extra { margin: 28px 0 8px; }

/* Editable Register box */
.elul-history-intro {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.elul-register {
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--rose);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  margin: 24px 0 32px;
}
.elul-register-intro {
  margin: 0 auto 14px;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  max-width: 480px;
}
.elul-register a {
  color: var(--teal-dark);
}


/* ─── ESF ABOUT PAGE ───────────────────────────────────── */
.esf-about-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 32px;
}
@media (min-width: 768px) {
  .esf-about-page { padding-top: 56px; }
}
.esf-section {
  margin-bottom: 28px;
}
.esf-section:last-of-type {
  margin-bottom: 12px;
}
.esf-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.esf-section-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 14px;
}
.esf-section-body p:last-child { margin-bottom: 0; }
.esf-section-body a {
  color: var(--teal-dark);
  text-decoration: underline;
}
.esf-section-body strong { color: var(--teal-dark); }

/* Apply button */
.esf-apply {
  text-align: center;
  margin: 36px 0 8px;
}
.esf-apply-btn {
  display: inline-block;
  background: var(--teal-dark);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 14px 36px;
  border-radius: var(--radius);
  text-decoration: none !important;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.esf-apply-btn:hover,
.esf-apply-btn:focus-visible {
  background: var(--burgundy);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  outline: none;
}

.esf-extra { margin: 28px 0 8px; }

/* Testimonials grid on ESF About page (reuses .bmp-testimonial card styles) */
.esf-testimonials { margin: 36px 0 16px; }
.esf-testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 768px) {
  .esf-testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ─── FLEXIBLE PAGE TEMPLATE ───────────────────────────── */
.flex-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 8px 0 32px;
}
.flex-body {
  margin-bottom: 28px;
}
.flex-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 16px;
}
.flex-body p:last-child { margin-bottom: 0; }
.flex-body a {
  color: var(--teal-dark);
  text-decoration: underline;
}
.flex-body h2, .flex-body h3 {
  font-family: 'Playfair Display', serif;
  color: var(--teal-dark);
  margin: 24px 0 10px;
}

.flex-section {
  margin: 32px 0;
}
.flex-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--teal-dark);
  text-align: center;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Card grid — columns by count */
.flex-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .flex-card-grid--2col { grid-template-columns: repeat(2, 1fr); }
  .flex-card-grid--3col { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .flex-card-grid--3col { grid-template-columns: repeat(3, 1fr); }
}

/* Flexible card */
.flex-card {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--rose);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.flex-card:hover {
  box-shadow: 0 4px 18px rgba(0,120,111,0.14);
  transform: translateY(-1px);
}
.flex-card-image {
  width: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.flex-card-image img {
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  display: block;
}
.flex-card-body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.flex-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--teal-dark);
  margin: 0 0 8px;
}
.flex-card-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 14px;
  flex: 1;
}
.flex-card-btn {
  align-self: flex-start;
  margin-top: auto;
}

/* Bottom CTA */
.flex-cta {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--rose);
  border-radius: var(--radius);
  padding: 26px 22px 24px;
  text-align: center;
  margin: 32px 0;
}
.flex-cta-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--teal-dark);
  margin: 0 0 12px;
}
.flex-cta-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 18px;
}

/* Register shortcode button — uses btn classes */
.maayan-register-btn {
  margin-top: 6px;
}

/* Single Article photos */
.sa-photos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 24px 0;
}
@media (min-width: 640px) {
  .sa-photos--2 { grid-template-columns: repeat(2, 1fr); }
  .sa-photos--3 { grid-template-columns: repeat(3, 1fr); }
  .sa-photos--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .sa-photos--4 { grid-template-columns: repeat(4, 1fr); }
}
.sa-photo {
  margin: 0;
  text-align: center;
}
.sa-photo img {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}
.sa-photo figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 6px;
}


/* ─── BAT MITZVAH PROGRAM PAGE ─────────────────────────── */
.bmp-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 0 32px;
}

/* Hero quote — smaller variant of story-quote */
.bmp-hero-quote {
  margin-top: 8px;
  margin-bottom: 28px;
  padding: 16px 22px 14px;
}
.bmp-hero-quote p {
  font-size: 1.1rem !important;
  line-height: 1.45 !important;
}
@media (min-width: 768px) {
  .bmp-hero-quote p {
    font-size: 1.25rem !important;
  }
}

/* Intro paragraph block */
.bmp-intro {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal-bright);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 32px;
}
.bmp-intro p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin: 0;
}

/* About section */
.bmp-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  color: var(--teal-dark);
  text-align: center;
  margin: 0 0 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.bmp-about { margin-bottom: 32px; }

/* About section paragraphs + floated photos */
.bmp-about-block {
  margin-bottom: 28px;
}
.bmp-about-block:last-child { margin-bottom: 0; }
.bmp-about-para {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin: 0;
}

/* Inline photos */
.bmp-photo {
  margin: 0;
  text-align: center;
}
.bmp-photo img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}
.bmp-photo figcaption {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 6px;
  text-align: center;
  line-height: 1.4;
}

/* Desktop: flex layout — text vertically centered alongside photo */
@media (min-width: 640px) {
  .bmp-about-block {
    display: flex;
    align-items: center;  /* vertically center text against photo height */
    gap: 24px;
  }
  /* Right-sided photo: text first, photo right */
  .bmp-about-block:has(.bmp-photo--right) {
    flex-direction: row;
  }
  .bmp-about-block:has(.bmp-photo--right) .bmp-photo {
    order: 2;
  }
  /* Left-sided photo: photo left, text right */
  .bmp-about-block:has(.bmp-photo--left) {
    flex-direction: row;
  }
  .bmp-about-block:has(.bmp-photo--left) .bmp-photo {
    order: 0;
  }
  .bmp-photo--right,
  .bmp-photo--left {
    flex: 0 0 38%;
  }
  .bmp-photo--full {
    margin: 24px auto;
    max-width: 70%;
  }
}

/* Mobile: photo on top, text below — stack vertically */
@media (max-width: 639px) {
  .bmp-about-block {
    display: block;
  }
  .bmp-photo--right,
  .bmp-photo--left,
  .bmp-photo--full {
    margin: 0 auto 14px;
    max-width: 100%;
  }
  .bmp-photo img {
    max-height: 220px;
  }
}

/* Credibility stats */
.bmp-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 32px 0;
  padding: 22px 16px;
  background: var(--teal-xpale);
  border-radius: var(--radius);
  border-top: 3px solid var(--rose);
}
@media (min-width: 640px) {
  .bmp-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
.bmp-stat { text-align: center; padding: 4px 8px; }
.bmp-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1.15;
  margin-bottom: 4px;
}
.bmp-stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Register CTA */
.bmp-register {
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--rose);
  border-radius: var(--radius);
  padding: 28px 22px 26px;
  margin: 32px 0;
}
.bmp-register .bmp-section-title { margin-bottom: 14px; }
.bmp-register-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0 auto 18px;
  max-width: 480px;
}
.bmp-register-btn {
  display: inline-block;
  background: var(--teal-dark);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 14px 36px;
  border-radius: var(--radius);
  text-decoration: none !important;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.bmp-register-btn:hover,
.bmp-register-btn:focus-visible {
  background: var(--burgundy);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  outline: none;
}
.bmp-scholarship {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 16px 0 0;
}
.bmp-scholarship a {
  color: var(--teal-dark);
  text-decoration: underline;
}

/* Testimonials */
.bmp-testimonials { margin: 36px 0 16px; }
.bmp-testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 768px) {
  .bmp-testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}
.bmp-testimonial {
  background: var(--teal-xpale);
  border-radius: var(--radius);
  border-left: 4px solid var(--rose);
  padding: 22px 24px 20px;
  margin: 0;
  position: relative;
}
.bmp-testimonial p {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--teal-dark);
  margin: 0 0 10px;
}
.bmp-testimonial cite {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.bmp-extra { margin: 28px 0 8px; }


/* ─── OUR STORY PAGE ────────────────────────────────────── */
.story-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 0 32px;
}

/* Opening pull-quote */
.story-quote {
  margin: 8px 0 32px;
  padding: 22px 24px 18px;
  border-top: 1px solid var(--rose);
  border-bottom: 1px solid var(--rose);
  text-align: center;
}
.story-quote p {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.45;
  color: var(--teal-dark);
  margin: 0 0 10px;
}
.story-quote cite {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--burgundy);
}
@media (min-width: 768px) {
  .story-quote { padding: 28px 36px 22px; }
  .story-quote p { font-size: 1.7rem; }
}

/* Body */
.story-body {
  margin-bottom: 32px;
}
.story-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 18px;
}
.story-body p:last-child { margin-bottom: 0; }
.story-body a {
  color: var(--teal-dark);
  text-decoration: underline;
}

/* Stat callouts */
.story-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 28px 0 32px;
  padding: 22px 16px;
  background: var(--teal-xpale);
  border-radius: var(--radius);
  border-top: 3px solid var(--rose);
}
@media (min-width: 640px) {
  .story-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}
.story-stat {
  text-align: center;
  padding: 4px 8px;
}
.story-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1.1;
  margin-bottom: 4px;
}
.story-stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.story-extra { margin: 24px 0; }

/* Videos */
.story-videos-section { margin-top: 36px; }
.story-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--teal-dark);
  text-align: center;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.story-videos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 768px) {
  .story-videos { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
.story-videos--single {
  grid-template-columns: 1fr !important;
  max-width: 640px;
  margin: 0 auto;
}
.story-video { display: flex; flex-direction: column; }
.story-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.story-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.story-video-title {
  text-align: center;
  margin-top: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--teal-dark);
}


.support-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}
.support-card {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--rose);
  border-radius: var(--radius);
  padding: 0 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow .2s, transform .2s;
  overflow: hidden;
}
.support-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.support-card-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.support-card > h3,
.support-card > p,
.support-card > .btn {
  padding-left: 20px;
  padding-right: 20px;
}
.support-card > h3 { padding-top: 20px; }
.support-card:hover {
  box-shadow: 0 4px 18px rgba(0,120,111,0.14);
  transform: translateY(-1px);
}
.support-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--teal-dark);
  margin-bottom: 8px;
}
.support-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}
.support-card .btn {
  align-self: center;
}

.support-bottom-cta {
  margin-top: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--rose);
  border-radius: var(--radius);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
  transition: box-shadow .2s;
}
.support-bottom-cta:hover { box-shadow: 0 4px 18px rgba(0,120,111,0.14); }
.support-bottom-cta .support-bottom-text { flex: 1; }
.support-bottom-cta h3 {
  font-family: 'Playfair Display', serif;
  color: var(--teal-dark);
  font-size: 1.3rem;
  margin-bottom: 6px;
}
.support-bottom-cta p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .support-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ─── PAGE-SPECIFIC SECTION TITLE COLORS ──────────────── */
/* Our People page: teal section titles */
.people-page .section-title {
  color: #00786f;
  border-left-color: #00786f;
}
/* All Classes (programs) page: teal section title — distinct from homepage's burgundy */
.content-section--warm.programs-page .section-title {
  color: #00786f;
  border-left-color: #00786f;
}

/* ─── Footer "Join Our Mailing List" button + modal ─── */
.footer-mailing-list {
  margin-top: 14px;
}
.footer-mailing-btn {
  cursor: pointer;
  border: none;
  font: inherit;
}

.mailing-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 32, 30, 0.6);
}
.mailing-modal-overlay[hidden] { display: none; }

.mailing-modal {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 80vh;
  max-height: 720px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.mailing-modal .cv-jmml-widget-wrap,
.mailing-modal .cv-jmml-widget-wrap iframe {
  width: 100%;
  height: 100%;
}
.mailing-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--teal-dark);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mailing-modal-close:hover,
.mailing-modal-close:focus-visible {
  background: var(--teal);
}


/* ─── Footer social icons (Instagram, YouTube) ─── */
.footer-social {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
}
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.78);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  text-decoration: none;
  transition: color .2s, background .2s, transform .2s;
}
.footer-social-link:hover,
.footer-social-link:focus-visible {
  color: #fff;
  background: rgba(255,255,255,0.10);
  transform: translateY(-1px);
}
.footer-social-link svg { display: block; }

/* ─── Stay Connected box buttons (1–3 conditional buttons) ─── */
.stay-connected-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}
.stay-connected-buttons .sc-btn {
  flex: 1 1 200px;
  max-width: 280px;
  text-align: center;
  cursor: pointer;
  border: none;
  font: inherit;
}
/* On wider screens, three buttons sit comfortably on one row */
@media (min-width: 600px) {
  .stay-connected[data-buttons="3"] .sc-btn { flex-basis: 180px; }
}

/* Remove the unused footer social CSS that was added in v73 */
.footer-social { display: none; }

/* ─────────────────────────────────────────
   CUSTOM BLOCK STYLES (Stage 1)
   Output classes used by the Maayan Gutenberg blocks. Reuses existing
   theme components where possible.
───────────────────────────────────────── */

/* Spotlight Card Grid (block output) — responsive card row */
.maayan-block-spotlight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 20px 0;
}
@media (min-width: 600px) {
  .maayan-block-spotlight-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}
.maayan-block-spotlight-grid .maayan-card {
  margin-bottom: 0; /* container handles spacing via grid gap */
}
.maayan-card--clickable {
  cursor: pointer;
}
.maayan-card__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--burgundy);
  background: rgba(151,45,44,0.08);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.maayan-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--teal-dark);
  margin: 0 0 8px;
  line-height: 1.3;
}
.maayan-card__title a {
  color: inherit;
  text-decoration: none;
}
.maayan-card__title a:hover { color: var(--teal); }
.maayan-card__desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* Photo + Text block — two-column on desktop, stack on mobile */
.maayan-block-photo-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 24px 0;
}
.maayan-block-photo-text__media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.maayan-block-photo-text__content h3 {
  font-family: 'Playfair Display', serif;
  color: var(--teal-dark);
  font-size: 1.25rem;
  margin: 0 0 10px;
  line-height: 1.25;
}
.maayan-block-photo-text__body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}
.maayan-block-photo-text__body p { margin: 0 0 12px; }
.maayan-block-photo-text__body p:last-child { margin-bottom: 0; }
.maayan-block-photo-text .btn { margin-top: 12px; }
@media (min-width: 768px) {
  .maayan-block-photo-text {
    flex-direction: row;
    align-items: center;
    gap: 32px;
  }
  .maayan-block-photo-text--right { flex-direction: row-reverse; }
  .maayan-block-photo-text__media,
  .maayan-block-photo-text__content { flex: 1; min-width: 0; }
}

/* Stat Trio block — uses existing .story-stats / .story-stat styling */
.maayan-block-stat-trio {
  margin: 24px 0;
}

/* ─── Image block (size + alignment) ─── */
.maayan-block-image {
  margin: 24px 0;
}
.maayan-block-image img {
  height: auto;
  display: block;
  border-radius: var(--radius);
}
.maayan-block-image--size-small  img { max-width: 200px; width: 100%; }
.maayan-block-image--size-medium img { max-width: 400px; width: 100%; }
.maayan-block-image--size-large  img { max-width: 600px; width: 100%; }
.maayan-block-image--size-full   img { max-width: 100%; width: 100%; }
.maayan-block-image--align-left  { text-align: left; }
.maayan-block-image--align-left img { margin-right: auto; }
.maayan-block-image--align-center { text-align: center; }
.maayan-block-image--align-center img { margin-left: auto; margin-right: auto; }
.maayan-block-image--align-right { text-align: right; }
.maayan-block-image--align-right img { margin-left: auto; }
.maayan-block-image figcaption {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}

/* ─── Photo + Text image sizing ─── */
@media (min-width: 768px) {
  .maayan-block-photo-text--size-small  .maayan-block-photo-text__media { flex: 0 0 25%; }
  .maayan-block-photo-text--size-medium .maayan-block-photo-text__media { flex: 0 0 40%; }
  .maayan-block-photo-text--size-large  .maayan-block-photo-text__media { flex: 0 0 55%; }
  .maayan-block-photo-text--size-full   .maayan-block-photo-text__media { flex: 0 0 70%; }
  .maayan-block-photo-text--size-small  .maayan-block-photo-text__content,
  .maayan-block-photo-text--size-medium .maayan-block-photo-text__content,
  .maayan-block-photo-text--size-large  .maayan-block-photo-text__content,
  .maayan-block-photo-text--size-full   .maayan-block-photo-text__content { flex: 1; min-width: 0; }
}

/* ─── Body Text block ─── */
.maayan-block-body-text {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  margin: 16px 0;
}
.maayan-block-body-text p { margin: 0 0 14px; }
.maayan-block-body-text p:last-child { margin-bottom: 0; }
.maayan-block-body-text a { color: var(--teal-dark); }
.maayan-block-body-text a:hover { color: var(--teal); }

/* ─── Hero block (when used in page body) ─── */
.maayan-block-hero {
  margin-bottom: 24px;
}
.maayan-block-hero.page-hero:not(.page-hero--has-bg) {
  /* No-image hero falls back to standard teal-gradient banner styling */
  padding: 30px 16px;
  min-height: auto;
}

/* ─────────────────────────────────────────
   Page editor content moved to bottom of slug-based templates.
   Hybrid layout: small horizontal padding on mobile (so text doesn't
   touch viewport edges) plus max-width centering on desktop (so content
   reads as a focused column, matching BMP / ESF About / Our Story).
───────────────────────────────────────── */
.page-editor-content,
.story-editor-content,
.esf-editor-content,
.esf-app-editor-content,
.elul-editor-content,
.bmp-editor-content {
  max-width: 760px;
  margin: 12px auto 0;
  padding: 20px 16px;
}
@media (min-width: 768px) {
  .page-editor-content,
  .story-editor-content,
  .esf-editor-content,
  .esf-app-editor-content,
  .elul-editor-content,
  .bmp-editor-content {
    padding: 20px 24px;
  }
}

/* Hero Banner blocks should be full-bleed (no padding) even when inside
   a padded editor-content wrapper — they look better edge-to-edge. */
.page-editor-content > .maayan-block-hero,
.story-editor-content > .maayan-block-hero,
.esf-editor-content > .maayan-block-hero,
.esf-app-editor-content > .maayan-block-hero,
.elul-editor-content > .maayan-block-hero,
.bmp-editor-content > .maayan-block-hero,
.entry-content > .maayan-block-hero {
  margin-left: -16px;
  margin-right: -16px;
}
@media (min-width: 768px) {
  .page-editor-content > .maayan-block-hero,
  .story-editor-content > .maayan-block-hero,
  .esf-editor-content > .maayan-block-hero,
  .esf-app-editor-content > .maayan-block-hero,
  .elul-editor-content > .maayan-block-hero,
  .bmp-editor-content > .maayan-block-hero,
  .entry-content > .maayan-block-hero {
    margin-left: -24px;
    margin-right: -24px;
  }
}

/* Current Fellow optional bottom sections — match ESF About section styling */
.current-fellow-bottom-section {
  margin: 32px 0 0;
  padding: 0 16px;
}
.current-fellow-bottom-section + .current-fellow-bottom-section {
  margin-top: 24px;
}

/* Small site-builder credit appended to the copyright line — subtle, very low-contrast. */
.footer-site-credit {
  font-size: inherit;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
}
.footer-site-credit a {
  color: inherit;
  text-decoration: none;
  border-bottom: none;
}
.footer-site-credit a:hover,
.footer-site-credit a:focus {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
}
