/* File: /css/wl-frontpage.css */
/* ==========================================================================
   WLIAA Theme — Front Page Module (FPM) Stylesheet
   --------------------------------------------------------------------------
   Styles for all FPM blocks: quote, wach, humanitarian, adppgm, funding,
   newsletter, and the shared FPM card system. Loaded render-blocking on
   the front page; loaded non-blocking in the footer on other pages
   (cache warm-up).

   Phase 1 of the mobile-first refactor (v0.0.1.01) extracted these rules
   from style.css with NO rule changes — only relocation. Mobile-first
   inversion of the @media queries is Phase 2.
   ========================================================================== */

/* ==========================================================================
   FPM Quote Block — Story Highlight Styles
   --------------------------------------------------------------------------
   Mobile-first (Phase 2.2):
     • Mobile is the default (no @media wrapper).
     • Tablet portrait (≥ 521px) steps up the image height only.
     • Tablet / desktop (≥ 783px) adds the side-by-side grid layout,
       larger typography, the body paragraph, the decorative shadow
       and corner radius on the image, and the side border on the
       quote text.
     • Visual output identical to the previous desktop-first version
       at every viewport.
     • The trailing "@media (max-width: 782px) { .wl-fpm-quote {
       margin-top:32; margin-bottom:32; } }" block that previously sat
       at the end of this file (from the Phase 1 split of style.css
       §21) has been folded into the mobile default margin here.

   Audit notes (flagged; NOT fixed in this commit):
     • Editor-only classes (.wl-fpm-quote-editor, *-placeholder,
       .wl-fpm-quote-image-editor-wrap, .wl-fpm-quote-photo-remove,
       .wl-fpm-quote-tag-placeholder, .wl-fpm-quote-link-indicator)
       are shipped to frontend visitors. ~1–2 KB of dead code per
       pageview. They must stay here while functions.php's
       add_editor_style() pulls this same file into the block
       editor; the proper fix is a dedicated editor stylesheet.
     • .wl-fpm-quote-tag is permanently display:none, yet PHP still
       emits the <span>. Out of scope for CSS work.
     • .wl-fpm-quote-body is display:none on mobile while PHP still
       emits the text (~200–500 chars × 3 quote blocks on the front
       page). Minor HTML bloat; flagged for the PHP audit pass.
   ========================================================================== */


/* ---- Shared (apply at every viewport) ---- */

.wl-fpm-quote {
  display: block;
  max-width: 1200px;
  margin: 32px auto;            /* mobile default; 60px auto at ≥ 783 */
  padding: 0;                   /* mobile default; 0 20px at ≥ 783 */
  text-decoration: none;
  color: inherit;
}

.wl-fpm-quote-linked {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.wl-fpm-quote-linked:hover {
  transform: translateY(-2px);
}

.wl-fpm-quote-linked:hover .wl-fpm-quote-image-wrap {
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.2);
}

.wl-fpm-quote-linked:hover .wl-fpm-quote-arrow {
  transform: translateX(4px);
}

.wl-fpm-quote-linked:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary);
  outline-offset: 8px;
  border-radius: var(--wp--custom--radius--lg);
}

.wl-fpm-quote-grid {
  display: grid;
  grid-template-columns: 1fr;   /* mobile default; 5fr 7fr at ≥ 783 */
  gap: 0;                       /* mobile default; 48px at ≥ 783 */
  align-items: start;
}

/* Image column */
.wl-fpm-quote-image-col {
  min-width: 0;
}

.wl-fpm-quote-image-wrap {
  overflow: hidden;
  transition: box-shadow 0.2s ease;
  /* border-radius + box-shadow apply only at ≥ 783 */
}

.wl-fpm-quote-image-wrap img {
  display: block;
  width: 100%;
  height: 390px;                /* phone default; 350 at ≥ 521; 500 at ≥ 783 */
  object-fit: cover;
}

/* Content column */
.wl-fpm-quote-content-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-self: stretch;
  padding: 1.5rem;              /* mobile default; 0 at ≥ 783 */
}

