/*
 Theme Name:     Theme Bambino
 Theme URI:      https://example.com
 Description:    Child theme for Twenty Twenty-Four
 Author:         Your Name
 Template:       twentytwentyfour
 Version:        1.0.0
*/

/* =========================================================
   0) THEME-FRIENDLY VARS
   ========================================================= */
:root {
  --es-border: #e5e7eb;
  --es-muted: #6b7280;
  --es-surface: #ffffff;
  --es-ink: #111827;

  /* Fixed header offset for anchor scroll */
  --es-header-offset: 90px;
}

/* =========================================================
   1) BASE LAYOUT / GLOBALS
   ========================================================= */
.es-agency-landing {
  font-family: inherit;
  color: var(--wp--preset--color--contrast, var(--es-ink));
  margin: 0;
}

/* Landing H2 style */
.es-agency-landing h2 {
  font-family: "Caveat", cursive !important;
  font-weight: 400 !important;
}

/* H3 back to sitewide font */
.es-agency-landing h3 {
  font-family: inherit !important;
}

/* Full-bleed reset */
.wp-block-post-content.has-global-padding {
  padding-left: 0;
  padding-right: 0;
}

/* Generic section wrapper */
.es-section {
  padding: 0;
  scroll-margin-top: var(--es-header-offset);
}

/* Smooth scroll + fixed-header anchor padding */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--es-header-offset);
}

/* Prevent tiny full-bleed overflow from causing horizontal scroll */
html,
body {
  overflow-x: clip;
}
@supports not (overflow: clip) {
  html,
  body { overflow-x: hidden; }
}

/* Force predictable sizing everywhere inside landing */
.es-agency-landing,
.es-agency-landing * {
  box-sizing: border-box;
}

/* =========================================================
   BLOG TYPOGRAPHY (simple hierarchy)
   Title  = Caveat, large
   H2     = Inter, medium
   H3     = Inter, normal + bold
   P/Li   = Inter, normal
   ========================================================= */

