/**
 * You Donate Foundation — theme styles
 */

/* ── Buttons: white labels + smooth hover ── */
.wp-block-button__link,
.wp-element-button,
.ydf-newsletter-form button {
  transition:
    background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
    box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

.wp-block-button__link:hover,
.wp-element-button:hover,
.ydf-newsletter-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(2, 44, 87, 0.24);
}

.wp-block-button__link:active,
.wp-element-button:active,
.ydf-newsletter-form button:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 44, 87, 0.18);
  transition-duration: 0.15s;
}

.has-sage-background-color.wp-block-button__link,
.has-forest-background-color.wp-block-button__link,
.has-orange-background-color.wp-block-button__link {
  color: #ffffff !important;
}

.has-sage-background-color.wp-block-button__link:hover,
.has-forest-background-color.wp-block-button__link:hover,
.has-orange-background-color.wp-block-button__link:hover {
  color: #ffffff !important;
}

.ydf-header-bar .ydf-donate-btn .wp-block-button__link {
  color: #ffffff !important;
  background-color: var(--wp--preset--color--orange) !important;
}

.ydf-header-bar .ydf-donate-btn .wp-block-button__link:hover {
  color: #ffffff !important;
  background-color: var(--wp--preset--color--forest) !important;
}

/* Header CTA — text only (no arrow); hero keeps the arrow below. */
.ydf-header-bar .ydf-donate-btn .wp-block-button__link::after {
  display: none !important;
  content: none !important;
}

.ydf-header-bar .ydf-donate-btn .wp-block-button__link {
  gap: 0 !important;
}

/* Donate CTA — shared header + hero styling with arrow icon */
.ydf-donate-btn .wp-block-button__link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #ffffff !important;
  background-color: var(--wp--preset--color--orange) !important;
  border: none !important;
}

.ydf-donate-btn .wp-block-button__link:hover {
  color: #ffffff !important;
  background-color: var(--wp--preset--color--forest) !important;
}

.ydf-donate-btn .wp-block-button__link::after {
  content: "";
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* ── Contrast: light surfaces always use dark type ── */
.has-surface-background-color .wp-block-heading,
.has-background-background-color .wp-block-heading,
.has-sage-light-background-color .wp-block-heading,
.is-style-ydf-card .wp-block-heading,
.is-style-ydf-stat.has-surface-background-color .wp-block-heading {
  color: var(--wp--preset--color--forest) !important;
}

.has-surface-background-color .has-text-muted-color,
.has-background-background-color .has-text-muted-color,
.is-style-ydf-card .has-text-muted-color {
  color: var(--wp--preset--color--text-muted) !important;
}

/* Sage stat cards — white type */
.has-sage-background-color .wp-block-heading,
.has-sage-background-color > .wp-block-paragraph,
.has-sage-background-color .has-surface-color {
  color: #ffffff !important;
}

/* Dark band sections — light type on green (not inside cards) */
.ydf-hero .ydf-hero-intro .wp-block-heading,
.ydf-hero .ydf-hero-intro > .wp-block-paragraph:not(.has-text-muted-color),
.ydf-cta .wp-block-heading,
.ydf-cta > .alignwide .wp-block-heading {
  color: #ffffff !important;
}

.ydf-hero .has-sage-light-color,
.ydf-cta .has-sage-light-color {
  color: var(--wp--preset--color--sage-light) !important;
}

.ydf-cta .ydf-marquee,
.ydf-hero .ydf-marquee {
  color: var(--wp--preset--color--sage-light) !important;
}

/* Full-bleed green CTA inside constrained page content (About, Contact, etc.) */
.wp-block-post-content > .ydf-cta.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  box-sizing: border-box;
}

@media (max-width: 781px) {
  .wp-block-post-content > .ydf-cta.alignfull {
    padding-left: var(--wp--preset--spacing--m) !important;
    padding-right: var(--wp--preset--spacing--m) !important;
  }
}

/* Hero stat / card overrides (inside dark hero) */
.ydf-hero .has-surface-background-color .wp-block-heading,
.ydf-hero .ydf-hero-card .wp-block-heading,
.ydf-hero .is-style-ydf-stat.has-surface-background-color .wp-block-heading {
  color: var(--wp--preset--color--forest) !important;
}

.ydf-hero .has-surface-background-color .has-text-muted-color,
.ydf-hero .ydf-hero-card .has-text-muted-color {
  color: var(--wp--preset--color--text-muted) !important;
}

.ydf-hero .has-sage-background-color .wp-block-heading,
.ydf-hero .has-sage-background-color .has-surface-color {
  color: #ffffff !important;
}

/* Forest pinstripe hero pattern (Hopper-inspired) */
.is-style-ydf-hero-pattern {
  background-color: var(--wp--preset--color--forest);
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.035) 10px,
    rgba(255, 255, 255, 0.035) 11px
  );
}

/* Card surfaces */
.is-style-ydf-card {
  box-shadow: var(--wp--preset--shadow--card);
  border: 1px solid var(--wp--preset--color--border);
}

.is-style-ydf-stat {
  box-shadow: var(--wp--preset--shadow--soft);
}

.ydf-count {
  font-variant-numeric: tabular-nums;
  display: inline-block;
  min-width: 2.5ch;
}

/* Inner page content width — align with header nav */
main .wp-block-query.alignwide {
  margin-top: var(--wp--preset--spacing--2-xl);
  margin-bottom: var(--wp--preset--spacing--section);
}

main .wp-block-post-content {
  margin-bottom: var(--wp--preset--spacing--section);
}