.wl-fpm-quote-tag {
  display: none;
  align-self: flex-start;
  padding: 4px 16px;
  border-radius: var(--wp--custom--radius--pill);
  background-color: var(--wp--preset--color--tertiary-fixed);
  color: var(--wp--custom--color--fpm-quote-heading);
  font-family: var(--wp--preset--font-family--body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.wl-fpm-quote-heading {
  display: block;
  font-family: var(--wp--preset--font-family--heading);
  font-size: 28px;              /* mobile default; 48px at ≥ 783 */
  font-weight: 700;
  line-height: 1.15;
  color: var(--wp--preset--color--on-surface);
  letter-spacing: -0.02em;
  margin: 0 0 12px 0;           /* mobile default; 0 0 20px 0 at ≥ 783 */
}

.wl-fpm-quote-body {
  display: none;                /* mobile default; block at ≥ 783 */
  font-family: var(--wp--preset--font-family--body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--wp--preset--color--on-surface-variant);
  margin: 0 0 24px 0;
}

.wl-fpm-quote-text {
  display: flex;
  align-items: center;
  flex: 1;
  overflow: hidden;
  font-family: var(--wp--preset--font-family--yanone);
  font-size: 35px;              /* mobile default; 20px at ≥ 783 */
  font-weight: 300;
  font-style: italic;
  line-height: 1.6;
  color: var(--wp--preset--color--primary);
  padding: 8px 0;               /* mobile default; 8px 0 8px 24px at ≥ 783 */
  margin: 0 0 16px 0;           /* mobile default; 0 0 24px 0 at ≥ 783 */
  quotes: none;
  /* border-left applies only at ≥ 783 */
}

.wl-fpm-quote-text::before,
.wl-fpm-quote-text::after {
  content: none;
}

.wl-fpm-quote-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin-top: auto;
  padding: 14px 28px;
  border-radius: var(--wp--custom--radius--md);
  background-color: var(--wp--preset--color--primary);
  font-family: var(--wp--preset--font-family--body);
  font-size: 16px;
  font-weight: 700;
  color: var(--wp--preset--color--white);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.wl-fpm-quote-link:hover {
  background-color: var(--wp--preset--color--primary-dark);
}

.wl-fpm-quote-arrow {
  font-size: 20px;
  color: var(--wp--preset--color--white);
  transition: transform 0.2s ease;
}

/* ---- Editor-only styles (see audit note at top of section) ---- */

.wl-fpm-quote-editor {
  padding: 10px;
}

.wl-fpm-quote-editor .wl-fpm-quote {
  margin: 20px 0;
}

.wl-fpm-quote-editor .wl-fpm-quote-heading {
  min-height: 50px;
}

.wl-fpm-quote-editor .wl-fpm-quote-body {
  min-height: 40px;
}

.wl-fpm-quote-editor .wl-fpm-quote-text {
  min-height: 40px;
}

.wl-fpm-quote-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 400px;
  border: 3px dashed var(--wp--preset--color--outline-variant);
  border-radius: var(--wp--custom--radius--lg);
  background-color: var(--wp--custom--color--placeholder-bg);
  cursor: pointer;
  font-size: 14px;
  color: var(--wp--preset--color--on-surface-variant);
}

.wl-fpm-quote-image-placeholder:hover {
  border-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--primary);
}

.wl-fpm-quote-image-editor-wrap {
  position: relative;
}

.wl-fpm-quote-image-editor-wrap img {
  cursor: pointer;
}

.wl-fpm-quote-photo-remove {
  margin-top: 10px;
}

.wl-fpm-quote-tag-placeholder {
  display: inline-block;
  padding: 4px 16px;
  border-radius: var(--wp--custom--radius--pill);
  background-color: var(--wp--custom--color--placeholder-bg);
  color: var(--wp--custom--color--placeholder-text);
  font-size: 13px;
  font-style: italic;
  margin-bottom: 16px;
}

.wl-fpm-quote-link-indicator {
  margin-top: 8px;
  font-size: 13px;
  color: var(--wp--preset--color--primary);
  font-weight: 600;
}


/* ==========================================================================
   Tablet portrait (≥ 521px) — image height step
   ========================================================================== */

@media (min-width: 521px) {

  .wl-fpm-quote-image-wrap img {
    height: 350px;
  }
}


/* ==========================================================================
   Tablet / Desktop (≥ 783px)
   --------------------------------------------------------------------------
   Side-by-side grid layout, full typography, body paragraph, and
   decorative image styling all kick in here.
   ========================================================================== */

