/* ==========================================================================
   YWAM San José — design system for Elementor (Version A)
   Palette base: coolors.co/palette/ff6f00-c04000-b22222-023659-6b8e23-4682b4

   How this works with Elementor 4 (Atomic):
   - Colors and fonts are Elementor global variables with the same names as the tokens
     below (--orange, --sand, --font-display…). Change them in Elementor → Variables and
     the whole site follows. The values here are only fallbacks.
   - Elementor's default styles for Atomic blocks (padding:10px, display…) load after this
     file. Three Elementor global classes neutralise them and read these variables instead:
       ywam-block  →  display / flex-direction / padding / margin / width / max-width
                      via --blk-display, --blk-dir, --blk-pad, --blk-m, --blk-w, --blk-maxw
       ywam-text   →  margin via --txt-m (headings & paragraphs)
       button      →  the button box via --btn-bg, --btn-fg, --btn-border, --btn-pad, --btn-size
     So component classes below set those variables for layout-level properties, and set
     everything else normally. Styles added in the Elementor editor still win.

   Contrast notes (WCAG):
   - Body text: ink on sand (14:1). Small accent text: firebrick on sand (5.8:1).
   - Orange is a fill, never small text on light: ink on orange = 6:1.
   - On navy/jungle/ink sections use sand text; orange only for large display text.
   ========================================================================== */

/* Layout variables read by the ywam-block / ywam-text / button global classes.
   Registered as non-inherited so a container's padding doesn't leak into its children. */
@property --blk-display { syntax: "*"; inherits: false; }
@property --blk-dir { syntax: "*"; inherits: false; }
@property --blk-pad { syntax: "*"; inherits: false; }
@property --blk-m { syntax: "*"; inherits: false; }
@property --blk-w { syntax: "*"; inherits: false; }
@property --blk-maxw { syntax: "*"; inherits: false; }
@property --txt-m { syntax: "*"; inherits: false; }
@property --btn-bg { syntax: "*"; inherits: false; }
@property --btn-fg { syntax: "*"; inherits: false; }
@property --btn-border { syntax: "*"; inherits: false; }
@property --btn-pad { syntax: "*"; inherits: false; }
@property --btn-size { syntax: "*"; inherits: false; }

:root {
  /* Palette (fallbacks — Elementor variables override these) */
  --orange: #FF6F00;
  --mahogany: #C04000;
  --firebrick: #B22222;
  --navy: #023659;
  --olive: #6B8E23;
  --steel: #4682B4;
  --jungle: #2F4A1C;
  --sand: #F5EFE4;
  --sand-2: #ECE2CF;
  --paper: #FFFCF6;
  --ink: #0B1E2D;
  --muted: #4B5661;
  --line: rgb(11 30 45 / 0.12);

  /* Type (fallbacks) */
  --font-display: "Bricolage Grotesque";
  --font-body: "DM Sans";
  --font-hand: "Caveat";

  /* Layout */
  --content-max: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;
  --section-y: clamp(72px, 10vw, 144px);

  /* Shape */
  --r-lg: clamp(20px, 2.4vw, 32px);
  --r-md: clamp(14px, 1.6vw, 20px);
  --r-sm: 12px;
  --pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { overflow-x: clip; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body), system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  color: var(--ink);
  background: var(--sand);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: inherit; }
a:hover, a:active { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display), system-ui, sans-serif;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: inherit;
  text-wrap: balance;
}

p { text-wrap: pretty; }

::selection { background: var(--orange); color: var(--ink); }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Classic widgets (shortcodes, menus) sit flush — spacing comes from the design classes */
.elementor-widget-shortcode, .elementor-widget-nav-menu { margin: 0 !important; }

/* ---------- Container: 1280px content, fluid below ---------- */
.container {
  --blk-w: 100%;
  --blk-maxw: calc(var(--content-max) + var(--gutter) * 2);
  --blk-m: 0 auto;
  --blk-pad: 0 var(--gutter);
}

/* ---------- Type helpers ---------- */
.display-1 { font-size: clamp(3rem, 1rem + 8.2vw, 8.75rem); line-height: 0.9; letter-spacing: -0.045em; }
.display-2 { font-size: clamp(2.6rem, 1rem + 5.6vw, 6.25rem); line-height: 0.92; letter-spacing: -0.04em; }
.h2 { font-size: clamp(2.1rem, 1rem + 3.6vw, 4.25rem); line-height: 0.95; }
.h3 { font-size: clamp(1.35rem, 1rem + 1vw, 1.9rem); line-height: 1.1; letter-spacing: -0.02em; }

.eyebrow {
  --txt-m: 0 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body), sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--firebrick);
}

.eyebrow::before {
  content: "";
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--orange);
}

.lead {
  max-width: 54ch;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.5;
  color: var(--muted);
}

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.mt-section { --blk-m: clamp(40px, 5vw, 64px) 0 0; }

/* Inline accents inside headings — use the editor's text toolbar:
   Underline = orange marker highlight · Italic = handwritten accent · Bold = accent color */
:is(h1, h2, h3, h4) u {
  text-decoration: none;
  background: linear-gradient(transparent 60%, rgb(255 111 0 / 0.6) 60%, rgb(255 111 0 / 0.6) 88%, transparent 88%);
  padding-inline: 0.04em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

:is(h1, h2, h3, h4) :is(em, i) {
  font-family: var(--font-hand), "Bradley Hand", cursive;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--mahogany);
  font-size: 1.15em;
  display: inline-block;
  transform: rotate(-3deg);
}

:is(h1, h2, h3, h4) :is(strong, b) { font-weight: inherit; color: var(--mahogany); }
.on-dark :is(h1, h2, h3, h4) :is(strong, b),
.on-dark :is(h1, h2, h3, h4) :is(em, i) { color: var(--orange); }

