:root {
  --clr-teal: #2563eb;
  --clr-teal-deep: #1d4ed8;
  --clr-teal-muted: #bfdbfe;
  --clr-teal-bg: rgba(37, 99, 235, 0.1);

  --clr-forest-deep: #0b1f4d;

  --clr-coral: #d94a47;
  --clr-coral-deep: #b83230;

  --bg-ivory: #ffffff;

  --nav-bg: transparent;
  --nav-text: #ffffff;
  --nav-scrolled-bg: var(--bg-ivory);
  --nav-scrolled-text: #333333;

  --font-body: "DM Sans", system-ui, sans-serif;
  --r-pill: 100px;
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset only navbar elements */
.nav,
.nav *,
.nav-backdrop,
.nav-backdrop * {
  box-sizing: border-box;
}

.nav a {
  color: var(--nav-text);
  text-decoration: none;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Navbar */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: 68px;
  display: flex;
  align-items: center;
  background: var(--nav-bg);
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    height 0.35s ease;
}

.nav.scrolled {
  height: 60px;
  background: var(--nav-scrolled-bg) !important;
  box-shadow: 0 2px 20px rgba(9, 30, 80, 0.12);
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
}

.nav__container {
  width: 100%;
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  padding-left: max(2rem, env(safe-area-inset-left));
  padding-right: max(2rem, env(safe-area-inset-right));
  display: flex;
  align-items: center;
}

.nav__logo {
  margin-right: auto;
  flex-shrink: 0;
  line-height: 1;
}

.nav__logo-img--full {
  height: 80px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* ── Nav drawer wrapper ──
   Desktop: a transparent pass-through so .nav__links lays out exactly as
   if it were a direct child of .nav__container (unchanged desktop look).
   Mobile/tablet: becomes the slide-in panel (see media query below). */
.nav__drawer {
  display: contents;
}

/* Drawer header (logo + close button) — only rendered inside the
   mobile/tablet slide-in panel; hidden entirely on desktop since the
   main logo above is already visible there. */
.nav__drawer-header {
  display: none;
}

/* Links */
.nav__links {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0.45rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--nav-text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.nav.scrolled .nav__link {
  color: var(--nav-scrolled-text) !important;
}

.nav__link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav.scrolled .nav__link:hover {
  color: var(--clr-teal) !important;
  background: var(--clr-teal-bg);
}

.nav__link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.nav.scrolled .nav__link.active {
  color: var(--clr-teal-deep) !important;
  background: var(--clr-teal-bg);
}

/* Donate */
.btn--nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  margin-left: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--r-pill);
  background: var(--clr-coral);
  color: #ffffff !important;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.btn--nav:hover {
  background: var(--clr-coral-deep);
  transform: translateY(-1px);
}

.btn--nav .material-icons-outlined {
  font-size: 14px !important;
}

/* Dropdown */
.nav__dropdown {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav__chevron {
  font-size: 16px !important;
  transition: transform 0.2s ease;
}

.nav__dropdown.is-open .nav__chevron {
  transform: rotate(180deg);
}

.nav__dropdown-menu {
  position: absolute;
  top: calc(100%);
  left: 50%;
  min-width: 300px;
  max-width: calc(100vw - 2rem);
  padding: 0.5rem;
  border-radius: 16px;
  background: rgb(255, 255, 255);
  border: 1px solid rgba(37, 99, 235, 0.14);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
  z-index: 200;
}

.nav__dropdown.is-open .nav__dropdown-menu,
.nav__dropdown:hover > .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

#nav-dropdown-contact .nav__dropdown-menu,
#nav-dropdown-media .nav__dropdown-menu {
  left: auto;
  right: 0;
  transform: translateY(6px);
}

#nav-dropdown-contact.is-open .nav__dropdown-menu,
#nav-dropdown-media.is-open .nav__dropdown-menu,
#nav-dropdown-contact:hover > .nav__dropdown-menu,
#nav-dropdown-media:hover > .nav__dropdown-menu {
  transform: translateY(0);
}

#nav-dropdown-programs .nav__dropdown-menu,
#nav-dropdown-partnerships .nav__dropdown-menu {
  min-width: 340px;
}

.nav__dropdown-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  color: #111111;
  transition: background 0.15s ease;
}

.nav__dropdown-link:hover {
  background: var(--clr-teal-bg);
}

.nav__dropdown-link strong {
  display: block;
  font-size: 0.85rem;
  color: #111111;
}

.nav__dropdown-link small {
  display: block;
  margin-top: 1px;
  font-size: 0.7rem;
  color: #7a7a7a;
}

