/* ===========================
   BES — Bhutan Ecological Society
   style.css
   =========================== */

@font-face {
  font-family: 'Bitcrusher';
  src: url('../fonts/bitcrusher/bitcrusher condensed bd.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Jomolhari';
  src: url('../fonts/Jomolhari/Jomolhari-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: #f3ede0;
  --amber: #8c5e0b;
  --amber-dark: #6b4608;
  --green: #3a5c2a;
  --text-dark: #1a1a1a;
  --text-body: #2a2a2a;
  --nav-text: #3a3a2a;
}

html,
body {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
}

/* overflow-x must live on body only — setting it on html too disqualifies the
   standard body-to-viewport overflow propagation, which decouples
   window.scrollY from real scroll position and breaks any scroll-driven JS
   (e.g. the header's hide/show + frosted-background logic). */
body {
  overflow-x: hidden;
}

/* ---- HEADER ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: transparent;
  transition: transform 0.35s ease, background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
}

.header.nav-hidden {
  transform: translateY(-110%);
}

.header.nav-frosted {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  padding: 12px clamp(24px, 4vw, 56px);
  max-width: 100%;
}

.logo-link {
  display: inline-flex;
  flex: 0 0 auto;
  line-height: 0;
}

.logo {
  width: 210px;
  height: 56px;
  object-fit: contain;
  display: block;
  margin: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 16px);
  margin-left: auto;
}

.nav-link {
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1a1a1a;
  padding: 8px clamp(8px, 0.8vw, 12px);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
  background: #608138;
  color: #ffffff;
}

.nav-link.active,
.nav-link[aria-current="page"] {
  color: #608138;
  font-weight: 600;
}

.nav-link.active:hover,
.nav-link[aria-current="page"]:hover {
  color: #ffffff;
}

/* ---- NAV DROPDOWNS (composite tab + panel, like the About Us page) ---- */
.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-item>.nav-link {
  border-radius: 8px 8px 0 0;
}

.nav-item:hover>.nav-link,
.nav-item:focus-within>.nav-link {
  background: #608138;
  color: #ffffff;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  max-width: 440px;
  padding: 6px 0;
  background: #608138;
  border-radius: 0 8px 8px 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease-in-out, visibility 0.32s ease-in-out;
  z-index: 200;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
}

/* keep the last two from spilling off the right edge */
.nav-item:nth-last-child(-n + 2) .nav-dropdown {
  left: auto;
  right: 0;
  border-radius: 8px 0 8px 8px;
}

.nav-dropdown a {
  display: block;
  padding: 10px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: normal;
  line-height: 1.35;
  color: #ffffff;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown a:hover {
  background: rgba(0, 0, 0, 0.28);
  color: #ffffff;
}

.nav-dropdown .resource-section-link {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-dropdown .resource-section-link:not(:first-child) {
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.nav-dropdown .resource-sub-link {
  position: relative;
  padding-left: 36px;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.nav-dropdown .resource-sub-link::before {
  content: "\2014";
  position: absolute;
  left: 18px;
  opacity: 0.7;
}

.nav-view-all {
  font-weight: 600;
  margin-top: 4px;
}

.nav-view-all .nav-arrow {
  margin-right: 6px;
}

/* ---- HERO ---- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  background: #ffffff;
}

.hero.hero--map-active {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 1;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.hero-slide--map {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 4% 90px;
  background: #F1F4F0;
}

.hero-slide--map.is-active {
  position: relative;
  inset: auto;
  min-height: 100vh;
}

.hero-slide--map .bcm {
  width: 100%;
  max-width: 1600px;
  min-width: 0;
}

.hero-slide-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  animation: heroImageFadeIn 1.3s ease forwards;
}

@keyframes heroImageFadeIn {
  to {
    opacity: 1;
  }
}

.hero-content {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: none;
  text-align: center;
}

.hero-text-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(28px);
  animation: heroTextIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.2s;
  /* Flex items default to min-width: auto, which uses the unwrapped
     (max-content) width as the minimum — so .hero-heading's text would
     refuse to wrap and overflow the viewport on narrow phones instead. */
  min-width: 0;
  max-width: 100%;
}

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

@keyframes heroNavFade {
  to {
    opacity: 1;
  }
}

.hero-heading {
  font-family: 'Inter', sans-serif;
  font-size: clamp(3.4rem, 6.2vw, 5.6rem);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.055em;
  color: #000000;
  margin: 0 0 10px;
  overflow-wrap: break-word;
}

@media (min-width: 1025px) {
  .hero-heading {
    white-space: nowrap;
  }
}

.hero-subtext {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #000000;
  max-width: 540px;
  margin: 0;
}

.hero-nav {
  position: absolute;
  top: 50vh;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  animation: heroNavFade 0.9s ease forwards;
  animation-delay: 0.45s;
}

.hero-nav-btn {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #608138;
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0px 8px 7px 0px rgba(0, 0, 0, 0.15);
}

.hero-nav-btn:hover {
  background: #4e6a2e;
  color: #ffffff;
}

/* ===========================================================
   TABLET RESPONSIVE — 769px to 1024px
   =========================================================== */
@media (max-width: 1024px) and (min-width: 769px) {

  /* DWM: intro full-width on top, 2 cards per row, rest below */
  .dwm {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    min-height: 0;
  }

  .dwm-intro {
    grid-column: 1 / -1;
    padding: 48px 32px;
    align-items: flex-start;
  }

  .dwm-heading {
    font-size: 4rem;
    white-space: nowrap;
  }

  .dwm-i-wrap {
    width: 0.5em;
    height: 60px;
    margin-top: 0%;
  }

  .dwm-i-fan {
    height: 2.2em;
    top: 120%;
  }

  .dwm-subtext {
    max-width: 100%;
  }

  .dwm-card {
    padding: 32px 24px;
  }

  .dwm-card-title {
    font-size: 1.4rem;
  }
}

/* Fix the orange "DOING What Matters" heading so the fan SVG stays aligned
   inside the "O" at tablet widths. Scoped to 701-1024 (not true mobile) —
   below 701px there isn't room for it on one line, so it's left to wrap. */
@media (max-width: 1024px) and (min-width: 701px) {
  .dwm-heading {
    font-size: 5.25rem;
    /* 84px tablet */
    white-space: nowrap;
    text-align: left;
  }

  .dwm-br {
    display: none;
  }

  .dwm-heading .dwm-i-wrap {
    width: 0.4em;
    height: 0;
    margin-top: 0;
    vertical-align: baseline;
  }

  .dwm-heading .dwm-i-fan {
    height: 2.2em;
    top: auto;
    bottom: -0.2em;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* 701–768px: small-tablet zone — keep the tablet fan (from the ≤1024 block)
   so there's no jump; only the heading font scales here. */
@media (max-width: 768px) and (min-width: 701px) {
  .dwm-heading {
    font-size: clamp(3rem, 14vw, 5.75rem);
    text-align: left;
  }
}

/* ---- DOING WHAT MATTERS ---- */
.dwm {
  display: grid;
  grid-template-columns: 35% repeat(3, calc(65% / 3));
  background-color: #F1F1E1;
  min-height: 520px;
  overflow: hidden;
}

/* --- DWM ENTRANCE ANIMATIONS ---
   Content is visible by default. The hidden/animated start state only kicks in
   once JS adds `.anim-ready` — so if JS doesn't run, the section still shows. */
.dwm.anim-ready .dwm-intro,
.dwm.anim-ready .dwm-card {
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.7s ease;
}

.dwm.anim-ready .dwm-intro {
  transform: translateX(-80px);
}

.dwm.anim-ready .dwm-card {
  transform: translateX(80px);
}

/* Reports Shaping = card #4 (last card), it should appear ON TOP (first/highest z-index) */
.dwm .dwm-card:nth-child(4) {
  z-index: 4;
  transition-delay: 0.15s;
}

.dwm .dwm-card:nth-child(3) {
  z-index: 3;
  transition-delay: 0.30s;
}

.dwm .dwm-card:nth-child(2) {
  z-index: 2;
  transition-delay: 0.45s;
}

.dwm.anim-ready.is-visible .dwm-intro,
.dwm.anim-ready.is-visible .dwm-card {
  opacity: 1;
  transform: translateX(0);
}

.dwm-intro {
  padding: 80px 40px 56px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-center;
  gap: 20px;
}

.dwm-i-wrap {
  display: inline-block;
  position: relative;
  margin-top: 10%;
  width: 0.5em;
  height: 100px;
  vertical-align: baseline;
  overflow: visible;
}

.dwm-i-fan {
  position: absolute;

  top: -112%;
  left: 50%;
  transform: translateX(-50%);

  height: 3em;
  width: auto;
}

.dwm-heading {
  font-family: 'Inter', sans-serif;
  font-size: clamp(3.25rem, 3.8vw, 4rem);
  font-weight: 700;
  line-height: 0.94;
  color: #608138;
  text-transform: uppercase;
  letter-spacing: -0.055em;
  overflow: visible;
}

.dwm-doing {
  display: inline-block;
  white-space: nowrap;
}

.dwm-subtext {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  line-height: 1.75;
  color: var(--text-body);
  text-align: justify;
  max-width: 320px;
}

.dwm-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.dwm-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.dwm-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 11px;
  transition: color 0.2s;
}

.dwm-link-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-body);
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.dwm-link-btn:hover .dwm-link-icon {
  color: #608138;
}

.dwm-link-btn:hover .dwm-link-label {
  color: #608138;
  text-decoration: underline;
}

.dwm-card {
  padding: 48px 36px 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dwm-card:nth-child(2) {
  background-color: #EBEBCD;
}

.dwm-card:nth-child(3) {
  background-color: #D0D0B1;
}

.dwm-card:nth-child(4) {
  background-color: #EBEBCD;
}

.dwm-card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
}

.dwm-card-icon img {
  width: 60px;
  height: 56px;

  object-fit: contain;
}

.dwm-card-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.45rem, 1.7vw, 1.75rem);
  font-weight: 700;
  line-height: 1.18;
  padding-top: 20px;
  color: #2f5426;
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.dwm-card-body {
  font-family: 'Inter', sans-serif;
  padding-right: 12px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-body);
  text-align: justify;
  flex: 1;
}

.dwm-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #608138;
  color: #ffffff;
  font-size: 11px;
  text-decoration: none;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.dwm-card-btn:hover {
  background-color: #4e6a2e;
}

/* ===== PARTNERS SECTION ===== */
.partners-section {
  background: #ffffff;
  padding: 12px 0 28px;
  margin-bottom: 32px;
}

.partners-heading-wrap {
  text-align: left;
  margin-bottom: 32px;
  padding: 0 64px;
}

.partners-title {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 32px;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}

.partners-viewport {
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  padding: 16px 0;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
}

.partners-viewport.is-dragging {
  cursor: grabbing;
}

.partners-track {
  display: flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  will-change: transform;
  padding: 8px 0;
}

.partner-logo {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  object-fit: contain;
  padding: 20px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ===== HORIZONTAL SCROLL SECTIONS (Updates / Projects) ===== */
.hscroll-section {
  padding: 24px 64px 8px;
  background: #ffffff;
  scroll-margin-top: 96px;
}

/* per-section spacing tweaks */
.hscroll-section--latest {
  padding-top: 44px;
  margin-top: 32px;
}

/* a bit more room above Latest */
.hscroll-section--ongoing {
  padding-top: 4px;
  padding-bottom: 0;
}

/* tighter */

.hscroll-title {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 32px;
  color: #1a1a1a;
  margin-bottom: 24px;
}

.hscroll-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.hscroll-title-row .hscroll-title {
  margin-bottom: 24px;
}

.hscroll-view-all {
  flex-shrink: 0;
  color: #608138;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.hscroll-view-all:hover {
  color: #4e6a2e;
  text-decoration: underline;
}

.hscroll-title--underline {
  display: inline-block;
  border-bottom: 3px solid #4a90c2;
  padding-bottom: 4px;
}

.hscroll-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 32px;
}

.hscroll-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  align-self: center;
  border-radius: 50%;
  border: none;
  background: #608138;
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  position: relative;
  z-index: 5;
}

.hscroll-arrow:hover {
  background: #4e6a2e;
}

.hscroll-arrow:disabled {
  opacity: 0.35;
  cursor: default;
  background: #608138;
}

.hscroll-viewport {
  flex: 1;
  overflow: hidden;
  scroll-behavior: smooth;
  /* internal padding gives the hover shadow room to render inside the clip box
     (top/right/bottom/left); the JS page-step subtracts the horizontal padding */
  padding: 18px 24px 48px 28px;
}

.hscroll-track {
  display: flex;
  gap: 24px;
  transition: transform 0.4s ease;
  will-change: transform;
}

.story-card {
  flex-shrink: 0;
  flex-basis: calc((100% - 48px) / 3);
  background: #F9FBFA;
  border: none;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.2s, box-shadow 0.2s;
}

.story-card:hover {
  background: #ffffff;
  box-shadow: -6px 17px 20px 0px rgba(0, 0, 0, 0.15);
}

.story-card-title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.3;
  color: #1a1a1a;
  text-wrap: balance;
}

