/* ---------------------------------------------------------------
   CHYTA — Classical Hatha Yoga Teachers Association
   Brand: Navy #202b6d / Gold #ffc400 / Off-white #f7f5f0
   Typeface: Fields (Display for headings, regular for body)
--------------------------------------------------------------- */

@font-face {
  font-family: "Fields Display";
  src: url("../assets/fonts/fonnts.com-Fields-Display-.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Fields Display";
  src: url("../assets/fonts/fonnts.com-Fields-Display-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Fields Display";
  src: url("../assets/fonts/fonnts.com-Fields-Display-Semi-Bold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Fields Display";
  src: url("../assets/fonts/fonnts.com-Fields-Display-Extra-Bold.otf") format("opentype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Fields Display";
  src: url("../assets/fonts/fonnts.com-Fields-Display-Black.otf") format("opentype");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "Fields";
  src: url("../assets/fonts/fonnts.com-Fields-Light.otf") format("opentype");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Fields";
  src: url("../assets/fonts/fonnts.com-Fields-.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Fields";
  src: url("../assets/fonts/fonnts.com-Fields-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Fields";
  src: url("../assets/fonts/fonnts.com-Fields-Semi-Bold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --navy: #202b6d;
  --navy-dark: #161c4a;
  --gold: #ffc400;
  --gold-dark: #e0aa00;
  --off-white: #f3f2f7;
  --orange: #fa8800;
  --strong-blue: #2f4acc;
  --turquoise: #b5e3de;
  --paper: #fffdf9;
  --ink: #23252b;
  --ink-soft: #565a68;
  --line: #e4e1d8;
  --radius: 14px;
  --wrap: 1180px;
  --shadow: 0 12px 30px -14px rgba(32, 43, 109, 0.25);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Fields", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--off-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fields Display", "Fields", sans-serif;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold-dark); }

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

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

.section { padding: 56px 0; }
.section-intro { color: var(--ink-soft); margin-top: -8px; margin-bottom: 32px; max-width: 640px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin: 0 0 0.7em;
}

.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--navy);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color .15s ease;
}
.btn:hover { background: var(--navy-dark); color: #fff; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  margin-left: 10px;
}
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy-dark); }
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--navy-dark); }

/* ---------------- Header / Nav ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.brand-mark { width: 68px; height: auto; }
.brand-name {
  font-family: "Fields Display", sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.header-social {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e1306c;
}
.header-social:hover { color: #f77737; }

.main-nav > ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.main-nav > ul > li > a {
  display: block;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--off-white);
  border-radius: 8px;
  white-space: nowrap;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
  background: rgba(255,255,255,0.1);
  color: var(--gold);
}

.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--navy-dark);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  margin: 0;
  list-style: none;
  display: none;
  flex-direction: column;
  z-index: 50;
}
.has-dropdown.open > .dropdown {
  display: flex;
}
.dropdown li a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--off-white);
  font-weight: 500;
}
.dropdown li a:hover { background: rgba(255,255,255,0.08); color: var(--gold); }

.has-flyout { position: relative; }
.flyout {
  position: absolute;
  top: -8px;
  left: 100%;
  min-width: 240px;
  background: var(--navy-dark);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  margin: 0;
  list-style: none;
  display: none;
  flex-direction: column;
}
.has-flyout.open > .flyout { display: flex; }
.flyout li a { display: block; padding: 9px 14px; border-radius: 8px; font-size: 0.9rem; color: var(--off-white); }
.flyout li a:hover { background: rgba(255,255,255,0.08); color: var(--gold); }

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

/* ---------------- Hero ---------------- */

.hero { padding: 64px 0 40px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: center;
}
.hero-copy .lede { font-size: 1.1rem; max-width: 560px; }
.hero-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .btn-outline { margin-left: 0; }
.hero-mark { display: flex; justify-content: center; }
.hero-mark img { width: 240px; }