@media (min-width: 783px) {

  .wl-fpm-quote {
    margin: 60px auto;
    padding: 0 20px;
  }

  .wl-fpm-quote-grid {
    grid-template-columns: 5fr 7fr;
    gap: 48px;
  }

  .wl-fpm-quote-image-wrap {
    border-radius: var(--wp--custom--radius--lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  }

  .wl-fpm-quote-image-wrap img {
    height: 500px;
  }

  .wl-fpm-quote-content-col {
    padding: 0;
  }

  .wl-fpm-quote-heading {
    font-size: 48px;
    margin: 0 0 20px 0;
  }

  .wl-fpm-quote-body {
    display: block;
  }

  .wl-fpm-quote-text {
    font-size: 20px;
    padding: 8px 0 8px 24px;
    margin: 0 0 24px 0;
    border-left: 4px solid var(--wp--preset--color--primary-container);
  }
}

/* ==========================================================================
   Block: wl/fpm-wach — Front Page Module: Waiting Children Hero
   --------------------------------------------------------------------------
   Mobile-first (Phase 2.1):
     • Mobile rules are the defaults (no @media wrapper).
     • Tablet/desktop additions wrap in @media (min-width: 783px).
     • Tablet-only refinements (783–1100px) wrap in
       @media (min-width: 783px) and (max-width: 1100px) — placed AFTER
       the 783+ block so they win at tablet but vanish at large desktop.
     • Visual parity with the previous desktop-first version is preserved.
       Every original rule has a direct equivalent here; only the cascade
       direction has been inverted.
   ========================================================================== */


/* ---- Shared (apply at every viewport) ---- */

.wl-fpm-wach {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;             /* mobile default; widens at ≥783px */
}

.wl-fpm-wach-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wl-fpm-wach-heart {
  flex-shrink: 0;
}


/* ==========================================================================
   Mobile defaults (apply below 783px)
   ========================================================================== */

.wl-fpm-wach-desktop {
  display: none;
}

.wl-fpm-wach-mobile {
  display: block;
}

.wl-fpm-wach-mobile-hero {
  position: relative;
  width: 100%;
  height: calc(100vh - 60px);    /* fallback for older browsers */
  height: calc(100svh - 60px);   /* stable on modern browsers — prevents CLS */
  overflow: hidden;
}

.wl-fpm-wach-mobile-hero > .wl-fpm-wach-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.wl-fpm-wach-mobile-hero > .wl-fpm-wach-img,
.wl-fpm-wach-mobile-hero > .wl-fpm-wach-image-link > .wl-fpm-wach-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Semi-transparent circle overlay */
.wl-fpm-wach-circle {
  position: absolute;
  top: 6%;
  left: 4%;
  width: 58vw;
  height: 58vw;
  max-width: 280px;
  max-height: 280px;
  border-radius: 50%;
  background: rgba(30, 30, 30, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.wl-fpm-wach-circle span {
  color: var(--wp--preset--color--white);
  font-family: var(--wp--preset--font-family--heading);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  padding: 1rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Bottom mobile button bar */
.wl-fpm-wach-mobile-buttons {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
}

.wl-fpm-wach-mbtn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
}

.wl-fpm-wach-mbtn--primary {
  background: var(--wp--custom--color--fpm-wach-cta);
  color: var(--wp--preset--color--white);
}

.wl-fpm-wach-mbtn--secondary {
  background: var(--wp--custom--color--fpm-wach-overlay);
  color: var(--wp--preset--color--white);
}


/* ==========================================================================
   Tablet / Desktop (≥ 783px)
   ========================================================================== */

@media (min-width: 783px) {

  .wl-fpm-wach {
    padding: 2rem 1.5rem 3rem;
  }

  .wl-fpm-wach-desktop {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
  }

  .wl-fpm-wach-mobile {
    display: none;
  }

  /* ---- Text column ---- */

  .wl-fpm-wach-text {
    flex: 1 1 55%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .wl-fpm-wach-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--wp--preset--color--tertiary-fixed);
    color: var(--wp--preset--color--on-tertiary-fixed);
    border-radius: var(--wp--custom--radius--pill);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    width: fit-content;
    font-family: var(--wp--preset--font-family--heading);
    margin: 0 0 2.5rem 0;
  }

  .wl-fpm-wach-heading {
    font-size: clamp(2.25rem, 1.75rem + 3vw, 4.25rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--wp--preset--color--on-surface);
    margin: 0;
  }

  .wl-fpm-wach-accent {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
  }

  a.wl-fpm-wach-accent:hover {
    text-decoration: underline;
  }

  .wl-fpm-wach-desc {
    font-size: 1.3rem;
    color: var(--wp--preset--color--on-surface-variant);
    line-height: 1.8;
    max-width: 36rem;
    margin: 1rem 0 0 0;
  }

  /* ---- Desktop buttons ---- */

  .wl-fpm-wach-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.5rem;
  }

  .wl-fpm-wach-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: var(--wp--custom--radius--lg);
    font-weight: 700;
    font-size: 1.0625rem;
    font-family: var(--wp--preset--font-family--heading);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
  }

  .wl-fpm-wach-btn:hover {
    transform: translateY(-1px);
  }

  .wl-fpm-wach-btn--primary {
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--white);
    box-shadow: 0 12px 32px rgba(0, 101, 141, 0.15);
  }

  .wl-fpm-wach-btn--secondary {
    background: var(--wp--preset--color--secondary);
    color: var(--wp--preset--color--on-secondary);
  }

  /* ---- Image column ---- */

  .wl-fpm-wach-image-wrap {
    flex: 1 1 45%;
    position: relative;
  }

  .wl-fpm-wach-image-wrap .wl-fpm-wach-img {
    border-radius: var(--wp--custom--radius--lg);
    aspect-ratio: 5 / 6;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.15);
    transform: rotate(2deg);
  }
}