.story-card-date {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #251E19;
  opacity: 0.5;
  margin-top: -4px;
}

.story-card-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: 8px;
  background: #e8e8e8;
}

.story-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-card-body {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  line-height: 1.6;
  color: #3a3a3a;
  text-align: justify;
  flex: 1;
}

.story-card-btn {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 30px;
  background: #608138;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
  margin-top: 4px;
}

.story-card-btn:hover {
  background: #4e6a2e;
}

/* ===== FOOTER ===== */
.footer {
  background: #6d7e3a;
  color: #ffffff;
  padding: 36px 64px 18px;
  font-family: 'Inter', sans-serif;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  margin-top: 24px;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 12px;
}

.footer-contact {
  min-width: 220px;
}

.footer-reach {
  min-width: 200px;
  margin-top: 33px;
}

/* drop email/phone to line up with the address */
.footer-links {
  min-width: 260px;
}

.footer-heading {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.footer-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.footer-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  font-size: 18px;
}

.footer-socials a {
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
}

.footer-socials a:hover {
  background: rgba(255, 255, 255, 0.3);
}

.footer-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.4);
  min-height: 110px;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px 24px;
  max-width: none;
}

.footer-links-grid a {
  color: #ffffff;
  font-size: 12px;
  text-decoration: none;
  opacity: 0.9;
  white-space: nowrap;
}

