/*
Theme Name: IQRA
Theme URI: https://example.com/noor-academy
Author: IQRA Dev
Author URI: https://example.com
Description: WordPress theme for the IQRA Islamic school. A faithful theme conversion of the static IQRA landing page — emerald/gold/cream palette, Playfair Display + Amiri + Inter typography, geometric SVG star dividers, sticky nav, fade-in reveals and a responsive mobile menu. CPT-aware: lights up when the IQRA companion plugin is active.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: noor-academy
Tags: education, islamic, one-column, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   DESIGN TOKENS
   Palette: deep emerald green (primary) + warm gold/amber (accent)
            on a cream / off-white ground.
============================================================ */
:root {
  --green-950: #052017;
  --green-900: #062b21;
  --green-800: #0B3D2E;
  --green-700: #14532D;
  --green-600: #1f6b4a;
  --green-500: #2d8a63;

  --gold:       #C9A24B;
  --gold-light: #E0C479;
  --gold-deep:  #A8842F;

  --cream:      #FBF8F1;
  --sand:       #F3EDE0;
  --sand-deep:  #E8DFC9;

  --ink:        #16241d;
  --ink-soft:   #2c3a33;
  --muted:      #5c6b64;
  --line:       #e4dcc8;

  --shadow-sm: 0 1px 2px rgba(11,61,46,.06), 0 2px 8px rgba(11,61,46,.05);
  --shadow-md: 0 6px 24px rgba(11,61,46,.10);
  --shadow-lg: 0 18px 50px rgba(6,43,33,.18);

  --radius:    14px;
  --radius-lg: 22px;
  --container: 1180px;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-arabic:  'Amiri', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; color: var(--green-900); margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; color: var(--ink-soft); }

::selection { background: var(--gold); color: var(--green-950); }

/* ============================================================
   LAYOUT HELPERS
============================================================ */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 25px 0; position: relative; }
.section--tight { padding: 72px 0; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.eyebrow {
  font-family: var(--font-arabic);
  font-size: 1.05rem;
  letter-spacing: .04em;
  color: var(--gold-deep);
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before, .eyebrow::after {
  content: ""; width: 26px; height: 1px; background: var(--gold);
  opacity: .7;
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: .6em; }
.section-head p { font-size: 1.075rem; color: var(--muted); margin: 0; }
.arabic { font-family: var(--font-arabic); }

/* ============================================================
   GEOMETRIC DIVIDER MOTIF
============================================================ */
.divider {
  display: flex; justify-content: center; align-items: center;
  padding: 5px 0;
  background: var(--cream);
}
.divider svg { display: block; }
.divider .line { height: 1px; width: 90px; background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent); }
.divider-row { display: flex; align-items: center; gap: 18px; }

/* ============================================================
   NAVBAR
============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 248, 241, .82);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
}
.nav.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); background: rgba(251,248,241,.95); }
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { flex: none; display: inline-flex; align-items: center; }
.brand__logo {
  display: block;
  width: 48px;
  height: 48px;
  max-width: 120px;
  object-fit: contain;
  border-radius: 10px;
}
.brand__name { font-family: var(--font-display); font-size: 1.32rem; font-weight: 700; color: var(--green-900); letter-spacing: -.01em; line-height: 1; }
.brand__name span { display: block; font-family: var(--font-arabic); font-size: .72rem; font-weight: 400; color: var(--gold-deep); letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a {
  font-size: .94rem; font-weight: 500; color: var(--ink-soft);
  padding: 9px 14px; border-radius: 999px; position: relative;
  transition: color .2s ease, background .2s ease;
  white-space: nowrap;          /* keep menu labels on one line (prevents CJK mid-word wrapping) */
  word-break: keep-all;         /* never break inside a CJK word */
  overflow-wrap: normal;        /* do not break long words; let them overflow instead */
}
.nav__links a:hover { color: var(--green-800); background: rgba(11,61,46,.06); }
.nav__cta {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--green-950) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(201,162,75,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(201,162,75,.45); background: linear-gradient(180deg, var(--gold-light), var(--gold)) !important; }

.nav__actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  background: var(--cream); border-radius: 12px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--green-800);
  border-radius: 2px; position: relative; transition: transform .3s ease, opacity .2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: rotate(45deg); top: 0; }
.nav-toggle.open span::after  { transform: rotate(-45deg); top: 0; }

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: .98rem;
  padding: 13px 26px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  text-align: center;
}
.btn--gold {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--green-950);
  box-shadow: 0 6px 18px rgba(201,162,75,.32);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(201,162,75,.42); }
