/*
Theme Name: Hafiz Muddassir — hafiz-muddassir-theme-v1
Theme URI: https://hafizmuddassir.com
Author: WP-Flash | SerpZenith
Description: Bespoke theme for Hafiz Muddassir online Islamic education. Parchment/green manuscript design system, Libre Baskerville + Lato + Amiri, gated geometric WebGL hero, icon mega-menu, auto-TOC, AEO schema suite.
Version: 1.7.4
License: Private
Text Domain: hafiz-muddassir-theme-v1
*/

/* =====================================================
   VARIABLES — config/visual-identity.json
   ===================================================== */
:root {
  --c-primary: #14532D;
  --c-secondary: #0E3D21;
  --c-accent: #B58A3C;        /* fills & rules only on parchment */
  --c-accent-dark: #8A6420;   /* gold TEXT on parchment */
  --c-accent-soft: #E8DCC0;
  --c-bg: #FAF7F0;
  --c-surface: #FFFFFF;
  --c-border: #E4DCCC;
  --c-text: #22251F;
  --c-muted: #5C6157;
  --c-success: #15803D;
  --primary-rgb: 20, 83, 45;
  --accent-rgb: 181, 138, 60;

  --f-heading: 'Libre Baskerville', Georgia, serif;
  --f-body: 'Lato', -apple-system, 'Segoe UI', sans-serif;
  --f-arabic: 'Amiri', 'Traditional Arabic', serif;

  --radius: 4px;
  --radius-lg: 8px;
  --sh-sm: 0 2px 8px rgba(20, 40, 25, 0.07);
  --sh-md: 0 5px 18px rgba(20, 40, 25, 0.11);
  --sh-lg: 0 10px 34px rgba(20, 40, 25, 0.16);

  --sp-md: 24px;
  --sp-lg: 48px;
  --sp-xl: 88px;
  --container: 1180px;
  --measure: 68ch;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--f-body);
  font-size: 17px;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--c-accent-dark); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--c-accent-dark); outline-offset: 3px; border-radius: 2px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--c-primary); color: #fff; padding: 12px 24px; font-weight: 700;
}
.skip-link:focus { left: 0; color: #fff; }

/* =====================================================
   TYPOGRAPHY
   Libre Baskerville H1/H2 only; Lato below. Amiri for Arabic.
   Line-height 1.8: transliteration diacritics need the room.
   ===================================================== */
h1, h2 {
  font-family: var(--f-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--c-text);
  letter-spacing: 0.002em;
}
h3, h4, h5, h6 { font-family: var(--f-body); font-weight: 700; line-height: 1.35; color: var(--c-text); }
h1 { font-size: clamp(34px, 4.6vw, 52px); }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: clamp(20px, 2.4vw, 25px); }
h4 { font-size: 20px; }
p { margin-bottom: 1.35em; }
p:last-child { margin-bottom: 0; }

/* Arabic script — always Amiri, always tagged lang="ar" in markup */
[lang="ar"] {
  font-family: var(--f-arabic);
  font-size: 1.25em;
  line-height: 2.0;
  direction: rtl;
  unicode-bidi: isolate;
}
.arabic-block {
  font-family: var(--f-arabic);
  font-size: 1.5em;
  line-height: 2.1;
  direction: rtl;
  text-align: center;
  padding: 22px 26px;
  background: var(--c-surface);
  border-block: 2px solid var(--c-accent);
  margin: 26px 0;
}
/* transliterated terms */
em.term, .entry-content em { font-style: italic; }

/* Quick-answer block — the AI-citable passage */
.direct-answer {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--c-accent);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 26px 30px 24px;
  margin: 34px 0 26px;
  position: relative;
  font-size: 17.5px;
  line-height: 1.75;
  box-shadow: var(--sh-sm);
}
.direct-answer::before {
  content: "Quick answer";
  position: absolute; top: -12px; left: 20px;
  background: var(--c-accent); color: #FFFFFF;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 12px; border-radius: 3px;
}
.direct-answer p:first-child { font-weight: 700; }
.direct-answer p + p { margin-top: 13px; font-weight: 400; font-size: 16.5px; }