/* Marker-pen underline behind a word (for hand-written HTML) */
.highlight {
  background: linear-gradient(transparent 60%, rgb(255 111 0 / 0.6) 60%, rgb(255 111 0 / 0.6) 88%, transparent 88%);
  padding-inline: 0.04em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hand {
  font-family: var(--font-hand), "Bradley Hand", cursive;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--mahogany);
  font-size: 1.15em;
  display: inline-block;
  transform: rotate(-3deg);
}

.text-orange { color: var(--orange); }

/* ---------- Buttons (Elementor button widget + global class "button") ---------- */
.button {
  --btn-bg: var(--orange);
  --btn-fg: var(--ink);
  --btn-border: transparent;
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease-out), border-color 0.25s;
}

.button::after { content: "→"; transition: transform 0.25s var(--ease-out); }

.button:hover, .button:focus-visible { --btn-bg: var(--ink); --btn-fg: var(--sand); --btn-border: var(--ink); transform: translateY(-2px); }
.button:hover::after { transform: translateX(4px); }

.button--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-border: var(--ink); }
.on-dark .button--ghost { --btn-fg: var(--sand); --btn-border: var(--sand); }
.on-dark .button--ghost:hover, .on-dark .button--ghost:focus-visible { --btn-bg: var(--sand); --btn-fg: var(--ink); --btn-border: var(--sand); }

.button--light { --btn-bg: var(--sand); --btn-fg: var(--ink); }
.button--light:hover { --btn-bg: var(--orange); --btn-fg: var(--ink); --btn-border: var(--orange); }

.button--sm { --btn-pad: 0.7em 1.2em; --btn-size: 0.925rem; }
.button--sm::after { display: none; }

.button-row { --blk-display: flex; --blk-m: 32px 0 0; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 2px;
  width: fit-content;
}
.link-arrow::after { content: "→"; transition: transform 0.25s var(--ease-out); }
.link-arrow:hover::after, a:hover > .link-arrow::after, a:hover .link-arrow::after { transform: translateX(4px); }
.link-arrow a { text-decoration: none; }

/* ---------- Header (Theme Builder header) ---------- */
.elementor-location-header {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 100;
  background: rgb(245 239 228 / 0.82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  transition: box-shadow 0.3s;
}

.elementor-location-header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 30px rgb(11 30 45 / 0.06); }

.header-inner {
  --blk-display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: inherit;
  text-decoration: none;
}
.logo a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }

.logo strong, .logo-mark {
  font-family: var(--font-display), sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.logo span, .logo-tag {
  margin-left: 10px;
  padding: 5px 10px;
  border-radius: var(--pill);
  background: var(--jungle);
  color: var(--sand);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.header-actions { --blk-display: flex; align-items: center; gap: 8px; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 40px;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: var(--pill);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.lang-switch:hover { background: var(--ink); color: var(--sand); }

/* Elementor Pro Nav Menu, restyled */
.ywam-nav { margin-left: auto !important; }

body .ywam-nav .elementor-nav-menu--main .elementor-item {
  padding: 10px 14px !important;
  border-radius: var(--pill);
  color: var(--ink) !important;
  font-family: var(--font-body), sans-serif !important;
  font-weight: 500 !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  transition: background 0.2s, color 0.2s;
}
body .ywam-nav .elementor-nav-menu--main .elementor-item:hover { background: var(--sand-2); }
body .ywam-nav .elementor-nav-menu--main .elementor-item.elementor-item-active,
body .ywam-nav .elementor-nav-menu--main .current-menu-ancestor > .elementor-item {
  background: var(--ink);
  color: var(--sand) !important;
}
body .ywam-nav .elementor-nav-menu--main > .elementor-nav-menu > li { margin: 0 1px; }
body .ywam-nav .elementor-nav-menu--main .elementor-item::before,
body .ywam-nav .elementor-nav-menu--main .elementor-item::after { display: none !important; }
body .ywam-nav .sub-arrow { padding-left: 6px; }
body .ywam-nav .sub-arrow svg { width: 0.7em; height: 0.7em; fill: currentColor; }

body .ywam-nav .elementor-nav-menu--main .sub-menu {
  min-width: 260px !important;
  padding: 8px !important;
  background: var(--paper) !important;
  border-radius: var(--r-md);
  box-shadow: 0 1px 0 var(--line), 0 20px 50px rgb(11 30 45 / 0.16);
  margin-top: 8px !important;
}
body .ywam-nav .elementor-nav-menu--main .sub-menu .elementor-sub-item {
  padding: 10px 14px !important;
  border-radius: var(--r-sm);
  color: var(--ink) !important;
  background: transparent !important;
  font-family: var(--font-body), sans-serif !important;
  font-weight: 500 !important;
  font-size: 1rem !important;
  white-space: nowrap;
}
body .ywam-nav .elementor-nav-menu--main .sub-menu .elementor-sub-item:hover,
body .ywam-nav .elementor-nav-menu--main .sub-menu .elementor-sub-item.elementor-item-active { background: var(--sand) !important; color: var(--mahogany) !important; }

/* Burger + mobile dropdown */
body .ywam-nav .elementor-menu-toggle {
  width: 44px; height: 44px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--ink) !important;
  color: var(--sand) !important;
  font-size: 18px;
}
body .ywam-nav .elementor-menu-toggle svg { fill: var(--sand); width: 18px; height: 18px; }

body .ywam-nav .elementor-nav-menu--dropdown.elementor-nav-menu__container {
  margin-top: 16px !important;
  padding: 8px var(--gutter) 40px;
  background: var(--sand) !important;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-top: 1px solid var(--line);
}
body .ywam-nav .elementor-nav-menu--dropdown .elementor-item {
  padding: 14px 0 !important;
  border-bottom: 1px solid var(--line);
  background: transparent !important;
  color: var(--ink) !important;
  font-family: var(--font-display), sans-serif !important;
  font-size: clamp(1.75rem, 6vw, 2.5rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.1 !important;
  justify-content: flex-start !important;
}
body .ywam-nav .elementor-nav-menu--dropdown .elementor-item.elementor-item-active,
body .ywam-nav .elementor-nav-menu--dropdown .elementor-item:hover { color: var(--mahogany) !important; }
body .ywam-nav .elementor-nav-menu--dropdown .sub-menu { position: static !important; display: block !important; width: auto !important; margin: 0 !important; padding: 6px 0 10px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
body .ywam-nav .elementor-nav-menu--dropdown .elementor-sub-item {
  padding: 8px 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-family: var(--font-body), sans-serif !important;
  font-size: 1.05rem !important;
  font-weight: 500 !important;
}
body .ywam-nav .elementor-nav-menu--dropdown .elementor-sub-item.elementor-item-active { color: var(--mahogany) !important; }
body .ywam-nav .elementor-nav-menu--dropdown .sub-arrow { display: none; }

@media (max-width: 1100px) {
  .header-cta { display: none !important; }
}

/* Tablet & phone (menu collapses): logo left · language + menu button flush right, language first */
@media (max-width: 1024px) {
  .header-inner { flex-wrap: nowrap; }
  .header-inner > :first-child { margin-right: auto; }
  .header-actions { order: 2; --blk-m: 0; }
  body .ywam-nav { order: 3; margin-left: 0 !important; flex-shrink: 0; }
  body .ywam-nav .elementor-nav-menu--dropdown.elementor-nav-menu__container { width: 100vw !important; }
}

@media (max-width: 420px) {
  .logo span, .logo-tag { display: none; }
}

/* ---------- Sections ---------- */
.section { --blk-pad: var(--section-y) 0; }
.section--tight { --blk-pad: calc(var(--section-y) * 0.6) 0; }
.section--flush-top { --blk-pad: 0 0 var(--section-y); }

.section--paper { background: var(--paper); }
.section--sand-2 { background: var(--sand-2); }

.on-dark { color: var(--sand); }
.on-dark .eyebrow { color: var(--orange); }
.on-dark .lead, .on-dark .muted { color: rgb(245 239 228 / 0.78); }
.section--navy { background: var(--navy); }
.section--jungle { background: var(--jungle); }
.section--ink { background: var(--ink); }

.section-head {
  --blk-display: flex;
  --blk-m: 0 0 clamp(36px, 5vw, 72px);
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 24px 48px;
}

.section-head > .e-con { max-width: 760px; }
.section-head .lead { --txt-m: 20px 0 0; }

/* ---------- Home hero ---------- */
.hero { --blk-pad: clamp(32px, 5vw, 64px) 0 var(--section-y); }

.hero-top {
  --blk-display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: end;
  gap: 32px 64px;
}

.hero-top .lead { --txt-m: 0 0 8px; }

.hero-media { --blk-m: clamp(32px, 5vw, 64px) 0 0; position: relative; }
.hero-media .media-frame { aspect-ratio: 16 / 8; }

.hero-chips {
  --blk-display: flex;
  position: absolute !important;
  left: clamp(12px, 2vw, 28px);
  bottom: clamp(12px, 2vw, 28px);
  z-index: 1;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 860px) {
  .hero-top { grid-template-columns: 1fr; }
  .hero-media .media-frame { aspect-ratio: 4 / 5; }
}

/* Rounded image frame (every big image uses this) */
/* (".elementor .media-frame" beats WordPress's media-library CSS, which also uses the
   class "media-frame" and loads for logged-in editors — it would make frames absolute.) */
.media-frame,
.elementor .media-frame {
  position: relative;
  inset: auto;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--sand-2);
}

.media-frame img, .media-frame .e-image-base {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--zoom img { animation: settle 1.6s var(--ease-out) both; }

@keyframes settle { from { transform: scale(1.08); } to { transform: none; } }

/* Chips / tags */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 9px 16px;
  border-radius: var(--pill);
  background: rgb(255 252 246 / 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
}

.chip--dark { background: var(--ink); color: var(--sand); }

.chips { --blk-display: flex; flex-wrap: wrap; gap: 10px; }
.chips .chip { background: var(--paper); border: 1px solid var(--line); font-weight: 500; font-size: 0.95rem; }

/* Spinning "Pura Vida" badge ([ywam_badge]) */
.hero-media .elementor-widget-shortcode { position: static; }

.spin-badge {
  position: absolute;
  z-index: 2;
  bottom: 0;
  right: clamp(16px, 4vw, 56px);
  width: clamp(110px, 13vw, 168px);
  aspect-ratio: 1;
  transform: translateY(45%);
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 14px 40px rgb(192 64 0 / 0.35);
}

.spin-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 18s linear infinite; }

.spin-badge text {
  font-family: var(--font-body), sans-serif;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  fill: currentColor;
}

.spin-badge-center {
  font-family: var(--font-display), sans-serif;
  font-weight: 800;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: -0.04em;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Marquee ([ywam_marquee]) ---------- */
.marquee-wrap { position: relative; z-index: 2; }

.marquee {
  position: relative;
  overflow: hidden;
  padding-block: clamp(14px, 2vw, 22px);
  background: var(--orange);
  color: var(--ink);
  transform: rotate(-1.6deg);
  width: 104%;
  margin: -12px -2%;
}

.marquee--navy { background: var(--navy); color: var(--sand); transform: rotate(1.2deg); }

.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; flex-shrink: 0; }

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  padding-right: clamp(20px, 3vw, 40px);
  font-family: var(--font-display), sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee-item::after { content: "✺"; font-size: 0.8em; }

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Split layout ---------- */
.split {
  --blk-display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(36px, 6vw, 96px);
}

.split--wide-media { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.split .media-frame { aspect-ratio: 4 / 5; }
.split--landscape .media-frame { aspect-ratio: 4 / 3; }

.split-text { --blk-display: flex; --blk-dir: column; gap: 24px; }
.split-text .eyebrow { --txt-m: 0; }

@media (max-width: 860px) {
  .split, .split--wide-media { grid-template-columns: 1fr; }
  .split .media-frame { aspect-ratio: 4 / 3; }
}

/* Floating tag on an image */
.media-tag { position: absolute; left: 16px; bottom: 16px; z-index: 1; }

/* ---------- Stats ---------- */
.stats {
  --blk-display: grid;
  --blk-m: 16px 0 0;
  --blk-pad: 32px 0 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 28px;
  border-top: 1px solid var(--line);
}

.stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.on-dark .stats { border-top-color: rgb(245 239 228 / 0.18); }

.stat-num {
  display: block;
  font-family: var(--font-display), sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 1.5rem + 2.5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--mahogany);
}

.on-dark .stat-num { color: var(--orange); }

.stat-label { display: block; --txt-m: 8px 0 0; color: var(--muted); font-size: 0.95rem; line-height: 1.35; }
.on-dark .stat-label { color: rgb(245 239 228 / 0.75); }

/* ---------- Image cards ---------- */
.card-grid {
  --blk-display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(20px, 2.5vw, 32px);
}

.card {
  --blk-display: flex;
  --blk-dir: column;
  position: relative;
  gap: 18px;
  color: inherit;
  text-decoration: none;
}

.card .media-frame { aspect-ratio: 4 / 5; }
.card--landscape .media-frame { aspect-ratio: 4 / 3; }

.card .media-frame img { transition: transform 0.9s var(--ease-out); }
.card:hover .media-frame img { transform: scale(1.06); }

.card-tag { position: absolute; top: 16px; left: 16px; z-index: 1; }

.card-arrow {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.35s var(--ease-out), background 0.25s;
}

.card:hover .card-arrow { transform: rotate(-45deg); background: var(--sand); }

.card h3 { font-size: clamp(1.45rem, 1rem + 1.2vw, 2.1rem); line-height: 1.05; }
.card p { --txt-m: 8px 0 0; color: var(--muted); }

/* ---------- Bento gallery ---------- */
.bento {
  --blk-display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(150px, 19vw, 270px);
  gap: clamp(10px, 1.5vw, 20px);
}

.bento > * { position: relative; overflow: hidden; border-radius: var(--r-lg); }
.bento img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.bento .figure:hover img { transform: scale(1.05); }
.bento .figcaption { position: absolute; left: 14px; bottom: 14px; z-index: 1; }

.b-wide { grid-column: span 2; }
.b-tall { grid-row: span 2; }

.bento-note {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--orange);
  color: var(--ink);
}

.bento-note strong {
  font-family: var(--font-hand), cursive;
  font-size: clamp(2.4rem, 1.5rem + 2.5vw, 4rem);
  line-height: 0.9;
  transform: rotate(-4deg);
  transform-origin: left;
}

.bento-note span { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }

@media (max-width: 860px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 42vw; }
}

/* ---------- Quote ---------- */
.quote {
  --txt-m: 0 auto;
  max-width: 22ch;
  text-align: center;
  font-family: var(--font-display), sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 1rem + 3vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.quote-ref { display: block; --txt-m: 24px 0 0; text-align: center; font-weight: 700; color: var(--firebrick); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; }
.on-dark .quote-ref { color: var(--orange); }

/* ---------- CTA panel (sun + waves are background layers) ---------- */
.cta {
  --blk-pad: clamp(44px, 8vw, 112px) clamp(24px, 6vw, 96px);
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  color: var(--sand);
  background:
    radial-gradient(circle clamp(110px, 16vw, 220px) at calc(100% - clamp(30px, 7vw, 110px)) clamp(20px, 5vw, 80px), var(--orange) 98%, transparent 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='%236B8E23' fill-opacity='.55' d='M0 70c160-40 320-40 480 0s320 40 480 0 320-40 480 0v50H0z'/%3E%3Cpath fill='%236B8E23' fill-opacity='.35' d='M0 90c160-30 320-30 480 0s320 30 480 0 320-30 480 0v30H0z'/%3E%3C/svg%3E") bottom / 100% clamp(60px, 9vw, 120px) no-repeat,
    var(--jungle);
}

.cta h2 { max-width: 14ch; }
.cta .lead { --txt-m: 24px 0 0; color: rgb(245 239 228 / 0.82); }
.cta .hand, .cta :is(h2, h3) :is(em, i) { color: var(--orange); }

.cta--compact {
  --blk-pad: clamp(36px, 5vw, 64px) clamp(24px, 4vw, 56px) clamp(80px, 9vw, 120px);
  background:
    radial-gradient(circle clamp(60px, 7vw, 90px) at calc(100% - 20px) 20px, var(--orange) 98%, transparent 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='%236B8E23' fill-opacity='.55' d='M0 70c160-40 320-40 480 0s320 40 480 0 320-40 480 0v50H0z'/%3E%3Cpath fill='%236B8E23' fill-opacity='.35' d='M0 90c160-30 320-30 480 0s320 30 480 0 320-30 480 0v30H0z'/%3E%3C/svg%3E") bottom / 100% clamp(60px, 9vw, 120px) no-repeat,
    var(--jungle);
}

.cta--fill { height: 100%; }

@media (max-width: 640px) {
  .cta { --blk-pad: 120px 24px 96px; }
  .cta--compact { --blk-pad: 110px 24px 96px; }
}

/* ---------- Inner page hero ---------- */
.page-hero { --blk-pad: clamp(24px, 4vw, 48px) 0 0; }

.page-hero h1 { max-width: 16ch; }
.page-hero .lead { --txt-m: 24px 0 0; }

.page-hero-media { --blk-m: clamp(32px, 5vw, 64px) 0 0; position: relative; }
.page-hero-media .media-frame { aspect-ratio: 21 / 9; }

@media (max-width: 860px) {
  .page-hero-media .media-frame { aspect-ratio: 4 / 3; }
}

/* Breadcrumb ([ywam_breadcrumb]) */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumb li + li::before { content: "/"; margin-right: 10px; opacity: 0.5; }
.breadcrumb a { color: var(--ink); font-weight: 500; text-decoration-color: var(--orange); text-underline-offset: 3px; }

/* Quick facts bar */
.facts {
  --blk-display: grid;
  --blk-m: clamp(16px, 2vw, 24px) 0 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 2px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--line);
}

.fact { --blk-pad: 20px 24px; background: var(--paper); }
.fact .dt { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--firebrick); }
.fact .dd { display: block; --txt-m: 6px 0 0; font-family: var(--font-display), sans-serif; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.2; }

/* ---------- School rows (training overview) ---------- */
.rows { --blk-display: grid; gap: clamp(48px, 7vw, 96px); }

.row {
  --blk-display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  color: inherit;
  text-decoration: none;
}

.row:nth-child(even) .row-media { order: 2; }
.row .media-frame { aspect-ratio: 4 / 3; }
.row .media-frame img { transition: transform 0.9s var(--ease-out); }
.row:hover .media-frame img { transform: scale(1.05); }
.row-num { display: block; font-family: var(--font-display), sans-serif; font-weight: 800; font-size: 1rem; color: var(--mahogany); letter-spacing: 0.02em; }
.row h3 { --txt-m: 12px 0 0; font-size: clamp(1.9rem, 1rem + 2.4vw, 3.25rem); line-height: 0.98; }
.row p { --txt-m: 20px 0 0; color: var(--muted); max-width: 46ch; }
.row .chips { --blk-m: 24px 0 0; }
.row .link-arrow { --txt-m: 28px 0 0; }

@media (max-width: 860px) {
  .row { grid-template-columns: 1fr; }
  .row:nth-child(even) .row-media { order: 0; }
}

/* ---------- Phase cards ---------- */
.phases { --blk-display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(20px, 2.5vw, 32px); }

.phase { overflow: hidden; border-radius: var(--r-lg); background: var(--paper); }
.phase .media-frame { aspect-ratio: 16 / 10; border-radius: 0; }
.phase-body { --blk-pad: clamp(24px, 3vw, 40px); }
.phase-meta { --blk-display: flex; --blk-m: 0 0 16px; align-items: center; justify-content: space-between; gap: 12px; }
.phase-num { font-family: var(--font-display), sans-serif; font-weight: 800; font-size: 2.5rem; line-height: 1; color: var(--orange); }
.phase h3 { --txt-m: 0 0 14px; }
.phase p { color: var(--muted); }

/* ---------- Details + pricing ---------- */
.details {
  --blk-display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(20px, 2.5vw, 32px);
  align-items: stretch;
}

.detail-card {
  --blk-display: flex;
  --blk-dir: column;
  --blk-pad: clamp(28px, 4vw, 48px);
  border-radius: var(--r-lg);
  background: var(--ink);
  color: var(--sand);
}

.detail-card h3 { --txt-m: 0 0 24px; }
.detail-card .dl { --blk-display: grid; gap: 20px; }
.detail-card .dt { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); }
.detail-card .dd { display: block; --txt-m: 6px 0 0; font-size: 1.1rem; }
.detail-card .button { margin-top: 32px; align-self: flex-start; }

.pricing { --blk-pad: clamp(28px, 4vw, 48px); border-radius: var(--r-lg); background: var(--paper); }
.pricing h3 { --txt-m: 0 0 8px; }

.price-grid { --blk-display: grid; --blk-m: 28px 0 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.price-card { --blk-pad: 22px 20px; border-radius: var(--r-md); background: var(--sand); }
.price-card:first-child { background: var(--orange); }
.price-cat { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.price { display: block; --txt-m: 8px 0 0; font-family: var(--font-display), sans-serif; font-weight: 800; font-size: clamp(2rem, 1.2rem + 1.8vw, 2.8rem); letter-spacing: -0.04em; line-height: 1; }
.pricing-note { --txt-m: 20px 0 0; font-size: 0.925rem; color: var(--muted); }

@media (max-width: 860px) {
  .details { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .price-grid { grid-template-columns: 1fr; }
}

/* ---------- Gallery ---------- */
.gallery {
  --blk-display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, clamp(160px, 20vw, 300px));
  gap: clamp(10px, 1.5vw, 20px);
}

.gallery > * { position: relative; overflow: hidden; border-radius: var(--r-lg); }
.gallery > :first-child { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.gallery .figure:hover img { transform: scale(1.05); }
.gallery .figcaption { position: absolute; left: 14px; bottom: 14px; z-index: 1; }

@media (max-width: 640px) {
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 64vw 40vw; }
  .gallery > :first-child { grid-row: auto; grid-column: span 2; }
}

/* ---------- Highlights (ministry pages) ---------- */
.highlights { --blk-display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); }
.highlights .media-frame { aspect-ratio: 3 / 4; }
.highlights .figcaption { --txt-m: 14px 0 0; font-family: var(--font-display), sans-serif; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.2; }
.highlights .figure:nth-child(2) { --blk-m: clamp(24px, 5vw, 72px) 0 0; }

@media (max-width: 720px) {
  .highlights { grid-template-columns: 1fr 1fr; }
  .highlights .figure:nth-child(2) { --blk-m: 32px 0 0; }
  .highlights .figure:nth-child(3) { grid-column: span 2; }
  .highlights .figure:nth-child(3) .media-frame { aspect-ratio: 16 / 10; }
}

/* ---------- Ways to get involved ---------- */
.ways { --blk-display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: clamp(12px, 1.5vw, 20px); }

.way {
  --blk-pad: clamp(24px, 3vw, 36px);
  border-radius: var(--r-lg);
  background: var(--paper);
  transition: transform 0.35s var(--ease-out);
}

.way:hover { transform: translateY(-6px); }
.way-num { display: inline-grid; place-items: center; width: 44px; height: 44px; --txt-m: 0 0 24px; border-radius: 50%; background: var(--orange); font-weight: 800; }
.way h3 { --txt-m: 0 0 12px; font-size: 1.5rem; }
.way p { color: var(--muted); }

/* ---------- Timeline ---------- */
.timeline {
  --blk-display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 32px;
}

.timeline .li { --blk-pad: 28px 0 0; position: relative; border-top: 3px solid var(--ink); }
.timeline-year { display: block; font-family: var(--font-display), sans-serif; font-weight: 800; font-size: clamp(2.4rem, 1.5rem + 2vw, 3.5rem); line-height: 1; letter-spacing: -0.04em; }
.timeline-year::before { content: ""; position: absolute; top: -9px; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--orange); }
.timeline h3 { --txt-m: 12px 0 8px; font-size: 1.25rem; }
.timeline p { color: var(--muted); }

/* ---------- Contact ---------- */
.info-list { --blk-display: grid; gap: 14px; }

.info-card { --blk-pad: clamp(22px, 3vw, 32px); border-radius: var(--r-lg); background: var(--paper); }
.info-card h3 { font-size: 0.8rem; font-family: var(--font-body), sans-serif; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.3; color: var(--firebrick); }
.info-card p { --txt-m: 10px 0 0; font-size: 1.1rem; }
.info-card .big { font-family: var(--font-display), sans-serif; font-weight: 800; font-size: clamp(1.6rem, 1rem + 1.6vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.1; text-decoration: none; }
.info-card .link-arrow { --txt-m: 16px 0 0; font-size: 1rem; }
.info-card .small { font-size: 0.9rem; }

/* ---------- Footer (Theme Builder footer) ---------- */
.elementor-location-footer {
  position: relative;
  margin-top: clamp(40px, 6vw, 90px);
  background: var(--ink);
  color: var(--sand);
}

/* Wave sitting on top of the footer */
.elementor-location-footer::before {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  bottom: calc(100% - 1px);
  height: clamp(40px, 6vw, 90px);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath fill='%230B1E2D' d='M0 60c120-30 240-45 360-30s240 45 360 45 240-30 360-45 240-15 360 15v45H0z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
  pointer-events: none;
}

.footer-top { --blk-pad: clamp(32px, 5vw, 64px) var(--gutter) 0; }

.footer-big {
  font-family: var(--font-display), sans-serif;
  font-weight: 800;
  font-size: clamp(4rem, 1rem + 13vw, 13rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: var(--orange);
  white-space: nowrap;
}

.footer-big span { color: var(--sand); }

.footer-inner {
  --blk-display: grid;
  --blk-pad: clamp(40px, 5vw, 64px) var(--gutter);
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
}

.footer-col { --blk-display: flex; --blk-dir: column; gap: 10px; }
.footer-label { --txt-m: 0 0 8px; font-size: 0.8rem; font-family: var(--font-body), sans-serif; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.3; color: var(--orange); }
.footer-logo, .footer-logo img { width: 170px; height: auto; }
.footer-tagline { --txt-m: 8px 0 0; max-width: 30ch; color: rgb(245 239 228 / 0.75); }
.footer-col p { color: rgb(245 239 228 / 0.8); }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: var(--orange); }
/* Footer "Get in touch" button: sized to its label, a little space above; turns sand on hover (navy would vanish on the dark footer) */
.footer-col .button { align-self: flex-start; margin-top: 8px; }
.footer-col .button:hover, .footer-col .button:focus-visible { --btn-bg: var(--sand); --btn-fg: var(--ink); --btn-border: var(--sand); color: var(--ink); }

/* Footer menu (Nav Menu widget, vertical) */
body .ywam-footer-nav .elementor-nav-menu--main .elementor-item {
  padding: 5px 0 !important;
  color: var(--sand) !important;
  font-family: var(--font-body), sans-serif !important;
  font-weight: 500 !important;
  font-size: 1rem !important;
  line-height: 1.4 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  background: none !important;
}
body .ywam-footer-nav .elementor-nav-menu--main .elementor-item:hover { color: var(--orange) !important; }
body .ywam-footer-nav .elementor-item::before, body .ywam-footer-nav .elementor-item::after { display: none !important; }
body .ywam-footer-nav .elementor-menu-toggle { display: none !important; }

.footer-bottom {
  --blk-display: flex;
  --blk-pad: 22px var(--gutter);
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  border-top: 1px solid rgb(245 239 228 / 0.14);
  font-size: 0.9rem;
  color: rgb(245 239 228 / 0.7);
}

.footer-bottom a, .footer-bottom .lang-link { color: var(--sand); }
.footer-bottom p { color: inherit; }

.made-in { display: inline-flex; align-items: center; gap: 10px; }

/* Costa Rica flag: blue / white / red (double) / white / blue */
.made-in::before {
  content: "";
  flex-shrink: 0;
  width: 26px; height: 16px;
  border-radius: 3px;
  background: linear-gradient(var(--navy) 0 16.66%, #fff 16.66% 33.33%, var(--firebrick) 33.33% 66.66%, #fff 66.66% 83.33%, var(--navy) 83.33%);
  box-shadow: 0 0 0 1px rgb(245 239 228 / 0.25);
}

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > :first-child { grid-column: span 2; }
}

/* ---------- Scroll reveal (only when JS is running; never in the editor) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}

.js .reveal.is-visible { opacity: 1; transform: none; }
.no-reveal .reveal { opacity: 1 !important; transform: none !important; }

.d1 { --d: 0.1s; }
.d2 { --d: 0.15s; }
.d3 { --d: 0.2s; }
.d4 { --d: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Rotating photo frames ----------
   A .media-frame with two or more images crossfades between them (assets/site.js).
   Add a photo: duplicate the image inside the frame in Elementor and pick another picture.
   In the Elementor editor the images sit side by side (scroll the frame) so each can be selected. */
.media-frame.is-rotating > .e-image-base,
.media-frame.is-rotating > img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.media-frame.is-rotating > .is-active { opacity: 1; z-index: 0; }
.media-frame.is-rotating > :not(img):not(.e-image-base) { z-index: 1; }

.elementor-editor-active .media-frame:has(> img + img) {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.elementor-editor-active .media-frame:has(> img + img) > img { flex: 0 0 100%; scroll-snap-align: start; }

/* School rows count themselves, so hiding a school never leaves a gap (01, 02, 03…). */
.rows { counter-reset: school-row; }
.rows > .row { counter-increment: school-row; }
.rows .row-num { font-size: 0; }
.rows .row-num::before { content: counter(school-row, decimal-leading-zero); font-size: 1rem; }

/* ---------- School cards on the home page (.school-grid) ----------
   Balanced rows of up to three, based on how many schools are shown (assets/site.js sets --span):
   2 → 2 · 3 → 3 · 4 → 2+2 · 5 → 2+3 · 6 → 3+3 · 7 → 2+2+3 …  Cards in a row of two get a landscape photo. */
.school-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.school-grid > .card { grid-column: span var(--span, 2); }
.school-grid > .card.is-wide .media-frame { aspect-ratio: 3 / 2; }

@media (max-width: 1000px) {
  .school-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .school-grid > .card { grid-column: auto; }
  .school-grid > .card.is-wide .media-frame { aspect-ratio: 4 / 5; }
}
@media (max-width: 640px) {
  .school-grid { grid-template-columns: 1fr; }
  .school-grid > .card .media-frame, .school-grid > .card.is-wide .media-frame { aspect-ratio: 4 / 3; }
}

/* In-page links (e.g. Get involved → #volunteer) stop below the sticky header */
html { scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + 100px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Way cards: a link at the end sits on the card's bottom edge, so links line up across a row */
.way { --blk-display: flex; --blk-dir: column; align-items: flex-start; }
.way > .link-arrow { --txt-m: auto 0 0; padding-top: 18px; }
.way > .eyebrow { --txt-m: 20px 0 4px; }
.way > p:not(.eyebrow) + p:not(.eyebrow):not(.link-arrow) { --txt-m: 12px 0 0; }
/* Six cards → 3 + 3 instead of 4 + 2 */
.ways--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .ways--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); } }

/* ---------- Country category lookup ([ywam_country_category], assets/country-category.js) ---------- */
.cc-lookup { margin-top: 18px; }
.cc-open { background: none; border: 0; border-bottom: 2px solid var(--orange); padding: 0 0 2px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.price-card { transition: box-shadow 0.25s, transform 0.25s var(--ease-out); }
.price-card.is-match { box-shadow: 0 0 0 3px var(--ink); transform: translateY(-2px); }

.cc-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto;
  padding: clamp(24px, 4vw, 40px); border: 0; border-radius: var(--r-lg);
  background: var(--paper); color: var(--ink); font-family: var(--font-body), sans-serif;
  box-shadow: 0 30px 80px rgb(11 30 45 / 0.35);
}
.cc-dialog::backdrop { background: rgb(11 30 45 / 0.55); backdrop-filter: blur(3px); }
.cc-dialog[open] { animation: cc-in 0.3s var(--ease-out); }
@keyframes cc-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.cc-dialog .eyebrow { margin: 0 0 10px; }
.cc-title { margin: 0 0 10px; font-family: var(--font-display), sans-serif; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); line-height: 1.1; letter-spacing: -0.02em; }
.cc-intro { margin: 0 0 22px; color: var(--muted); }
.cc-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--sand); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.cc-close:hover { background: var(--ink); color: var(--sand); }
.cc-dialog .field input { width: 100%; min-height: 52px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--ink); font: inherit; font-size: 1.05rem; }
.cc-dialog .field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(255 111 0 / 0.35); }
.cc-dialog .field { display: grid; gap: 6px; }
.cc-dialog .field > span { font-weight: 700; font-size: 0.95rem; }
.cc-list { margin: 6px 0 0; padding: 6px; list-style: none; border-radius: var(--r-sm); background: #fff; border: 1.5px solid var(--line); }
.cc-list [role="option"] { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.cc-list [aria-selected="true"], .cc-list [role="option"]:hover { background: var(--sand); }
.cc-none { padding: 10px 12px; color: var(--muted); }
.cc-pill { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--sand); font-weight: 800; font-size: 0.85rem; }
.cc-result { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); margin-top: 24px; padding: 20px; border-radius: var(--r-sm); background: var(--sand); }
.cc-result[hidden] { display: none; }
.cc-letter {
  display: grid; place-items: center; flex: none; width: clamp(96px, 22vw, 128px); aspect-ratio: 1; border-radius: 50%;
  background: var(--orange); color: var(--ink); font-family: var(--font-display), sans-serif; font-weight: 800;
  font-size: clamp(3.6rem, 2.6rem + 4vw, 5rem); line-height: 1; letter-spacing: -0.04em;
  animation: cc-pop 0.45s var(--ease-out);
}
@keyframes cc-pop { from { transform: scale(0.6); opacity: 0; } }
.cc-result-text p { margin: 0; }
.cc-result-country { color: var(--muted); }
.cc-result-cat { font-family: var(--font-display), sans-serif; font-weight: 800; font-size: clamp(1.4rem, 1rem + 1.2vw, 1.9rem); letter-spacing: -0.02em; }
.cc-result-cost { margin-top: 6px !important; font-weight: 700; }
.cc-source { margin: 22px 0 0; font-size: 0.85rem; color: var(--muted); }
.cc-source a { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .cc-dialog[open], .cc-letter { animation: none; } }