/* Homepage: flush full-width section bands (no body-background gutter between them) */
.home .wp-block-post-content.is-layout-flow,
.home .wp-block-post-content {
  --wp--style--block-gap: 0;
  gap: 0;
}

.home .wp-block-post-content > .alignfull {
  margin-block-start: 0;
  margin-block-end: 0;
}

/* Pill outline button */
.is-style-ydf-outline .wp-block-button__link {
  background: transparent !important;
  color: var(--wp--preset--color--surface) !important;
  border: 2px solid var(--wp--preset--color--surface);
}

.ydf-hero .is-style-ydf-outline .wp-block-button__link {
  color: var(--wp--preset--color--surface) !important;
  border-color: rgba(255, 255, 255, 0.6);
}

.has-surface-background-color .is-style-ydf-outline .wp-block-button__link,
.has-background-background-color .is-style-ydf-outline .wp-block-button__link,
.has-sage-light-background-color .is-style-ydf-outline .wp-block-button__link,
.ydf-who-we-are .is-style-ydf-outline .wp-block-button__link,
.ydf-upcoming-events-section .is-style-ydf-outline .wp-block-button__link,
.ydf-header-bar .is-style-ydf-outline .wp-block-button__link {
  color: var(--wp--preset--color--forest) !important;
  border-color: var(--wp--preset--color--forest);
  background: transparent !important;
}

.has-surface-background-color
  .is-style-ydf-outline
  .wp-block-button__link:hover,
.has-background-background-color
  .is-style-ydf-outline
  .wp-block-button__link:hover,
.has-sage-light-background-color
  .is-style-ydf-outline
  .wp-block-button__link:hover,
.ydf-who-we-are .is-style-ydf-outline .wp-block-button__link:hover,
.ydf-upcoming-events-section
  .is-style-ydf-outline
  .wp-block-button__link:hover {
  background: var(--wp--preset--color--forest) !important;
  border-color: var(--wp--preset--color--forest) !important;
  color: #ffffff !important;
}

.is-style-ydf-outline .wp-block-button__link:hover,
.ydf-hero .is-style-ydf-outline .wp-block-button__link:hover {
  background: var(--wp--preset--color--orange) !important;
  border-color: var(--wp--preset--color--orange) !important;
  color: var(--wp--preset--color--surface) !important;
}

/* Large rounded images */
.is-style-ydf-rounded img {
  border-radius: 24px;
  object-fit: cover;
  width: 100%;
}

/* Stacked image column (about + who-we-are sections) */
.ydf-stacked-images {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--l);
}

.ydf-stacked-images > .wp-block-image {
  margin: 0;
}

.ydf-stacked-images > .wp-block-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Hero bento grid — photo | stats | photo */
.ydf-hero-bento {
  align-items: stretch !important;
  width: 100%;
  max-width: var(--wp--style--global--wide-size, 1200px);
  margin-inline: auto !important;
  gap: clamp(1rem, 2vw, 1.5rem) !important;
}

.ydf-hero-bento > .wp-block-column {
  display: flex;
  flex-direction: column;
}

.ydf-hero-bento__photo .wp-block-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ydf-hero-bento__photo .is-style-ydf-zoom {
  flex: 1;
  display: flex;
  overflow: hidden;
  border-radius: 24px;
  margin: 0;
  cursor: zoom-in;
}

.ydf-hero-bento .is-style-ydf-zoom {
  overflow: hidden;
  border-radius: 24px;
  margin: 0;
  cursor: zoom-in;
}

.ydf-hero-bento__photo .is-style-ydf-zoom img,
.ydf-hero-bento .is-style-ydf-zoom img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  border-radius: 24px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.ydf-hero-bento__stats {
  justify-content: center;
  gap: 0;
}

.ydf-hero-bento__stats .is-style-ydf-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ydf-hero-bento .is-style-ydf-zoom:hover img {
  transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .ydf-hero-bento .is-style-ydf-zoom img {
    transition: none;
  }

  .ydf-hero-bento .is-style-ydf-zoom:hover img {
    transform: none;
  }
}

@media (max-width: 781px) {
  .ydf-hero-bento {
    flex-wrap: wrap !important;
    gap: var(--wp--preset--spacing--m) !important;
  }

  .ydf-hero-bento__stats {
    order: -1;
    flex-basis: 100% !important;
    width: 100% !important;
  }

  .ydf-hero-bento__photo {
    flex-basis: calc(50% - 0.5rem) !important;
    width: calc(50% - 0.5rem) !important;
    min-width: 0;
  }

  .ydf-hero-bento__photo .is-style-ydf-zoom img {
    min-height: 200px;
    aspect-ratio: 3 / 4;
    height: auto;
  }
}

/* Scroll reveal — fade / slide in on viewport entry */
.ydf-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.ydf-reveal-left {
  transform: translate(-28px, 0);
}

.ydf-reveal-right {
  transform: translate(28px, 0);
}

.ydf-reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

.ydf-reveal-d1.is-visible {
  transition-delay: 0.08s;
}

.ydf-reveal-d2.is-visible {
  transition-delay: 0.18s;
}

.ydf-reveal-d3.is-visible {
  transition-delay: 0.28s;
}