/* ==========================================================================
   Tablet-only refinements (783–1100px)
   --------------------------------------------------------------------------
   Layer over the 783+ defaults above; the cascade resolves these as
   winners at tablet width (same specificity, later source order) and
   ignores them at large desktop (≥1101px).
   ========================================================================== */

@media (min-width: 783px) and (max-width: 1100px) {

  .wl-fpm-wach-text {
    gap: 0.75rem;
  }

  .wl-fpm-wach-badge {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
  }

  .wl-fpm-wach-heading {
    margin-top: -25px;
  }

  .wl-fpm-wach-desc {
    line-height: 1.7;
  }

  .wl-fpm-wach-desktop {
    align-items: stretch;
  }

  .wl-fpm-wach-image-wrap .wl-fpm-wach-img {
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: right center;
  }

  .wl-fpm-wach-buttons {
    flex-wrap: nowrap;
    margin-top: -15px;
  }

  .wl-fpm-wach-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
  }
}

/* ==========================================================================
   Shared FPM Card System
   --------------------------------------------------------------------------
   Base styles for fpm-humanitarian, fpm-adppgm, fpm-funding, fpm-newsletter.
   Block-specific overrides follow in each block's own section.

   Mobile-first (Phase 2.7):
     • Mobile is the default (no @media wrapper). Cards collapse to a
       single-column grid with image first; content column gets the
       tighter mobile padding; heading and body drop to 1.5rem / 1rem.
     • Tablet / desktop (≥ 783px) restores the two-column 7fr/5fr
       grid, swaps column order (image right), bumps the content
       column padding to 3rem/3.5rem, and scales the heading via
       clamp(1.75rem, 2.5vw, 2.25rem) and body to 1.0625rem.
     • Visual output identical to the previous desktop-first version
       at every viewport.

   Phase 2.3 / 2.4 / 2.5 follow-up: block-specific desktop reverts
   that explicitly restate values now provided by the shared base's
   own @media (min-width: 783px) rules are now redundant but still
   correct (same values via lower specificity from shared, same
   values via higher specificity from block — cascade-equivalent).
   They can be pruned in a follow-up CSS audit pass.
   ========================================================================== */

/* ── Wrapper & link behavior ── */

.wl-fpm-card-wrap {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.wl-fpm-card-linked {
  display: block;
  text-decoration: none;
  color: inherit;
}

.wl-fpm-card-linked:hover {
  text-decoration: none;
  color: inherit;
}

.wl-fpm-card-linked:hover .wl-fpm-card {
  box-shadow: var(--wp--custom--shadow--card-hover);
}

.wl-fpm-card-linked:hover .wl-fpm-card-cta {
  background-color: var(--wp--preset--color--primary-dark);
}

.wl-fpm-card-linked:focus-visible {
  outline: 3px solid var(--wp--preset--color--primary);
  outline-offset: 3px;
}

/* ── Card grid ── */

.wl-fpm-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--wp--preset--color--white);
  border-radius: var(--wp--custom--radius--lg);
  overflow: hidden;
  box-shadow: var(--wp--custom--shadow--card);
  border: 1px solid rgba(191, 199, 207, 0.15);
  transition: box-shadow 0.3s ease;
}

/* ── Image column ── */

.wl-fpm-card-image-col {
  position: relative;
  min-width: 0;
  order: 0;
  min-height: 22rem;
  overflow: hidden;
}