body.single-post,
body.blog,
body.archive {
  --es-blog-font: inherit; /* Inter via theme */
  --es-blog-ink: var(--wp--preset--color--contrast, #111827);
}

/* Base blog content font */
body.single-post .wp-block-post-content,
body.blog .wp-block-post-content,
body.archive .wp-block-post-content {
  font-family: var(--es-blog-font) !important;
  color: var(--es-blog-ink);
  line-height: 1.7;
  font-size: 1rem; /* normal readable base */
}

/* Paragraphs + lists */
body.single-post .wp-block-post-content p,
body.single-post .wp-block-post-content li,
body.blog .wp-block-post-content p,
body.blog .wp-block-post-content li,
body.archive .wp-block-post-content p,
body.archive .wp-block-post-content li {
  font-family: var(--es-blog-font) !important;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  margin: 0 0 1rem 0;
}

/* H2 = Inter medium */
body.single-post .wp-block-post-content h2,
body.blog .wp-block-post-content h2,
body.archive .wp-block-post-content h2 {
  font-family: var(--es-blog-font) !important;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  margin: 2.2rem 0 1rem 0;
}

/* H3 = Inter normal + bold */
body.single-post .wp-block-post-content h3,
body.blog .wp-block-post-content h3,
body.archive .wp-block-post-content h3 {
  font-family: var(--es-blog-font) !important;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 1.6rem 0 0.7rem 0;
}

/* Optional H4 if needed: smaller bold */
body.single-post .wp-block-post-content h4,
body.blog .wp-block-post-content h4,
body.archive .wp-block-post-content h4 {
  font-family: var(--es-blog-font) !important;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 1.2rem 0 0.6rem 0;
}

/* Post / card titles = Caveat big */
body.single-post .wp-block-post-title,
body.single-post .wp-block-post-title a,
body.blog .wp-block-post-title,
body.blog .wp-block-post-title a,
body.archive .wp-block-post-title,
body.archive .wp-block-post-title a {
  font-family: "Caveat", cursive !important;
  font-size: clamp(3.2rem, 5vw, 3.7rem) !important;
  font-weight: 400;
  line-height: 1.1;
  color: var(--es-blog-ink) !important;
  text-decoration: none !important;
  text-align: left !important;
  padding: 0 !important;
}

/* =========================================================
   EVERYONE.STUDIO — ARCHIVES / CATEGORIES / BLOG (CLEAN)
   TT4 + default WP Query Loop markup
   Applies to: blog index, categories, tags, archives, CPT archives, authors
   No custom classes needed
   ========================================================= */


/* ---------------------------------------------------------
   0) ARCHIVE SCOPE + DEFAULT LABELS
   --------------------------------------------------------- */

/* Defaults used on non-author archives */
body.blog,
body.archive,
body.category,
body.tag,
body.post-type-archive {
  --es-archive-title: "Stories";
  --es-pill-label: "Stories";
}

/* Per-category overrides (your 3 cats) */
body.category-stories {
  --es-archive-title: "Stories";
  --es-pill-label: "Stories";
}
body.category-news {
  --es-archive-title: "News";
  --es-pill-label: "News";
}
body.category-research {
  --es-archive-title: "Research";
  --es-pill-label: "Research";
}


/* ---------------------------------------------------------
   A) PAGE HEADER / SPACING (archives + authors)
   --------------------------------------------------------- */

body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-site-blocks,
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
main,
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
main.wp-block-group,
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-group.alignwide,
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-group.alignfull {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Kill theme block gaps above header */
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-site-blocks > * + * {
  margin-block-start: 0 !important;
}

/* Controlled breathing room before title */
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive) main {
  padding-top: 2.2rem !important;
}

/* --- Non-author archive titles: replace "Category: X" etc. --- */
body:is(.blog,.archive,.category,.tag,.post-type-archive)
.wp-block-query-title,
body:is(.blog,.archive,.category,.tag,.post-type-archive)
.archive-title {
  position: relative !important;
  margin: 0 0 0.6rem 0 !important;
  padding: 0 !important;
  text-align: left !important;
  color: var(--es-ink, #111827) !important;

  /* hide original label visually */
  font-size: 0 !important;
  line-height: 0 !important;
}

body:is(.blog,.archive,.category,.tag,.post-type-archive)
.wp-block-query-title::after,
body:is(.blog,.archive,.category,.tag,.post-type-archive)
.archive-title::after {
  content: var(--es-archive-title) !important;
  display: block !important;

  font-family: "Caveat", cursive !important;
  font-weight: 400 !important;
  font-size: clamp(2.6rem, 4vw, 3.4rem) !important;
  line-height: 1.1 !important;
  color: var(--es-ink, #111827) !important;
}

/* --- Author archive title: keep real author name visible --- */
body.author .wp-block-query-title,
body.author .archive-title,
body.author h1.wp-block-query-title {
  font-family: "Caveat", cursive !important;
  font-weight: 400 !important;
  font-size: clamp(2.6rem, 4vw, 3.4rem) !important;
  line-height: 1.1 !important;
  margin: 0 0 0.6rem 0 !important;
  padding: 0 !important;
  text-align: left !important;
  color: var(--es-ink, #111827) !important;
}

/* Native term / author descriptions if WP outputs them */
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.taxonomy-description,
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-term-description,
body.author .wp-block-post-author-biography {
  margin: 0 0 1.2rem 0 !important;
  font-size: 1rem !important;
  line-height: 1.7 !important;
  color: var(--es-muted, #6b7280) !important;
  max-width: 48rem !important;
}

/* Remove whitespace between header and cards */
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query {
  margin-top: 0.2rem !important;
  padding-top: 0 !important;
}

/* Remove inline padding on the Group wrapping the grid */
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-group:has(.wp-block-post-template) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  --wp--preset--spacing--50: 0px !important;
  --wp--preset--spacing--40: 0px !important;
}


/* ---------------------------------------------------------
   B) GRID LAYOUT (3 per row desktop)
   --------------------------------------------------------- */

body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1.6rem !important;
  margin: 0 !important;
  padding: 0 0 3.5rem 0 !important; /* bottom breathing room before footer */
  list-style: none !important;
}

@media (max-width: 1024px) {
  body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
  .wp-block-query .wp-block-post-template {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 640px) {
  body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
  .wp-block-query .wp-block-post-template {
    grid-template-columns: 1fr !important;
  }
}


/* ---------------------------------------------------------
   C) CARD BASE (3:4 portrait)
   --------------------------------------------------------- */

body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-template > li {
  position: relative !important;
  aspect-ratio: 3 / 4 !important;
  border-radius: 1.1rem !important;
  overflow: hidden !important;
  background: #0b0b0b !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08) !important;
  transform: translateY(0);
  transition: transform .22s ease, box-shadow .22s ease;
}

body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-template > li > article {
  position: absolute !important;
  inset: 0 !important;
}


/* ---------------------------------------------------------
   D) FEATURED IMAGE FULL COVER + FULL CARD CLICK
   --------------------------------------------------------- */

body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-featured-image {
  position: absolute !important;
  inset: 0 !important;
  margin: 0 !important;
}

/* Image link becomes full-card click target */
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-featured-image a {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 4 !important;
}

body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-featured-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transform: scale(1);
  transition: transform .5s ease;
}


/* ---------------------------------------------------------
   E) GRADIENT OVERLAY (lighter + progressive)
   --------------------------------------------------------- */

body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-template > li::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.90) 0%,
    rgba(0,0,0,0.55) 28%,
    rgba(0,0,0,0.18) 52%,
    rgba(0,0,0,0.00) 100%
  );
}


