/* ===================================================================================
   WAFAC brand inputs -- captured 2026-09-22 via Playwright against the LIVE
   https://www.fireadaptedwashington.org/ (Decision 2, docs/planning/todo/ITEM-004.md
   sub-item 4.2). Every value below cites the live selector it was read from so 4.3/4.4
   can recolor/rebuild the chrome without a second trip to the site. Colors/fonts here
   are NOT yet applied anywhere in this file -- that's 4.3 (index.html chrome) and 4.4
   (this file's actual header/nav rules); this block is documentation only.

   STRUCTURAL DIFFERENCE FROM WRCD -- read this first: WAFAC's live header is a SINGLE
   unified band (one background color + one background image) holding both the logo
   and the nav together, not WRCD's two-tier cream-band-over-olive-strip split. 4.4
   should design the recolor around one band, not try to force a second tier that
   doesn't exist on the live site.

   -- LOGO --
   Asset: "Washington-Fire-Adapted-Communties_main-logo.png" (flame mark + "WASHINGTON
   STATE / FIRE ADAPTED COMMUNITIES / LEARNING NETWORK" wordmark baked into one image),
   native 368x170, served from
   https://www.fireadaptedwashington.org/wp-content/uploads/2021/07/Washington-Fire-Adapted-Communties_main-logo.png
   -- downloaded byte-for-byte to img/wafac-logo.png (not redrawn/cropped).
   No distinct mobile logo exists: the srcset only offers this same image at 368w/300w,
   unlike WRCD's separate full-submark vs. compressed-mobile-logo files -- one asset
   covers every breakpoint. Rendered height on the live site (picked up from the visible
   <img alt="Washington-Fire-Adapted-Communties_main-logo"> inside <header>): ~125px at a
   1400px-wide viewport, ~126px at a 375px-wide viewport -- effectively constant across
   breakpoints (WAFAC does not compress it for mobile the way WRCD does). 4.4 is free to
   pick a different final height to leave room for the map; this is only the as-served
   reference point.

   -- FAVICON --
   Three sizes actually served via <link rel="icon"|"apple-touch-icon"> in <head>:
     32x32   -> img/favicon.png           (rel="icon" sizes="32x32")
     192x192 -> img/favicon-192.png       (rel="icon" sizes="192x192")
     180x180 -> img/apple-touch-icon.png  (rel="apple-touch-icon")
   Source: https://www.fireadaptedwashington.org/wp-content/uploads/2021/07/cropped-Washington-Fire-Adapted-Communties_favicon-{32x32,192x192,180x180}.png

   -- HEADER BAND (background) --
   Selector: the <div class="elementor-element-...  e-con-full"> that directly wraps
   both the logo <a> and the nav -- confirmed by walking up from the live logo <img>'s
   parents to the first ancestor with a non-transparent computed style. Two class-named
   variants exist in the DOM (one hidden below 768px via "elementor-hidden-mobile", one
   hidden at/above 2400px via "elementor-hidden-widescreen") but BOTH resolve to the
   identical computed values below, so treat them as one logical band:
     background-color: rgb(0, 61, 69)   #003d45  (dark teal -- shows if the image fails)
     background-image: url(".../wp-content/uploads/2022/03/WAFAC_header-bar.jpg")
       (a warm-toned photo, covers the band; not downloaded -- 4.4 can keep the flat
       #003d45 fallback color instead of also fetching this JPG, since Decision 2 only
       calls for colors/logo, not a background photo).
     padding: 0px (no fixed measured band height was found in the live CSS itself --
       the header's total rendered height varies with the logo's own height, see LOGO).

   -- NAV: labels/hrefs --
   IMPORTANT DEVIATION from the assumed "including dropdown children": on the live
   site the practically-reachable nav (both the real mobile hamburger menu, opened via
   ".elementor-menu-toggle" -> ".elementor-nav-menu--dropdown", AND the top-level items
   of the separate desktop-only mega-menu widget "nav.e-n-menu") is a FLAT 5-item list
   with NO dropdown/submenu children:
     Home        -> https://www.fireadaptedwashington.org/
     Our Work    -> https://www.fireadaptedwashington.org/our-work/
     Take Action -> https://www.fireadaptedwashington.org/take-action/
     News        -> https://www.fireadaptedwashington.org/news-you-can-use/
     Connect     -> https://www.fireadaptedwashington.org/connect/
   The desktop-only "nav.e-n-menu" widget DOES expose a much richer per-item "mega
   menu" on hover/click (in-page anchors like "#goals" plus live blog-post links), but
   that content is not simple external links like WRCD's one dropdown and would go
   stale fast if hand-copied -- recommend 4.3 build the flat 5-link list only, matching
   what the real mobile hamburger menu already shows, same has-dropdown-free shape for
   both desktop and mobile (no ".has-dropdown"/".dropdown" wrapper needed for WAFAC,
   though 4.3's own text says keep that markup pattern available in case this changes).

   -- NAV: link color / hover-active color --
   Selector: ".elementor-nav-menu--dropdown a" (the real mobile hamburger menu's links,
   screenshotted open):
     default (non-current-page) link color: rgb(255, 255, 255)  #ffffff
     current-page ("elementor-item-active") link color: rgb(252, 209, 74)  #fcd14a  (gold)
   The live stylesheet's own ":hover" rule for the desktop nav
   (".elementor-nav-menu--main .elementor-item:hover") resolves through the same
   accent-color chain as the active-state rule above, so #fcd14a is recorded as both
   the hover AND current-page color -- a live :hover was not independently forced via
   pointer movement against the mega-menu widget, so treat the hover value as
   high-confidence-by-inference rather than directly observed.
   Hamburger icon itself: a matching gold/olive tone (visually sampled from the
   screenshot; not pixel-picked to a hex value since 4.3/4.4 don't need a custom
   hamburger icon color -- .site-nav-toggle's existing WRCD burnt-orange bars can stay
   or be re-sampled later if wanted).

   -- FONT --
   font-family: Montserrat, sans-serif  (both nav variants; the live page does not
     load this via a Google Fonts <link> the way WRCD loads EB Garamond -- check
     the live <head> again in 4.3 for the exact loading mechanism before swapping
     index.html's font <link>, since Montserrat may come bundled through Elementor's
     own font loader rather than a plain Google Fonts URL.)
   font-weight: 500 (".elementor-nav-menu--dropdown a", mobile) / 600
     (".e-n-menu-title-text", desktop) -- both selectors confirmed via computed style.
   font-size: 14px (both variants measured); text-transform: uppercase; letter-spacing:
     normal (neither variant applies WRCD's 1px tracking).

   -- MOBILE BREAKPOINT --
   Real, structural breakpoint (confirmed by bisecting viewport widths against the
   actual toggle/nav elements' rendered bounding boxes, not just reading a stylesheet
   rule): the desktop "nav.e-n-menu" widget is rendered down to 768px wide and
   disappears at 767px and below, where ".elementor-menu-toggle" (the real hamburger)
   appears instead. So: max-width: 767px is WAFAC's own live mobile breakpoint --
   different from whatever pixel value 4.3/4.4 choose to keep for this file's own
   @media block (this repo's existing convention tests at <=640px per the uniform DoD;
   767px is only the live site's own value, recorded for reference, not a requirement
   to match it exactly).
   =================================================================================== */