@media (prefers-reduced-motion: reduce) {
  .ydf-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Hero bento — show on load (above-the-fold), not scroll-triggered */
.ydf-hero-bento .ydf-reveal,
.ydf-hero-bento .ydf-reveal-left,
.ydf-hero-bento .ydf-reveal-right {
  opacity: 1;
  transform: none !important;
  transition: none;
  animation: ydf-hero-enter 0.55s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.ydf-hero-bento .ydf-reveal-d1 {
  animation-delay: 0.06s;
}

.ydf-hero-bento .ydf-reveal-d2 {
  animation-delay: 0.14s;
}

@keyframes ydf-hero-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ydf-hero-bento .ydf-reveal {
    animation: none;
  }
}

/* WordPress lightbox — keep preview centered and fully visible */
.wp-lightbox-overlay,
.wp-lightbox-overlay .wp-block-image,
.wp-lightbox-overlay .wp-block-image img,
.wp-lightbox-overlay .ydf-reveal {
  opacity: 1 !important;
}

.wp-lightbox-overlay .lightbox-image-container {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  transform-origin: center center !important;
}

.wp-lightbox-overlay .wp-block-image,
.wp-lightbox-overlay .wp-block-image img {
  transform: none !important;
  transition: none !important;
}

.wp-lightbox-container,
.wp-lightbox-container img {
  opacity: 1 !important;
  transform: none !important;
}

/* Header + homepage hero shell */
header:has(.ydf-header-wrap) {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
}

.admin-bar header:has(.ydf-header-wrap) {
  top: 32px;
}

.ydf-header-bar {
  transition:
    padding 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    max-width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop header — logo left, nav centered, donate right */
@media (min-width: 782px) {
  .ydf-header-bar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    width: 100% !important;
    max-width: var(--wp--style--global--wide-size, 1200px) !important;
    flex-wrap: nowrap !important;
  }

  .ydf-header-bar .ydf-site-brand {
    grid-column: 1;
    justify-self: start;
    min-width: 0;
  }

  .ydf-header-bar .ydf-header-nav {
    grid-column: 2;
    justify-self: center;
    width: max-content;
    max-width: 100%;
  }

  .ydf-header-bar > .wp-block-buttons {
    grid-column: 3;
    justify-self: end;
    margin: 0 !important;
  }
}

.ydf-header-wrap {
  position: relative;
  z-index: 100;
  background-color: var(--wp--preset--color--background);
  margin-bottom: 0;
  transition:
    padding 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    background-image 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    backdrop-filter 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.ydf-site-brand .wp-block-site-logo img,
.ydf-site-brand .custom-logo {
  transition:
    max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    max-width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Inner pages: flush header → page title banner */
body:not(.home) .wp-site-blocks > main {
  margin-block-start: 0 !important;
}

body:not(.home) main > .ydf-page-header:first-child,
body:not(.home) main > .alignfull.ydf-page-header:first-child {
  margin-block-start: 0 !important;
}

/* Scrolled (home) + default inner pages: full-width flat white bar */
header.is-scrolled .ydf-header-wrap,
body:not(.home) .ydf-header-wrap {
  padding: 0 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 4px 24px rgba(2, 44, 87, 0.08);
  border-bottom: 1px solid var(--wp--preset--color--border);
}

header.is-scrolled .ydf-header-bar,
body:not(.home) .ydf-header-bar {
  max-width: var(--wp--style--global--wide-size, 1200px) !important;
  width: 100% !important;
  margin-left: auto;
  margin-right: auto;
  border-radius: 0 !important;
  background: #ffffff !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none !important;
  box-shadow: none !important;
  padding-top: var(--wp--preset--spacing--s) !important;
  padding-bottom: var(--wp--preset--spacing--s) !important;
  padding-left: var(--wp--preset--spacing--l) !important;
  padding-right: var(--wp--preset--spacing--l) !important;
  transform: translateY(0);
}

header.is-scrolled .ydf-header-bar .ydf-site-brand .wp-block-site-logo img,
header.is-scrolled .ydf-header-bar .ydf-site-brand .custom-logo,
body:not(.home) .ydf-header-bar .ydf-site-brand .wp-block-site-logo img,
body:not(.home) .ydf-header-bar .ydf-site-brand .custom-logo {
  max-height: 36px;
}

/* Inner pages: no header morph animation */
body:not(.home) .ydf-header-wrap,
body:not(.home) .ydf-header-bar,
body:not(.home) .ydf-site-brand .wp-block-site-logo img,
body:not(.home) .ydf-site-brand .custom-logo {
  transition: none;
}

.home .ydf-header-wrap {
  background-color: var(--wp--preset--color--forest);
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.035) 10px,
    rgba(255, 255, 255, 0.035) 11px
  );
  margin-bottom: 0;
  padding-bottom: 0;
}

.home .ydf-header-bar {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.ydf-site-brand .wp-block-site-logo {
  line-height: 0;
}

.ydf-site-brand .wp-block-site-logo img,
.ydf-site-brand .custom-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 52px;
  max-width: 140px;
  object-fit: contain;
}

.ydf-header-bar .ydf-site-brand .wp-block-site-logo img,
.ydf-header-bar .ydf-site-brand .custom-logo {
  max-height: 44px;
  max-width: 200px;
}

.ydf-header-bar .wp-block-navigation .wp-block-navigation-item__content,
.ydf-header-bar .wp-block-navigation-submenu__toggle {
  position: relative;
  padding: 0.35rem 0;
  color: var(--wp--preset--color--text);
  text-decoration: none;
}

.ydf-header-bar .wp-block-navigation .wp-block-navigation-item__content::before,
.ydf-header-bar .wp-block-navigation .wp-block-navigation-item__content::after,
.ydf-header-bar .wp-block-navigation-submenu__toggle::before,
.ydf-header-bar .wp-block-navigation-submenu__toggle::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 50%;
  height: 2px;
  background: var(--wp--preset--color--orange);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ydf-header-bar .wp-block-navigation .wp-block-navigation-item__content::before,
.ydf-header-bar .wp-block-navigation-submenu__toggle::before {
  left: 0;
  transform-origin: left center;
}

.ydf-header-bar .wp-block-navigation .wp-block-navigation-item__content::after,
.ydf-header-bar .wp-block-navigation-submenu__toggle::after {
  right: 0;
  transform-origin: right center;
}

.ydf-header-bar .wp-block-navigation-item__content:hover,
.ydf-header-bar .wp-block-navigation-submenu__toggle:hover {
  color: var(--wp--preset--color--orange);
}

.ydf-header-bar .wp-block-navigation-item__content:hover::before,
.ydf-header-bar .wp-block-navigation-item__content:hover::after,
.ydf-header-bar .wp-block-navigation-item__content:focus-visible::before,
.ydf-header-bar .wp-block-navigation-item__content:focus-visible::after,
.ydf-header-bar .wp-block-navigation-submenu__toggle:hover::before,
.ydf-header-bar .wp-block-navigation-submenu__toggle:hover::after,
.ydf-header-bar .wp-block-navigation-submenu__toggle:focus-visible::before,
.ydf-header-bar .wp-block-navigation-submenu__toggle:focus-visible::after {
  transform: scaleX(1);
}

.ydf-header-bar
  .wp-block-navigation-item.current
  .wp-block-navigation-item__content {
  color: var(--wp--preset--color--orange);
  font-weight: 600;
}

.ydf-header-bar
  .wp-block-navigation-item.current
  .wp-block-navigation-item__content::before,
.ydf-header-bar
  .wp-block-navigation-item.current
  .wp-block-navigation-item__content::after {
  transform: scaleX(1);
}

/* Events dropdown submenu */
.ydf-header-bar .wp-block-navigation-submenu {
  position: relative;
  align-items: center;
  gap: 0.1rem;
}

.ydf-header-bar
  .wp-block-navigation-submenu
  > .wp-block-navigation-item__content {
  display: inline-flex;
  align-items: center;
}

.ydf-header-bar
  .wp-block-navigation-submenu
  .wp-block-navigation__submenu-icon {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0.35rem 0;
  margin: 0 0 0 0.1rem;
  line-height: 1;
}

.ydf-header-bar
  .wp-block-navigation-submenu
  .wp-block-navigation__submenu-icon
  svg {
  display: block;
  margin: 0;
  width: 0.65em;
  height: 0.65em;
}

.ydf-header-bar
  .wp-block-navigation-submenu
  .wp-block-navigation__submenu-icon::before,
.ydf-header-bar
  .wp-block-navigation-submenu
  .wp-block-navigation__submenu-icon::after {
  display: none;
}

.ydf-header-bar .wp-block-navigation__submenu-container {
  background: var(--wp--preset--color--forest) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: 0 12px 32px rgba(2, 44, 87, 0.22);
  min-width: 220px;
  padding: 0.35rem 0 !important;
}

.ydf-header-bar
  .wp-block-navigation__submenu-container
  .wp-block-navigation-item__content {
  color: #ffffff !important;
  padding: 0.65rem 1.25rem !important;
  font-weight: 500;
}

.ydf-header-bar
  .wp-block-navigation__submenu-container
  .wp-block-navigation-item__content::before,
.ydf-header-bar
  .wp-block-navigation__submenu-container
  .wp-block-navigation-item__content::after {
  display: none;
}

.ydf-header-bar
  .wp-block-navigation__submenu-container
  .wp-block-navigation-item__content:hover,
.ydf-header-bar
  .wp-block-navigation__submenu-container
  .wp-block-navigation-item__content:focus {
  color: var(--wp--preset--color--sage-light) !important;
  background: rgba(255, 255, 255, 0.08);
}

.ydf-header-bar .wp-block-navigation-submenu__toggle {
  color: var(--wp--preset--color--text);
}

.ydf-header-bar .wp-block-navigation-submenu__toggle:hover {
  color: var(--wp--preset--color--orange);
}

@media (prefers-reduced-motion: reduce) {
  .ydf-header-bar .wp-block-navigation-item__content::before,
  .ydf-header-bar .wp-block-navigation-item__content::after,
  .ydf-header-bar .wp-block-navigation-submenu__toggle::before,
  .ydf-header-bar .wp-block-navigation-submenu__toggle::after {
    transition: none;
  }
}

/* Hero — centered copy + photo / stats / photo grid */
.ydf-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 0 !important;
  padding-left: var(--wp--preset--spacing--l);
  padding-right: var(--wp--preset--spacing--l);
}