.nav__dd-icon {
  flex-shrink: 0;
  color: var(--clr-teal);
  font-size: 20px !important;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: 0.75rem;
  padding: 0.5rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  /* Stays above the drawer so it always remains tappable to close the menu */
  position: relative;
  z-index: 10002;
}

.nav__hamburger:hover {
  background: rgba(255, 255, 255, 0.12);
}

.nav.scrolled .nav__hamburger:hover {
  background: var(--clr-teal-bg);
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--nav-text);
  transition: all 0.25s ease;
}

.nav.scrolled .nav__hamburger span {
  background: var(--nav-scrolled-text) !important;
}

.nav__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Lock the page behind the drawer so it can't scroll while the mobile
   menu is open */
body.nav-open {
  overflow: hidden;
}

/* Mobile */
@media (max-width: 1024px) {
  .nav {
    height: 64px;
  }

  .nav.scrolled {
    height: 56px;
  }

  .nav__container {
    padding: 0 1rem;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .nav__logo-img--full {
    height: 44px;
  }

  .nav__hamburger {
    display: flex;
  }

  body.nav-open .nav {
    z-index: 10000;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .nav-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  /* Drawer wrapper becomes the actual slide-in panel */
  .nav__drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10001;
    width: min(340px, 90vw);
    height: 100dvh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--clr-forest-deep);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateX(100%);
    transition: transform 0.32s var(--ease-smooth);
    /* Hard clamp: nothing may visually spill past the panel's edges,
       regardless of how wide the nested dropdown content wants to be */
    overflow-x: hidden;
    max-width: 100vw;
  }

  .nav__drawer.open {
    transform: translateX(0);
  }

  /* Drawer header: logo (brand stays visible while menu is open) + close */
  .nav__drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding: 18px 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav__drawer-logo {
    display: inline-flex;
    align-items: center;
    line-height: 1;
  }

  .nav__drawer-logo img {
    height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
  }

  .nav__drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition:
      background 0.2s ease,
      transform 0.2s ease,
      color 0.2s ease;
  }

  .nav__drawer-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    transform: rotate(90deg);
  }

  .nav__drawer-close .material-icons-outlined {
    font-size: 20px;
  }

  /* Scrollable link list fills the remaining drawer height */
  .nav__links {
    flex: 1;
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 1.25rem 2rem;
    box-sizing: border-box;
  }

  .nav__links > li {
    width: 100%;
    min-width: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav__links > li:last-child {
    border-bottom: 0;
    margin-top: 1rem;
  }

  .nav__link,
  .nav.scrolled .nav__link {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 44px;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.85) !important;
    background: transparent;
    font-size: 0.95rem;
    box-sizing: border-box;
  }

  .nav__link:hover,
  .nav.scrolled .nav__link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.06);
  }

  .nav__dropdown {
    height: auto;
    display: block;
    width: 100%;
    min-width: 0;
  }

  .nav__chevron {
    color: rgba(255, 255, 255, 0.5) !important;
  }

  .nav__dropdown.is-open .nav__chevron {
    color: var(--clr-teal-muted) !important;
  }

  .nav__dropdown-menu,
  #nav-dropdown-contact .nav__dropdown-menu,
  #nav-dropdown-media .nav__dropdown-menu {
    position: relative;
    top: auto;
    left: 170px;
    right: auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: 0;
    margin: 0 0 0.5rem;
    padding: 0 0.25rem;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    backdrop-filter: none;
    box-sizing: border-box;
    transition:
      max-height 0.3s ease,
      padding 0.3s ease;
  }

  .nav__dropdown-menu li {
    min-width: 0;
  }

  .nav__dropdown.is-open .nav__dropdown-menu {
    max-height: 520px;
    padding: 0.25rem;
  }

  .nav__dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.75);
  }

  .nav__dropdown-link:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .nav__dropdown-link > div {
    min-width: 0;
    flex: 1 1 auto;
  }

  .nav__dropdown-link strong {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.82rem;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .nav__dropdown-link small {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.68rem;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .nav__dd-icon {
    color: var(--clr-teal-muted);
    font-size: 18px !important;
  }

  .btn--nav {
    width: 100%;
    height: auto;
    justify-content: center;
    margin-left: 0;
    margin-top: 0.25rem;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
  }
}

/* Small tablets / large phones — trim drawer + logo further */
@media (max-width: 640px) {
  /* .nav__logo-img--full {.nav__logo-img--full
  } */

  .nav__drawer {
    width: min(320px, 92vw);
  }
}

/* Small phones — drawer goes full-width, tighten spacing */
@media (max-width: 420px) {
  .nav__container {
    padding-left: max(0.85rem, env(safe-area-inset-left));
    padding-right: max(0.85rem, env(safe-area-inset-right));
  }

  .nav__logo-img--full {
    height: 50px;
  }

  .nav__drawer {
    width: 100vw;
  }

  .nav__drawer-header {
    padding: 16px 1rem;
  }

  .nav__links {
    padding: 8px 1rem 2rem;
  }

  .nav__hamburger {
    width: 36px;
    height: 36px;
    margin-left: 0.5rem;
  }
}

/* Landscape phones (short viewport height) — keep the drawer usable */
@media (max-width: 1024px) and (max-height: 480px) and (orientation: landscape) {
  .nav__drawer-header {
    padding: 12px 1.25rem;
  }

  .nav__links {
    padding-top: 4px;
  }

  .nav__links > li:last-child {
    margin-top: 0.5rem;
  }

  .nav__link,
  .nav.scrolled .nav__link {
    min-height: 38px;
    padding: 0.6rem 1rem;
  }
}

/* Desktop tightening */
@media (min-width: 1025px) and (max-width: 1280px) {
  .nav__link {
    padding: 0.35rem 0.45rem;
    font-size: 0.72rem;
  }

  .btn--nav {
    padding: 0.45rem 0.9rem;
    font-size: 0.72rem;
  }
}

/*==============================
COMING SOON MODAL
==============================*/

.comingsoon-modal {
  position: fixed;

  inset: 0;

  background: rgba(4, 18, 40, 0.65);

  backdrop-filter: blur(6px);

  display: flex;

  justify-content: center;

  align-items: center;

  padding: 20px;

  opacity: 0;

  visibility: hidden;

  transition: 0.35s;

  z-index: 999999;
}

.comingsoon-modal.show {
  opacity: 1;

  visibility: visible;
}

.comingsoon-card {
  background: #fff;

  width: 100%;

  max-width: 520px;

  border-radius: 26px;

  padding: 45px;

  text-align: center;

  position: relative;

  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.18);

  transform: translateY(30px);

  transition: 0.35s;
}