.btn--ghost {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.55);
}
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn--outline {
  background: transparent; color: var(--green-800); border-color: var(--green-700);
}
.btn--outline:hover { background: var(--green-800); color: #fff; }

/* ============================================================
   HERO
============================================================ */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(201,162,75,.18), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(31,107,74,.55), transparent 55%),
    linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 55%, var(--green-950) 100%);
  color: #f4efe2;
  padding: 50px 0 50px;
}
.hero__pattern { position: absolute; inset: 0; z-index: 0; opacity: .5; pointer-events: none; }
.hero__arch { position: absolute; right: -4%; top: 50%; transform: translateY(-50%); z-index: 1; opacity: .16; pointer-events: none; }
.hero__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-arabic); color: var(--gold-light); font-size: 1.15rem;
  margin-bottom: 22px; letter-spacing: .02em;
}
.hero__eyebrow .star { width: 16px; height: 16px; opacity: .9; }
.hero h1 {
  color: #fff; font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 600;
  line-height: 1.08; margin-bottom: 24px;
}
.hero h1 em { font-style: italic; color: var(--gold-light); }
.hero__sub { font-size: 1.16rem; color: #e6ddc7; max-width: 560px; margin-bottom: 36px; line-height: 1.75; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; }
.hero__meta { display: flex; align-items: center; gap: 26px; margin-top: 46px; color: #d8cfb8; font-size: .92rem; }
.hero__meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.hero__meta strong { color: #fff; font-weight: 600; }

/* Hero medallion / decorative card */
.hero__medallion { position: relative; display: flex; justify-content: center; align-items: center; }
.hero__logo {
  display: block;
  width: min(420px, 80vw);
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border: 1px solid rgba(224,196,121,.38);
  border-radius: 28px;
  background: rgba(6,43,33,.36);
  padding: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,.20), inset 0 0 40px rgba(201,162,75,.10);
}

/* ============================================================
   HERO BACKGROUND VIDEO
   Active when a video is set in the Customizer. The <video> fills
   the whole hero (object-fit: cover), muted + looping so browsers
   allow autoplay. A scrim keeps the copy readable.
============================================================ */
.hero--video { padding: 0; min-height: 100vh; }
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  z-index: 0;
}
.hero__video-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(201,162,75,.14), transparent 60%),
    linear-gradient(180deg, rgba(5,32,23,.55) 0%, rgba(5,32,23,.35) 45%, rgba(5,32,23,.65) 100%);
}
.hero__video-inner {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 110px 0 90px;
  text-align: center;
}
.hero__video-inner .hero__copy { max-width: 780px; }
.hero__video-inner .hero__sub { margin-left: auto; margin-right: auto; }
.hero__video-inner .hero__cta,
.hero__video-inner .hero__meta { justify-content: center; }
.hero__scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 3;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  color: #fff; background: rgba(6,43,33,.45);
  border: 1px solid rgba(224,196,121,.45); border-radius: 50%;
  cursor: pointer; transition: background .2s ease, border-color .2s ease;
  backdrop-filter: blur(3px);
}
.hero__scroll-cue:hover { background: rgba(11,61,46,.8); border-color: var(--gold); }
@media (max-width: 860px) {
  .hero--video { min-height: 92vh; }
  .hero__video-inner { min-height: 92vh; }
  .hero__video-inner .hero__meta { flex-direction: column; gap: 12px; }
}