.ydf-hero-intro {
  width: 100%;
  max-width: var(--wp--style--global--wide-size, 1200px);
  margin-inline: auto;
  text-align: center;
}

.ydf-hero-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem) !important;
  line-height: 1.1 !important;
  max-width: 18ch;
  margin-inline: auto !important;
}

.ydf-hero-lead {
  max-width: 38rem;
  margin-inline: auto;
  line-height: 1.55 !important;
  font-size: clamp(1rem, 1.35vw, 1.125rem) !important;
}

.ydf-hero-actions {
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: var(--wp--preset--spacing--l);
}

.ydf-hero-actions .wp-block-button__link {
  padding-inline: 1.75rem !important;
}

/* Standalone bento section (legacy pattern) */
.ydf-bento-section .has-surface-background-color .wp-block-heading,
.ydf-bento-section
  .is-style-ydf-stat.has-surface-background-color
  .wp-block-heading {
  color: var(--wp--preset--color--forest) !important;
}

.ydf-bento-section .has-surface-background-color .has-text-muted-color {
  color: var(--wp--preset--color--text-muted) !important;
}

.ydf-bento-section .has-sage-background-color .wp-block-heading,
.ydf-bento-section .has-sage-background-color .has-surface-color {
  color: #ffffff !important;
}

/* Feature cards — aligned grid with icons */
.ydf-feature-grid,
.ydf-pillar-grid {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: var(--wp--style--global--wide-size, 1200px);
  margin-left: auto;
  margin-right: auto;
}