/* ---------------------------------------------------------
   F) TITLE OVERLAY (Inter, medium)
   --------------------------------------------------------- */

body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-title {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 10% !important;
  z-index: 6 !important;
  margin: 0 !important;
  padding: 0 1.2rem !important;
  text-align: left !important;
  pointer-events: none !important; /* click through to image */
}

body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-title,
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-title a,
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-title.has-large-font-size,
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-title.has-large-font-size a {
  font-family: inherit !important; /* Inter */
  font-size: clamp(1.25rem, 1.8vw, 1.55rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #ffffff !important;
  text-decoration: none !important;
}


/* ---------------------------------------------------------
   G) PILL UNDER TITLE
   - Non-author archives use --es-pill-label
   - Author archives use per-card category pills below
   --------------------------------------------------------- */

/* Non-author default pill */
body:is(.blog,.archive,.category,.tag,.post-type-archive)
.wp-block-query .wp-block-post-title::after {
  content: var(--es-pill-label) !important;
  display: inline-flex !important;
}

/* Author default: no pill unless category match */
body.author .wp-block-query .wp-block-post-title::after {
  content: "" !important;
  display: none !important;
}

/* Per-card pills on author archives */
body.author .wp-block-query li.category-stories .wp-block-post-title::after {
  content: "Stories" !important; display: inline-flex !important;
}
body.author .wp-block-query li.category-news .wp-block-post-title::after {
  content: "News" !important; display: inline-flex !important;
}
body.author .wp-block-query li.category-research .wp-block-post-title::after {
  content: "Research" !important; display: inline-flex !important;
}

/* Shared pill styling (applies wherever the pill is displayed) */
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-title::after {
  align-items: center !important;
  margin-top: 0.7rem !important;
  padding: 0.3rem 0.7rem !important;
  font-size: 0.8rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.02em !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.9) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.12) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  width: fit-content !important;
}


/* ---------------------------------------------------------
   H) AUTHOR NAME OVERLAY (if block exists)
   --------------------------------------------------------- */

body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-author-name,
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-author__name,
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-author,
body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-author a {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 5% !important;
  z-index: 6 !important;
  margin: 0 !important;
  padding: 0 1.2rem !important;

  font-family: inherit !important;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  color: rgba(255,255,255,0.85) !important;
  text-align: left !important;
  pointer-events: none !important;
}

body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-author__avatar {
  display: none !important;
}


/* ---------------------------------------------------------
   I) HOVER EFFECT
   --------------------------------------------------------- */

body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-template > li:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.14) !important;
}

body:is(.blog,.archive,.category,.tag,.author,.post-type-archive)
.wp-block-query .wp-block-post-template > li:hover
.wp-block-post-featured-image img {
  transform: scale(1.04);
}

/* =========================================================
   2) PRIVACY + EXTRA POLICY PAGES
   (page-id-3 and page-id-161)
   H1 / H2 / H3 TYPOGRAPHY
   ========================================================= */
body.page-id-3 h1,
body.page-id-3 h2,
body.page-id-3 h3,
body.page-id-161 h1,
body.page-id-161 h2,
body.page-id-161 h3 {
  font-family: inherit !important;
  color: inherit;
  line-height: 1.25;
  margin: 0 0 0.9rem 0;
  font-weight: 700;
}

/* H1 — main page title */
body.page-id-3 h1,
body.page-id-161 h1 {
  font-size: clamp(2.1rem, 3vw, 2.6rem);
  line-height: 1.15;
  margin-top: 0;
  margin-bottom: 1.2rem;
}

/* H2 — slightly smaller than site H2, clearly above p */
body.page-id-3 h2,
body.page-id-3 h2.wp-block-heading,
body.page-id-161 h2,
body.page-id-161 h2.wp-block-heading {
  font-size: clamp(1.35rem, 1.8vw, 1.6rem);
  line-height: 1.25;
  margin-top: 1.6rem;
  margin-bottom: 0.8rem;
}

/* H3 — subhead under H2 */
body.page-id-3 h3,
body.page-id-161 h3 {
  font-size: clamp(1.1rem, 1.4vw, 1.25rem);
  line-height: 1.3;
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
}

/* =========================================================
   3) HEADER MENU (desktop base)
   ========================================================= */

/* Thin all header nav links */
header.wp-block-template-part .wp-block-navigation a {
  font-weight: 300 !important;
}