/* ============================================================
   IMAGE BAND (full-width image that reveals on scroll)
   Renders only when an image is set in the Customizer. The image
   fills the band edge-to-edge (object-fit: cover) and a ~50% dark
   scrim fades it back so the overlaid text stays readable. Height,
   type scale and spacing step down on smaller screens.
============================================================ */
.image-band {
  position: relative;
  min-height: 70vh;
  display: flex; align-items: center;
  overflow: hidden;
  color: #fff;
}
.image-band__img {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transform: scale(1.12) translateY(6%);
  transition: transform 1.4s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.image-band.in .image-band__img { transform: scale(1) translateY(0); }
/* ~50% fade over the image so the text on top is easy to read */
.image-band__scrim {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(6,43,33,.46) 0%,
    rgba(6,43,33,.50) 50%,
    rgba(6,43,33,.56) 100%);
}
.image-band__inner {
  position: relative; z-index: 2;
  width: 100%;
  padding-top: 72px; padding-bottom: 72px;
}
.image-band__copy {
  max-width: 720px; margin: 0 auto; text-align: center;
}
.image-band__copy h2 {
  color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 600;
  line-height: 1.15; margin-bottom: 18px;
  text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.image-band__copy p {
  font-size: clamp(1rem, 1.5vw, 1.15rem); color: #f2ecdd;
  line-height: 1.75; margin: 0;
  text-shadow: 0 1px 12px rgba(0,0,0,.45);
}
@media (max-width: 860px) {
  .image-band { min-height: 56vh; }
  .image-band__inner { padding-top: 48px; padding-bottom: 48px; }
}
@media (max-width: 520px) {
  .image-band { min-height: 46vh; }
  .image-band__inner { padding-top: 36px; padding-bottom: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .image-band__img { transform: none; transition: none; }
}

/* ============================================================
   HERO SLIDESHOW (auto-scrolling gallery)
   Active when slides are configured in the Customizer.
============================================================ */
.hero--slideshow { padding: 0; min-height: 0; }
.hero__slides {
  position: relative; z-index: 2;
  width: 100%;
  /* Fluid height driven by the first slide's natural aspect ratio
     (set as --hero-ratio by section-hero.php). The whole image is
     always visible — object-fit: contain never crops. The max-height
     caps very tall/portrait images on narrow screens. */
  aspect-ratio: var(--hero-ratio, 16 / 9);
  max-height: 86vh;
  overflow: hidden;
}
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}
.hero__slide.is-active { opacity: 1; visibility: visible; z-index: 2; }
.hero__slide-link { display: block; width: 100%; height: 100%; }
.hero__slide-img {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  background: var(--ink, #16241d);
}
.hero__slide-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  margin: 0; padding: 70px 24px 26px;
  color: #fff; font-size: clamp(1rem, 2vw, 1.3rem);
  text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,.55);
  background: linear-gradient(180deg, transparent, rgba(5,32,23,.72));
}
.hero__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 4; width: 46px; height: 46px;
  display: grid; place-items: center;
  background: rgba(6,43,33,.55); color: #fff;
  border: 1px solid rgba(224,196,121,.4); border-radius: 50%;
  cursor: pointer; transition: background .2s ease, border-color .2s ease;
  backdrop-filter: blur(3px);
}
.hero__nav:hover { background: rgba(11,61,46,.85); border-color: var(--gold); }
.hero__nav--prev { left: 18px; }
.hero__nav--next { right: 18px; }
.hero__dots {
  position: absolute; left: 0; right: 0; bottom: 18px; z-index: 4;
  display: flex; justify-content: center; gap: 10px;
}
.hero__dot {
  width: 12px; height: 12px; padding: 0;
  border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.38);
  border: 1px solid rgba(255,255,255,.55);
  transition: background .25s ease, transform .25s ease;
}
.hero__dot:hover { background: rgba(255,255,255,.7); }
.hero__dot.is-active { background: var(--gold); border-color: var(--gold-light); transform: scale(1.15); }

@media (max-width: 860px) {
  /* The ratio itself comes from the uploaded image (set via the
     --hero-ratio custom property by section-hero.php); only the
     height cap changes per breakpoint. */
  .hero__slides { max-height: 78vh; }
  .hero__nav { width: 40px; height: 40px; }
  .hero__nav--prev { left: 10px; }
  .hero__nav--next { right: 10px; }
}
@media (max-width: 520px) {
  .hero__slides { max-height: 72vh; }
  .hero__slide-caption { font-size: .95rem; padding: 54px 16px 20px; }
  .hero__dots { bottom: 12px; gap: 8px; }
  .hero__dot { width: 10px; height: 10px; }
}

.medallion {
  width: min(420px, 80vw); aspect-ratio: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.medallion svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.medallion__core {
  position: relative; z-index: 2; text-align: center; color: #f4efe2;
  background: rgba(6,43,33,.42); border: 1px solid rgba(224,196,121,.3);
  border-radius: 50%; width: 56%; aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
  box-shadow: inset 0 0 40px rgba(201,162,75,.12);
}
.medallion__core .bismillah { font-family: var(--font-arabic); font-size: 1.7rem; color: var(--gold-light); line-height: 1; margin-bottom: 10px; }
.medallion__core .est { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: #d8cfb8; }
.medallion__core .year { font-family: var(--font-display); font-size: 1.6rem; color: #fff; margin-top: 4px; }

/* ============================================================
   ABOUT + STATS
============================================================ */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about__copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: .5em; }
.about__copy .lead { font-size: 1.12rem; color: var(--ink); margin-bottom: 1.1em; }
.about__cards { display: grid; gap: 16px; }
.mv-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-sm);
  display: flex; gap: 16px; align-items: flex-start;
  transition: transform .25s ease, box-shadow .25s ease;
}
.mv-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.mv-card__icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(201,162,75,.16), rgba(201,162,75,.06)); color: var(--gold-deep); }
.mv-card h4 { font-size: 1.08rem; margin-bottom: 4px; color: var(--green-800); }
.mv-card p { font-size: .95rem; margin: 0; color: var(--muted); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-top: -40px; position: relative; z-index: 3;
}
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 26px; text-align: center; box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.stat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}
.stat:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.stat__num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--green-800); line-height: 1; margin-bottom: 8px; }
.stat__num span { color: var(--gold-deep); }
.stat__label { font-size: .9rem; color: var(--muted); font-weight: 500; letter-spacing: .01em; }

