/*
Theme Name: Engaging Every Learner
Description: WordPress adaptation of the Engaging Every Learner Foundation Lovable concept.
Version: 0.3.3
Requires PHP: 8.0
Text Domain: engaging-every-learner
*/

.eelf-header {
  --header-height: 88px;
  position: sticky;
  top: 0;
  z-index: 20;
  color: var(--forest);
  background: rgba(250, 248, 241, .88);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(17, 55, 43, .12);
}
.eelf-header--overlay {
  position: absolute;
  inset: 0 0 auto;
  color: #fff;
  background: linear-gradient(180deg, rgba(8, 30, 24, .78), rgba(8, 30, 24, .36) 70%, transparent);
  border-bottom: 0;
  backdrop-filter: none;
}
.admin-bar .eelf-header { top: 32px; }
.admin-bar .eelf-header--overlay { top: 32px; }
.eelf-header-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: var(--header-height); }
.eelf-brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 700; line-height: 1.1; font-size: clamp(.81rem, 2.7vw, 1.05rem); }
.eelf-brand img { width: clamp(35px, 9vw, 48px); aspect-ratio: 1; border-radius: 4px; }
.eelf-header a, .eelf-header button { color: inherit; }
.eelf-header--overlay .nav-link::after { background: currentColor; }
.eelf-header-donate { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .8rem; border: 1px solid currentColor; border-radius: 3px; font-size: .8rem; font-weight: 700; }
.eelf-header-donate:hover { background: var(--forest); color: #fff; border-color: var(--forest); }
.eelf-header--overlay .eelf-header-donate:hover { background: #fff; color: var(--forest); border-color: #fff; }
.eelf-mobile-navigation { padding-block: 0.8rem; }
.eelf-header--overlay .eelf-mobile-navigation { background: var(--forest); }
.eelf-mobile-navigation a { display: block; padding-block: 0.65rem; }
.eelf-menu-toggle { display: none; }
.eelf-js .eelf-menu-toggle { display: inline-flex; }
.eelf-js .hero-slide-controls { visibility: visible; }
.hero-slide-controls { visibility: hidden; }
.hero-slide-image { filter: none; }
.eelf-nav-list { display: flex; flex-wrap: wrap; gap: 2rem; }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }
.custom-logo-link img { width: min(274px, 100%); height: auto; }
#mobile-navigation[hidden] { display: none; }
.eelf-header--overlay + main .hero-slide-content { padding-top: 78px; }
.eelf-header :focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

@media (max-width: 782px) {
  .admin-bar .eelf-header { top: 46px; }
}

@media (max-width: 640px) {
  .eelf-header { --header-height: 72px; }
  .eelf-header-inner > div:last-child { gap: .55rem; }
  .eelf-header--overlay + main .hero-slide-content { padding-top: 65px; }
}

.eelf-header--overlay + main .hero-slide-content--compact {
  padding-block: 100px 88px;
  gap: clamp(.65rem, 2vh, 1.2rem);
}
.hero-slide-content--compact > * { margin-block: 0; }
.hero-slide-content--compact .display-title { font-size: clamp(2.4rem, 6.4vw, 4.5rem); }

.eelf-integration { margin-top: 1.75rem; }
.eelf-integration iframe { max-width: 100%; }
.eelf-integration .wpforms-container input:not([type=checkbox]):not([type=radio]),
.eelf-integration .wpforms-container textarea,
.eelf-integration .wpforms-container select { background: var(--background); border-color: var(--border); }
.eelf-integration .wpforms-container button[type=submit] { background: var(--primary); color: var(--primary-foreground); }

.eelf-section-intro { max-width: 44rem; }
.eelf-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--border); margin-top: clamp(1.5rem, 5vw, 3rem); }
.eelf-metric { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .55rem; padding: 1.4rem 1rem 1.35rem 0; }
.eelf-metric + .eelf-metric { border-inline-start: 1px solid var(--border); padding-inline-start: 1rem; }
.eelf-metric dt { font-size: .8rem; font-weight: 650; color: var(--muted-foreground); }
.eelf-metric dd { font: 400 clamp(1.8rem, 3.8vw, 3.7rem)/1 'DM Serif Display', Georgia, serif; color: var(--primary); font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.eelf-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.eelf-source-note { margin-top: .85rem; font-size: .75rem; color: var(--muted-foreground); }
.eelf-story { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: clamp(1.5rem, 5vw, 5rem); }
.eelf-story-media, .eelf-portrait { overflow: hidden; border-radius: 4px; background: var(--accent); }
.eelf-story-media img, .eelf-portrait img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: scale .55s ease; }
.eelf-portrait img { object-position: center 35%; }
.eelf-story-media:hover img, .eelf-portrait:hover img { scale: 1.035; }
.eelf-event-details { margin-top: 1.6rem; border-block: 1px solid var(--border); }
.eelf-event-details summary { cursor: pointer; padding-block: .9rem; font-weight: 650; color: var(--primary); }
.eelf-event-details dl { display: grid; gap: .85rem; padding: .15rem 0 1.1rem; font-size: .875rem; }
.eelf-event-details dt { font-weight: 700; }
.eelf-event-details dd { color: var(--muted-foreground); margin-top: .2rem; }
.eelf-footer-contact { display: grid; gap: .65rem; margin-top: 1rem; font-size: .85rem; overflow-wrap: anywhere; }
.eelf-social-links { display: flex; gap: .85rem; flex-wrap: wrap; }
.eelf-footer-contact a:hover { text-decoration: underline; }

@media (max-width: 47.99rem) {
  .eelf-story { grid-template-columns: 1fr; }
  .eelf-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eelf-metric:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .eelf-metric:nth-child(n+3) { border-block-start: 1px solid var(--border); }
}

@media (min-width: 64rem) {
  .eelf-js .eelf-menu-toggle, .eelf-mobile-navigation { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #main-content *, #main-content *::before, #main-content *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-slide-content > * { opacity: 1; transform: none; }
}