.wl-fpm-card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wl-fpm-card-overlay {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 1.5rem;
  border-radius: var(--wp--custom--radius--md);
  box-shadow: var(--wp--custom--shadow--sm);
  max-width: 20rem;
}

.wl-fpm-card-overlay-title {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--wp--preset--color--primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.wl-fpm-card-overlay-subtitle {
  font-size: 0.875rem;
  color: var(--wp--preset--color--on-surface-variant);
  margin: 0.125rem 0 0;
  line-height: 1.4;
}

/* ── Content column ── */

.wl-fpm-card-content-col {
  order: 0;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wl-fpm-card-heading {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--wp--preset--color--on-surface);
  margin: 0 0 1.25rem;
}

.wl-fpm-card-body {
  display: block;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--wp--preset--color--on-surface-variant);
  margin: 0 0 2rem;
}

/* ── Features list ── */

.wl-fpm-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wl-fpm-card-feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.wl-fpm-card-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  border-radius: 50%;
  background: var(--wp--preset--color--secondary);
  color: var(--wp--preset--color--on-secondary);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1;
}

.wl-fpm-card-feature-inner {
  display: block;
}

.wl-fpm-card-feature-title {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--wp--preset--color--on-surface);
  line-height: 1.3;
}

.wl-fpm-card-feature-text {
  display: block;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--wp--preset--color--on-surface-variant);
  margin-top: 0.125rem;
}

/* ── CTA button ── */

.wl-fpm-card-cta-wrap {
  display: block;
  margin-top: 0.5rem;
}

.wl-fpm-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--white);
  font-family: var(--wp--preset--font-family--body);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: var(--wp--custom--radius--md);
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.wl-fpm-card-cta:hover {
  background-color: var(--wp--preset--color--primary-dark);
}

.wl-fpm-card-cta:focus-visible {
  outline: 3px solid var(--wp--preset--color--primary);
  outline-offset: 3px;
}

.wl-fpm-card-arrow {
  transition: transform 0.25s ease;
}

.wl-fpm-card-cta:hover .wl-fpm-card-arrow {
  transform: translateX(4px);
}

/* ── Tablet / Desktop (≥ 783px): two-column layout ── */

@media (min-width: 783px) {
  .wl-fpm-card {
    grid-template-columns: 7fr 5fr;
  }

  .wl-fpm-card-image-col {
    order: 2;
    min-height: auto;
  }

  .wl-fpm-card-content-col {
    order: 1;
    padding: 3rem 3.5rem;
  }

  .wl-fpm-card-heading {
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  }

  .wl-fpm-card-body {
    font-size: 1.0625rem;
  }
}

/* ── Editor-only (shared) ── */

.wl-fpm-card-editor .wl-fpm-card-image-editor-wrap {
  position: relative;
  min-height: 20rem;
  overflow: hidden;
}

.wl-fpm-card-editor .wl-fpm-card-photo {
  cursor: pointer;
}

.wl-fpm-card-editor .wl-fpm-card-photo-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
}

.wl-fpm-card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20rem;
  width: 100%;
  background: var(--wp--preset--color--surface-container-low);
  border: 2px dashed var(--wp--preset--color--outline-variant);
  border-radius: var(--wp--custom--radius--md);
  font-size: 0.875rem;
  color: var(--wp--preset--color--on-surface-variant);
  cursor: pointer;
}

.wl-fpm-card-feature-placeholder {
  font-size: 0.875rem;
  color: var(--wp--preset--color--on-surface-variant);
  font-style: italic;
  opacity: 0.6;
}

/* Editor backward-compat: block.js files still use block-specific editor classes.
   These aliases map old class names to the shared editor styles.
   TODO: Update block.js files to use wl-fpm-card-editor classes, then remove. */

.wl-fpm-hum-editor .wl-fpm-hum-image-editor-wrap,
.wl-fpm-adppgm-editor .wl-fpm-adppgm-image-editor-wrap,
.wl-fpm-funding-editor .wl-fpm-funding-image-editor-wrap,
.wl-fpm-newsletter-editor .wl-fpm-newsletter-image-editor-wrap {
  position: relative;
  min-height: 20rem;
  overflow: hidden;
}

.wl-fpm-hum-editor .wl-fpm-hum-photo,
.wl-fpm-adppgm-editor .wl-fpm-adppgm-photo,
.wl-fpm-funding-editor .wl-fpm-funding-photo,
.wl-fpm-newsletter-editor .wl-fpm-newsletter-photo {
  cursor: pointer;
}