/* =====================================================
   LAYOUT
   ===================================================== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--sp-xl) 0; }
.section--tint { background: var(--c-surface); }
.section--deep { background: var(--c-primary); color: #fff; }
.section--deep h2, .section--deep h3 { color: #fff; }
.section--deep p { color: rgba(255,255,255,0.85); }

.kicker {
  display: inline-block;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--c-accent-dark);
  padding-bottom: 6px; margin-bottom: 12px;
  border-bottom: 2px solid var(--c-accent);
}
.section--deep .kicker { color: var(--c-accent-soft); border-color: var(--c-accent); }
.section-header { margin-bottom: var(--sp-lg); }
.section-header.center { text-align: center; }
.section-sub { color: var(--c-muted); font-size: 18px; margin-top: 10px; max-width: 640px; }
.section-header.center .section-sub { margin-inline: auto; }
.section--deep .section-sub { color: rgba(255,255,255,0.78); }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 28px;
  border-radius: var(--radius);
  font-family: var(--f-body);
  font-size: 13.5px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  border: 2px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  position: relative; overflow: hidden;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }
.btn-primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn-primary:hover { background: var(--c-secondary); color: #fff; }
.btn-outline { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: #fff; }
.btn-gold { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.btn-gold:hover { background: var(--c-accent-dark); color: #fff; }
.btn-ghost-light { background: rgba(255,255,255,0.10); color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-ghost-light:hover { background: #fff; color: var(--c-primary); }
.btn-whatsapp { background: #075E54; color: #fff; border-color: #075E54; }
.btn-whatsapp:hover { background: #0A7A6C; color: #fff; }
.btn-lg { padding: 17px 34px; font-size: 14px; }
.btn::after {
  content: ""; position: absolute; inset: 0 auto 0 -80%;
  width: 50%; transform: skewX(-24deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transition: left 0.5s ease; pointer-events: none;
}
.btn:hover::after { left: 130%; }
@media (prefers-reduced-motion: reduce) { .btn::after { display: none; } }

/* =====================================================
   REVEAL ENGINE  ([data-av] tagged by scroll.js)
   ===================================================== */
[data-av] {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(.22,.65,.3,1), transform 0.6s cubic-bezier(.22,.65,.3,1);
  transition-delay: var(--av-delay, 0ms);
}
[data-av].av-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-av] { opacity: 1 !important; transform: none !important; transition: none !important; }
}
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--c-accent), var(--c-accent-dark));
  z-index: 300; pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .progress-bar { display: none; } }

/* 3D depth cards (CSS only — cheap, sitewide) */
.depth-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--sh-sm);
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(.2,.7,.3,1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.depth-card:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: var(--c-accent); }
@media (prefers-reduced-motion: reduce), (hover: none) {
  .depth-card:hover { transform: none; }
}

/* =====================================================
   HEADER
   ===================================================== */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(250,247,240,0.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 13px 24px; max-width: var(--container); margin: 0 auto;
}
.site-logo {
  font-family: var(--f-heading); font-size: 19px; font-weight: 700;
  color: var(--c-text); line-height: 1.15; letter-spacing: 0.01em;
}
.site-logo span { color: var(--c-primary); }
.site-logo small {
  display: block; font-family: var(--f-body); font-size: 9.5px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--c-accent-dark); font-weight: 700; margin-top: 3px;
}
.hamburger {
  display: none; background: none; border: 1px solid var(--c-border);
  border-radius: var(--radius); cursor: pointer; padding: 9px 11px;
}
.hamburger span { display: block; width: 20px; height: 2px; background: var(--c-text); margin: 4px 0; }

/* ── nav: icon pills + mega panels ── */
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 12px; border-radius: 6px;
  font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--c-text);
  transition: color 0.2s, background 0.2s;
}
.nav-links > li > a:hover,
.nav-links > li:focus-within > a { background: rgba(var(--primary-rgb), 0.06); color: var(--c-primary); }
.mi-top-ico { display: inline-flex; color: var(--c-accent-dark); transition: transform 0.25s ease; }
.nav-links > li > a:hover .mi-top-ico { transform: translateY(-2px); }
.nav-links .menu-item-has-children > a::after {
  content: ""; width: 6px; height: 6px; margin-left: 3px;
  border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translate(-2px,-2px);
  transition: transform 0.25s ease; opacity: 0.6; display: inline-block;
}
.nav-links .menu-item-has-children:hover > a::after,
.nav-links .menu-item-has-children:focus-within > a::after { transform: rotate(225deg) translate(-2px,-2px); opacity: 1; }