/* ============================================================
   PROGRAMS
============================================================ */
.programs { background: linear-gradient(180deg, var(--cream), var(--sand)); }
.programs__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.program {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px 26px; box-shadow: var(--shadow-sm); position: relative;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
  overflow: hidden;
}
.program::after {
  content: ""; position: absolute; inset: auto -40px -60px auto; width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(201,162,75,.12), transparent 70%);
  transition: transform .4s ease;
}
.program:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--sand-deep); }
.program:hover::after { transform: scale(1.8); }
.program__icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--green-800), var(--green-700)); color: var(--gold-light);
  margin-bottom: 20px; box-shadow: 0 8px 18px rgba(11,61,46,.22);
}
.program h3 { font-size: 1.22rem; margin-bottom: 10px; }
.program p { font-size: .94rem; color: var(--muted); margin: 0; }

/* ============================================================
   ADMISSIONS
============================================================ */
.admissions { background: var(--cream); }
.admissions__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.steps { display: grid; gap: 18px; }
.step {
  display: flex; gap: 20px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.step:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.step__num {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700;
  font-size: 1.15rem; color: var(--green-950);
  background: linear-gradient(160deg, var(--gold-light), var(--gold));
  box-shadow: 0 4px 12px rgba(201,162,75,.3);
}
.step h4 { font-size: 1.08rem; margin-bottom: 4px; color: var(--green-800); }
.step p { font-size: .93rem; margin: 0; color: var(--muted); }

.admissions__panel {
  background: linear-gradient(160deg, var(--green-900), var(--green-800));
  border-radius: var(--radius-lg); padding: 44px 38px; color: #f0e9d6;
  position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.admissions__panel .patt { position: absolute; inset: 0; opacity: .14; pointer-events: none; }
.admissions__panel h3 { color: #fff; font-size: 1.7rem; margin-bottom: 12px; position: relative; }
.admissions__panel p { color: #ddd2b7; position: relative; margin-bottom: 24px; }
.admissions__panel ul { position: relative; margin-bottom: 30px; }
.admissions__panel li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(224,196,121,.2); color: #e8dfc6; font-size: .95rem; }
.admissions__panel li:last-child { border-bottom: none; }
.admissions__panel li svg { flex: none; margin-top: 3px; }

/* ============================================================
   FACULTY
============================================================ */
.faculty__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.teacher {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px 24px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .28s ease, box-shadow .28s ease;
}
.teacher:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.teacher__avatar {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 18px;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1.6rem;
  color: #fff; position: relative;
  background: linear-gradient(160deg, var(--green-700), var(--green-900));
  box-shadow: 0 8px 20px rgba(11,61,46,.25), inset 0 0 0 3px rgba(201,162,75,.4);
}
.teacher h3 { font-size: 1.16rem; margin-bottom: 4px; }
.teacher__role { font-size: .88rem; color: var(--gold-deep); font-weight: 500; margin-bottom: 12px; }
.teacher__bio { font-size: .9rem; color: var(--muted); margin: 0; }

/* ============================================================
   EVENTS
============================================================ */
.events { background: linear-gradient(180deg, var(--sand), var(--cream)); }
.events__list { display: grid; gap: 16px; max-width: 880px; margin: 0 auto; }
.event {
  display: flex; gap: 24px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.event:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--sand-deep); }
.event__date {
  flex: none; width: 78px; text-align: center;
  border-right: 1px solid var(--line); padding-right: 24px;
}
.event__date .month { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; }
.event__date .day { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--green-800); line-height: 1.1; }
.event__body h4 { font-size: 1.12rem; margin-bottom: 4px; color: var(--green-800); }
.event__body p { font-size: .94rem; margin: 0; color: var(--muted); }
.event__tag { font-size: .76rem; color: var(--gold-deep); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }

/* ============================================================
   FACEBOOK FEED
============================================================ */
.section--facebook { background: var(--cream); }
.fb-embed {
  max-width: 500px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.fb-embed iframe { width: 100% !important; border: none; border-radius: calc(var(--radius) - 6px); }
.fb-placeholder { display: flex; justify-content: center; }
.fb-placeholder__card {
  max-width: 460px; width: 100%; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 48px 36px; box-shadow: var(--shadow-sm);
}
.fb-placeholder__icon {
  width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 20px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(160deg, #1877F2, #0e5fce);
  box-shadow: 0 10px 24px rgba(24,119,242,.28);
}
.fb-placeholder__card h3 { font-size: 1.35rem; margin-bottom: 8px; color: var(--green-800); }
.fb-placeholder__card p { font-size: .98rem; color: var(--muted); margin: 0 0 26px; }
@media (max-width: 640px) {
  .fb-embed { padding: 8px; }
  .fb-placeholder__card { padding: 36px 22px; }
}

/* ============================================================
   CONTACT
============================================================ */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: stretch; }
.contact__info { display: flex; flex-direction: column; gap: 22px; }
.info-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-sm);
}
.info-card__icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(11,61,46,.1), rgba(11,61,46,.04)); color: var(--green-700); }
.info-card h4 { font-size: 1rem; margin-bottom: 2px; color: var(--green-800); }
.info-card p { font-size: .95rem; margin: 0; color: var(--muted); }
.map {
  margin-top: 4px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  min-height: 170px; position: relative;
  background:
    repeating-linear-gradient(45deg, rgba(11,61,46,.04) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, var(--sand), var(--sand-deep));
  display: grid; place-items: center; color: var(--green-800);
}
.map span { font-family: var(--font-display); font-size: 1.05rem; opacity: .8; }