.footer-links-grid a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-copy {
  text-align: center;
  font-size: 11px;
  margin-top: 20px;
  opacity: 0.85;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #608138;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, background 0.2s;
  z-index: 200;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #4e6a2e;
}

/* ===== HAMBURGER (hidden on desktop) ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: #608138;
  border-radius: 2px;
}

.nav-toggle-bar--short {
  width: 12px;
}

.nav-toggle-bar--long {
  width: 20px;
}

/* ===========================================================
   TABLET + MOBILE NAV — hamburger active from ≤1024px
   Header floats over the hero so the cream dividers extend
   underneath the nav (logo + burger sit on top of the cream).
   =========================================================== */
@media (max-width: 1024px) {
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: transparent;
  }

  .header-inner {
    min-height: 74px;
    padding: 12px 20px;
    justify-content: space-between;
    position: relative;
    background: transparent;
  }

  .logo {
    width: 190px;
    height: 50px;
    margin: 0;
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: #ffffff;
    padding: 12px 0;
    max-height: calc(100vh - 74px);
    overflow-y: auto;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    margin: 0;
    z-index: 160;
  }

  .nav.is-open {
    display: flex;
  }

  .nav-link {
    display: block;
    padding: 14px 24px;
    width: 100%;
    border-top: 1px solid #f0eee7;
    text-align: left;
  }

  /* accordion dropdowns in the mobile menu */
  .nav-item {
    display: block;
    width: 100%;
  }

  .nav-item>.nav-link {
    border-radius: 0;
    position: relative;
  }

  .nav-item>.nav-link::after {
    content: "";
    position: absolute;
    right: 26px;
    top: 44%;
    width: 11px;
    height: 11px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.3s ease;
  }

  .nav-item.is-open>.nav-link::after {
    transform: translateY(-50%) rotate(225deg);
  }

  .nav-item:hover>.nav-link {
    background: transparent;
    color: #1a1a1a;
  }

  .nav-item.is-open>.nav-link {
    color: #608138;
  }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    min-width: 0;
    max-width: none;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    background: #faf9f5;
    box-shadow: none;
    border-radius: 0;
    transition: max-height 0.3s ease;
  }

  .nav-item.is-open .nav-dropdown {
    max-height: 620px;
  }

  .nav-dropdown a {
    padding: 12px 24px 12px 40px;
    color: #1a1a1a;
    border-top: 1px solid #efece4;
  }

  .nav-dropdown a:hover {
    background: #f3f1ea;
    color: #608138;
  }

  .nav-dropdown .resource-section-link:not(:first-child) {
    border-top-color: #e2dfd4;
  }

  .nav-dropdown .resource-sub-link {
    padding-left: 58px;
  }

  .nav-dropdown .resource-sub-link::before {
    left: 40px;
  }

  .nav-toggle {
    display: flex;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
  }
}