.ydf-feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ydf-feature-grid.is-layout-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ydf-pillar-grid.is-layout-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ydf-pillar-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: var(--wp--preset--spacing--3-xl);
}

.ydf-feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  min-height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 20px;
  background: var(--wp--preset--color--surface);
  box-shadow: var(--wp--preset--shadow--soft);
}

.ydf-feature-card--soft,
.ydf-feature-card--pillar {
  background: var(--wp--preset--color--background);
}

.ydf-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: rgba(239, 106, 8, 0.14);
  color: var(--wp--preset--color--forest);
  flex-shrink: 0;
}

.ydf-feature-card__number {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--wp--preset--color--forest);
}

.ydf-feature-card > .wp-block-heading.ydf-count,
.ydf-feature-card > .wp-block-heading.ydf-feature-card__number {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--wp--preset--color--forest);
}

.ydf-feature-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--wp--preset--color--forest);
}

.ydf-feature-card > .wp-block-heading.ydf-feature-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--wp--preset--color--forest);
}

.ydf-feature-card__label,
.ydf-feature-card__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--wp--preset--color--text-muted);
}

.ydf-feature-card > .wp-block-paragraph {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--wp--preset--color--text-muted);
}

@media (max-width: 1024px) {
  .ydf-feature-grid,
  .ydf-feature-grid.is-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .ydf-pillar-grid,
  .ydf-pillar-grid.is-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 781px) {
  .ydf-feature-grid,
  .ydf-feature-grid.is-layout-grid,
  .ydf-pillar-grid,
  .ydf-pillar-grid.is-layout-grid {
    grid-template-columns: 1fr !important;
  }

  .ydf-hero,
  .ydf-hero.has-global-padding,
  .ydf-hero.is-layout-constrained,
  .home .ydf-hero,
  .home .wp-site-blocks > main > .ydf-hero:first-child {
    padding-top: var(--wp--preset--spacing--l) !important;
    padding-bottom: var(--wp--preset--spacing--xl) !important;
    padding-left: var(--wp--preset--spacing--m) !important;
    padding-right: var(--wp--preset--spacing--m) !important;
    --wp--style--root--padding-left: 0px !important;
    --wp--style--root--padding-right: 0px !important;
  }

  .ydf-hero-intro {
    padding-inline: 0.25rem;
  }

  .ydf-hero-title {
    max-width: none;
  }
}

/* Hero — seamless with header on home (desktop) */
@media (min-width: 782px) {
  .home .ydf-hero {
    margin-top: 0 !important;
    padding-top: var(--wp--preset--spacing--l) !important;
    padding-bottom: var(--wp--preset--spacing--l) !important;
  }

  .home .wp-site-blocks > main > .ydf-hero:first-child {
    padding-top: var(--wp--preset--spacing--l) !important;
  }
}

.ydf-hero .ydf-hero-title,
.ydf-hero .ydf-hero-intro .wp-block-heading,
.ydf-hero .ydf-hero-intro h1 {
  color: #ffffff !important;
}

.ydf-hero .ydf-badge,
.ydf-hero .has-sage-light-color {
  color: var(--wp--preset--color--sage-light) !important;
}

.ydf-hero .wp-block-buttons .wp-block-button__link {
  font-weight: 600;
}

.ydf-hero-card .wp-block-heading.has-forest-color {
  color: var(--wp--preset--color--forest) !important;
}

.ydf-hero-card .has-text-muted-color {
  color: var(--wp--preset--color--text-muted) !important;
}

.home .wp-site-blocks > header,
.home .wp-site-blocks > main {
  margin-top: 0;
}

/* FAQ details */
.is-style-ydf-faq {
  padding: 1rem 1.25rem;
  border: 1px solid var(--wp--preset--color--border);
}

.is-style-ydf-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--wp--preset--color--forest);
  list-style: none;
}

.is-style-ydf-faq summary::-webkit-details-marker {
  display: none;
}

.is-style-ydf-faq summary::after {
  content: "+";
  float: right;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--wp--preset--color--orange);
}

.is-style-ydf-faq[open] summary::after {
  content: "−";
}

/* Newsletter form */
.ydf-newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.ydf-newsletter-form input[type="email"] {
  flex: 1 1 200px;
  min-width: 0;
  padding: 0.875rem 1.25rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 9999px;
  font: inherit;
  background: var(--wp--preset--color--background);
}

.ydf-newsletter-form button {
  border: none;
  cursor: pointer;
  border-radius: 9999px;
  padding: 0.875rem 1.75rem;
  background: var(--wp--preset--color--forest);
  color: var(--wp--preset--color--surface);
  font-weight: 600;
}

.ydf-newsletter-form button:hover {
  background: var(--wp--preset--color--orange);
  color: #ffffff;
}

/* Footer links */
.ydf-footer-links {
  list-style: none;
  padding-left: 0 !important;
}

.ydf-footer-links li {
  margin-bottom: 0.35rem;
}

.ydf-footer-links a {
  text-decoration: none;
  color: var(--wp--preset--color--text-muted);
}

.ydf-footer-links a:hover {
  color: var(--wp--preset--color--orange);
}