/* ============================================================
   DONATE PAGE
============================================================ */
.donate__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.donate__info { display: flex; flex-direction: column; gap: 22px; }

/* QR-style info card: icon on top-left, image + caption below */
.info-card--qr { align-items: flex-start; }
.info-card--qr .info-card__qr-body { flex: 1; }
.info-card__qr-img {
  margin: 12px 0 8px;
  display: flex;
  justify-content: center;
}
.info-card__qr-img img {
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px;
}

/* Stripe payment column */
.donate__pay {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 90px;
}
.donate__pay h3 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.donate__pay-note {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 22px;
}
.donate__stripe {
  display: flex;
  justify-content: center;
  min-height: 50px;
}
.donate__stripe stripe-buy-button { display: block; }

@media (max-width: 860px) {
  .brand__logo { width: 40px; height: 40px; }

  .donate__grid { grid-template-columns: 1fr; gap: 36px; }
  .donate__pay { position: static; }
}

/* ============================================================
   NAV — DONATE LINK
============================================================ */
.nav__donate {
  font-weight: 600 !important;
  color: var(--gold-deep) !important;
  border: 1.5px solid rgba(201,162,75,.45);
  background: rgba(201,162,75,.08);
}
.nav__donate:hover {
  color: var(--green-950) !important;
  background: linear-gradient(180deg, var(--gold-light), var(--gold)) !important;
  border-color: var(--gold);
}