/* WAFAC resource map.
   Full-viewport layout with a mobile breakpoint -- see the @media block below. */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, sans-serif;
}

/* Top bar linking back to the main fireadaptedwashington.org site -- reproduces that
   site's real header: a SINGLE unified dark-teal band holding both the logo and nav
   together, not a two-tier cream-over-olive split like WRCD's (Decision 2,
   docs/planning/todo/ITEM-004.md sub-item 4.2's live-site sampling). .site-nav-top and
   .site-nav-menu stay two separate elements in the markup (same structure 4.3 built, kept
   for the mobile-toggle JS), but both resolve to the SAME background color (#003d45) so
   they read on screen as one continuous band, matching the live site. Total height is
   unchanged from the layout this file started with (SITE_NAV_HEIGHT = 62px top band +
   40px nav strip = 102px) so #map and .panel below can offset by a known constant --
   4.2's measured live logo height (~125-126px, effectively constant across breakpoints)
   did not force a different band height here, since 4.2's own note leaves 4.4 free to
   pick whatever height leaves the most room for the map. */
.site-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.site-nav-top {
  display: flex;
  justify-content: center;
  padding: 7px 0;
  /* Dark teal -- pixel-sampled from fireadaptedwashington.org's live header band
     (rgb(0, 61, 69), the "background-color" fallback behind its header photo; see the
     brand-inputs comment block at the top of this file). */
  background: #003d45;
  box-sizing: border-box;
}

.site-nav-logo {
  display: flex;
}

.site-nav-logo img {
  height: 48px;
  width: auto;
  display: block;
}

/* Hamburger toggle -- hidden on desktop (the olive strip below is always visible there),
   shown only inside the mobile breakpoint at the bottom of this file. Bars turn into an
   X via .is-open, toggled by this site's own js/map.js; mirrors the icon-swap pattern
   carried over from www-wrcd/'s own mobile header. */