.wl-fpm-hum-editor .wl-fpm-hum-photo-remove,
.wl-fpm-adppgm-editor .wl-fpm-adppgm-photo-remove,
.wl-fpm-funding-editor .wl-fpm-funding-photo-remove,
.wl-fpm-newsletter-editor .wl-fpm-newsletter-photo-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
}

.wl-fpm-hum-image-placeholder,
.wl-fpm-adppgm-image-placeholder,
.wl-fpm-funding-image-placeholder,
.wl-fpm-newsletter-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20rem;
  width: 100%;
  background: var(--wp--preset--color--surface-container-low);
  border: 2px dashed var(--wp--preset--color--outline-variant);
  border-radius: var(--wp--custom--radius--md);
  font-size: 0.875rem;
  color: var(--wp--preset--color--on-surface-variant);
  cursor: pointer;
}

.wl-fpm-hum-feature-placeholder,
.wl-fpm-adppgm-feature-placeholder,
.wl-fpm-funding-feature-placeholder {
  font-size: 0.875rem;
  color: var(--wp--preset--color--on-surface-variant);
  font-style: italic;
  opacity: 0.6;
}

/* ==========================================================================
   FPM Humanitarian Project Card  (wl/fpm-humanitarian)
   --------------------------------------------------------------------------
   Block-specific overrides only — base card styles live in the
   Shared FPM Card System section above.

   Mobile-first (Phase 2.6):
     • This block has no block-specific viewport-dependent rules.
       The two declarations below (.wl-fpm-hum-tag and its child
       svg) are viewport-agnostic — the tag badge renders identically
       at every viewport.
     • All responsive layout is inherited from the Shared FPM Card
       base via the .wl-fpm-hum wrapper. The wrapper does not
       override any shared card properties; mobile single-column
       and desktop side-by-side behavior comes entirely from
       .wl-fpm-card rules in the shared section.
     • No CSS conversion was needed for Phase 2.6; section was
       reviewed and confirmed mobile-first-compatible as-is.
   ========================================================================== */

/* Tag badge (humanitarian-specific) */
.wl-fpm-hum-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--wp--preset--color--on-secondary);
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.wl-fpm-hum-tag svg {
  flex-shrink: 0;
}
/* =============================================
   FPM Featured Adoption Program Block  (wl/fpm-adppgm)
   ---------------------------------------------
   Block-specific overrides only — base card styles live in the
   Shared FPM Card System section above.

   Mobile-first (Phase 2.3):
     • Mobile is the default (no @media wrapper).
     • Tablet / desktop (≥ 783px) unwraps the section header,
       widens its gap, lifts the section-title font size to the
       clamp(1.5rem, 2.5vw, 2rem) scale, and removes the small
       mobile padding-left.
     • Visual output identical to the previous desktop-first
       version at every viewport.
   ============================================= */

/* ── Section header bar (adppgm-specific) ── */

.wl-fpm-adppgm-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-bottom: 1.25rem;
  text-align: left;
  width: 100%;
}

.wl-fpm-adppgm-section-title {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: left;
  color: var(--wp--preset--color--on-surface);
  margin: 0;
  padding: 0 0 0 15px;
}

.wl-fpm-adppgm-view-all {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--wp--preset--color--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.wl-fpm-adppgm-view-all:hover {
  color: var(--wp--preset--color--primary-dark);
}

/* ── Tablet / Desktop (≥ 783px) ── */

@media (min-width: 783px) {
  .wl-fpm-adppgm-section-header {
    flex-wrap: nowrap;
    gap: 1.5rem;
  }

  .wl-fpm-adppgm-section-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    padding: 0;
  }
}

/* ============================================================
   FPM Funding Your Adoption Block  (wl/fpm-funding)
   ------------------------------------------------------------
   Block-specific overrides only — base card styles live in the
   Shared FPM Card System section above.

   Mobile-first (Phase 2.4):
     • Mobile is the default (no @media wrapper).
       Funding tightens the shared card padding, drops body and
       check sizes, hides feature descriptions, and closes the
       gap before the CTA.
     • Tablet / desktop (≥ 783px) reverts each touched property
       to the value the Shared FPM Card base provides at desktop
       (this block has no desktop-specific styling of its own —
       at desktop the cascade falls through to the shared base).
     • Visual output identical to the previous desktop-first
       version at every viewport.

   Phase 2.7 follow-up: once the Shared FPM Card base is
   inverted to mobile-first, the desktop reverts here will
   match the shared base's own @media (min-width: 783px)
   rules and may be removable. Audit and clean up then.
   ============================================================ */