.form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px; box-shadow: var(--shadow-md);
}
.form h3 { font-size: 1.4rem; margin-bottom: 6px; }
.form > p { font-size: .95rem; color: var(--muted); margin-bottom: 22px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .86rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; letter-spacing: .01em; }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font-body); font-size: .98rem; color: var(--ink);
  background: var(--cream); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 14px; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--green-600); background: #fff;
  box-shadow: 0 0 0 4px rgba(45,138,99,.12);
}
.field textarea { resize: vertical; min-height: 120px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__note { font-size: .82rem; color: var(--muted); margin-top: 12px; text-align: center; }

/* ============================================================
   FOOTER
============================================================ */
.footer {
  background: var(--green-950); color: #cdbfa1; padding: 70px 0 28px;
  position: relative; overflow: hidden;
}
.footer__patt { position: absolute; inset: 0; opacity: .07; pointer-events: none; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; position: relative; }
.footer__brand .brand__name { color: #fff; }
.footer__brand p { color: #b3a98f; font-size: .94rem; max-width: 320px; margin-top: 14px; }
.footer h5 { color: var(--gold-light); font-family: var(--font-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.footer__links a { display: block; color: #c4b89c; font-size: .94rem; padding: 6px 0; transition: color .2s ease, padding-left .2s ease; }
.footer__links a:hover { color: var(--gold-light); padding-left: 5px; }
.prayer {
  background: rgba(255,255,255,.04); border: 1px solid rgba(224,196,121,.18);
  border-radius: var(--radius); padding: 16px 18px;
}
.prayer__title { display: flex; align-items: center; gap: 8px; color: var(--gold-light); font-size: .86rem; font-weight: 600; letter-spacing: .04em; margin-bottom: 10px; }
.prayer__times { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: .86rem; }
.prayer__times span { color: #c4b89c; }
.prayer__times strong { color: #fff; font-weight: 500; }
.footer__quote {
  position: relative; margin-top: 22px; padding: 16px 0 0; border-top: 1px solid rgba(224,196,121,.15);
  font-family: var(--font-arabic); font-style: italic; color: #d8cfb8; font-size: .96rem; line-height: 1.6;
}
.footer__quote cite { display: block; font-style: normal; font-family: var(--font-body); font-size: .8rem; color: var(--gold); margin-top: 6px; letter-spacing: .02em; }

.socials { display: flex; gap: 12px; margin-top: 18px; }
.socials a {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.05); border: 1px solid rgba(224,196,121,.18); color: #cdbfa1;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.socials a:hover { background: var(--gold); color: var(--green-950); transform: translateY(-2px); }

.footer__bottom {
  position: relative; margin-top: 50px; padding-top: 22px;
  border-top: 1px solid rgba(224,196,121,.15);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: .85rem; color: #9a8f74;
}

/* ============================================================
   REVEAL ON SCROLL
============================================================ */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  * { animation: none !important; }
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
  .programs__grid, .faculty__grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero__arch { opacity: .1; right: -12%; }
}
@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 74px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 8px 18px 18px; box-shadow: var(--shadow-md);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .3s ease, opacity .3s ease;
    max-height: calc(100vh - 74px); overflow-y: auto;
  }
  .nav__links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 14px 12px; border-radius: 10px; border-bottom: 1px solid var(--line); }
  .nav__links a:last-of-type { border-bottom: none; }
  .nav__cta { margin-top: 10px; justify-content: center; }
  .nav-toggle { display: inline-flex; }
  .nav__actions .btn--gold.desktop-only { display: none; }

  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero__medallion { order: -1; }
  /* Static hero only: the slideshow variant keeps its edge-to-edge
     layout (padding: 0) so no green background shows around the gallery. */
  .hero:not(.hero--slideshow) { min-height: auto; padding: 110px 0 70px; }

  .about__grid, .admissions__grid, .contact__grid { grid-template-columns: 1fr; gap: 36px; }
  .stats { margin-top: 24px; grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .form__row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .section { padding: 25px 0; }
  .programs__grid, .faculty__grid, .stats { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .event { flex-direction: column; align-items: flex-start; gap: 14px; }
  .event__date { border-right: none; border-bottom: 1px solid var(--line); padding-right: 0; padding-bottom: 12px; width: 100%; display: flex; align-items: baseline; gap: 10px; }
  .hero__meta { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero__cta .btn { flex: 1; justify-content: center; }
}

/* ============================================================
   PLUGIN INTEGRATION (companion plugin active)
   Maps the [noor_prayer_times] shortcode CSS variables onto the
   theme palette so the live prayer panel matches the footer.
   Does not alter the original landing-page styling.
============================================================ */
.footer .noor-prayer-times {
  --noor-accent:  var(--gold-light);
  --noor-surface: rgba(255, 255, 255, .04);
  --noor-text:    #c4b89c;
  --noor-muted:   #9a8f74;
  max-width: none;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(224, 196, 121, .18);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: #c4b89c;
}
.footer .noor-prayer-times__title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.footer .noor-prayer-times__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  font-size: .86rem;
}
.footer .noor-prayer-times__item {
  display: flex;
  justify-content: space-between;
  border-bottom: 0;
  padding: 0;
}
.footer .noor-prayer-times__name { color: #c4b89c; }
.footer .noor-prayer-times__time { color: #fff; font-weight: 500; }
.footer .noor-prayer-times__credit,
.footer .noor-prayer-times__error {
  color: #9a8f74;
  font-size: .76rem;
  margin-top: 8px;
}

/* ============================================================
   WORDPRESS CORE ALIGNMENTS & UTILITY
============================================================ */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin: 0 auto 1em; }
.alignwide, .alignfull { width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text,
.gallery-caption { font-size: .85rem; color: var(--muted); }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.bypostauthor { }
.sticky { }

/* ============================================================
   404 / SEARCH (theme-consistent)
============================================================ */
.error-page {
  min-height: 70vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 96px 0;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(201,162,75,.16), transparent 60%),
    linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 55%, var(--green-950) 100%);
  color: #f4efe2;
}
.error-page__num {
  font-family: var(--font-display); font-size: clamp(4rem, 14vw, 9rem); font-weight: 700;
  color: var(--gold-light); line-height: 1; margin-bottom: 8px;
}
.error-page h1 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: .5em; }
.error-page p { color: #e6ddc7; max-width: 540px; margin: 0 auto 28px; font-size: 1.05rem; }
.error-page .search {
  display: flex; gap: 10px; max-width: 460px; margin: 0 auto 26px; justify-content: center;
}
.error-page .search input {
  font-family: var(--font-body); font-size: 1rem; padding: 12px 16px; border-radius: 999px;
  border: 1.5px solid rgba(224,196,121,.4); background: rgba(255,255,255,.08); color: #fff; min-width: 240px;
}
.error-page .search input::placeholder { color: #d8cfb8; }
.error-page .search input:focus { outline: none; border-color: var(--gold-light); box-shadow: 0 0 0 4px rgba(201,162,75,.18); }
.search-page { padding: 96px 0; }
.search-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .3em; }
.search-page .search-form { margin: 0 0 40px; }
.search-form { display: flex; gap: 10px; max-width: 560px; }
.search-form label { flex: 1; }
.search-form .search-field {
  width: 100%; font-family: var(--font-body); font-size: 1rem; padding: 12px 16px;
  border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink);
}
.search-form .search-field:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 4px rgba(45,138,99,.12); }
.search-form .search-submit {
  font-family: var(--font-body); font-weight: 600; font-size: .95rem; padding: 12px 22px;
  border-radius: 999px; cursor: pointer; border: 1.5px solid transparent;
  background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--green-950);
  box-shadow: 0 6px 18px rgba(201,162,75,.32);
}

/* ============================================================
   MULTI-PAGE: SHARED INTERIOR PAGE STYLES
   Used by the page templates (page-about.php, page-admissions.php,
   page-contact.php) and the CPT archives/singles (archive-*.php,
   single-noor_*.php). Reuses the theme's existing CSS variables.
============================================================ */

/* Anchor targets clear the sticky nav when jumped/smooth-scrolled to. */
[id] { scroll-margin-top: 96px; }

/* Shared page hero (page templates + CPT archives/singles) */
.page-hero,
.cpt-hero {
  position: relative;
  padding: 4rem 0;
  text-align: center;
  color: #f4efe2;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(201,162,75,.16), transparent 60%),
    linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 55%, var(--green-950) 100%);
}
.page-hero .container,
.cpt-hero .container { position: relative; z-index: 1; }
.page-hero .arabic,
.cpt-hero .arabic {
  display: block;
  font-size: 1.15rem;
  color: var(--gold-light);
  margin-bottom: 10px;
}
.page-hero h1,
.cpt-hero h1 {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 12px;
}
.page-hero p,
.cpt-hero p {
  color: #e6ddc7;
  font-size: 1.08rem;
  max-width: 640px;
  margin: 0 auto;
}
.page-hero .eyebrow,
.cpt-hero .eyebrow { color: var(--gold-light); }
.page-hero .eyebrow::before,
.page-hero .eyebrow::after,
.cpt-hero .eyebrow::before,
.cpt-hero .eyebrow::after { background: var(--gold-light); }

/* Main content wrapper for interior pages */
.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  background: var(--cream);
}
.page-content > *:last-child { margin-bottom: 0; }
.page-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--green-800);
  margin-top: 1.6em;
}
.page-content h2:first-child { margin-top: 0; }
.page-content h3 {
  font-family: var(--font-display);
  color: var(--green-800);
}
.page-content p { color: var(--ink-soft); }
.page-content a { color: var(--green-700); }
.page-content a:hover { color: var(--gold-deep); }

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  font-size: .88rem;
  color: var(--muted);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "/"; color: var(--sand-deep); }