/* ===========================================================
   TABLET HERO (769–1024px) — show dividers + text on right
   =========================================================== */
@media (max-width: 1024px) and (min-width: 701px) {
  .hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    padding: 0;
    display: block;
    overflow: hidden;
  }

  .hero-nav {
    gap: 12px;
  }

  .hero-nav-btn {
    width: 42px;
    height: 42px;
    font-size: 14px;
  }

  /* ---- DWM (tablet): intro full-width on top, 2 cards per row, rest below ---- */
  .dwm {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    min-height: 0;
  }

  .dwm-intro {
    grid-column: 1 / -1;
    padding: 96px 40px 32px;
    align-items: flex-start;
  }

  .dwm-subtext {
    max-width: 640px;
  }

  .dwm-card {
    padding: 36px 28px 28px;
  }

  .dwm-card-title {
    font-size: 1.85rem;
    padding-top: 16px;
  }

  /* ---- LATEST / ONGOING (tablet): 2 cards visible, rest scrollable ---- */
  .hscroll-section {
    padding: 40px 32px;
  }

  .hscroll-arrow {
    display: none;
  }

  .hscroll-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 16px 32px 40px 0;
    /* room for the hover shadow */
  }

  .hscroll-viewport::-webkit-scrollbar {
    display: none;
  }

  .hscroll-track {
    transform: none !important;
    width: max-content;
    gap: 20px;
  }

  .story-card {
    flex: 0 0 calc(50vw - 52px);
    scroll-snap-align: start;
  }

  /* ---- FOOTER (tablet): deterministic 3-column grid, no vertical dividers ---- */
  .footer {
    padding: 32px 36px 16px;
  }

  .footer-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 28px;
    justify-items: start;
    align-items: start;
  }

  .footer-contact,
  .footer-reach,
  .footer-links {
    min-width: 0;
    margin-top: 0;
  }

  .footer-reach {
    margin-top: 33px;
    /* line email/phone up with the address */
  }

  .footer-divider {
    display: none;
  }

  .footer-links-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 100%;
  }

  .footer-links-grid a {
    white-space: normal;
  }
}