.comingsoon-modal.show .comingsoon-card {
  transform: translateY(0);
}

.comingsoon-close {
  position: absolute;

  top: 18px;

  right: 18px;

  width: 42px;

  height: 42px;

  border: none;

  border-radius: 50%;

  background: #f4f4f4;

  cursor: pointer;

  font-size: 28px;

  color: #004e8f;

  transition: 0.3s;
}

.comingsoon-close:hover {
  background: #cf2b23;

  color: #fff;
}

.comingsoon-icon {
  width: 90px;

  height: 90px;

  margin: auto;

  border-radius: 50%;

  background: rgba(0, 78, 143, 0.08);

  display: flex;

  align-items: center;

  justify-content: center;

  margin-bottom: 20px;
}

.comingsoon-icon span {
  font-size: 46px;

  color: #004e8f;
}

.comingsoon-tag {
  display: inline-block;

  padding: 10px 22px;

  background: #fff4dd;

  color: #cf2b23;

  font-weight: 700;

  border-radius: 999px;

  font-size: 0.78rem;

  letter-spacing: 2px;

  text-transform: uppercase;

  margin-bottom: 20px;
}

.comingsoon-card h2 {
  font-family: "Lora", serif;

  font-size: 2rem;

  color: #004e8f;

  margin-bottom: 18px;
}

.comingsoon-card p {
  font-family: "DM Sans", sans-serif;

  font-size: 1rem;

  line-height: 1.9;

  color: #6b7280;

  margin-bottom: 28px;
}

.comingsoon-divider {
  width: 90px;

  height: 3px;

  margin: 25px auto;

  background: #cf2b23;

  border-radius: 999px;
}

.comingsoon-card h3 {
  font-family: "Lora", serif;

  font-size: 1.45rem;

  color: #004e8f;

  margin-bottom: 35px;

  line-height: 1.5;
}

.comingsoon-btn {
  padding: 16px 36px;

  background: #cf2b23;

  color: #fff;

  border: none;

  border-radius: 999px;

  cursor: pointer;

  font-weight: 700;

  font-size: 1rem;

  transition: 0.3s;
}

.comingsoon-btn:hover {
  background: #004e8f;

  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .comingsoon-card {
    padding: 35px 25px;
  }

  .comingsoon-card h2 {
    font-size: 1.7rem;
  }

  .comingsoon-card h3 {
    font-size: 1.2rem;
  }

  .comingsoon-icon {
    width: 75px;

    height: 75px;
  }

  .comingsoon-icon span {
    font-size: 38px;
  }
}

@media (max-width: 480px) {
  .comingsoon-card {
    padding: 28px 20px;
  }

  .comingsoon-btn {
    width: 100%;
  }
}