.breadcrumb a { color: var(--green-700); }
.breadcrumb a:hover { color: var(--gold-deep); }
.breadcrumb .current { color: var(--muted); }

/* CTA panel for interior pages */
.page-cta {
  margin: 3rem 0;
  padding: 3rem 2rem;
  text-align: center;
  color: #f0e9d6;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background:
    radial-gradient(800px 400px at 85% -20%, rgba(201,162,75,.18), transparent 60%),
    linear-gradient(160deg, var(--green-900), var(--green-800));
}
.page-cta h2,
.page-cta h3 {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.page-cta p { color: #ddd2b7; margin-bottom: 1.4rem; }
.page-cta .btn { margin-top: 4px; }
.page-cta .btn--ghost {
  color: #fff;
  border-color: rgba(255,255,255,.55);
}
.page-cta .btn--ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

/* Interior page section spacing */
.section--page { padding: 4.5rem 0; }
.section--page + .section--page { border-top: 1px solid var(--line); }

/* Blog/post cards (blog index and CPT listing layouts) */
.post-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card__thumb {
  margin: -28px -30px 20px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.post-card__thumb img { width: 100%; height: auto; display: block; }
.post-card h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.25;
  margin-bottom: 6px;
}
.post-card h2 a { color: var(--green-800); }
.post-card h2 a:hover { color: var(--green-600); }
.post-card__meta {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.post-card .entry-content p,
.post-card__excerpt { color: var(--ink-soft); margin-bottom: 16px; }
.post-card__link {
  display: inline-block;
  font-weight: 600;
  font-size: .95rem;
  color: var(--green-700);
}
.post-card__link:hover { color: var(--gold-deep); }

@media (max-width: 860px) {
  .page-content { padding: 3rem 1.25rem; }
  .section--page { padding: 3.5rem 0; }
  .page-hero, .cpt-hero { padding: 3rem 0; }
}

/* ============================================================
   LANGUAGE SWITCHER (header navbar) — globe + short code
   ============================================================ */
.lang-switcher { flex: none; }

.lang-switcher--globe {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--green-800);
  border: 1.5px solid rgba(224,196,121,.35);
  border-radius: 10px;
  padding: 0 10px 0 10px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.lang-switcher--globe:hover,
.lang-switcher--globe:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,162,75,.15);
}
.lang-switcher__globe {
  color: var(--gold-light);
  flex: none;
}
.lang-switcher__code {
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--gold-light);
  pointer-events: none;
  padding-right: 4px;
}