.hero-photo {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: flex-start;
  background-size: cover;
  background-position: 50% 75%;
  background-color: var(--navy);
}
.hero-photo.scrim::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(18, 23, 63, 0.82) 0%,
    rgba(18, 23, 63, 0.62) 45%,
    rgba(18, 23, 63, 0.25) 100%);
}
.hero-photo-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 40px 0 56px;
}
.hero-photo-overlay h1 {
  color: #f9f9f9;
  max-width: 900px;
  line-height: 1.3;
  font-size: clamp(1.6rem, 3.3vw, 3rem);
}
@media (min-width: 700px) {
  .hero-photo-overlay h1 { white-space: nowrap; }
}
.hero-photo-overlay h1 mark {
  background-color: var(--gold);
  color: var(--navy-dark);
  padding: 0 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero-photo-overlay .lede { color: #f9f9f9; font-size: 1.05rem; max-width: 560px; }
.hero-cta-box {
  background: var(--off-white);
  border-radius: 8px;
  padding: 18px 22px;
  max-width: 520px;
  margin: 8px 0 20px;
}
.hero-cta-label {
  color: var(--navy);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0 0 12px;
}
.hero-signup { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-signup input {
  flex: 1;
  min-width: 180px;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 0.95rem;
}
.home-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding-top: 76px;
}
.home-actions .btn { padding: 15px 30px; font-size: 1rem; }
.home-actions .btn-outline { margin-left: 0; }

.page-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: 64px 0;
  color: #fff;
}
.page-hero .eyebrow { color: var(--gold); }
.page-hero h1 { color: #fff; }
.page-hero .lede { color: #d9dcf2; font-size: 1.08rem; max-width: 680px; margin: 0; }
.program-hero { padding: 52px 0; }

.feature-photo {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: top;
}
@media (min-width: 640px) {
  .feature-photo { max-height: 500px; }
}
.program-photo {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 40px auto 24px;
  border-radius: var(--radius);
}
.logo-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 800px;
  margin: 0 auto 24px;
}
.logo-strip img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.inline-photo {
  width: 100%;
  border-radius: var(--radius);
  margin: 12px 0 20px;
}
.photo-band-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}
.band-photo {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
}
.pull-quote {
  margin: 20px 0 0;
  padding: 18px 22px;
  border-left: 4px solid var(--gold);
  background: var(--paper);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  font-size: 1.08rem;
  color: var(--navy);
}
.pull-quote cite { display: block; margin-top: 8px; font-style: normal; font-weight: 600; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------------- Program cards ---------------- */

.program-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.program-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color .15s ease;
}
.program-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--gold);
}
.program-card h3 { margin-bottom: 2px; }
.program-card p { font-size: 0.92rem; margin-bottom: 4px; flex-grow: 1; }
.card-link { font-weight: 700; font-size: 0.85rem; color: var(--gold-dark); display: inline-block; transition: transform 0.2s ease; }
.program-card:hover .card-link,
.offering-card:hover .card-link { transform: translateX(4px); }