.site-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.site-nav-toggle span {
  display: block;
  /* 4px bars / 4px gaps -- carried over from www-wrcd/'s own icon sizing (in turn modeled
     on a 1000-unit-viewBox SVG path that splits its 35px rendered height into three equal
     bar/gap/bar/gap/bar bands, each ~12.5% of that height, ~4.4px); a previous 2px-bar/5px-
     gap version read as noticeably thinner than that ~1:1 ratio, hence "too thin". Pill-
     shaped ends (the source path is fully rounded, radius = half its bar thickness) via
     border-radius. */
  height: 4px;
  width: 100%;
  border-radius: 2px;
  /* Gold -- matches the nav's own hover/active accent color (#fcd14a, sampled from
     fireadaptedwashington.org's live nav) so the icon reads against the dark-teal band
     instead of WRCD's unrelated burnt-orange bars. */
  background: #fcd14a;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav-toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.site-nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.site-nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.site-nav-menu {
  /* Same dark teal as .site-nav-top (#003d45) -- the live site has no second-tier nav
     color to sample, since its header is one unified band; matching the two selectors'
     backgrounds is what makes this file's separate elements read as that single band. */
  background: #003d45;
}

/* Direct child only -- ".site-nav-menu ul" would also match the nested .dropdown <ul>
   inside "What We Do", forcing it into this same 40px flex row and squashing its
   background box down to one item's height with the rest bleeding the map through. */
.site-nav-menu > ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin: 0;
  padding: 0;
  height: 40px;
}