/* ---------- Legal links in the footer ([ywam_legal_links]) ---------- */
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
/* Sit right after the copyright; "Made with love" and the language link move to the right */
.elementor-location-footer .footer-bottom > .elementor-widget:has(.legal-links) { margin-inline-end: auto !important; } /* beats the shortcode-widget margin reset */
.legal-links a, .legal-links button { color: var(--sand); text-decoration: none; font: inherit; }
.legal-links button { padding: 0; border: 0; background: none; cursor: pointer; }
.legal-links a:hover, .legal-links button:hover { color: var(--orange); }

/* ---------- Plain text pages (Privacy / Cookie policy: WordPress editor, not Elementor) ---------- */
body.page:not(.elementor-page) .site-main {
  max-width: 760px; margin: 0 auto; padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(40px, 6vw, 72px);
  color: var(--ink); font-size: 1.05rem; line-height: 1.7;
}
body.page:not(.elementor-page) .page-header .entry-title {
  margin: 0 0 clamp(24px, 3vw, 40px); font-family: var(--font-display), sans-serif; font-weight: 800;
  font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); line-height: 1; letter-spacing: -0.04em;
}
body.page:not(.elementor-page) .page-content h2 { margin: 2em 0 0.5em; font-family: var(--font-display), sans-serif; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); letter-spacing: -0.02em; line-height: 1.15; }
body.page:not(.elementor-page) .page-content h3 { margin: 1.6em 0 0.4em; font-size: 1.15rem; }
body.page:not(.elementor-page) .page-content p, body.page:not(.elementor-page) .page-content li { color: var(--muted); }
body.page:not(.elementor-page) .page-content a { color: var(--ink); text-decoration-color: var(--orange); text-underline-offset: 3px; }
body.page:not(.elementor-page) .page-content .placeholder-note { padding: 14px 18px; border-radius: var(--r-sm); background: var(--paper); border-left: 4px solid var(--orange); color: var(--ink); }