.ydf-footer-columns .wp-block-heading {
  margin: 0 0 0.5rem;
}

.ydf-footer-contact {
  margin: 0 !important;
  line-height: 1.65;
}

.ydf-footer-contact a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ydf-footer-contact a:hover {
  color: var(--wp--preset--color--orange);
}

/* GiveWP form styling inside theme */
.give-wrap,
.give-form-wrap,
[id^="give-form"] {
  font-family: inherit;
}

.give-btn,
.give-submit {
  border-radius: 9999px !important;
  background: var(--wp--preset--color--orange) !important;
  border: none !important;
  font-weight: 600 !important;
  padding: 0.875rem 1.75rem !important;
}

.give-btn:hover,
.give-submit:hover {
  background: var(--wp--preset--color--forest) !important;
}

.give-form-grid {
  gap: 1.5rem;
}

.give-form-grid .give-grid-item {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--wp--preset--shadow--card);
  border: 1px solid var(--wp--preset--color--border);
}

/* Give single form page — match inner-page header shell */
body.ydf-give-form-page .ydf-header-wrap,
body.ydf-give-form-page:not(.home) .ydf-header-wrap {
  padding: 0 !important;
  background-color: #ffffff !important;
  box-shadow: 0 4px 24px rgba(2, 44, 87, 0.08);
  border-bottom: 1px solid var(--wp--preset--color--border);
}

body.ydf-give-form-page .ydf-header-bar,
body.ydf-give-form-page:not(.home) .ydf-header-bar {
  max-width: var(--wp--style--global--wide-size, 1200px) !important;
  width: 100% !important;
  margin-left: auto;
  margin-right: auto;
  border-radius: 0 !important;
  background: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
  padding-top: var(--wp--preset--spacing--s) !important;
  padding-bottom: var(--wp--preset--spacing--s) !important;
  padding-left: var(--wp--preset--spacing--l) !important;
  padding-right: var(--wp--preset--spacing--l) !important;
}

body.ydf-give-form-page .ydf-header-bar .ydf-site-brand .wp-block-site-logo img,
body.ydf-give-form-page .ydf-header-bar .ydf-site-brand .custom-logo {
  max-height: 36px;
}

.ydf-give-form-page .ydf-give-form-main {
  margin-top: 0;
}

.ydf-give-form-page .ydf-page-header {
  margin-bottom: 0;
}

.ydf-give-form-page .ydf-page-header .wp-block-post-title,
.ydf-give-form-page .ydf-page-header .wp-block-heading {
  margin: 0;
}

.ydf-appeals-grid .give-form-grid-container {
  margin-top: var(--wp--preset--spacing--l);
}

.ydf-appeal-card {
  overflow: hidden;
  height: 100%;
  box-shadow: var(--wp--preset--shadow--card);
}

.ydf-appeal-card__image {
  margin: 0 calc(-1 * var(--wp--preset--spacing--l))
    var(--wp--preset--spacing--m);
}

.ydf-appeal-card__image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.ydf-appeal-card__date {
  margin: 0 0 0.35rem;
}

.ydf-appeal-card .wp-block-heading {
  margin: 0 0 0.75rem;
}

.ydf-appeal-card .wp-block-heading a {
  color: inherit;
  text-decoration: none;
}

.ydf-appeal-card .wp-block-heading a:hover {
  color: var(--wp--preset--color--forest);
}

.ydf-appeal-card > .wp-block-paragraph:last-child a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.ydf-give-form-page .ydf-give-form-card {
  max-width: 600px;
  margin: var(--wp--preset--spacing--l) auto var(--wp--preset--spacing--2-xl);
  padding: var(--wp--preset--spacing--l) var(--wp--preset--spacing--l);
  border-radius: 20px;
  box-shadow: var(--wp--preset--shadow--card);
  border: 1px solid var(--wp--preset--color--border);
}

.ydf-give-form-page .give-form-title,
.ydf-give-form-page .entry-title {
  display: none;
}

.ydf-give-form-page [id^="give-form-"][id$="-content"] {
  margin: 0;
  padding: 0;
}

.ydf-give-form-page .summary.entry-summary {
  width: 100%;
  max-width: 100%;
}

.ydf-give-form-page .give-form-wrap,
.ydf-give-form-page .give-form {
  max-width: 100%;
  margin: 0;
}

.ydf-give-form-page .give-form-section {
  margin-bottom: 1rem;
  padding-bottom: 0;
}