.site-nav-menu a,
.site-nav-menu span {
  /* White default / gold hover-active, matching fireadaptedwashington.org's own
     ".elementor-nav-menu--dropdown a" computed styles (Montserrat, 14px, uppercase, no
     letter-spacing -- unlike WRCD's EB Garamond serif with 1px tracking). */
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.site-nav-menu a:hover,
.site-nav-menu a:focus-visible,
.site-nav-menu span:hover,
.site-nav-menu span:focus-visible {
  /* Gold -- rgb(252, 209, 74), sampled from the live site's current-page/hover accent
     color chain (".elementor-item-active" / ":hover"); replaces WRCD's plain underline. */
  color: #fcd14a;
  text-decoration: underline;
}

.site-nav-menu li.has-dropdown {
  position: relative;
}

.site-nav-menu .dropdown {
  /* Not currently rendered -- WAFAC's live nav is a flat 5-link list with no submenus
     (per 4.2's findings), so no ".has-dropdown" markup exists in this file's index.html
     yet. Kept ready (recolored to match) in case that changes later. */
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  list-style: none;
  margin: 0;
  padding: 8px 0;
  min-width: 240px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 11;
}

.site-nav-menu li.has-dropdown:hover .dropdown,
.site-nav-menu li.has-dropdown:focus-within .dropdown {
  display: block;
}

.site-nav-menu .dropdown a {
  display: block;
  padding: 8px 20px;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: none;
  color: #003d45;
}

.site-nav-menu .dropdown a:hover,
.site-nav-menu .dropdown a:focus-visible {
  text-decoration: none;
  background: rgba(0, 61, 69, 0.08);
}

#map {
  position: absolute;
  top: 102px;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

/* The zoom/compass NavigationControl lives top-left and the attribution control
   bottom-left (see map.js), not their usual top-right/bottom-right -- the panel docks
   top-right and spans the full height, so keeping both controls on the left means nothing
   needs to be cleared at either edge: top just matches #map's own top (102px, the
   .site-nav height, so the panel starts flush with the top of the visible map) and bottom
   is flush at 0 instead of reserving space for an attribution strip that's no longer
   there. No padding here (unlike earlier) -- #panel-header carries its own, so the header
   can sit flush at the panel's real top edge with nothing able to scroll into view above
   it. .panel is positioned relative to the viewport, not to #map, hence repeating #map's
   102px offset here rather than inheriting it. */
.panel {
  position: absolute;
  top: 102px;
  right: 0;
  bottom: 0;
  width: 340px;
  max-width: 90vw;
  overflow-y: auto;
  background: #ffffff;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  z-index: 2;
}

/* Sticky as a whole unit (county name + close button together) so the close button stays
   pinned too, instead of scrolling away as a separately absolutely-positioned element. */
.panel-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

/* Looks like the plain heading it replaces (same size/weight/position) but is a real
   <select> -- appearance: none strips each browser's own chrome so the custom arrow
   (a small inline SVG, matching the close button's #444) is the only affordance shown. */
.panel-county-select {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0 20px 0 0;
  border: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23444' d='M4 6l4 4 4-4z'/%3E%3C/svg%3E") no-repeat right center / 14px;
  font: inherit;
  font-size: 20px;
  font-weight: bold;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.panel-close {
  flex-shrink: 0;
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #444;
}

#panel-content {
  padding: 0 16px 16px 16px;
}

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

.project-list li {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ddd;
}

.project-list h3 {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 6px 0;
  font-size: 15px;
}

.project-icon {
  flex-shrink: 0;
  width: 2em;
  height: 2em;
  font-size: 2em;
  line-height: 1;
  object-fit: contain;
}

.project-title-text {
  /* Icon stays a fixed left column -- title text wraps within its own column instead of
     flowing back under/around the icon on a second line. */
  flex: 1 1 auto;
  min-width: 0;
}

.project-thumb {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 4px;
  margin: 0 0 8px 0;
}

.statewide-heading {
  margin: 20px 0 12px 0;
  padding-top: 12px;
  border-top: 2px solid #ccc;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
}

.project-list p {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #333;
}

.project-list a {
  display: inline-block;
  font-size: 12px;
  word-break: break-all;
  /* WAFAC's dark teal (#003d45), replacing WRCD's green -- the panel has no direct
     live-site analog to sample, so it reuses the same brand teal as the header/nav for a
     consistent accent against the panel's white background. */
  color: #003d45;
}

.empty {
  color: #666;
  font-style: italic;
}

/* County-name label that follows the cursor on hover -- overrides MapLibre's default
   popup chrome (padding/tip/shadow) down to a small unobtrusive tag. */
.county-hover-label .maplibregl-popup-content {
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  /* WAFAC's dark teal, matching .project-list a above -- same reasoning: no live-site
     analog to sample, reuse the brand teal instead of WRCD's green. */
  color: #003d45;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.county-hover-label .maplibregl-popup-tip {
  display: none;
}

/* Mobile header: wafac-logo.png (the SAME single asset used at every breakpoint -- 4.2
   found WAFAC serves no separate compressed mobile logo the way WRCD does) far left --
   still linking back to the main site -- hamburger far right, dropdown menu collapsed
   behind it. Unlike WRCD's mobile menu (a visually distinct khaki/navy widget), the
   dropdown here keeps the SAME dark-teal band background as the desktop nav strip
   (#003d45) with the same white/gold link colors, matching fireadaptedwashington.org's
   own single-unified-band header at every width (4.2's real breakpoint bisection found
   the live site's own nav/hamburger swap at 767/768px, kept here for reference; this
   file keeps this repo's existing <=640px convention per the uniform DoD). Placed at the
   end of the file (rather than next to .site-nav) so these overrides win the cascade
   against the unconditional #map/.panel/.site-nav-* rules defined earlier -- same
   specificity, so source order decides, media query or not. */
@media (max-width: 640px) {
  .site-nav-top {
    justify-content: space-between;
    padding: 7px 16px;
    box-sizing: border-box;
  }

  .site-nav-toggle {
    display: flex;
  }

  .site-nav-menu {
    display: none;
    /* Same dark teal as the desktop band (#003d45) -- keeps the single-unified-band look
       when the mobile menu drops open, instead of WRCD's separate khaki mobile widget. */
    background: #003d45;
  }

  .site-nav-menu.is-open {
    display: block;
  }

  .site-nav-menu > ul {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    gap: 0;
    padding: 8px 16px 16px;
  }

  .site-nav-menu > ul > li {
    width: 100%;
  }

  .site-nav-menu a,
  .site-nav-menu span {
    display: block;
    padding: 10px 0;
    /* White, matching the desktop nav's default link color -- the mobile band is now the
       same dark teal as desktop, so it needs the same light text (WRCD's mobile menu used
       dark navy text because its khaki background was light). */
    color: #ffffff;
  }

  /* No hover on touch -- the dropdown is always expanded inline under "What We Do"
     instead of needing a second tap. */
  .site-nav-menu .dropdown {
    display: block;
    position: static;
    transform: none;
    box-shadow: none;
    background: none;
    min-width: 0;
    padding: 0 0 0 16px;
  }

  .site-nav-menu .dropdown a {
    color: #ffffff;
    padding: 8px 0;
  }

  /* The dropdown menu is collapsed (0px) when closed instead of always reserving its
     40px, so #map/.panel offset by just the 62px cream band -- otherwise a blank gap opens
     up between the header and the map. When .site-nav-menu is .is-open it overlays the map
     as a dropdown (position: absolute, z-index: 10 from .site-nav), the same overlay
     approach carried over from www-wrcd/'s own mobile menu behavior. */
  #map {
    top: 62px;
  }

  .panel {
    top: 62px;
  }
}