.nav-links .sub-menu {
  position: absolute; top: calc(100% + 14px); left: -10px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  box-shadow: 0 22px 54px -16px rgba(20,40,25,0.28), 0 2px 8px rgba(20,40,25,0.06);
  padding: 12px;
  min-width: 300px;
  opacity: 0; visibility: hidden;
  transform: translateY(10px) scale(0.985);
  transform-origin: top left;
  transition: opacity 0.22s cubic-bezier(.2,.7,.3,1), transform 0.22s cubic-bezier(.2,.7,.3,1), visibility 0.22s;
  z-index: 260;
}
.nav-links .sub-menu::after {
  content: ""; position: absolute; top: 0; left: 18px; right: 18px; height: 2px;
  background: linear-gradient(90deg, var(--c-accent), transparent);
}
.nav-links .sub-menu::before { content: ""; position: absolute; top: -16px; left: 0; right: 0; height: 16px; }
.nav-links > li:hover > .sub-menu,
.nav-links > li:focus-within > .sub-menu,
.nav-links > li.open > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.nav-links > li.has-mega > .sub-menu {
  display: grid; grid-template-columns: repeat(2, minmax(230px, 1fr));
  gap: 2px 6px; width: max-content; max-width: min(92vw, 620px);
}
.nav-links > li.flip-right > .sub-menu { left: auto; right: -10px; transform-origin: top right; }

.nav-links .sub-menu a {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px; border-radius: 7px;
  color: var(--c-text);
  transition: background 0.18s ease, transform 0.18s ease;
}
.nav-links .sub-menu a:hover { background: rgba(var(--primary-rgb), 0.06); transform: translateX(2px); }
.mi-ico {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, rgba(var(--accent-rgb),0.18), rgba(var(--primary-rgb),0.08));
  color: var(--c-accent-dark);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.nav-links .sub-menu a:hover .mi-ico { background: var(--c-primary); color: var(--c-accent-soft); transform: rotate(-4deg) scale(1.06); }