/* ── Mobile defaults: Funding-specific overrides of shared FPM card ── */

.wl-fpm-funding .wl-fpm-card-content-col {
  padding: 1.5rem 1.25rem 3rem;
}

.wl-fpm-funding .wl-fpm-card-body {
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

/* Hide feature descriptions, keep titles */
.wl-fpm-funding .wl-fpm-card-feature-text {
  display: none;
}

.wl-fpm-funding .wl-fpm-card-features {
  margin-bottom: 1.5rem;
  gap: 0.625rem;
}

.wl-fpm-funding .wl-fpm-card-check {
  width: 1.5rem;
  height: 1.5rem;
  min-width: 1.5rem;
  font-size: 0.75rem;
}

.wl-fpm-funding .wl-fpm-card-feature {
  align-items: center;
}

.wl-fpm-funding .wl-fpm-card-cta-wrap {
  margin-top: 0;
}

/* ── Tablet / Desktop (≥ 783px): revert to shared FPM Card base ── */

@media (min-width: 783px) {
  .wl-fpm-funding .wl-fpm-card-content-col {
    padding: 3rem 3.5rem;
  }

  .wl-fpm-funding .wl-fpm-card-body {
    font-size: 1.0625rem;
    margin-bottom: 2rem;
  }

  .wl-fpm-funding .wl-fpm-card-feature-text {
    display: block;
  }

  .wl-fpm-funding .wl-fpm-card-features {
    margin-bottom: 2.25rem;
    gap: 1rem;
  }

  .wl-fpm-funding .wl-fpm-card-check {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    font-size: 0.875rem;
  }

  .wl-fpm-funding .wl-fpm-card-feature {
    align-items: flex-start;
  }

  .wl-fpm-funding .wl-fpm-card-cta-wrap {
    margin-top: 0.5rem;
  }
}

/* =============================================
   FPM Newsletter Block  (wl/fpm-newsletter)
   ---------------------------------------------
   Block-specific overrides + the newsletter form CSS shared with
   the wliaa-forms plugin's [wlf_newsletter] shortcode.

   Mobile-first (Phase 2.5):
     • Mobile is the default (no @media wrapper). Newsletter
       collapses to single-column (1fr), uses the shorter 22rem
       image min-height, stacks the form's name+email fields,
       and makes the submit button full-width.
     • Tablet / desktop (≥ 783px) restores the 5fr/7fr image-left
       grid, raises image-col min-height to 28rem, and lays the
       form fields side-by-side with a natural-width submit.
     • Visual output identical to the previous desktop-first
       version at every viewport.

   Notes:
     • Two declarations were dropped as redundant:
         .wl-fpm-newsletter .wl-fpm-card-body { font-size: 1rem; }
         .wl-fpm-newsletter .wl-fpm-card-heading { font-size: 1.5rem; }
       Both restated the shared FPM Card mobile rule's value, so
       the shared cascade already produces the same computed value
       at mobile. Removed for clarity; computed values unchanged.

   Phase 2.7 follow-up: once the Shared FPM Card base is inverted
   to mobile-first, this section's desktop reverts on .wl-fpm-card
   and .wl-fpm-card-image-col will match the shared base's own
   @media (min-width: 783px) values and may be removable.
   ============================================= */

/* ── Mobile defaults: Newsletter-specific overrides of shared FPM card ── */

.wl-fpm-newsletter .wl-fpm-card {
  grid-template-columns: 1fr;
}

.wl-fpm-newsletter .wl-fpm-card-image-col {
  order: 0;
  min-height: 22rem;
}

.wl-fpm-newsletter .wl-fpm-card-content-col {
  order: 0;
}

.wl-fpm-newsletter .wl-fpm-card-body {
  margin-bottom: 1.75rem;
}

.wl-fpm-newsletter-heading {
  margin-bottom: 1rem;
}

.wl-fpm-newsletter-fallback {
  font-size: 0.9375rem;
  color: var(--wp--preset--color--on-surface-variant);
  font-style: italic;
  margin: 0;
}

/* ── Newsletter form (rendered by wliaa-forms plugin shortcode) ── */

/* Honeypot field — visually hidden, kept in DOM for spam detection.
   Server-side check lives in wliaa-forms/includes/wlf-newsletter-handler.php. */
.wlf-hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wlf-newsletter-form-wrap {
  width: 100%;
}

.wlf-newsletter-message {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.wlf-newsletter-success {
  background-color: var(--wp--custom--status--success-bg);
  color: var(--wp--custom--status--success-text);
  border: 1px solid var(--wp--custom--status--success-border);
}

.wlf-newsletter-error {
  background-color: var(--wp--custom--status--error-bg);
  color: var(--wp--custom--status--error-text);
  border: 1px solid var(--wp--custom--status--error-border);
}

.wlf-newsletter-form {
  display: block;
}

/* Mobile default: stack the name + email fields vertically */
.wlf-newsletter-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.wlf-newsletter-field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wlf-newsletter-label {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--wp--preset--color--on-surface, var(--wp--preset--color--on-surface));
  margin-bottom: 0.375rem;
}

.wlf-newsletter-label .wlf-required {
  color: var(--wp--custom--status--error-text);
  margin-left: 2px;
}

.wlf-newsletter-input {
  padding: 12px 16px;
  border: 1px solid rgba(191, 199, 207, 0.6);
  border-radius: var(--wp--custom--radius--md);
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.9375rem;
  color: var(--wp--preset--color--on-surface, var(--wp--preset--color--on-surface));
  background: var(--wp--preset--color--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.wlf-newsletter-input:focus {
  outline: 2px solid transparent; /* visible in forced-colors / high-contrast mode */
  border-color: var(--wp--preset--color--primary, var(--wp--preset--color--primary));
  box-shadow: 0 0 0 3px rgba(0, 103, 141, 0.15);
}

.wlf-newsletter-input::placeholder {
  color: rgba(64, 72, 78, 0.5);
}

.wlf-newsletter-submit-wrap {
  margin-bottom: 0.75rem;
}

/* Mobile default: full-width centered submit */
.wlf-newsletter-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--wp--preset--color--primary, var(--wp--preset--color--primary));
  color: var(--wp--preset--color--white);
  font-family: var(--wp--preset--font-family--body);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 32px;
  border-radius: var(--wp--custom--radius--md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease;
  width: 100%;
}

.wlf-newsletter-submit:hover {
  background-color: var(--wp--preset--color--primary-dark);
}

.wlf-newsletter-submit:focus-visible {
  outline: 3px solid var(--wp--preset--color--primary, var(--wp--preset--color--primary));
  outline-offset: 3px;
}

.wlf-newsletter-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.wlf-newsletter-privacy-note {
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--wp--preset--color--on-surface-variant, var(--wp--preset--color--on-surface-variant));
  margin: 0;
  line-height: 1.4;
}

/* ── Tablet / Desktop (≥ 783px) ── */

@media (min-width: 783px) {
  .wl-fpm-newsletter .wl-fpm-card {
    grid-template-columns: 5fr 7fr;
  }

  .wl-fpm-newsletter .wl-fpm-card-image-col {
    min-height: 28rem;
  }

  .wlf-newsletter-fields {
    flex-direction: row;
    gap: 1rem;
  }

  .wlf-newsletter-submit {
    width: auto;
    justify-content: normal;
  }
}

/* ── Editor-only (newsletter-specific) ── */

.wl-fpm-newsletter-editor .wl-fpm-card-photo {
  min-height: 20rem;
}

/* Editor faux form preview */

.wl-fpm-newsletter-form-preview {
  padding-top: 0.5rem;
}

.wl-fpm-newsletter-faux-field {
  margin-bottom: 0.75rem;
}

.wl-fpm-newsletter-faux-label {
  display: block;
  font-family: var(--wp--preset--font-family--body);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--wp--preset--color--on-surface, var(--wp--preset--color--on-surface));
  margin-bottom: 0.375rem;
}

.wl-fpm-newsletter-faux-input {
  display: block;
  padding: 12px 16px;
  border: 1px solid rgba(191, 199, 207, 0.6);
  border-radius: var(--wp--custom--radius--md);
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.9375rem;
  color: rgba(64, 72, 78, 0.5);
  background: var(--wp--preset--color--white);
}

.wl-fpm-newsletter-faux-button {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--wp--custom--radius--md);
  background-color: var(--wp--preset--color--primary, var(--wp--preset--color--primary));
  color: var(--wp--preset--color--white);
  font-family: var(--wp--preset--font-family--body);
  font-size: 16px;
  font-weight: 700;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

.wl-fpm-newsletter-faux-privacy {
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--wp--preset--color--on-surface-variant, var(--wp--preset--color--on-surface-variant));
  margin: 0;
}