/* ---------- Five impacts (Homes of Hope) ---------- */
.impacts { --blk-display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.impacts-head { --blk-display: flex; --blk-dir: column; gap: 20px; position: sticky; top: calc(var(--header-h, 80px) + 32px); }
.impacts-head .eyebrow { --txt-m: 0; }
.impact-list { --blk-display: grid; }
.impact { --blk-display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(16px, 2.5vw, 32px); --blk-pad: clamp(22px, 3vw, 32px) 0; border-top: 1.5px solid var(--line); }
.impact:last-child { border-bottom: 1.5px solid var(--line); }
.impact-num { font-family: var(--font-display), sans-serif; font-weight: 800; font-size: clamp(2.2rem, 1.4rem + 2.4vw, 3.4rem); line-height: 0.9; letter-spacing: -0.05em; color: var(--orange); min-width: 2.2ch; }
.impact-body h3 { --txt-m: 0 0 8px; font-size: clamp(1.25rem, 1rem + 0.8vw, 1.6rem); line-height: 1.1; }
.impact-body p { color: var(--muted); }
@media (max-width: 860px) {
  .impacts { grid-template-columns: 1fr; }
  .impacts-head { position: static; }
}

/* ---------- Testimonials ---------- */
.testimonials { --blk-display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(20px, 2.5vw, 32px); }
.testimonial { --blk-display: flex; --blk-dir: column; --blk-pad: clamp(28px, 4vw, 48px); position: relative; border-radius: var(--r-lg); background: rgb(245 239 228 / 0.07); border: 1px solid rgb(245 239 228 / 0.14); }
/* Quote mark on the text, not the card: Elementor uses ::before on containers for background overlays */
.testimonial-text::before { content: "“"; display: block; height: 0.6em; margin-bottom: 8px; font-family: var(--font-display), sans-serif; font-weight: 800; font-size: 5rem; line-height: 1; color: var(--orange); }
.testimonial-text { font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.2rem); line-height: 1.65; color: var(--sand); }
.testimonial-by { --txt-m: auto 0 0; padding-top: 24px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); }