.mi-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mi-label { font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--c-text); }
.mi-desc { font-size: 12px; line-height: 1.4; color: var(--c-muted); font-weight: 400; }
.nav-links .sub-menu a:hover .mi-label { color: var(--c-primary); }
.nav-links .sub-menu .menu-all { grid-column: 1 / -1; margin-top: 4px; }
.nav-links .sub-menu .menu-all a {
  justify-content: center; gap: 8px;
  background: rgba(var(--primary-rgb), 0.06); color: var(--c-primary);
  font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  padding: 11px;
}
.nav-links .sub-menu .menu-all a:hover { background: var(--c-primary); color: #fff; transform: none; }

/* header CTAs */
.header-cta { display: flex; align-items: center; gap: 8px; }
.hcta {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 15px 0 5px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.hcta:hover { color: #fff; transform: translateY(-1px); box-shadow: var(--sh-md); }
.hcta-ico {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.hcta--wa { background: #075E54; }
.hcta--wa:hover { background: #0A7A6C; }
.hcta--wa .hcta-ico { background: #25D366; color: #05261A; }
.hcta--tel { background: var(--c-primary); }
.hcta--tel:hover { background: var(--c-secondary); }
.hcta--tel .hcta-ico { background: rgba(255,255,255,0.18); color: #fff; }

@media (max-width: 1080px) { .hcta--tel .hcta-label { display: none; } .hcta--tel { padding: 0 5px; } }
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--c-bg); border-bottom: 1px solid var(--c-border);
    padding: 14px 20px 26px; gap: 2px;
    box-shadow: var(--sh-md);
    max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .hamburger { display: block; }
  .nav-links > li > a { width: 100%; padding: 13px 10px; font-size: 15px; }
  .nav-links .menu-item-has-children > a::after { margin-left: auto; }
  .nav-links .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    display: none; box-shadow: none; border: none; border-radius: 0;
    border-left: 2px solid var(--c-border); margin-left: 12px;
    padding: 2px 0 10px 8px; min-width: 0; width: auto; max-width: none;
  }
  .nav-links .sub-menu::after, .nav-links .sub-menu::before { display: none; }
  .nav-links > li.has-mega > .sub-menu { grid-template-columns: 1fr; width: auto; }
  .nav-links li.open > .sub-menu { display: grid; }
  .nav-links > li:not(.has-mega).open > .sub-menu { display: block; }
  .mi-desc { display: none; }
}
@media (max-width: 560px) {
  .hcta { height: 38px; padding: 0 4px; gap: 0; }
  .hcta-label { display: none; }
}
@media (max-width: 360px) { .hcta--tel { display: none; } }

/* =====================================================
   HERO — front page (WebGL geometric field behind)
   ===================================================== */
.hero-3d {
  position: relative;
  min-height: clamp(540px, 78vh, 780px);
  display: flex; align-items: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 8%, rgba(232,220,192,0.16), transparent 62%),
    radial-gradient(ellipse 70% 60% at 82% 88%, rgba(181,138,60,0.14), transparent 60%),
    linear-gradient(168deg, #0B2E19 0%, #14532D 52%, #1B6B3A 100%);
  overflow: hidden; isolation: isolate;
}

/* ── Islamic pattern fallback ──
   Mobile never downloads Three.js, so this layer is what most visitors
   actually see. Two stacked layers: an eight-point khatam lattice built
   from repeating conic gradients, and a row of pointed-arch silhouettes
   along the base, both in brass on deep green. */
.hero-3d::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  opacity: 0.20;
  background-image:
    repeating-conic-gradient(from 22.5deg at 50% 50%,
      rgba(232,220,192,0.55) 0deg 3deg, transparent 3deg 45deg),
    repeating-conic-gradient(from 0deg at 50% 50%,
      rgba(181,138,60,0.40) 0deg 2deg, transparent 2deg 45deg);
  background-size: 116px 116px, 116px 116px;
  background-position: 0 0, 58px 58px;
  mask-image: radial-gradient(ellipse 92% 88% at 50% 40%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 92% 88% at 50% 40%, #000 25%, transparent 78%);
}

/* Arcade of pointed arches along the base. Each arch is a radial
   gradient clipped by an ogee mask, repeated horizontally. */
.hero-3d::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  z-index: -2; pointer-events: none; opacity: 0.34;
  background-image:
    radial-gradient(closest-side at 50% 100%,
      transparent 0 62%, rgba(181,138,60,0.85) 62% 66%, transparent 66%),
    linear-gradient(to top, rgba(11,46,25,0.75), transparent 70%);
  background-size: 150px 190px, 100% 100%;
  background-repeat: repeat-x, no-repeat;
  background-position: center bottom, center bottom;
}
@media (max-width: 640px) {
  .hero-3d::before { background-size: 84px 84px, 84px 84px; background-position: 0 0, 42px 42px; }
  .hero-3d::after  { background-size: 104px 138px, 100% 100%; height: 40%; }
}

#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: -1; display: block; opacity: 0; transition: opacity 1.4s ease;
}
#hero-canvas.is-ready { opacity: 1; }
/* geometric fallback pattern, always painted */
.hero-3d::after {
  content: ""; position: absolute; inset: 0; z-index: -2; opacity: 0.14; pointer-events: none;
  background-image:
    repeating-conic-gradient(from 22.5deg, rgba(232,220,192,0.35) 0deg 4deg, transparent 4deg 45deg);
  background-size: 140px 140px;
  mask-image: radial-gradient(ellipse 90% 90% at 60% 40%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 60% 40%, black 20%, transparent 75%);
}
.hero-3d .container { position: relative; z-index: 2; padding-block: 76px; }
.hero-inner { max-width: 720px; position: relative; }
.hero-inner::before {
  content: ""; position: absolute; inset: -44px -60px -44px -44px;
  background: radial-gradient(ellipse 92% 100% at 30% 50%, rgba(11,46,25,0.55), transparent 76%);
  z-index: -1; border-radius: 20px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(232,220,192,0.13);
  border: 1px solid rgba(232,220,192,0.4);
  color: var(--c-accent-soft);
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.hero-title {
  font-family: var(--f-heading);
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.15; color: #fff; margin-bottom: 18px;
}
.hero-title em { font-style: italic; color: #E8CE96; }
.hero-sub {
  font-size: clamp(16.5px, 1.9vw, 19px);
  color: rgba(255,255,255,0.86);
  max-width: 590px; margin-bottom: 30px; line-height: 1.75;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-trust { display: flex; gap: 24px; flex-wrap: wrap; }
.hero-trust .trust-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,0.88);
}
.hero-trust .trust-item svg { color: #E8CE96; flex-shrink: 0; }

/* inner-page hero */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(150deg, var(--c-secondary), var(--c-primary));
  color: #fff; padding: 70px 0 58px;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.1; pointer-events: none;
  background-image: repeating-conic-gradient(from 22.5deg, rgba(232,220,192,0.5) 0deg 4deg, transparent 4deg 45deg);
  background-size: 120px 120px;
  mask-image: radial-gradient(ellipse 85% 100% at 70% 0%, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 85% 100% at 70% 0%, black 25%, transparent 75%);
}
.page-hero h1 { color: #fff; margin-bottom: 14px; max-width: 840px; }
.page-hero .page-hero-sub { color: rgba(255,255,255,0.84); font-size: 17.5px; max-width: 660px; line-height: 1.75; }
.page-hero .hero-ctas { margin: 24px 0 0; }

/* =====================================================
   GRIDS & COMPONENTS
   ===================================================== */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card-icon {
  width: 52px; height: 52px; border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(var(--accent-rgb),0.16), rgba(var(--primary-rgb),0.08));
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  color: var(--c-accent-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card-title { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.depth-card p { color: var(--c-muted); font-size: 15px; }
.card-link { font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--c-primary); }
.card-link:hover { color: var(--c-accent-dark); }

.locations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 11px; }
.location-link {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 15px; border: 1px solid var(--c-border); border-radius: var(--radius);
  font-size: 14px; font-weight: 600; color: var(--c-text); background: var(--c-surface);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.location-link:hover { border-color: var(--c-primary); color: var(--c-primary); transform: translateY(-2px); }
.location-link svg { color: var(--c-accent-dark); flex-shrink: 0; }

/* stats */
.stats-bar { background: var(--c-primary); color: #fff; padding: 42px 0; }
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.stat-number { font-family: var(--f-heading); font-size: clamp(26px, 3.6vw, 40px); font-weight: 700; color: #E8CE96; line-height: 1.1; }
.stat-label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; margin-top: 8px; }
@media (max-width: 640px) { .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 26px 14px; } }

/* manifesto */
.manifesto-list { max-width: 720px; margin: 0 auto; }
.manifesto-item {
  display: grid; grid-template-columns: 56px 1fr; gap: 22px;
  padding: 36px 0; border-bottom: 1px solid var(--c-border);
  opacity: 0.35; transition: opacity 0.4s ease;
}
.manifesto-item:first-child { border-top: 1px solid var(--c-border); }
.manifesto-item.in-view { opacity: 1; }
.manifesto-number { font-family: var(--f-heading); font-size: 15px; font-weight: 700; color: var(--c-accent-dark); padding-top: 5px; }
.manifesto-body h3 { margin-bottom: 10px; }
.manifesto-body p { color: var(--c-muted); margin: 0; }
@media (prefers-reduced-motion: reduce) { .manifesto-item { opacity: 1; } }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--c-border); }
.faq-item:first-child { border-top: 1px solid var(--c-border); }
.faq-question {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 20px 0; font-weight: 700; font-size: 16.5px; cursor: pointer; list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-chevron {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--c-accent-dark); color: var(--c-accent-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; line-height: 1; transition: transform 0.2s ease;
}
details[open] .faq-chevron { transform: rotate(45deg); }
.faq-answer { padding: 0 0 20px; color: var(--c-muted); line-height: 1.8; }

/* CTA band */
.cta-section {
  background: linear-gradient(135deg, var(--c-secondary), var(--c-primary), #1B6B3A, var(--c-secondary));
  background-size: 280% 280%;
  animation: cta-drift 20s ease infinite;
  color: #fff; text-align: center; padding: var(--sp-xl) 0;
  position: relative; overflow: hidden;
}
@keyframes cta-drift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .cta-section { animation: none; } }
.cta-section h2 { color: #fff; margin-bottom: 14px; }
.cta-section p { color: rgba(255,255,255,0.85); font-size: 18px; max-width: 580px; margin: 0 auto 26px; }
.cta-section .hero-ctas { justify-content: center; margin: 0; }

/* =====================================================
   CONTENT PAGES
   ===================================================== */
.breadcrumb { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--c-muted); padding: 16px 0; }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb [aria-current] { color: var(--c-text); font-weight: 700; }
.breadcrumb .sep { opacity: 0.5; }

.content-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 52px; align-items: start; }
@media (max-width: 900px) { .content-layout { grid-template-columns: 1fr; gap: 40px; } }
.entry-content { max-width: var(--measure); }
.entry-content > p:first-of-type { font-size: 19px; line-height: 1.75; }
.entry-content h2 { margin: 56px 0 18px; padding-bottom: 12px; border-bottom: 2px solid var(--c-border); position: relative; }
.entry-content h2::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 44px; height: 2px; background: var(--c-accent); }
.entry-content h3 { margin: 34px 0 13px; }
.entry-content ul, .entry-content ol { margin: 0 0 1.35em 1.2em; }
.entry-content li { margin-bottom: 9px; }
.entry-content li::marker { color: var(--c-accent-dark); font-weight: 700; }
.entry-content table {
  width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px;
  background: var(--c-surface); border: 1px solid var(--c-border); box-shadow: var(--sh-sm);
  font-variant-numeric: tabular-nums;
}
.entry-content th {
  background: var(--c-primary); color: #fff; font-weight: 700;
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 12px 16px; text-align: left;
}
.entry-content td { padding: 12px 16px; border-bottom: 1px solid var(--c-border); }
.entry-content tbody tr:hover { background: rgba(var(--accent-rgb), 0.05); }
.entry-content tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.entry-content a:not(.btn) {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1.5px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size 0.3s ease; padding-bottom: 1px;
}
.entry-content a:not(.btn):hover { background-size: 100% 1.5px; }
.entry-updated {
  margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--c-border);
  font-size: 13px; color: var(--c-muted); font-style: italic;
}

/* sidebar */
.sidebar-sticky { position: sticky; top: 92px; }
.sidebar-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--sh-sm);
  margin-bottom: 20px;
}
.sidebar-card h3 { font-family: var(--f-heading); font-weight: 700; font-size: 19px; margin-bottom: 12px; }
.sidebar-links { list-style: none; }
.sidebar-links li { padding: 9px 0; border-bottom: 1px solid var(--c-border); font-size: 14.5px; }
.sidebar-links li:last-child { border-bottom: none; }
.toc-list { list-style: none; max-height: 44vh; overflow-y: auto; }
.toc-list li { border-bottom: 1px solid var(--c-border); }
.toc-list li:last-child { border-bottom: none; }
.toc-list a {
  display: block; padding: 8px 2px 8px 12px; font-size: 13.5px; color: var(--c-muted);
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, padding-left 0.2s;
}
.toc-list a:hover { color: var(--c-primary); padding-left: 16px; }
.toc-list a.toc-active { color: var(--c-primary); font-weight: 700; border-left-color: var(--c-accent); }