/* The native <select> is overlaid transparent on top so it stays
   accessible and the existing change-handler in main.js keeps working,
   while the globe + short code provide the visible "button" look. */
.lang-switcher--globe #langSelect {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  color: transparent;          /* hide the native option text in the closed control */
  font-size: .86rem;
  font-weight: 600;
  padding: 9px 22px 9px 0;     /* room for the caret area */
  cursor: pointer;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;                  /* fully transparent overlay */
}
.lang-switcher--globe #langSelect:focus { outline: none; }
.lang-switcher--globe #langSelect option {
  font-weight: 500;
  color: var(--ink);
  background: var(--cream);
}

@media (max-width: 860px) {
  .lang-switcher__code { font-size: .78rem; }
  .lang-switcher--globe { padding: 0 8px; }
}

/* Default page card: title + editor content inside a blog-style card. */
.post-card h1 {
  color: var(--green-800);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 16px;
}
.post-card .entry-content > :last-child {
  margin-bottom: 0;
}

/* Migrated editor content tables */
.page-content table,
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: #fff;
  font-size: .95rem;
}
.page-content th,
.entry-content th {
  background: rgba(11,61,46,.06);
  color: var(--green-800);
  font-family: var(--font-display);
  text-align: left;
}
.page-content th,
.page-content td,
.entry-content th,
.entry-content td {
  border: 1px solid var(--line);
  padding: .75rem .85rem;
  vertical-align: top;
}
.page-content tbody tr:nth-child(even),
.entry-content tbody tr:nth-child(even) {
  background: rgba(251,248,241,.55);
}
@media (max-width: 640px) {
  .page-content table,
  .entry-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}


/* ============================================================
   NESTED PRIMARY NAV + EXPANDED FOOTER
============================================================ */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-menu > .menu-item {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-submenu-toggle {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.nav-submenu-toggle:hover,
.nav-submenu-toggle:focus-visible {
  color: var(--green-800);
  background: rgba(11,61,46,.07);
  outline: none;
}
.nav-submenu-toggle svg {
  transition: transform .2s ease;
}
.menu-item.is-open > .nav-submenu-toggle {
  color: var(--green-800);
  background: rgba(11,61,46,.07);
}
.menu-item.is-open > .nav-submenu-toggle svg {
  transform: rotate(180deg);
}
.nav-menu .sub-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 80;
  min-width: 250px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid rgba(11,61,46,.12);
  border-radius: var(--radius);
  background: rgba(255,255,255,.98);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.nav-menu > .menu-item:hover > .sub-menu,
.nav-menu > .menu-item:focus-within > .sub-menu,
.nav-menu > .menu-item.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-menu .sub-menu li + li {
  margin-top: 2px;
}
.nav-menu .sub-menu a {
  display: block;
  width: 100%;
  border-radius: 8px;
  color: var(--ink-soft);
  line-height: 1.35;
  white-space: normal;
}
.nav-menu .sub-menu a:hover,
.nav-menu .sub-menu a:focus-visible {
  color: var(--green-800);
  background: rgba(11,61,46,.06);
}
.nav-menu > .menu-item.is-current > a {
  color: var(--green-800);
}

@media (max-width: 860px) {
  .nav-menu {
    display: block;
    width: 100%;
  }
  .nav-menu > .menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .nav-menu > .menu-item > a {
    flex: 1;
  }
  .nav-submenu-toggle {
    flex: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    background: var(--cream);
  }
  .nav-menu .sub-menu {
    position: static;
    min-width: 0;
    display: none;
    margin: 6px 0 4px 12px;
    padding: 4px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-menu > .menu-item.is-open > .sub-menu {
    display: block;
  }
  .nav-menu .sub-menu a {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
  }
  .nav-menu .sub-menu li:last-child a {
    border-bottom: 0;
  }
}

/* Expanded footer: brand + Quick Links + Discover + Resources.
   Desktop only — must stay ABOVE the responsive overrides (or in a
   min-width query) so the mobile media queries below/after it win. */
@media (min-width: 861px) {
  .footer__top { grid-template-columns: 1.35fr .8fr .8fr .8fr; }
}