.program-card.program-card-photo { padding: 0; overflow: hidden; }
.program-card-media { height: 150px; overflow: hidden; }
.program-card-media { background: var(--off-white); }
.program-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; background: var(--off-white); display: block; transition: transform 0.4s ease; }
/* Face sits near the top of this photo — a centred crop cuts it off. */
.program-card-media img[src*="surya-kriya-practice"] { object-position: center 12%; }
.program-card.program-card-photo:hover .program-card-media img { transform: scale(1.08); }
.program-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
button.chip {
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
button.chip:hover { transform: translateY(-2px); }
button.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
button.chip.active:hover { color: #fff; }
.program-card[hidden] { display: none; }
.program-card.card-pop { animation: card-pop 0.35s ease; }
@keyframes card-pop {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.center-link { text-align: center; margin-top: 28px; }

/* ---------------- Band / CTA ---------------- */

.band { background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); }
.band-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 8px;
}

.cta-section {
  text-align: center;
  background: var(--navy);
  border-radius: var(--radius);
  color: #fff;
  padding: 48px 24px;
}
.cta-section h2 { color: #fff; }
.cta-section p { color: #d9dcf2; }
.cta-section .btn-outline { color: #fff; border-color: #fff; }
.cta-section .btn-outline:hover { background: #fff; color: var(--navy); }
.cta-section .btn { background: var(--gold); border-color: var(--gold); color: var(--navy-dark); }
.cta-section .btn:hover { background: var(--gold-dark); border-color: var(--gold-dark); }

/* ---------------- Program page body ---------------- */

.program-body p { font-size: 1.02rem; }
.note {
  background: #fff1e0;
  border: 1px solid var(--orange);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.92rem;
  color: var(--navy-dark);
}
.benefits-box, .reading-box, .quote-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 24px 0;
}
.benefits-list { margin: 0; padding-left: 20px; }
.benefits-list li { margin-bottom: 8px; color: var(--ink); }
.quote-box { border-left: 4px solid var(--gold); }
.quote-box p { font-style: italic; color: var(--ink); margin: 0; }
.reading-box ul { list-style: none; margin: 0; padding: 0; }
.reading-box li { margin-bottom: 8px; }
.reading-box a { font-weight: 600; }

.related-section h3 { margin-bottom: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}
.chip:hover { border-color: var(--gold); color: var(--navy); }

/* ---------------- Values list ---------------- */

.values-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.values-list li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.92rem;
}

/* ---------------- Event type / sub-card grids ---------------- */

.event-type-grid, .sub-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.sub-card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.event-type-card, .sub-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.event-type-card h4, .sub-card h4 { margin-bottom: 6px; font-size: 1rem; color: var(--navy); }
.event-type-card p, .sub-card p { margin: 0; font-size: 0.9rem; }
.extra-section {
  margin: 28px 0;
  padding-top: 8px;
}
.extra-section h3 { margin-bottom: 6px; }

.event-thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.event-thumb-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
}

/* ---------------- Homepage: stats, personas, offerings, FAQ ---------------- */

.stats-card {
  padding: 36px 24px;
  background: var(--navy);
  border-radius: 16px;
  box-shadow: var(--shadow);
  position: relative;
}
.stats-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
}
.stats-band > div:not(:first-child) { border-left: 1px solid rgba(255,255,255,0.18); }

.hop-logo {
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  cursor: pointer;
  animation: hop-between-buttons 3.4s ease-in-out infinite alternate;
}
.hop-logo:hover { animation-play-state: paused; }
@keyframes hop-between-buttons {
  0%    { left: 0;                  transform: translateY(0); }
  25%   { left: calc(25% - 14px);   transform: translateY(-14px); }
  50%   { left: calc(50% - 28px);   transform: translateY(0); }
  75%   { left: calc(75% - 42px);   transform: translateY(-14px); }
  100%  { left: calc(100% - 56px); transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hop-logo { animation: none; left: calc(50% - 28px); }
}
.stat-num {
  display: block;
  font-family: "Fields Display", sans-serif;
  font-weight: 800;
  font-size: 2.6rem;
  color: #f9f9f9;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label { font-size: 0.92rem; color: #d9dcf2; font-weight: 700; }

.offering-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.offering-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color .15s ease;
}
.offering-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--gold); }
.offering-card img { width: 100%; height: 170px; object-fit: cover; transition: transform 0.4s ease; }
.offering-card:hover img { transform: scale(1.06); }
.offering-body { padding: 18px 20px; }
.offering-body h3 { margin-bottom: 6px; }
.offering-body p { font-size: 0.92rem; margin-bottom: 8px; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 20px;
}
.faq-item summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  color: var(--navy);
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 14px;
  font-size: 1.2rem;
  color: var(--gold-dark);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding-bottom: 16px; margin: 0; }

/* ---------------- Academic Research ---------------- */

.study-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.study-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.study-source {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--strong-blue);
  margin: 0 0 6px;
}
.study-card h3 { font-size: 1rem; margin-bottom: 10px; }
.study-card a { font-weight: 600; font-size: 0.9rem; }

/* ---------------- Classical Hatha Yoga page ---------------- */

.chy-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.chy-toc { position: sticky; top: 96px; }
.chy-toc h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.chy-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.chy-toc a { font-size: 0.9rem; color: var(--ink-soft); display: block; padding: 6px 0; }
.chy-toc a:hover { color: var(--navy); }
.chy-section {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 96px;
}
.chy-section:last-child { border-bottom: none; }
.chy-section p { font-size: 1.02rem; }

/* ---------------- Forms ---------------- */

.finder-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.finder-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
}
.finder-form input, .finder-form select, .finder-form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.finder-form input:focus, .finder-form select:focus, .finder-form textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.finder-filter-group { display: flex; flex-direction: column; gap: 8px; }