.ydf-give-form-page .give-form-section-title {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.ydf-give-form-page .give-donation-amount .give-donation-levels-wrap {
  margin-bottom: 0.75rem;
}

.ydf-give-form-page .give-btn-level,
.ydf-give-form-page .give-donation-level-btn {
  padding: 0.5rem 1rem !important;
}

.ydf-give-form-page #give-final-total-wrap,
.ydf-give-form-page .give-donation-total-label {
  margin-top: 0.75rem;
}

.ydf-give-form-page .give-stripe-gateways-wrap,
.ydf-give-form-page .give-gift-aid-wrap {
  margin-top: 0.75rem;
}

.ydf-give-form-page .give_error.give_warning {
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

/* WooCommerce blocks */
.wc-block-components-button,
.woocommerce a.button,
.woocommerce button.button {
  border-radius: 9999px !important;
}

/* Mobile drawer clones — only visible inside the open overlay menu */
.ydf-mobile-menu-logo,
.ydf-mobile-menu-donate {
  display: none !important;
}

/* Responsive — compact sticky header + mobile nav overlay */
@media (max-width: 781px) {
  /* Legacy WP Responsive Menu plugin bar — hidden; theme nav handles mobile */
  #wprmenu_bar,
  .wprmenu_bar,
  .wprm-wrapper,
  #mg-wprm-wrap {
    display: none !important;
  }

  html {
    padding-top: 0 !important;
  }

  /* One flush white sticky bar — no homepage pill / forest shell on scroll */
  header:has(.ydf-header-wrap),
  header.is-mobile-header:has(.ydf-header-wrap),
  header.is-scrolled:has(.ydf-header-wrap) {
    top: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  .admin-bar header:has(.ydf-header-wrap),
  .admin-bar header.is-mobile-header:has(.ydf-header-wrap) {
    top: 46px !important;
  }

  .ydf-header-wrap,
  .home .ydf-header-wrap,
  header.is-scrolled .ydf-header-wrap,
  header.is-mobile-header .ydf-header-wrap,
  body:not(.home) .ydf-header-wrap {
    padding: 0 !important;
    margin: 0 !important;
    background-color: #ffffff !important;
    background-image: none !important;
    box-shadow: 0 2px 16px rgba(2, 44, 87, 0.06);
    border-bottom: 1px solid var(--wp--preset--color--border);
    transition: none !important;
  }

  .ydf-header-bar,
  .home .ydf-header-bar,
  header.is-scrolled .ydf-header-bar,
  header.is-mobile-header .ydf-header-bar,
  body:not(.home) .ydf-header-bar {
    display: grid !important;
    grid-template-columns: minmax(2.75rem, 1fr) auto minmax(2.75rem, 1fr);
    grid-template-areas: "menu logo donate";
    align-items: center !important;
    justify-items: center;
    gap: 0.5rem !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.625rem 1rem !important;
    background: #ffffff !important;
    transform: none !important;
    transition: none !important;
  }

  .ydf-header-wrap,
  .ydf-header-bar,
  .ydf-site-brand .wp-block-site-logo img,
  .ydf-site-brand .custom-logo {
    transition: none !important;
  }

  .ydf-header-bar .ydf-site-brand {
    grid-area: logo;
    justify-self: center;
    min-width: 0;
  }

  .ydf-header-bar .ydf-site-brand .wp-block-site-logo img,
  .ydf-header-bar .ydf-site-brand .custom-logo {
    max-height: 34px;
    max-width: 120px;
  }

  .ydf-header-bar .ydf-header-nav {
    grid-area: menu;
    justify-self: start;
    flex: 0 0 auto;
    margin: 0 !important;
  }

  .ydf-header-bar > .wp-block-buttons {
    grid-area: donate;
    justify-self: end;
    flex: 0 0 auto;
    display: flex !important;
    margin: 0 !important;
  }

  .ydf-header-bar .ydf-donate-btn .wp-block-button__link {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }

  /* Single header bar on homepage — no forest wrap layer behind the bar */
  .home .ydf-header-wrap,
  header.is-mobile-header .ydf-header-wrap {
    background-color: #ffffff !important;
    background-image: none !important;
    box-shadow: 0 2px 16px rgba(2, 44, 87, 0.06) !important;
    border-bottom: 1px solid var(--wp--preset--color--border) !important;
  }

  .home .ydf-header-bar,
  header.is-mobile-header .ydf-header-bar {
    border-bottom: none !important;
    box-shadow: none !important;
  }

  /* ── Mobile menu: closed ── */
  html:not(.has-modal-open)
    .ydf-header-nav
    .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none !important;
  }

  html:not(.has-modal-open)
    .ydf-header-nav
    .wp-block-navigation__responsive-container-open {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
  }

  /* ── Mobile menu: open — full-screen modern drawer ── */
  html.has-modal-open .ydf-site-brand,
  html.has-modal-open .ydf-header-bar > .wp-block-buttons,
  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation__responsive-container-open {
    visibility: hidden !important;
    pointer-events: none !important;
  }

  html.has-modal-open .ydf-header-wrap,
  html.has-modal-open .ydf-header-bar {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }

  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation__responsive-container.is-menu-open {
    display: flex !important;
    flex-direction: column;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--wp--preset--color--surface) !important;
    overflow: hidden;
    z-index: 100000 !important;
    animation: none;
  }

  .admin-bar
    html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation__responsive-container.is-menu-open {
    top: 46px !important;
    height: calc(100dvh - 46px) !important;
    max-height: calc(100dvh - 46px) !important;
  }

  html.has-modal-open .ydf-header-nav .wp-block-navigation__responsive-close,
  html.has-modal-open .ydf-header-nav .wp-block-navigation__responsive-dialog {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
    min-height: 100%;
    height: 100%;
  }

  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation__responsive-container-close {
    position: absolute;
    top: 0.875rem;
    right: 1rem;
    z-index: 3;
    visibility: visible !important;
    pointer-events: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 999px;
    background: var(--wp--preset--color--background);
    color: var(--wp--preset--color--forest);
    box-shadow: var(--wp--preset--shadow--soft);
  }

  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation__responsive-container-close
    svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .admin-bar
    html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation__responsive-container-close {
    top: calc(46px + 0.875rem);
  }

  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation__responsive-container-content {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 0 !important;
    background: var(--wp--preset--color--surface) !important;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation__responsive-container-content::before {
    content: none;
    display: none;
  }

  html.has-modal-open .ydf-header-nav .ydf-mobile-menu-logo {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 1.125rem 1.25rem 1rem;
    border-bottom: 1px solid var(--wp--preset--color--border);
    background: var(--wp--preset--color--surface);
  }

  html.has-modal-open .ydf-header-nav .ydf-mobile-menu-logo a {
    display: inline-flex;
    line-height: 0;
  }

  html.has-modal-open .ydf-header-nav .ydf-mobile-menu-logo img {
    max-height: 36px;
    width: auto;
  }

  .admin-bar html.has-modal-open .ydf-header-nav .ydf-mobile-menu-logo {
    padding-top: calc(46px + 1.125rem);
  }

  html.has-modal-open .ydf-header-nav .ydf-mobile-menu-donate {
    display: block !important;
    flex-shrink: 0;
    margin-top: auto;
    padding: 1rem 1.25rem max(1.5rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--wp--preset--color--border);
    background: var(--wp--preset--color--surface);
  }

  html.has-modal-open .ydf-header-nav .ydf-mobile-menu-donate .wp-block-button {
    width: 100%;
    margin: 0;
  }

  html.has-modal-open
    .ydf-header-nav
    .ydf-mobile-menu-donate
    .wp-block-button__link {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
  }

  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation__responsive-container-content
    .wp-block-navigation__container {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    width: 100%;
    padding: 0.25rem 0 2rem;
    margin: 0;
  }

  html.has-modal-open .ydf-header-nav .wp-block-navigation-item,
  html.has-modal-open .ydf-header-nav .wp-block-navigation-submenu {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    width: 100%;
    margin: 0;
    border-bottom: 1px solid var(--wp--preset--color--border);
  }

  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation-item
    > .wp-block-navigation-item__content,
  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation-submenu
    > .wp-block-navigation-item__content {
    display: flex !important;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--wp--preset--color--forest) !important;
    text-decoration: none;
    box-sizing: border-box;
  }

  html.has-modal-open .ydf-header-nav .wp-block-navigation-item__content:hover,
  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation-item__content:focus-visible {
    background: var(--wp--preset--color--background);
    color: var(--wp--preset--color--sage) !important;
  }

  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation-item__content::before,
  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation-item__content::after {
    display: none !important;
  }

  html.has-modal-open .ydf-header-nav .wp-block-navigation__submenu-icon {
    display: none !important;
  }

  html.has-modal-open .ydf-header-nav .wp-block-navigation__submenu-container {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none;
    border-top: 1px solid var(--wp--preset--color--border);
    background: var(--wp--preset--color--background);
    box-shadow: none;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    min-width: 0 !important;
    overflow: visible;
  }

  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation__submenu-container
    .wp-block-navigation-item {
    border-bottom: 1px solid var(--wp--preset--color--border);
  }

  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation__submenu-container
    .wp-block-navigation-item:last-child {
    border-bottom: none;
  }

  html.has-modal-open
    .ydf-header-nav
    .wp-block-navigation__submenu-container
    .wp-block-navigation-item__content {
    padding: 0.875rem 1.25rem 0.875rem 2rem !important;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--wp--preset--color--text) !important;
  }

  html.has-modal-open header:has(.ydf-header-wrap) {
    z-index: 100001;
  }

  .ydf-hero-bento {
    margin-top: var(--wp--preset--spacing--xl) !important;
  }
}

