/* Slider: responsive, full-width */

.slider {
  width: 100%;
  max-width: 100vw;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: #fff;
  min-height: 220px;
}
.slider-track {
  width: 100%;
  display: block;
}
.slide {
  width: 100%;
  display: none;
  justify-content: center;
  align-items: center;
}
.slide.is-active { display: block; }
.slider-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  
}
.slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.2em;
  z-index: 3;
}
.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: #eee;
  opacity: 0.8;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  padding: 0;
  outline: none;
}
.slider-dot.active {
  background: #ed2f9d;
  opacity: 1;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.35);
  color: #fff;
  border: none;
  font-size: 1.6rem;
  padding: 0.4em 0.6em;
  cursor: pointer;
  z-index: 2;
  border-radius: 50%;
  transition: background 0.2s;
}
.slider-btn:hover { background: rgba(0,0,0,0.6); }
.slider-btn-prev { left: 0.6rem; }
.slider-btn-next { right: 0.6rem; }
@media (max-width: 600px) {
  .slider { min-height: 160px; }
}
/* Footer flex layout: logo left, columns right */

footer {
  background: #ee36a0;
}
.footer-flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2em;
  /* Use a responsive left padding to keep logos visually offset on wide screens
     but collapse on smaller widths to avoid overflow. Box-sizing prevents padding
     from causing extra width. */
  padding: 2rem 1rem 0;
  padding-left: clamp(1rem, 10vw, 18rem);
  max-width: 100%;
  margin: -6rem 0rem 0rem 0rem;
  box-sizing: border-box;
  flex-wrap: wrap;
}
.footer-logo-left {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.footer-logos {
  width: 100%;
  max-width: 720px;
  height: auto;
  padding-top: 1.5rem;
}

/* Footer logo sizing for CORE and Dirección logos */
.footer-core-logo, .footer-direccion-logo {
  max-width: 220px;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}
.footer-logo-left p { margin: 0.75rem 0 0 0; }

/* Layout: align logos side-by-side and description underneath, then three columns on one row */
.footer-flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 1rem 0;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.footer-logo-left {
  flex: 0 0 46%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 0rem;

}

.footer-core-logo, .footer-direccion-logo {
  max-height: 100%; /* ensure same visual height */
  width: auto;
  object-fit: contain;
}

/* Make footer logos slightly smaller for a more compact footer */
.footer-core-logo, .footer-direccion-logo {
  max-width: 180px; /* reduced from 220px */
  height: auto;
}

/* Reduce the overall logo container so it doesn't push columns apart */
.footer-logos {
  max-width: 640px; /* reduced from 720px */
}

.footer-program-text {
  max-width: 680px;
  margin-top: 1rem;
  color: #ffffff;
}
.footer-program-link a { color: #ffffff; text-decoration: underline; }

.footer-columns {
  flex: 0 0 50%;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.footer-col { flex: 1 1 0; }

@media (max-width: 900px) {
  .footer-flex { flex-direction: column; align-items: center; }
  .footer-logo-left, .footer-columns { flex: 1 1 100%; }
  .footer-logo-row { justify-content: center; }
  .footer-program-text { text-align: center; }
}

/* Three-column footer layout (left: logos+text, middle: contact, right: links+accessibility) */
.footer-cols-three {
  display: flex;
  gap: 1.25rem; /* reduced gap so columns sit closer together */
  width: 100%;
  align-items: flex-start;
  padding: 0rem 0rem 0rem 5rem;
}

.footer-col--left {
  flex: 0 0 40%; /* no crece, no encoge, ocupa 40% */
}

.footer-col {
  flex: 0 0 30%; /* cada una ocupa 30% */
}

@media (max-width: 900px) {
  .footer-cols-three{ flex-direction: column; align-items: center; }
  .footer-cols-three .footer-col{ width: 100%; }
}

/* Footer-only link colors: keep all footer links white while preserving global link color elsewhere */
.site-footer a,
.site-footer a:visited,
.site-footer a:active,
.site-footer a:focus {
  color: #ffffff !important;
  text-decoration: none;
}

/* Keep an obvious hover/focus indicator but keep color white */
.site-footer a:hover,
.site-footer a:focus {
  color: #ffffff !important;
  text-decoration: underline;
}

/* Ensure footer program link is visible and consistent */
.site-footer .footer-program-link a { color: #ffffff !important; text-decoration: underline; }
.footer-columns {
  display: flex;
  justify-content: flex-start;
  gap: 2em;
  padding: 2em 1em;
  flex-wrap: wrap;
}
.footer-col {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 320px;
  width: auto;
  text-align: left;
}
@media (max-width: 900px) {
  .footer-flex {
    flex-direction: column;
    align-items: center;
    gap: 1.5em;
  }
  .footer-columns {
    flex-direction: column;
    align-items: center;
    gap: 1.5em;
  }
  .footer-col {
    max-width: 100%;
    text-align: left;
  }
}
/* Footer styles */
.site-footer {
  background: #ee36a0;
  padding: 6em 0 0 0;
  flex-shrink: 0; /* ensure footer does not shrink and stays at the bottom */
  color: #ffffff;
  font-family: "Archivo", "Nunito Sans", Arial, sans-serif;
}
.footer-top {
  text-align: center;
  margin-bottom: 2em;
}

.footer-col {
  flex: 1 1 200px;
  max-width: 320px;
}
.footer-col h4 {
  margin-top: 0;
  color: #ffffff;
  font-size: 1.2em;
}
.footer-col h4, .footer-col p, .footer-program-text, .footer-program-link a {
  text-align: left; /* ensure headings and text are left-aligned */
}
.footer-col p {
  color: #ffffff;
  margin: 0.5em 0 0 0;
  font-size: 1em;
  text-align: left;
}
@media (max-width: 900px) {
  .footer-columns {
    flex-direction: column;
    align-items: center;
    gap: 1.5em;
  }
  .footer-col {
    max-width: 100%;
    text-align: left;
  }
}

.footer-bottom {
  text-align: center;
  margin-top: 2em;
  font-size: 0.9em;
  color: #ffffff;
  width: 100%;
}
/* Enforce three-column proportions for footer: first = 40%, others = 30% each
   This block uses the `.footer-cols-three > ...` selector with max-width to
   override other `.footer-col` rules that appear later in the file. */
.footer-cols-three > .footer-col--left {
  flex: 0 0 40%;
  max-width: 40%;
}
.footer-cols-three > .footer-col {
  flex: 0 0 30%;
  max-width: 30%;
}

.footer-cols-three > .footer-col:nth-child(3) {
  margin-left: -0.5rem; /* adjust this value to taste (e.g. -0.5rem or -1rem) */
}
/* On viewports wider than 768px (>=769px) bring the middle and right
   30% columns closer together without affecting the left 40% column.
   Adjust the small margins below to taste (values chosen are conservative). */
@media (min-width: 769px) {
  /* middle column: give a tiny right-side pull so it visually hugs the right column */
  .footer-cols-three > .footer-col:nth-child(2) {
    margin-right: -2.75rem;
    margin-left: 7rem;
  }

  /* right column: negative left margin pulls it leftward toward the middle column */
  .footer-cols-three > .footer-col:nth-child(3) {
    margin-left: -0.5rem; /* tweak to -0.25rem / -0.75rem as desired */
  }
}
main {
  background-image: url('assets/images/bg.png');
  background-size: cover;
  background-repeat: no-repeat;
}
/* Let main expand to fill available vertical space so footer sits at bottom */
main {
  flex: 1 0 auto;
}

/* Mobile: remove main background image and use white background for small screens */
@media (max-width: 768px) {
  main {
    background-image: none !important;
    background-color: #ffffff !important;
    background-size: auto !important;
    background-repeat: no-repeat !important;
  }

  .post-banner-image {
    display: none !important;
  }
}

/* Link color: use brand orange and make links bold by default
   Footer links remain white due to `.site-footer a` overrides. */
a, a:link, a:visited {
  color: #fc4b09;
  text-decoration: underline;
  font-weight: 700;
}
a:hover, a:focus, a:active {
  color: #fc4b09;
  text-decoration-thickness: 2px;
  font-weight: 700;
}

/* Ensure WordPress Row and Stack blocks behave as expected */

/* Navigation layout
   - Desktop: use CSS Grid with three columns (logo / menu / logo)
     so the horizontal gap between the three areas is controlled by
     `--nav-column-gap` and is equal on both sides.
   - Mobile (see media queries below): fall back to flex and the
     existing slide-in drawer behavior.
*/
.main-nav {
  --nav-side-padding: 0rem;     /* horizontal padding of the nav */
  --nav-column-gap: 22.5rem;    /* gap between logo - menu - logo (adjustable) */

  display: grid;
  grid-template-columns: auto 1fr auto;
  column-gap: var(--nav-column-gap);
  align-items: center;
  font-family: "Nunito Sans", Arial, sans-serif;
  font-size: 20px;
  color: #fc4b09;
  font-weight: bold;
  padding: 0 var(--nav-side-padding);
  width: 100%;
  /* height kept to let header spacing be controlled elsewhere */
}

/* Desktop spacing: give the fixed nav some breathing room from page edges
   Use padding so the nav background remains full-bleed but content is inset */
@media (min-width: 768px) {
  .main-nav {
    --nav-side-padding: 2rem; /* fixed inner padding in rem */
    padding: 0 var(--nav-side-padding);
  }
}

/* Center the UL in the middle grid column and make it a horizontal flex container */
.main-nav ul {
  justify-self: center;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0rem; /* space between menu items */
  list-style: none;
  padding: 0;
  margin: 0;
}

.logo-visibles {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  margin-left: 0rem;
}

.logo-gobierno{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  margin-right: 4rem;
}

.logo-gobierno {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.main-nav > div,
.main-nav > nav,
.main-nav > ul {
  align-items: center;
}
.main-nav ul {
  display: flex;
  flex-direction: row;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Ensure flex children can shrink and not force overflow */
.main-nav > * {
  min-width: 0;
}

/* Make logos responsive */
.main-nav img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* At medium widths show the mobile toggle earlier to avoid overflow */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    padding: 0.5rem 1rem;
    align-items: center;
  }

  /* Convert the menu into the slide-in drawer (same behavior as <=768) */
  .main-nav ul {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 82vw;
    max-width: 360px;
    background: linear-gradient(rgba(255,255,255,0.06), rgba(255,255,255,0.06)), #ee36a0;
    box-shadow: -8px 0 24px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(.2,.9,.2,1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 3.5rem 1.25rem;
    margin: 0;
    z-index: 10003;
    overflow-y: auto;
    color: #ffffff;
  }
  .main-nav ul.open { transform: translateX(0); }

  /* Keep logos from overflowing their area */
  .logo-visibles, .logo-gobierno { flex: 0 0 auto; }
  .logo-visibles img { max-width: 220px; }
  .logo-gobierno img { max-width: 140px; }
}

.main-nav ul li {
  margin: 0 0.8rem;
}

/* Mobile nav toggle button (hidden on desktop) */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 2.6rem;
  color: #fc4b09;
  cursor: pointer;
  margin-left: -8rem;
}

.main-nav a {
  color: #fc4b09;
  text-decoration: none;
  font-weight: bold;
}

.main-nav a:hover {
  text-decoration: underline;
}

/* Post hero: image left, title and text right */

.post-hero {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  justify-content: center;
  max-width: 80%;
  margin: 0 auto;
  padding: 2rem 12rem;
  box-sizing: border-box;
}

.post-hero.image-derecha {
  flex-direction: initial;
}

/* Orientation classes are applied at desktop via media query (see below) */

.post-image img {
  /* Scale image between 180px and 360px depending on viewport */
  max-width: clamp(180px, 30vw, 360px);
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.post-body {
  flex: 1 1 clamp(280px, 50%, 480px);
  font-size: 18px;
  font-family: Arial, Helvetica, sans-serif;
  text-align: left;
  min-width: 0;
}

/* Desktop: respect per-post ACF orientation and enforce visual order */
@media (min-width: 769px) {
  .post-hero.image-izquierda { flex-direction: row; }
  .post-hero.image-derecha  { flex-direction: initial; }

  .post-hero.image-izquierda .post-image { order: 1; }
  .post-hero.image-izquierda .post-body  { order: 2; }
  .post-hero.image-derecha  .post-image { order: 2; }
  .post-hero.image-derecha  .post-body  { order: 1; }
}

/* Medium breakpoint: reduce padding and tighten layout */
@media (max-width: 768px) {
  .post-hero {
    padding: 3rem 2rem;
    gap: 1.25rem;
    align-items: center;
  }
  .post-image img {
    max-width: clamp(160px, 28vw, 340px);
  }
  .post-body { font-size: 17px; }
}

.post-title {
  /*font-size: 43px;
  line-height: 49px;*/
  color: #ed2f9d;
  font-weight: 900;
  font-family: "Archivo";
  text-align: left;
  margin: 0 0 .5rem 0;
  font-size: 2rem;
  font-weight: bold;
  
}

.post-excerpt {
  color: #000000;
  line-height: 1.5;
}

/* Make strong/bold text use the brand pink for emphasis */
strong, b {
  color: #ed2f9d;
}

h2{
  color: #ed2f9d;
}

@media (max-width: 720px) {
  .post-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 0; /* allow image to reach edges */
    gap: 0;     /* spacing handled below */
  }

  /* Make the image full-bleed across the viewport */
  .post-image {
    order: 1;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    display: block;
  }
  .post-image img {
    width: 100%;
    max-width: none;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 0; /* full-bleed looks better without rounding */
  }

  /* Content below the image, full width inside the centered page container */
  .post-body {
    order: 2;
    text-align: left;
    width: 100%;
    max-width: 880px;
    margin: 1rem auto;
    padding: 0 1rem;
  }
  .post-title { font-size: 1.6rem; margin-top: .25rem; }
}

/* Desktop: ensure stacked WP columns center their text when using flex-basis */
@media (min-width: 782px) {
  .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column[style*="flex-basis"] {
    flex-grow: 0;
    text-align: left;
  }

  /* For two-column blocks where first column is image and second is text:
     center the content of the first column and keep the second column left-aligned. */
  .wp-block-columns > .wp-block-column:first-child {
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }

  .wp-block-columns > .wp-block-column:nth-child(2) {
    text-align: left;
  }
}

/* Adjust post layout: make post body narrower and shift both image and body to the right
   Only apply on desktop to avoid mobile layout conflicts. Tweak values as needed. */
@media (min-width: 769px) {
  .post-hero.image-izquierda {
    /* Add left padding to push the whole block to the right */
    padding-left: 9rem;
    justify-content: flex-start;
    margin-top: -4rem;
    align-items: initial;
    margin-right: -6rem; /* ensure children stretch to same height */
  }

  /* Make the layout two responsive columns: image and body. The image
     column will match the height of the text column and the image inside
     will cover the area (object-fit: cover) so it doesn't look too small. */
  .post-hero.image-izquierda .post-image {
    flex: 0 0 65%;
    max-width: 65%;
    display: flex;
    align-items: flex-start; /* move image to the top of its column */
    justify-content: center;
    margin: 5rem -1rem 0rem -18rem; /* nudge visually upward */
    min-height: 280px; /* ensure image has room to grow */
  }

  .post-hero.image-izquierda .post-body {
    flex: 1 1 30%;
    max-width: 100%; /* allow body to take remaining space */
    margin-left: 0rem; /* small separation from the image is handled via gap */
    text-align: left;
    margin-top: 4.5rem;
  }

  /* Make the image scale to fit its column without cropping */
  .post-hero.image-izquierda .post-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    max-width: none; /* override earlier clamp if present */
    max-height: 100%;
  }

  /* Mirror the same layout for image on the right */
  .post-hero.image-derecha {
    /* Add right padding to keep symmetry with .image-izquierda */
    padding-right: 9rem;
    justify-content: flex-start;
    margin-top: 5rem;
    align-items: initial;
    margin-left: 20rem;/* ensure children stretch to same height */
  }

  .post-hero.image-derecha .post-image {
    flex: 0 0 60%;
    max-width: 60%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: -5rem 0rem 0rem 0rem;
    order: 2;
    min-height: 280px;
  }

  .post-hero.image-derecha .post-body {
    flex: 1 1 30%;
    max-width: 100%; /* allow body to take remaining space */
    margin-left: -10rem; /* small separation from the image is handled via gap */
    text-align: left;
    margin-top: -4.5rem;
  }

  .post-hero.image-derecha .post-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    max-width: none;
    max-height: 100%;
  }
}

/* Bottom long image under post-hero */
.post-hero-bottom-image {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  padding: 0 1rem;
  box-sizing: border-box;
}
.post-hero-bottom-image img {
  width: 100%;
  max-width: 1200px;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 6px;
}

@media (max-width: 720px) {
  .post-hero-bottom-image img { max-width: 100%; border-radius: 0; }
}

body {
  /* background-color: #00A499; */
  text-align: center;
  font-family: "Archivo", "Nunito Sans", Arial, sans-serif;
  margin: 0;
  padding: 0;
  margin-left: 0rem;
  margin-right: 0rem;
  /* remove left margin so page sits flush to the viewport */
  /* Make body a column flex container so footer can stay at the bottom */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /*
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;*/
}





.logo-container {
  margin-top: 40px;
  margin-bottom: 20px;
}

/*Usar block con margin: 50vh auto; si no se usa flex*/

.info {
  font-size: 11px;
  line-height: 18px;
  color: #ffffff;
  font-weight: 700;
  font-family: "Roboto";
  margin-top: 20px;
  /*position: absolute;*/
  bottom: 20px;
  text-align: center;
  width: 100%;
}

/*
:any-link{
  color: #000000;
  text-decoration: underline;
}
*/

.main-nav {
  font-size: 20px;
  color: #fc4b09;
  font-weight: bold;
  /* No podemos usar fuente Helvetica Neue debido a licencias!!
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  */
  font-family: "Nunito Sans", Helvetica, Arial, sans-serif;
  height: 10rem;
} 

.title-page h1{
  font-size: 43px;
  line-height: 49px;
  max-width: 880px;
  color: #ed2f9d;
  font-weight: 900;
  font-family: "Archivo";
  text-align: center;
  margin: 3rem auto;
  
}

.page , .page-body{
  /*max-width: 880px;*/
  width: 55%;
  font-size: 18px;
  line-height: 28px;
  color: #000000;
  font-family: "Archivo";
  text-align: left;
  margin: 0 auto;
}

.page h3 {
  margin-block-end: 0.1em;
  color: #ed2f9d;
}

.page p {
  margin-block-start: 0em;
  font-family: Arial, Helvetica, sans-serif;
}

/* Mobile navigation behavior and small-screen tweaks */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav { padding: 0.6rem 1rem; position: relative; }

  /* Slide-in drawer from the right */
  .main-nav ul {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 82vw;
    max-width: 360px;
    /* Use the requested brand color but slightly muted so text remains legible */
    background: linear-gradient(rgba(255,255,255,0.06), rgba(255,255,255,0.06)), #ee36a0;
    box-shadow: -8px 0 24px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(.2,.9,.2,1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 3.5rem 1.25rem;
    margin: 0;
    z-index: 10003;
    overflow-y: auto;
    color: #ffffff; /* default text color inside drawer */
  }
  .main-nav ul.open { transform: translateX(0); }
  .main-nav ul li { margin: 0; text-align: left; }
  .main-nav a { display: block; padding: 0.6rem 0; color: #ffffff; font-weight: 700; }
  .main-nav a:hover { opacity: 0.95; }
  .main-nav a:focus { outline: 2px solid rgba(255,255,255,0.18); outline-offset: 2px; }

  /* Backdrop overlay when menu open */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease;
    z-index: 10001;
    pointer-events: none;
  }
  .nav-backdrop.visible { opacity: 1; visibility: visible; pointer-events: auto; }

  .logo-gobierno { display: none; }
  .title-page h1 { font-size: 34px; text-align: center; }
  .page h3 { margin-block-end: 0.1em; color: #ed2f9d; text-align: center; margin-left: 2rem; margin-right: 2rem;}

  /* Hide images on mobile and make post text use full width */
  .post-hero { flex-direction: column; align-items: stretch; padding: 0.75rem 0.5rem; gap: 0.5rem; }
  .post-hero .post-image { display: none !important; }
  .post-hero .post-body { order: 1; width: 100%; max-width: 100%; margin: 0; padding: 0 0.5rem; font-size: 16px; text-align: left; }

  /* Ensure images stay hidden even if earlier media rules set them visible */
  .post-image img { display: none !important; }

  .page , .page-body{
    width: 90%;
    font-size: 18px;
    line-height: 28px;
    color: #000000;
    font-family: "Archivo";
    text-align: center;
    margin: 0 auto;
  }

  .page p{
    text-align: center;
    font-size: 16px;
  }

  .footer-cols-three{
    gap:1rem;
  }

  :root {
  --nav-height: 5.5rem; /* default matches earlier nav height (adjust if needed) */
  }

  .main-nav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height) !important;
    z-index: 10050; /* stay above the content */
    background: rgba(255,255,255,0.98); /* readable background */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

  /* Ensure the main page content starts below the fixed nav */
  body {
    padding-top: var(--nav-height);
  }
}

.wp-block-button {
  width: 196px;
  height: 40px;
  border-radius: 20px;
  background-color: #ee36a0;
}

.wp-block-button__link {
  width: 196px;
  height: 40px;
  border-radius: 20px;
  padding: 0 0;
  background-color: #ee36a0;
}

:where(.wp-block-button__link) {
  border-radius: 9999px;
  box-shadow: none;
  padding: 0 0;
  text-decoration: none;
}

/* Small-screen footer: center content and prevent horizontal overflow */
@media (max-width: 480px) {
  .site-footer {
    padding: 4.5rem 2rem 2rem 0;
    overflow: hidden;
    text-align: left;
  }

  h5{
    text-align: left;
  }

  .footer-flex {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 1rem;
    gap: 1rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .footer-logo-left {
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
  }

  .footer-logos {
    max-width: 260px;
    width: auto;
    height: auto;
  }

  .footer-columns {
    width: 100%;
    padding: 0.5rem 0;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .footer-col {
    max-width: 100%;
    width: 100%;
    text-align: center;
    padding: 0 0.5rem;
  }

  .footer-col h4, .footer-col h5 { text-align: left; }

  .footer-bottom {
    text-align: left;
    margin-top: 1.25rem;
    padding: 0 0.75rem;
    width: 100%;
    box-sizing: border-box;
  }
}

/* Mobile layout: stack footer columns vertically and align left
   Apply at <=768px so this covers typical phones and small tablets.
   Place after the 480px rules so it overrides any centering there. */
@media (max-width: 768px) {
  .footer-cols-three {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
    padding: 0 1rem !important;
  }

  .footer-cols-three .footer-col {
    width: 100% !important;
    max-width: none !important;
    text-align: left !important;
    padding-left: 0 !important;
  }

  /* Keep the left logo block full-width but left-aligned */
  .footer-flex, .footer-logo-left, .footer-columns {
    align-items: flex-start !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .footer-program-text {
    text-align: left !important;
  }

  /* Footer-bottom stays full width and left-aligned */
  .footer-bottom { text-align: center !important; }
}

/* Prevent horizontal scrolling: keep page fixed to viewport width */
/* This prevents accidental horizontal scroll caused by elements using 100vw
   plus padding/margins. If any element still overflows, we can inspect and
   adjust that element specifically instead of relying on this rule. */
html, body {
  overflow-x: hidden;
}

/* ==========================
   Sticky / Fixed main-nav
   - Keeps the main navigation visible while scrolling
   - Exposes a CSS variable `--nav-height` so you can tune spacing
   - Adds top padding to the page content to avoid being overlapped
   - Uses JS to keep `--nav-height` in sync with the actual nav height
   ========================== */



/* When mobile drawer is used, ensure drawer/backdrop order is correct */
@media (min-width: 768px) {
  .main-nav ul { z-index: 10060; }
  .nav-backdrop { z-index: 10055; }

  .main-nav { background: #ffffff; }

  :root {
  --nav-height: 10rem; /* default matches earlier nav height (adjust if needed) */
  }

  .main-nav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height) !important;
    z-index: 10050; /* stay above the content */
    background: rgba(255,255,255,0.98); /* readable background */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

  /* Ensure the main page content starts below the fixed nav */
  body {
    padding-top: var(--nav-height);
  }

}

/* Active menu item styles (scrollspy) */
/* Active menu item styles (scrollspy)
   Apply consistently for all screens >= 768px so pages and posts
   receive the same visual treatment without relying solely on JS. */
@media (min-width: 768px) {
  .main-nav a.active,
  .main-nav li.active > a,
  .main-nav li.current-menu-item > a,
  .main-nav li.current_page_item > a,
  .main-nav li.current-menu-ancestor > a,
  .main-nav li.current-menu-parent > a,
  .main-nav li.current_page_parent > a,
  .main-nav li.current_page_ancestor > a {
    color: #ed2f9d;
    text-decoration: underline;
    font-weight: 900;
  }
}