/* ===========================================================
   MOBILE RESPONSIVE — max-width: 700px (stacked hero)
   =========================================================== */
@media (max-width: 700px) {

  /* HEADER — mobile: logo dead center, hamburger top-right */
  .header {
    position: relative;
    background: transparent;
  }

  .header-inner {
    min-height: 64px;
    padding: 10px 16px;
    justify-content: space-between;
    position: relative;
  }

  .logo {
    width: 168px;
    height: 44px;
    margin: 0;
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: #ffffff;
    padding: 12px 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    margin: 0;
    z-index: 50;
  }

  .nav.is-open {
    display: flex;
  }

  .nav-link {
    display: block;
    padding: 14px 24px;
    width: 100%;
    border-top: 1px solid #f0eee7;
    text-align: left;
  }

  .nav-toggle {
    display: flex;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 60;
  }

  /* HERO — full-bleed image with nav controls */
  .hero {
    position: relative;
    height: 100vh;
    min-height: 480px;
    padding: 0;
    display: block;
    overflow: hidden;
  }

  .hero-nav {
    top: 37vh;
    padding: 0 8px;
    gap: 10px;
  }

  .hero-nav-btn {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .hero-content {
    width: 88%;
    max-width: none;
  }

  .hero-heading {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 14px;
  }

  .hero-subtext {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 6px;
  }

  /* DWM (orange title + 3 tan cards) — stack vertically */
  .dwm {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .dwm-intro {
    padding: 110px 24px 24px;
    text-align: left;
    align-items: flex-start;
  }

  .dwm-heading {
    font-size: clamp(2.25rem, 11vw, 4.5rem);
    white-space: normal;
    text-align: left;
  }

  .dwm-heading .dwm-i-wrap {
    width: 0.45em;
    height: 0;
    margin-top: 0;
    vertical-align: baseline;
  }

  .dwm-heading .dwm-i-fan {
    height: 2.7em;
    top: auto;
    bottom: -0.28em;
    left: 50%;
    transform: translateX(-50%);
  }

  .dwm-subtext {
    max-width: 100%;
    text-align: justify;
  }

  .dwm-card {
    padding: 28px 24px;
    border-left: none;
    border-top: none;
  }

  .dwm-card-title {
    font-size: 1.7rem;
    padding-top: 12px;
  }

  .dwm-card-br {
    display: none;
  }

  /* HORIZONTAL CARD SLIDERS (Latest Updates / Projects) — 1.5 cards */
  .hscroll-section {
    padding: 32px 0 32px 16px;
  }

  .hscroll-title {
    font-size: 1.6rem;
    padding-right: 16px;
  }

  .hscroll-title-row {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .hscroll-wrap {
    gap: 8px;
  }

  .hscroll-arrow {
    display: none;
  }

  .hscroll-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px 40px 0;
    /* room for the hover shadow */
  }

  .hscroll-viewport::-webkit-scrollbar {
    display: none;
  }

  .hscroll-track {
    transform: none !important;
    width: max-content;
    gap: 16px;
  }

  .story-card {
    flex: 0 0 86vw;
    max-width: 360px;
    scroll-snap-align: start;
  }

  /* PARTNERS */
  .partners-section {
    padding: 40px 0;
  }

  .partners-heading-wrap {
    padding: 0 16px;
    margin-bottom: 20px;
  }

  .partners-title {
    font-size: 1.6rem;
  }

  .partner-logo {
    width: 119px;
    height: 119px;
    padding: 14px;
  }

  .partners-track {
    gap: 5px;
  }

  /* FOOTER */
  .footer {
    padding: 28px 20px 14px;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-reach {
    margin-top: 0;
  }

  .footer-divider {
    display: none;
  }

  .footer-links-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 100%;
  }

  .footer-links-grid a {
    white-space: normal;
  }

  /* BACK TO TOP */
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
}

/* ===========================================================
   SMALL MOBILE (≤550px) — mobile divider art + larger hero elements
   Placed last so it wins over the 700px block by cascade order,
   no !important needed.
   =========================================================== */
@media (max-width: 550px) {

  /* Overlay the navbar over the hero so the hero genuinely starts at the
     very top of the viewport — no fragile header-height math. */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
  }

  .logo {
    width: 168px;
    height: 44px;
  }
}

/* ===========================================================
   EXTRA-NARROW PHONES (≤426px) — more breathing room between the
   prev/next hero arrows and the heading/subtext, which sit close
   together once the heading wraps to 2 lines at this width.
   =========================================================== */
@media (max-width: 426px) {
  .hero-heading {
    margin-bottom: 22px;
  }

  .hero-subtext {
    margin-top: 12px;
  }

  /* .hero itself is height:100vh + overflow:hidden by default (see the
     ≤700px block above) — the map slide's content can be taller than one
     screen, so it needs to actually grow the page and be scrollable rather
     than getting clipped. */
  .hero {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  /* Arrows overlay the bottom edge of whichever slide is active — their own
     bottom lines up with the slide's bottom edge, like a normal carousel,
     rather than floating in the dead space after it. .hero-nav is a direct
     child of .hero (not of .hero-slide), and with no bottom padding of its
     own, bottom:0 here lands it exactly at .hero's bottom edge — which
     tracks the active slide's real height once .hero-nav is out of flow. */
  .hero-nav {
    position: absolute;
    top: auto;
    left: auto;
    right: 0;
    bottom: 16px;
    transform: none;
    justify-content: flex-end;
    padding: 0 24px 0 0;
  }

  /* Reserve room at the bottom of the map slide's content so the overlaid
     arrows sit in empty space rather than covering the last legend row. */
  .hero-slide--map {
    padding-bottom: 64px;
  }

  /* .hero-slide--map.is-active carries min-height:100vh for the desktop/
     tablet layout, where the map fills the screen. On a phone whose real
     content is shorter than its screen height, that floor would still make
     .hero (and so .hero-nav's bottom:0 anchor) taller than the visible
     content, leaving the overlaid arrows hovering in empty space below it. */
  .hero-slide--map.is-active {
    min-height: auto;
  }
}