/* Page content from legacy builders — show a migration notice */
.wp-block-post-content .wpb_content_element,
.wp-block-post-content [class*="vc_"],
.wp-block-post-content .rev_slider {
  display: none;
}

/* ── Footer legal strip ── */
.ydf-footer {
  margin-top: 0;
}

.ydf-footer-legal__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(240, 218, 184, 0.35) 0%,
    rgba(241, 238, 234, 0.9) 100%
  );
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.ydf-footer-legal__item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  min-width: 0;
}

.ydf-footer-legal__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--forest);
  box-shadow: 0 2px 8px rgba(2, 44, 87, 0.08);
}

.ydf-footer-legal__divider {
  width: 1px;
  margin: 0 1.5rem;
  background: var(--wp--preset--color--border);
  align-self: stretch;
}

.ydf-footer-legal__content {
  min-width: 0;
}

.ydf-footer-legal__label {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wp--preset--color--orange);
}

.ydf-footer-legal__text {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--wp--preset--color--forest);
}

.ydf-footer-legal__badge {
  display: inline-block;
  margin: 0.5rem 0 0;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--wp--preset--color--forest);
  letter-spacing: 0.03em;
}

.ydf-footer-legal__bank-name {
  margin: 0 0 0.625rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--wp--preset--color--forest);
}

.ydf-footer-legal__details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0;
}

.ydf-footer-legal__detail {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ydf-footer-legal__detail dt {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wp--preset--color--text-muted);
}

.ydf-footer-legal__detail dd {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--wp--preset--color--forest);
  letter-spacing: 0.04em;
}

.ydf-footer-bottom {
  gap: 1rem;
}

.ydf-footer-copyright {
  margin: 0;
}

.ydf-footer-credit {
  margin: 0.35rem 0 0;
}

.ydf-footer-copyright a,
.ydf-footer-credit a {
  color: var(--wp--preset--color--forest);
  font-weight: 600;
  text-decoration: none;
}

.ydf-footer-copyright a:hover,
.ydf-footer-credit a:hover {
  color: var(--wp--preset--color--orange);
  text-decoration: underline;
}

.ydf-footer-copyright__sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}

@media (max-width: 781px) {
  .ydf-footer-legal__inner {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem 1.125rem;
  }

  .ydf-footer-legal__divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }

  .ydf-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

.ydf-legacy-notice {
  display: none;
}

.wp-block-post-content:has(.wpb_content_element) .ydf-legacy-notice,
.wp-block-post-content:has([class*="vc_"]) .ydf-legacy-notice {
  display: block;
}