/* Contact Us menu item styled as orange pill (desktop) */
header.wp-block-template-part .wp-block-navigation .es-menu-btn > a,
header.wp-block-template-part .wp-block-navigation .es-menu-btn .wp-block-navigation-item__content {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  background-color: #eb6424 !important;
  color: #ffffff !important;
  font-family: inherit;
  font-weight: 300 !important;
  font-size: 0.95em;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}

header.wp-block-template-part .wp-block-navigation .es-menu-btn > a:hover,
header.wp-block-template-part .wp-block-navigation .es-menu-btn .wp-block-navigation-item__content:hover,
header.wp-block-template-part .wp-block-navigation .es-menu-btn > a:focus-visible,
header.wp-block-template-part .wp-block-navigation .es-menu-btn .wp-block-navigation-item__content:focus-visible {
  transform: translateY(-1px);
  opacity: 0.9;
  background-color: #d9581e !important;
}

/* =========================================================
   4) FULL-BLEED UTILITY
   ========================================================= */
.es-fullbleed,
.es-hero,
.es-what-we-do,
.es-split,
.es-our-story,
.es-contact {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
}

/* =========================================================
   5) FOOTER (custom)
   ========================================================= */
.es-footer {
  background: var(--es-surface);
  border-top: 1px solid var(--es-border);
  padding: 3rem 1.5rem 1.5rem;
  font-family: inherit;
  color: var(--es-ink);
}

.es-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto; /* left | empty | right */
  gap: 2.5rem;
  align-items: start;
}

.es-footer__col--left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.es-footer__logo {
  width: 72px;
  height: auto;
  border-radius: 12px;
  display: block;
}

.es-footer__legal {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-size: 0.95rem;
}

.es-footer__legal-link {
  color: inherit;
  text-decoration: none;
  font-weight: 300;
  border-bottom: 1px solid transparent;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.es-footer__legal-link:hover,
.es-footer__legal-link:focus-visible {
  opacity: 0.8;
  border-color: currentColor;
}
.es-footer__sep { opacity: 0.6; }

.es-footer__spacer { min-height: 1px; }

.es-footer__right {
  display: flex;
  gap: 4rem;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
}

.es-footer__title {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
}

.es-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.es-footer__link {
  color: inherit;
  text-decoration: none;
  font-weight: 300;
  font-family: inherit;
  display: inline-flex;
  width: fit-content;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.es-footer__link:hover,
.es-footer__link:focus-visible {
  opacity: 0.8;
  transform: translateX(2px);
}

.es-footer__link--disabled {
  color: var(--es-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.es-footer__bottom {
  max-width: 1120px;
  margin: 2.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--es-border);
}
.es-footer__copyright {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--es-muted);
}

@media (max-width: 900px) {
  .es-footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .es-footer__right {
    justify-content: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
  }
  .es-footer__legal { white-space: normal; }
}

/* =========================================================
   6) HERO (SECTION 1)
   ========================================================= */
.es-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  color: #ffffff;
}

.es-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

.es-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    120deg,
    rgba(15, 23, 42, 0.85) 0%,
    rgba(15, 23, 42, 0.7) 40%,
    rgba(15, 23, 42, 0.3) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.es-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
  text-align: left;
}

.es-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.es-hero__title {
  font-size: clamp(3.2rem, 5vw, 4.6rem);
  line-height: 1.05;
  margin-bottom: 1.5rem;
  color: #eb6424;
  font-family: "Caveat", cursive !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em;
}

.es-hero__subtitle {
  font-size: clamp(1.02rem, 1.2vw, 1.15rem);
  max-width: 32rem;
  line-height: 1.6;
  margin-bottom: 2.25rem;
  opacity: 0.95;
}

@media (max-width: 768px) {
  .es-hero__content { text-align: center; }
  .es-hero__subtitle { margin-left: auto; margin-right: auto; }
}

/* =========================================================
   HERO CTA – Button 86
   ========================================================= */
.es-hero__cta.button-86 {
  all: unset;
  position: relative;
  z-index: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 25px;
  min-height: 52px;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 300;
  color: #ffffff;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.es-hero__cta.button-86::after,
.es-hero__cta.button-86::before {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: -1;
  transition: all 0.3s ease;
}

.es-hero__cta.button-86::before {
  transform: translate(0%, 0%);
  width: 100%;
  height: 100%;
  background: #eb6424;
  border-radius: 6px;
}

.es-hero__cta.button-86::after {
  transform: translate(12px, 12px);
  width: 42px;
  height: 42px;
  background: #ffffff25;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 999px;
}

.es-hero__cta.button-86:hover::before { transform: translate(4%, 16%); }
.es-hero__cta.button-86:hover::after {
  border-radius: 6px;
  transform: translate(0, 0);
  width: 100%;
  height: 100%;
}
.es-hero__cta.button-86:active::after { transition: 0s; transform: translate(0, 6%); }

.es-hero__cta.button-86:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.95);
  outline-offset: 4px;
}