/* ---------- WhatsApp button (inc/whatsapp.php) ---------- */
.wa-float {
  position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 90;
  display: inline-flex; align-items: center; gap: 0; height: 52px; padding: 0 0 0 0; border-radius: 999px;
  background: var(--ink); color: var(--sand); text-decoration: none; font-family: var(--font-body), sans-serif; font-weight: 700; font-size: 0.92rem;
  box-shadow: 0 10px 28px rgb(11 30 45 / 0.28); transition: box-shadow 0.25s, transform 0.25s var(--ease-out), gap 0.3s var(--ease-out), padding 0.3s var(--ease-out);
}
.wa-float--raised { bottom: max(84px, calc(env(safe-area-inset-bottom, 0px) + 68px)); }
.wa-float-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; }
.wa-float-label { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width 0.35s var(--ease-out); }
.wa-float:hover, .wa-float:focus-visible { color: var(--sand); box-shadow: 0 0 0 3px var(--orange), 0 12px 32px rgb(11 30 45 / 0.32); transform: translateY(-2px); outline: none; }
@media (hover: hover) and (min-width: 768px) {
  .wa-float:hover, .wa-float:focus-visible { padding-left: 20px; }
  .wa-float:hover .wa-float-label, .wa-float:focus-visible .wa-float-label { max-width: 12em; }
}
@media (max-width: 767px) { .wa-float { height: 48px; } .wa-float-icon { width: 48px; height: 48px; } }
@media print { .wa-float { display: none; } }
.qe-on .wa-float { display: none; } /* out of the way while editing with Quick Edit */
@media (prefers-reduced-motion: reduce) { .wa-float, .wa-float-label { transition: none; } }
/* Way cards with a button at the end (Ministries "How can I be part of this?"): button on the card's bottom edge */
.way > p:has(+ .button) { --txt-m: 0 0 20px; }
.way > .button { margin-top: auto; align-self: flex-start; }

/* Page header without a photo (e.g. form pages), and split rows that align to the top (tall forms) */
.page-hero--compact { --blk-pad: clamp(24px, 4vw, 48px) 0 clamp(40px, 5vw, 72px); }
.split--top { align-items: start; }

/* Card grids (ministries on Home and Ministries): when a ministry is hidden, the remaining cards stay centred
   instead of leaving an empty column (empty tracks collapse with auto-fit; cards keep their usual width). */
.card-grid:not(.school-grid) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 400px)); justify-content: center; } /* the school grid has its own balanced layout */