.teacher-search-wrap { max-width: 420px; margin: 0 auto 30px; }
.teacher-search-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-bottom: 6px;
  text-align: center;
}
.teacher-search {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.teacher-search:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.finder-filter-label { font-weight: 600; font-size: 0.92rem; color: var(--navy); }

/* location autocomplete dropdown */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 2px);
  margin: 0; padding: 4px; list-style: none; background: #fff;
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 33, 61, .12);
  max-height: 260px; overflow-y: auto;
}
.ac-opt { padding: 8px 10px; border-radius: 6px; font-size: .92rem; cursor: pointer; line-height: 1.35; }
.ac-opt.is-active, .ac-opt:hover { background: #eef0f4; }
.ac-opt .ac-main { display: block; color: var(--ink); }
.ac-opt .ac-sec { display: block; color: var(--ink-soft); font-size: .82rem; }
.finder-form .btn { align-self: flex-start; }
.finder-form .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; }
.form-note.ok { color: #227a4a; font-weight: 600; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------- Program Finder results ---------------- */

.finder-results { margin-top: 32px; }
.finder-results-status { color: var(--ink-soft); }
.finder-results-count { font-weight: 700; color: var(--navy); margin: 0 0 16px; }
.finder-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.event-result-card .program-card-body { gap: 5px; }
.event-result-meta { font-size: 0.86rem; color: var(--ink-soft); margin: 0; }
.event-result-meta strong { color: var(--navy); }
.event-result-card .btn { margin-top: 8px; align-self: flex-start; padding: 9px 18px; font-size: 0.85rem; }

.home-upcoming-marquee { overflow: hidden; }
.home-upcoming-marquee .marquee-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: home-upcoming-scroll var(--marquee-duration, 24s) linear infinite;
}
.home-upcoming-marquee:hover .marquee-track,
.home-upcoming-marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-card { flex: 0 0 auto; }
@keyframes home-upcoming-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .home-upcoming-marquee .marquee-track { animation: none; }
}

/* Mobile: one-card swipe carousel with left/right arrows */
.home-upcoming-carousel { position: relative; }
.home-upcoming-carousel .uc-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.home-upcoming-carousel .uc-track::-webkit-scrollbar { display: none; }
.home-upcoming-carousel .uc-card {
  flex: 0 0 100%;
  scroll-snap-align: start;
}
.uc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.94);
  color: var(--navy);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.uc-arrow:hover { border-color: var(--gold); color: var(--gold-dark); }