@keyframes es-soft-pulse {
  0%   { transform: translate(12px, 12px) scale(1);    opacity: 0.55; }
  50%  { transform: translate(12px, 12px) scale(1.10); opacity: 0.85; }
  100% { transform: translate(12px, 12px) scale(1);    opacity: 0.55; }
}

.es-hero__cta.button-86::after { animation: es-soft-pulse 1.8s ease-in-out infinite; }
.es-hero__cta.button-86:hover::after,
.es-hero__cta.button-86:active::after,
.es-hero__cta.button-86:focus-visible::after { animation: none; }

/* =========================================================
   7) HEADER OVER HERO SCROLL STATE
   ========================================================= */
body.es-landing .wp-site-blocks > * + *,
body.page-id-58 .wp-site-blocks > * + * {
  margin-block-start: 0 !important;
}

body.es-landing header.wp-block-template-part,
body.page-id-58 header.wp-block-template-part {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 !important;
  border-bottom: none !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

body.admin-bar.es-landing header.wp-block-template-part,
body.admin-bar.page-id-58 header.wp-block-template-part {
  top: 32px;
}

body.es-landing header.wp-block-template-part *,
body.page-id-58 header.wp-block-template-part * {
  background: transparent !important;
  --wp--preset--color--background: transparent !important;
}

body.es-scrolled.es-landing header.wp-block-template-part,
body.es-scrolled.page-id-58 header.wp-block-template-part {
  background: #ffffff !important;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08) !important;
}

body.es-landing .wp-block-post-content,
body.page-id-58 .wp-block-post-content {
  margin-top: 0;
  padding-top: 0;
}

body.es-landing header.wp-block-template-part a,
body.page-id-58 header.wp-block-template-part a,
body.es-landing header.wp-block-template-part .wp-block-site-title,
body.page-id-58 header.wp-block-template-part .wp-block-site-title {
  color: #ffffff !important;
  transition: color 0.2s ease;
}

body.es-scrolled.es-landing header.wp-block-template-part a,
body.es-scrolled.page-id-58 header.wp-block-template-part a,
body.es-scrolled.es-landing header.wp-block-template-part .wp-block-site-title,
body.es-scrolled.page-id-58 header.wp-block-template-part .wp-block-site-title {
  color: #111827 !important;
}

/* =========================================================
   8) SECTION 2 – WHAT WE DO
   ========================================================= */
.es-what-we-do {
  background-color: var(--es-surface);
  padding: 5rem 1.5rem;
}

.es-what-we-do__inner {
  max-width: 1120px;
  margin: 0 auto;
}

.es-what-we-do__header {
  max-width: 720px;
  margin: 0 0 3rem 0;
  text-align: left;
}

.es-section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.es-section-title {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 1.25rem;
}

.es-section-intro {
  margin: 0;
  line-height: 1.6;
  opacity: 0.9;
}

.es-what-we-do__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 2rem;
  margin-top: 3rem;
}

.es-what-we-do__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.5rem 1.5rem 1.75rem;
  border-radius: 1.25rem;
  border: 1px solid var(--es-border);
  background-color: var(--es-surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.03);
  text-align: left;
}

.es-what-we-do__icon { display: block; padding: 0; background: none; }
.es-what-we-do__icon img { width: 4.2rem; height: 4.2rem; object-fit: contain; display: block; }

.es-what-we-do__title { font-size: 1.05rem; margin: 0 0 0.4rem; font-weight: 600; }
.es-what-we-do__text { margin: 0; line-height: 1.6; color: var(--es-muted); opacity: 0.95; }

@media (max-width: 1024px) {
  .es-what-we-do__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .es-what-we-do__grid { grid-template-columns: 1fr; }
}

/* =========================================================
   9) SECTIONS 3 & 4 – SPLIT
   ========================================================= */
.es-split {
  background-color: var(--es-surface);
  padding: 5rem 1.5rem;
}

.es-split__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

/* Force NGOs + Brands split images to stay perfectly square */
.es-split__media img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border-radius: 1.25rem;
  display: block;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.es-split__content { text-align: left; }
.es-split__text {
  margin: 0 0 1.25rem 0;
  line-height: 1.7;
  color: var(--wp--preset--color--contrast, var(--es-ink));
  opacity: 0.95;
  max-width: 40rem;
}