/* =====================================================
   FLOATING CONTACT + MOBILE BAR
   ===================================================== */
.float-rail {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  z-index: 880; display: flex; flex-direction: column; gap: 12px; align-items: flex-end;
}
.float-btn {
  position: relative; display: flex; align-items: center;
  height: 54px; width: 54px; border-radius: 999px; overflow: hidden;
  color: #fff; box-shadow: 0 8px 24px -6px rgba(20,40,25,0.45);
  transition: width 0.3s cubic-bezier(.2,.7,.3,1), padding 0.3s cubic-bezier(.2,.7,.3,1),
              box-shadow 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}
.float-ico { flex: 0 0 54px; height: 54px; display: inline-flex; align-items: center; justify-content: center; }
.float-label {
  font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em;
  opacity: 0; transform: translateX(-6px);
  transition: opacity 0.22s ease 0.06s, transform 0.22s ease 0.06s;
}
.float-btn:hover, .float-btn:focus-visible { width: 196px; padding-right: 20px; color: #fff; transform: translateX(-2px); }
.float-btn:hover .float-label, .float-btn:focus-visible .float-label { opacity: 1; transform: none; }
.float-btn--wa { background: #075E54; }
.float-btn--wa:hover { background: #0A7A6C; }
.float-btn--tel { background: var(--c-primary); }
.float-btn--tel:hover { background: var(--c-secondary); }
.float-btn--wa::after {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  border: 2px solid #25D366; animation: fr-pulse 2.8s ease-out infinite; pointer-events: none;
}
@keyframes fr-pulse { 0% { transform: scale(1); opacity: 0.6; } 70%,100% { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .float-btn--wa::after { animation: none; } .float-btn, .float-label { transition: none; } }

.mobile-call-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  box-shadow: 0 -8px 28px rgba(0,0,0,0.2);
  padding-bottom: env(safe-area-inset-bottom);
}
.mcb-btn {
  flex: 1 1 50%; display: flex; align-items: center; justify-content: center; gap: 11px;
  padding: 12px 10px; min-height: 64px; color: #fff; transition: filter 0.15s ease;
}
.mcb-btn:active { filter: brightness(1.12); }
.mcb-btn--wa { background: #075E54; color: #fff; }
.mcb-btn--tel { background: var(--c-primary); color: #fff; box-shadow: inset 1px 0 0 rgba(255,255,255,0.2); }
.mcb-btn--wa:hover, .mcb-btn--tel:hover { color: #fff; }
.mcb-ico {
  width: 37px; height: 37px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.16);
}
.mcb-btn--wa .mcb-ico { background: #25D366; color: #05261A; }
.mcb-text { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.mcb-text strong { font-size: 15px; font-weight: 700; }
.mcb-text small { font-size: 11px; opacity: 0.88; font-weight: 500; margin-top: 1px; }
@media (max-width: 900px) {
  .float-rail { display: none; }
  .mobile-call-bar { display: flex; }
  body { padding-bottom: 66px; }
  .back-top { bottom: 78px; right: 16px; }
}
@media (min-width: 901px) { .back-top { right: auto; left: 22px; bottom: 26px; } }
@media (max-width: 380px) { .mcb-text small { display: none; } .mcb-btn { min-height: 56px; } }

.back-top {
  position: fixed; z-index: 850;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--c-primary); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-md);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { background: var(--c-secondary); }


/* ── Social profiles (footer + header) ──
   Brand colours on hover only; the resting state stays parchment so the
   footer does not turn into a row of logos competing with the content. */
.social-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.social-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 11px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: rgba(255,255,255,0.82);
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.social-link svg { flex-shrink: 0; }
.social-link:hover { transform: translateY(-2px); color: #fff; }
.social-link--yt:hover { background: #FF0000; border-color: #FF0000; }
.social-link--fb:hover { background: #1877F2; border-color: #1877F2; }
@media (prefers-reduced-motion: reduce) { .social-link:hover { transform: none; } }
@media (max-width: 560px) { .social-row { justify-content: flex-start; } }

/* Header social icons: icon-only, hidden on small screens where the
   contact buttons take priority. */
.header-social { display: flex; gap: 4px; align-items: center; }
.header-social a {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--c-muted);
  transition: background 0.2s ease, color 0.2s ease;
}
.header-social a:hover { background: rgba(var(--primary-rgb), 0.08); color: var(--c-primary); }
@media (max-width: 1180px) { .header-social { display: none; } }

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer { background: #0A2415; color: rgba(255,255,255,0.78); padding: var(--sp-xl) 0 26px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: var(--sp-lg);
  padding-bottom: var(--sp-lg); border-bottom: 1px solid rgba(255,255,255,0.12); margin-bottom: 24px;
}
.footer-brand .site-logo { color: #fff; margin-bottom: 14px; display: block; }
.footer-brand .site-logo span { color: #E8CE96; }
.footer-brand .site-logo small { color: rgba(232,220,192,0.6); }
.footer-brand p { font-size: 14px; opacity: 0.75; line-height: 1.75; }
.footer-col h4 {
  color: #fff; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 16px; opacity: 0.9;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.75); font-size: 14px; }
.footer-links a:hover { color: #E8CE96; }
.footer-contact a { font-family: var(--f-heading); color: #fff; font-size: 16.5px; display: block; margin-bottom: 8px; }
.footer-contact a:hover { color: #E8CE96; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; opacity: 0.72; flex-wrap: wrap; gap: 10px 22px; }
.footer-credit{color:rgba(255,255,255,.6);}.footer-credit a{color:var(--c-accent);font-weight:600;transition:color .2s ease;}.footer-credit a:hover{color:var(--c-accent-soft);}@media (max-width:640px){.footer-bottom{flex-direction:column;text-align:center;gap:8px;}}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }

/* 404 */
.error-404 { text-align: center; padding: 110px 0; }
.error-code { font-family: var(--f-heading); font-size: clamp(80px, 15vw, 170px); line-height: 1; color: rgba(var(--primary-rgb), 0.14); font-weight: 700; }

::selection { background: rgba(var(--accent-rgb), 0.3); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: #C9C0AC; border-radius: 6px; border: 3px solid var(--c-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--c-primary); }

@media print {
  .site-header, .site-footer, .mobile-call-bar, .float-rail, #hero-canvas, .cta-section, .back-top { display: none !important; }
  body { padding-bottom: 0; background: #fff; }
}