.uc-arrow[disabled] { opacity: 0.35; cursor: default; box-shadow: none; }
.uc-prev { left: 2px; }
.uc-next { right: 2px; }
  position: fixed;
  inset: 0;
  background: rgba(10, 13, 34, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
  z-index: 200;
}
.captcha-overlay.open { opacity: 1; visibility: visible; }
.captcha-modal {
  position: relative;
  width: min(440px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: scale(0.97);
  transition: transform 0.25s ease;
}
.captcha-overlay.open .captcha-modal { transform: scale(1); }
.captcha-modal h3 { margin: 0 0 6px; color: var(--navy); }
.captcha-modal-close {
  all: unset;
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 1.3rem;
  line-height: 1;
}
.captcha-modal-close:hover, .captcha-modal-close:focus-visible { background: var(--line); color: var(--ink); }
.captcha-label { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 16px; }
.captcha-stage { display: flex; flex-direction: column; gap: 20px; }
.captcha-targets {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  min-height: 110px;
  gap: 12px;
  flex-wrap: wrap;
}
.captcha-target {
  border-radius: 50%;
  border: 2px dashed var(--navy);
  background: transparent;
  padding: 0;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s, background 0.2s;
}
.captcha-target:hover, .captcha-target:focus-visible, .captcha-target.focused { opacity: 0.9; }
.captcha-target.miss { border-color: var(--orange); animation: captcha-shake 0.35s; }
.captcha-target.matched {
  border-style: solid;
  border-color: var(--gold);
  background: rgba(255, 196, 0, 0.15);
  opacity: 1;
}
.captcha-tray {
  display: flex;
  justify-content: center;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  /* Reserve the piece's footprint so switching it to position:absolute for
     dragging doesn't collapse the tray — that would shrink the (auto-height,
     vertically-centered) modal mid-drag and throw off the drag math. */
  min-height: calc(72px + 16px);
}
.captcha-piece {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: box-shadow 0.2s, transform 0.2s;
}
.captcha-piece.dragging {
  cursor: grabbing;
  box-shadow: 0 10px 24px -8px rgba(32, 43, 109, 0.5);
  transform: scale(1.05);
}
.captcha-piece.placed { cursor: default; }
.captcha-piece.bounce { animation: captcha-bounce-back 0.3s; }
.captcha-status { margin: 12px 0 0; font-size: 0.85rem; color: var(--ink-soft); min-height: 1.2em; }
.captcha-status.ok { color: #227a4a; font-weight: 600; }

.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 13, 34, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
  z-index: 200;
}
.success-overlay.open { opacity: 1; visibility: visible; }
.success-modal {
  position: relative;
  width: min(420px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 30px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
  transform: scale(0.97);
  transition: transform 0.25s ease;
}
.success-overlay.open .success-modal { transform: scale(1); }
.success-modal-close {
  all: unset;
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 1.3rem;
  line-height: 1;
}
.success-modal-close:hover, .success-modal-close:focus-visible { background: var(--line); color: var(--ink); }
.success-logo { width: 64px; height: 64px; margin: 0 auto 16px; display: block; }
.success-modal h3 { margin: 0 0 10px; color: var(--navy); }
.success-modal p { margin: 0 0 24px; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }
@keyframes captcha-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
@keyframes captcha-bounce-back {
  0% { transform: scale(1.05); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* ---------------- Testimonials ---------------- */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px 24px;
  margin-bottom: 24px;
}
.testimonial-card-float {
  animation-name: card-bob;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
@keyframes card-bob {
  from { transform: translateY(0); }
  to { transform: translateY(var(--bob, -6px)); }
}
@media (prefers-reduced-motion: reduce) {
  .testimonial-card-float { animation: none; }
}
.testimonial-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.15s ease;
  will-change: transform;
}
.testimonial-card:hover,
.testimonial-card:focus-visible,
.testimonial-card.active {
  border-color: var(--navy);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
  outline: none;
  z-index: 2;
}
.testimonial-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.testimonial-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fields Display", serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.testimonial-body { min-width: 0; }
.testimonial-card p { font-size: 0.92rem; margin-bottom: 10px; }
.testimonial-card h3 { font-size: 0.88rem; color: var(--navy); margin: 0; }
.testimonial-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.testimonial-load-more { display: block; margin: 0 auto 8px; }

/* ---------------- Teachers ---------------- */

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px 24px;
}
.teacher-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.teacher-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.teacher-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fields Display", serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.teacher-card-body { min-width: 0; }
.teacher-card-body h3 { color: var(--navy); margin: 2px 0 6px; font-size: 1.05rem; }
.teacher-location { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 10px; }
.teacher-programs {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.teacher-programs li {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--paper-2, #f0ede3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}
.teacher-bio { font-size: 0.92rem; margin: 0 0 14px; }
.teacher-contact { font-size: 0.82rem; padding: 8px 16px; }

.empty-state {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.empty-state p { margin: 0; font-size: 1.02rem; }

.testimonial-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 60;
  width: min(560px, calc(100vw - 40px));
  max-height: 82vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.97);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.testimonial-popup.visible { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.testimonial-popup p { font-size: 0.94rem; line-height: 1.6; margin-bottom: 10px; padding-right: 22px; }
.testimonial-popup h3 { font-size: 0.88rem; color: var(--navy); margin: 0; }
.testimonial-popup-close {
  all: unset;
  position: absolute;
  top: 14px;
  right: 16px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1;
}
.testimonial-popup-close:hover,
.testimonial-popup-close:focus-visible { background: var(--line); color: var(--ink); }

/* ---------------- Footer ---------------- */

.site-footer { background: var(--navy-dark); color: #cfd2ea; margin-top: 40px; }
.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 48px 24px 24px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-logo { width: 130px; margin-bottom: 12px; }
.footer-brand p { color: #aeb2d6; font-size: 0.9rem; }
.footer-col h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: #cfd2ea; font-size: 0.9rem; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #8d91b8;
}
.footer-bottom a { color: #8d91b8; }
.footer-bottom a:hover { color: var(--gold); }

/* ---------------- Responsive ---------------- */

@media (max-width: 980px) {
  .program-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-mark { order: -1; }
  .hero-mark img { width: 140px; }
  .band-grid { grid-template-columns: 1fr; }
  .photo-band-grid { grid-template-columns: 1fr; }
  .hero-photo { min-height: 380px; background-position: 15% 75%; }
  .hero-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(18,23,63,0.55) 0%, rgba(18,23,63,0.3) 45%, rgba(18,23,63,0.6) 100%);
  }
  .values-list { grid-template-columns: repeat(2, 1fr); }
  .event-type-grid, .sub-card-grid, .sub-card-grid-3 { grid-template-columns: 1fr; }
  .event-thumb-grid { grid-template-columns: repeat(2, 1fr); }
  .offering-grid { grid-template-columns: repeat(2, 1fr); }
  .study-grid { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: 1fr; }
  .stats-band > div:not(:first-child) { border-left: none; }
  .chy-layout { grid-template-columns: 1fr; }
  .chy-toc { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1500px) {
  .wrap, .header-inner { padding-left: 32px; padding-right: 32px; }
  .header-inner { gap: 12px; }
  .brand { gap: 8px; }
  .brand-mark { width: 44px; }
  .brand-name { font-size: 1.4rem; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    border-bottom: 1px solid rgba(255,255,255,0.12);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.25s ease;
  }
  .main-nav.open { max-height: 80vh; overflow-y: auto; opacity: 1; transform: none; }
  .main-nav > ul { flex-direction: column; align-items: stretch; padding: 8px 16px 20px; gap: 0; }
  .main-nav > ul > li > a { padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,0.12); border-radius: 0; }
  .dropdown, .flyout {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 16px;
    display: none;
    min-width: 0;
  }
  .has-dropdown.open > .dropdown, .has-flyout.open > .flyout { display: flex; }
  .program-grid { grid-template-columns: 1fr; }
  .offering-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ---------------- Scroll-reveal ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------- Back to top ---------------- */

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.15s ease;
  z-index: 90;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--navy-dark); }
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity 0.15s linear, visibility 0.15s; }
}

/* ---------------- Cookie consent gate ---------------- */

/* Blocking modal: the visitor must choose before using the site. */
.cookie-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(22, 28, 74, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
/* Shown either by the pre-render inline script (no stored choice) or by the
   footer "Cookie settings" button. */
html.cookie-gate #cookie-overlay,
.cookie-overlay.open { display: flex; }
html.cookie-gate,
html.cookie-gate body { overflow: hidden; }

.cookie-modal {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.45);
  max-width: 460px;
  width: 100%;
  padding: 28px 28px 24px;
}
.cookie-modal h2 { margin: 0 0 10px; font-size: 1.25rem; }
.cookie-modal p { margin: 0 0 20px; font-size: 0.92rem; color: var(--ink-soft); }
.cookie-modal a { color: var(--gold-dark); text-decoration: underline; }
.cookie-modal-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cookie-modal-actions .btn { margin: 0; flex: 1; min-width: 150px; padding: 11px 20px; }
@media (max-width: 420px) {
  .cookie-modal-actions .btn { flex: 1 1 100%; }
}

.footer-linkbtn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: #8d91b8;
  cursor: pointer;
}
.footer-linkbtn:hover { color: var(--gold); }

/* ---------------- Shrinking sticky header ---------------- */

.site-header { transition: box-shadow 0.25s ease; }
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner { transition: padding 0.25s ease; }
.site-header.scrolled .header-inner { padding: 8px 24px; }
.brand-mark { transition: width 0.25s ease; }
.site-header.scrolled .brand-mark { width: 48px; }
.brand-name { transition: font-size 0.25s ease; }
.site-header.scrolled .brand-name { font-size: 1.5rem; }

/* ---------------- Lightbox ---------------- */

img.zoomable { cursor: zoom-in; }
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 13, 34, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
  z-index: 200;
}
.lightbox-overlay.open { opacity: 1; visibility: visible; }
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* ---- Teachers map (Leaflet, CHYTA-themed) -------------------------------- */
.teachers-map {
  height: 440px;
  border-radius: 12px;
  border: 1px solid rgba(27, 42, 74, 0.15);
  box-shadow: 0 2px 10px rgba(27, 42, 74, 0.08);
  margin-bottom: 8px;
  z-index: 0; /* keep map below nav dropdowns */
  background: #f3efe4; /* warm paper tone while tiles load */
}
/* shorter on phones so the teacher list is visible below the map */
@media (max-width: 640px) {
  .teachers-map { height: 300px; }
}
/* warm, cream-toned tiles to match the paper palette */
.teachers-map .leaflet-tile-pane { filter: sepia(0.18) saturate(0.85) brightness(1.02); }
/* CHYTA-styled zoom control */
.teachers-map .leaflet-bar a {
  background: var(--paper);
  color: var(--navy);
  border-color: rgba(27, 42, 74, 0.18);
}
.teachers-map .leaflet-bar a:hover { background: #f0ead9; color: var(--navy-dark); }
/* CHYTA badge markers */
.chyta-marker-wrap { background: none; border: none; }
.chyta-marker {
  width: 34px; height: 34px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg); /* teardrop shape */
  background: var(--navy);
  border: 2px solid var(--gold);
  box-shadow: 0 3px 8px rgba(22, 28, 74, 0.35);
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box;
}
.chyta-marker.multi { background: var(--navy-dark); }
.chyta-marker span, .chyta-marker {
  color: var(--paper);
  font-family: "Fields Display", serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.chyta-marker > * { transform: rotate(45deg); } /* counter-rotate content */
.chyta-marker-tip {
  position: absolute; left: 13px; top: 30px;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid var(--navy);
}
/* paper-style popups */
.teachers-map .leaflet-popup-content-wrapper {
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  border: 1px solid rgba(27, 42, 74, 0.15);
  box-shadow: 0 4px 16px rgba(27, 42, 74, 0.18);
}
.teachers-map .leaflet-popup-tip { background: var(--paper); border: 1px solid rgba(27, 42, 74, 0.12); }
.teachers-map .leaflet-popup-content { margin: 14px 16px; }
.tp-scroll { max-height: 240px; overflow-y: auto; }
.tp-divider { border-top: 1px solid rgba(27, 42, 74, 0.12); margin: 10px 0; }
.map-note {
  font-size: 0.85rem;
  margin: 8px 0 22px;
}
.teacher-popup {
  font-family: inherit;
  min-width: 200px;
}
.teacher-popup h3 {
  margin: 0 0 2px;
  font-size: 1rem;
  font-family: "Fields Display", serif;
  color: var(--navy);
}
.teacher-popup .tp-intro {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.teacher-popup .tp-loc {
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.teacher-popup a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}
.tp-sep {
  border: none;
  border-top: 1px solid #eee;
  margin: 10px 0;
}
.teacher-short-info {
  font-style: italic;
  color: #666;
  margin: 2px 0 4px;
  font-size: 0.92rem;
}
.teacher-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.teacher-social {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid rgba(27, 42, 74, 0.3);
}
.teacher-social:hover {
  border-bottom-color: var(--navy);
}

/* Two-column teacher search: name + location */
.teacher-search-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .teacher-search-row { grid-template-columns: 1fr; }
}

/* ---- Everlist-style detail panel ---------------------------------------- */
/* The clicked card leaves the grid (display:none) and this panel takes the
   whole row at that row's boundary — content reads at a comfortable width,
   neighbours stay untouched. Grows out of the card via JS transform. */
.teacher-card-head { display: flex; align-items: center; gap: 14px; cursor: pointer; user-select: none; }
.teacher-card-head:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 8px; }
.teacher-card-summary { flex: 1; min-width: 0; }
.teacher-card-summary h3 { margin: 0 0 2px; }
.teacher-card-summary .teacher-short-info,
.teacher-card-summary .teacher-location { margin: 2px 0; }
.teacher-card-chevron { color: var(--navy); font-size: 0.9rem; transition: transform 0.2s ease; }
.teacher-card.pulse { box-shadow: 0 0 0 3px rgba(212, 165, 60, 0.45); }