.es-split__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--es-ink);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.es-split__link:hover,
.es-split__link:focus-visible {
  transform: translateX(2px);
  opacity: 0.8;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.es-split--brands .es-split__media { order: 2; }
.es-split--brands .es-split__content { order: 1; }

@media (max-width: 900px) {
  .es-split__inner { grid-template-columns: 1fr; gap: 2rem; }
  .es-split--brands .es-split__media,
  .es-split--brands .es-split__content { order: unset; }
  .es-split__text { max-width: none; }
}

/* =========================================================
   10) SECTION 5 – OUR STORY
   ========================================================= */
.es-our-story {
  background-color: var(--es-surface);
  padding: 5rem 1.5rem;
}

.es-our-story__inner { max-width: 1120px; margin: 0 auto; }
.es-our-story__header { max-width: 720px; margin: 0 0 2.5rem 0; text-align: left; }
.es-our-story__text { margin: 0; line-height: 1.7; color: var(--wp--preset--color--contrast, var(--es-ink)); opacity: 0.95; }

.es-our-story__gallery {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.es-our-story__gallery::-webkit-scrollbar { width: 0; height: 0; display: none; }

.es-our-story__track {
  display: flex;
  gap: 1.25rem;
  align-items: stretch;
  width: max-content;
  padding-right: 1.5rem;
  will-change: transform;
}

.es-our-story__item { flex: 0 0 auto; scroll-snap-align: start; margin: 0; }
.es-our-story__item img {
  width: clamp(180px, 22vw, 240px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 1rem;
  display: block;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.es-our-story__trusted {
  margin: 1.5rem 0 1rem 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--es-ink);
}

/* =========================================================
   11) SECTION 6 – CONTACT US
   (CF7 layout + Material floating labels + submit + success msg)
   ========================================================= */
.es-contact {
  background-color: var(--es-surface);
  padding: 5rem 1.5rem;
}

.es-contact__inner { max-width: 1120px; margin: 0 auto; }
.es-contact__header { max-width: 720px; margin: 0 0 3rem 0; text-align: left; }

.es-contact__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.es-contact__card--form { display: flex; flex-direction: column; }
.es-contact__side { display: flex; flex-direction: column; gap: 2rem; align-self: start; }
.es-contact__card--small { flex: 1; display: flex; flex-direction: column; }

.es-contact__card {
  border: 1px solid var(--es-border);
  border-radius: 1.25rem;
  background: var(--es-surface);
  padding: 1.75rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.03);
  text-align: left;
}

.es-contact__title { font-size: 1.15rem; margin: 0 0 0.75rem 0; font-weight: 600; }
.es-contact__text { margin: 0 0 1.25rem 0; line-height: 1.6; color: var(--es-muted); }

.es-contact__email {
  display: inline-flex;
  align-self: flex-start;
  width: fit-content;
  font-weight: 600;
  color: var(--es-ink);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.es-contact__email:hover,
.es-contact__email:focus-visible { opacity: 0.8; transform: translateX(2px); }

/* CF7 spacing cleanup */
.es-contact__card--form .wpcf7 form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.6rem;
  position: relative;
}
.es-contact__card--form .wpcf7 form p { margin: 0 !important; padding: 0 !important; }
.es-contact__card--form .wpcf7 form br { display: none !important; }

/* Material floating fields */
.es-contact__card--form .wpcf7 .es-md-field { position: relative; display: block; }

.es-contact__card--form .wpcf7 .es-md-field input[type="text"],
.es-contact__card--form .wpcf7 .es-md-field input[type="email"],
.es-contact__card--form .wpcf7 .es-md-field textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 1.05rem 0.95rem 0.85rem;
  border-radius: 0.9rem;
  border: 1.5px solid var(--es-border);
  background: transparent;
  font-size: 1rem;
  color: var(--es-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.es-contact__card--form .wpcf7 .es-md-field textarea {
  min-height: 120px !important;
  height: 120px !important;
  max-height: 160px;
  resize: vertical;
}

.es-contact__card--form .wpcf7 .es-md-field input::placeholder,
.es-contact__card--form .wpcf7 .es-md-field textarea::placeholder {
  color: transparent;
}

.es-contact__card--form .wpcf7 .es-md-label {
  position: absolute;
  left: 0.85rem;
  top: 1.05rem;
  padding: 0 0.35rem;
  font-size: 1rem;
  line-height: 1;
  color: var(--es-muted);
  background: var(--es-surface);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.15s ease, color 0.15s ease, top 0.15s ease;
}

.es-contact__card--form .wpcf7 .es-md-field:focus-within .es-md-label,
.es-contact__card--form .wpcf7 .es-md-field:has(input:not(:placeholder-shown)) .es-md-label,
.es-contact__card--form .wpcf7 .es-md-field:has(textarea:not(:placeholder-shown)) .es-md-label,
.es-contact__card--form .wpcf7 .es-md-field:has(input:-webkit-autofill) .es-md-label {
  top: -0.55rem;
  transform: scale(0.85);
  color: #eb6424;
  background: var(--es-surface);
  padding: 0 6px;
}

.es-contact__card--form .wpcf7 .es-md-field input:focus,
.es-contact__card--form .wpcf7 .es-md-field textarea:focus {
  outline: none;
  border-color: #eb6424;
  box-shadow: 0 0 0 3px rgba(235, 100, 36, 0.12);
}

.es-contact__card--form .wpcf7
.es-md-field:not(:focus-within):has(input:not(:placeholder-shown)) .es-md-label,
.es-contact__card--form .wpcf7
.es-md-field:not(:focus-within):has(textarea:not(:placeholder-shown)) .es-md-label {
  color: var(--es-muted) !important;
}

/* Submit button */
.es-contact__card--form .wpcf7 input[type="submit"] {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  background-color: #eb6424;
  color: #ffffff;
  font-family: inherit;
  font-weight: 300;
  font-size: 0.95em;
  letter-spacing: 0.01em;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 0.2rem;
  transition: background-color 0.15s ease, opacity 0.15s ease !important;
}
.es-contact__card--form .wpcf7 input[type="submit"]:hover,
.es-contact__card--form .wpcf7 input[type="submit"]:focus-visible {
  opacity: 0.9;
  background-color: #d9581e;
}

/* Success message right of button */
.es-contact__card--form .wpcf7 .wpcf7-response-output {
  position: absolute;
  left: 180px;
  bottom: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--es-muted);
  line-height: 1.2;
  max-width: calc(100% - 180px);
}
.es-contact__card--form .wpcf7 form.invalid .wpcf7-response-output,
.es-contact__card--form .wpcf7 form.sent .wpcf7-response-output,
.es-contact__card--form .wpcf7 form.failed .wpcf7-response-output {
  display: block;
}
.es-contact__card--form .wpcf7 .wpcf7-response-output:empty {
  display: none !important;
}

/* Spinner alignment */
.es-contact__card--form .wpcf7 .wpcf7-spinner {
  position: absolute;
  left: 140px;
  bottom: 50%;
  transform: translateY(50%);
  margin: 0;
}

@media (max-width: 900px) {
  .es-contact__layout { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .es-contact__card--form .wpcf7 .wpcf7-response-output {
    position: static;
    margin-top: 0.6rem !important;
    max-width: 100%;
  }
  .es-contact__card--form .wpcf7 .wpcf7-spinner {
    position: static;
    transform: none;
    margin-left: 0.6rem;
  }
}

/* =========================================================
   12) HEADER RESPONSIVE MENU (v3 final)
   ONLY TWO STATES
   ========================================================= */

/* Remove any list markers/dots globally in header */
header.wp-block-template-part .wp-block-navigation__container,
header.wp-block-template-part .wp-block-navigation__container li,
header.wp-block-template-part .wp-block-navigation-item,
header.wp-block-template-part .es-menu-btn {
  list-style: none !important;
}
header.wp-block-template-part .wp-block-navigation-item::marker,
header.wp-block-template-part .es-menu-btn::marker {
  content: "" !important;
}

/* ---------- DESKTOP (>=1024px) ---------- */
@media (min-width: 1024px) {
  header.wp-block-template-part .es-header-logo--mobile,
  header.wp-block-template-part .es-header-logo--mobile * {
    display: none !important;
    visibility: hidden !important;
  }

  header.wp-block-template-part .wp-block-site-logo,
  header.wp-block-template-part .wp-block-site-title {
    display: block !important;
  }

  header.wp-block-template-part .wp-block-navigation__container,
  header.wp-block-template-part .wp-block-navigation__responsive-container {
    display: flex !important;
    position: static !important;
    inset: auto !important;
    background: transparent !important;
    height: auto !important;
    width: auto !important;
  }

  header.wp-block-template-part .wp-block-navigation__responsive-container-open,
  header.wp-block-template-part .wp-block-navigation__responsive-container-close {
    display: none !important;
  }

  header.wp-block-template-part .es-menu-btn {
    display: flex !important;
  }
}

/* ---------- MOBILE/TABLET (<=1023px) ---------- */
@media (max-width: 1023px) {

  /* Header bar: favicon + burger only */
  header.wp-block-template-part .wp-block-site-logo,
  header.wp-block-template-part .wp-block-site-title {
    display: none !important;
  }

  header.wp-block-template-part .es-header-logo--mobile,
  header.wp-block-template-part .es-header-logo--mobile * {
    display: block !important;
  }

  header.wp-block-template-part .es-header-logo--mobile img {
    width: 46px !important;
    height: 46px !important;
    border-radius: 12px !important;
    object-fit: cover !important;
  }

  /* Hide nav items only when menu is closed */
  header.wp-block-template-part
  .wp-block-navigation__responsive-container:not(.is-menu-open):not(.has-modal-open)
  .wp-block-navigation__container,
  header.wp-block-template-part
  .wp-block-navigation__responsive-container:not(.is-menu-open):not(.has-modal-open)
  .wp-block-navigation-item,
  header.wp-block-template-part
  .wp-block-navigation__responsive-container:not(.is-menu-open):not(.has-modal-open)
  .es-menu-btn {
    display: none !important;
  }

  /* Burger button */
  header.wp-block-template-part .wp-block-navigation__responsive-container-open {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 56px !important;
    height: 56px !important;
  }

  header.wp-block-template-part
  .wp-block-navigation__responsive-container-open svg {
    width: 38px !important;
    height: 38px !important;
    fill: #eb6424 !important;
    color: #eb6424 !important;
  }

  /* Close hidden by default */
  header.wp-block-template-part .wp-block-navigation__responsive-container-close {
    display: none !important;
  }

  /* Fullscreen overlay */
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.is-menu-open,
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.has-modal-open,
  body.has-modal-open header.wp-block-template-part
  .wp-block-navigation__responsive-container {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #ffffff !important;
    z-index: 9999 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  /* Right-aligned overlay content column */
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__responsive-container-content,
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.has-modal-open
  .wp-block-navigation__responsive-container-content,
  body.has-modal-open header.wp-block-template-part
  .wp-block-navigation__responsive-container
  .wp-block-navigation__responsive-container-content {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    padding-right: 10vw !important;
    padding-top: 12vh !important;
    box-sizing: border-box !important;
    text-align: right !important;
  }

  /* Menu list */
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__container,
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.has-modal-open
  .wp-block-navigation__container,
  body.has-modal-open header.wp-block-template-part
  .wp-block-navigation__responsive-container
  .wp-block-navigation__container {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.4rem !important;
    width: auto !important;
    align-items: flex-end !important;
    text-align: right !important;
  }

  /* Big links */
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation-item__content,
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.has-modal-open
  .wp-block-navigation-item__content,
  body.has-modal-open header.wp-block-template-part
  .wp-block-navigation__responsive-container
  .wp-block-navigation-item__content {
    font-size: clamp(2rem, 6.5vw, 2.8rem) !important;
    font-weight: 400 !important;
    color: #111827 !important;
    text-align: right !important;
  }

  /* Close X (only visible when open) */
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__responsive-container-close,
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.has-modal-open
  .wp-block-navigation__responsive-container-close,
  body.has-modal-open header.wp-block-template-part
  .wp-block-navigation__responsive-container
  .wp-block-navigation__responsive-container-close {
    position: fixed !important;
    top: 4vh !important;
    right: 10vw !important;
    z-index: 10000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 56px !important;
    height: 56px !important;
  }

  header.wp-block-template-part
  .wp-block-navigation__responsive-container-close svg {
    width: 40px !important;
    height: 40px !important;
    fill: #eb6424 !important;
    color: #eb6424 !important;
  }

  /* Restore Contact Us as orange pill inside overlay */
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.is-menu-open
  .es-menu-btn > a,
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.has-modal-open
  .es-menu-btn > a,
  body.has-modal-open header.wp-block-template-part
  .wp-block-navigation__responsive-container
  .es-menu-btn > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eb6424 !important;
    color: #ffffff !important;
    font-size: clamp(1.9rem, 6.5vw, 2.8rem) !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
    padding: 1.1rem 1.9rem !important;
    border-radius: 6px !important;
    width: auto !important;
    text-decoration: none !important;
  }

  /* Push Contact Us lower / detached */
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.is-menu-open
  .es-menu-btn,
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.has-modal-open
  .es-menu-btn,
  body.has-modal-open header.wp-block-template-part
  .wp-block-navigation__responsive-container
  .es-menu-btn {
    margin-top: 20vh !important;
  }

  /* Remove theme overlay noise */
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.is-menu-open *,
  header.wp-block-template-part
  .wp-block-navigation__responsive-container.has-modal-open *,
  body.has-modal-open header.wp-block-template-part
  .wp-block-navigation__responsive-container * {
    background: transparent !important;
    box-shadow: none !important;
  }
}