.teacher-detail-panel {
  grid-column: 1 / -1;        /* occupies the clicked card's whole row */
  max-width: 760px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  position: relative;
  box-shadow: 0 6px 18px rgba(27, 42, 74, 0.14);
  scroll-margin: 24px;
}
.teacher-detail-panel.highlight { box-shadow: 0 0 0 3px rgba(212, 165, 60, 0.55), 0 6px 18px rgba(27, 42, 74, 0.18); }
.tdp-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(27, 42, 74, 0.12); }
.tdp-head .teacher-avatar { width: 64px; height: 64px; }
.tdp-title { min-width: 0; }
.tdp-title h3 { margin: 0 0 4px; color: var(--navy); font-size: 1.2rem; }
.tdp-body .teacher-about { margin: 0 0 14px; font-size: 1rem; line-height: 1.65; max-width: 72ch; }
.tdp-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-soft); font-size: 16px; line-height: 1;
  width: 30px; height: 30px; cursor: pointer; font-family: inherit;
}
.tdp-close:hover { color: var(--navy); border-color: var(--navy); }
@media (max-width: 640px) { .teacher-detail-panel { padding: 20px 18px; } .tdp-head { gap: 12px; } }
.tp-view {
  display: inline-block;
  margin-top: 6px;
  font-weight: 600;
}
