@charset "UTF-8";
/* ============================================================
   MCHSN - Mendocino Coast Human Services Network
   Stylesheet - matches wireframe layout
   ============================================================ */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f5f3ee;
  color: #1e2d3d;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; }
button { font-family: inherit; }

/* --- Skip link --- */
.skip-link {
  position: absolute; top: -999px; left: .5rem; z-index: 999;
  background: #1a4a6b; color: #fff; padding: .5rem 1rem;
  border-radius: 0 0 6px 6px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: #fff;
  border-bottom: 2px solid #1a4a6b;
  position: sticky; top: 0; z-index: 200;
}
.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.header-logo {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: baseline; gap: .45rem;
  flex: 1; text-align: left;
}
.header-abbr {
  font-size: 1.45rem; font-weight: 900;
  color: #1a4a6b; letter-spacing: -.5px; line-height: 1;
}
.header-full {
  font-size: .8rem; font-weight: 600;
  color: #3d5166; line-height: 1.25;
  text-transform: uppercase; letter-spacing: .4px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: .4rem;
  font-size: .78rem; color: #5a7a8a; flex-shrink: 0;
}
.bc-link {
  background: none; border: none; cursor: pointer;
  color: #1a6fa8; font-size: .78rem; padding: 0;
  text-decoration: underline; text-underline-offset: 2px;
}
.bc-link:hover { color: #1a4a6b; }
.bc-sep { color: #aab; font-size: .7rem; }
.bc-cur { color: #3d5166; font-weight: 600; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 1px solid #ccd; border-radius: 5px;
  padding: .4rem .5rem; cursor: pointer; flex-shrink: 0;
}
.hamburger span {
  display: block; width: 20px; height: 2px; background: #1a4a6b; border-radius: 2px;
}
.mobile-menu {
  background: #1a4a6b; display: flex; flex-direction: column;
}
.mobile-menu button {
  background: none; border: none; color: #fff; font-size: 1rem;
  padding: .85rem 1.5rem; text-align: left; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.mobile-menu button:hover { background: rgba(255,255,255,.1); }

/* ============================================================
   PAGE ANIMATION
   ============================================================ */
.page { animation: fadeUp .3s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HOME PAGE
   Wireframe: top tagline, then 2x2 grid (Mission | Photo / Photo | Vision),
   then centered ENTER button
   ============================================================ */
.home-top {
  background: #1a4a6b;
  padding: 1.75rem 2rem;
  text-align: center;
}
.home-tagline {
  color: rgba(255,255,255,.92);
  font-size: clamp(.95rem, 2vw, 1.25rem);
  font-style: italic;
  letter-spacing: .2px;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  min-height: 60vh;
  /* order: Mission(TL), Photo(TR), Photo(BL), Vision(BR) */
}

.home-cell { position: relative; }

.home-mission,
.home-vision {
  background: #fff;
  padding: 3rem 2.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.home-vision { background: #f0f5f9; }

.home-section-label {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2.5px;
  color: #1a6fa8;
}
.home-section-body {
  font-size: 1rem; color: #2c3e50; line-height: 1.75;
  max-width: 480px;
}

.home-photo {
  background-size: cover;
  background-position: center;
  min-height: 280px;
}
/* fallback gradient if image doesn't load */
.home-photo-tr { background-color: #2e7da8; }
.home-photo-bl { background-color: #2d6a4f; }

.home-enter-row {
  background: #fff;
  padding: 2.5rem;
  display: flex; justify-content: center;
  border-top: 1px solid #e0ddd8;
}
.enter-btn {
  padding: .9rem 3.5rem;
  background: #1a4a6b;
  color: #fff;
  font-size: 1.1rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  border: 3px solid #1a4a6b;
  border-radius: 4px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.enter-btn:hover, .enter-btn:focus-visible {
  background: #fff;
  color: #1a4a6b;
  outline: none;
}

/* ============================================================
   DOORS PAGE
   Wireframe: 5 columns x 2 rows of tall portrait "door" panels
   ============================================================ */
.doors-intro {
  background: #1a4a6b;
  color: rgba(255,255,255,.8);
  text-align: center;
  padding: 1.25rem 1.5rem;
  font-size: .9rem;
}

.doors-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  gap: 1rem;
}

.door {
  /* tall portrait panel - like an actual door */
  aspect-ratio: 3 / 5;
  border-radius: 6px 6px 4px 4px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--door-color, #1a4a6b);
  box-shadow: 0 3px 12px rgba(0,0,0,.12);
  transition: transform .2s ease, box-shadow .2s ease;
  background: var(--door-light, #e8f4fd);
  position: relative;
}
.door:hover, .door:focus-visible {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 10px 28px rgba(0,0,0,.2);
  outline: none;
  z-index: 1;
}

.door-img {
  flex: 1;
  background-size: cover;
  background-position: center;
  background-color: var(--door-color, #1a4a6b);
  opacity: .85;
}

.door-label {
  background: var(--door-color, #1a4a6b);
  color: #fff;
  padding: .6rem .75rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  flex-shrink: 0;
}
.door-icon { font-size: 1rem; line-height: 1; }
.door-name { font-size: .78rem; font-weight: 700; line-height: 1.25; }
.door-count { font-size: .65rem; opacity: .75; }

/* ============================================================
   CATEGORY PAGE
   ============================================================ */
.cat-banner {
  color: #fff;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.crisis-notice {
  background: #fdecea;
  border-left: 5px solid #c0392b;
  color: #7b241c;
  padding: .85rem 1.5rem;
  font-size: .9rem;
  display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap;
}
.crisis-notice-link { color: #c0392b; font-weight: 700; }

/* Search bar */
.cat-search-bar {
  background: #f0ede6;
  border-bottom: 1px solid #ddd8ce;
  padding: .85rem 1.5rem;
  position: sticky; top: 58px; z-index: 100;
  display: flex; align-items: center; gap: .6rem;
}
.cat-search-icon { color: #888; font-size: .95rem; flex-shrink: 0; }
.cat-search-input {
  flex: 1;
  border: 1.5px solid #c9b89a;
  border-radius: 6px;
  padding: .6rem 1rem;
  font-size: .95rem;
  background: #fff;
  max-width: 600px;
}
.cat-search-input:focus {
  outline: none;
  border-color: #1a6fa8;
  box-shadow: 0 0 0 3px rgba(26,111,168,.12);
}

.results-count {
  max-width: 1200px; margin: 0 auto;
  padding: .6rem 1.5rem;
  font-size: .8rem; color: #888;
}

/* ============================================================
   OUTLINE LIST (subcategories)
   Wireframe: ■ Subcategory header, then o items
   ============================================================ */
.outline-list {
  max-width: 1200px; margin: 0 auto;
  padding: .5rem 1.5rem 3rem;
  list-style: none;
  display: flex; flex-direction: column; gap: .35rem;
}

.outline-section {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #ddd;
  background: #fff;
}

.outline-header {
  width: 100%;
  background: #fff;
  border: none;
  cursor: pointer;
  padding: .85rem 1rem;
  display: flex; align-items: center; gap: .65rem;
  text-align: left;
  transition: background .15s;
}
.outline-header:hover { background: #f5f8fb; }
.outline-header.open {
  background: #1a4a6b;
  color: #fff;
}
.outline-header:focus-visible { outline: 3px solid #5bacd4; outline-offset: -3px; }

/* The filled-square bullet from the wireframe */
.outline-bullet {
  width: 12px; height: 12px;
  background: currentColor;
  border-radius: 2px;
  flex-shrink: 0;
  opacity: .7;
}

.outline-label {
  flex: 1; font-size: .97rem; font-weight: 600; letter-spacing: .1px;
}
.outline-count {
  font-size: .72rem; font-weight: 700;
  background: rgba(0,0,0,.08);
  padding: .15rem .5rem; border-radius: 999px;
  flex-shrink: 0;
}
.outline-header.open .outline-count { background: rgba(255,255,255,.2); }

.outline-chevron {
  width: 14px; height: 14px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
  flex-shrink: 0; opacity: .7;
}
.outline-header.open .outline-chevron { transform: rotate(-135deg); }

/* Collapsible body */
.outline-body {
  max-height: 0; overflow: hidden;
  transition: max-height .35s cubic-bezier(.4,0,.2,1);
}
.outline-body.open { max-height: 9999px; }

/* ============================================================
   RESOURCE ROWS (like the table in wireframe page 7)
   ============================================================ */
.resource-list {
  list-style: none;
  border-top: 1px solid #e8e8e8;
}

.resource-row {
  padding: 1rem 1.25rem 1rem 2rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex; flex-direction: column; gap: .4rem;
  position: relative;
}
/* The "o" bullet from the wireframe */
.resource-row::before {
  content: 'o';
  position: absolute;
  left: .85rem; top: 1.05rem;
  font-size: .85rem; color: #aab; font-weight: 600;
}
.resource-row:last-child { border-bottom: none; }
.resource-row:hover { background: #f8fafe; }

.resource-row.crisis::before { color: #c0392b; }

.rr-top {
  display: flex; align-items: baseline;
  gap: .6rem; flex-wrap: wrap;
}
.rr-name {
  font-weight: 700; font-size: .97rem; color: #1a4a6b;
}
.resource-row.crisis .rr-name { color: #c0392b; }
.rr-contact {
  font-size: .78rem; color: #778899;
}

.rr-desc {
  font-size: .88rem; color: #4a5568; line-height: 1.6;
  max-width: 800px;
}

.rr-contacts {
  display: flex; flex-wrap: wrap; gap: .5rem .9rem;
  align-items: center;
}
.rr-phone { font-size: .875rem; }
.rr-label { font-size: .72rem; color: #889; margin-right: .2rem; }
.rr-link { color: #1a6fa8; text-decoration: none; font-weight: 600; }
.rr-link:hover { text-decoration: underline; color: #1a4a6b; }
.rr-email { font-size: .875rem; }
.rr-web {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .22rem .65rem;
  border: 1.5px solid #1a6fa8;
  border-radius: 999px;
  font-size: .8rem; font-weight: 600;
  color: #1a6fa8;
  transition: all .15s;
}
.rr-web:hover { background: #1a6fa8; color: #fff; text-decoration: none; }

/* Crisis call button */
.call-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem 1.1rem;
  background: #c0392b; color: #fff;
  font-size: .88rem; font-weight: 700;
  border-radius: 5px; text-decoration: none;
  transition: background .15s;
}
.call-btn:hover { background: #922b21; text-decoration: none; color: #fff; }

.resource-row.crisis .rr-link { color: #c0392b; }
.resource-row.crisis .rr-link:hover { color: #7b241c; }

/* Empty state */
.empty-state {
  text-align: center; padding: 3rem 1.5rem;
  color: #889; font-size: .95rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .doors-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 860px) {
  .doors-grid { grid-template-columns: repeat(4, 1fr); }
  .header-full { display: none; }
}
@media (max-width: 680px) {
  .doors-grid { grid-template-columns: repeat(3, 1fr); }
  .home-grid { grid-template-columns: 1fr; }
  .home-grid .home-photo-tr { order: -1; min-height: 200px; }
  .home-grid .home-photo-bl { min-height: 200px; }
  .hamburger { display: flex; }
  .breadcrumb { display: none; }
  .outline-label { font-size: .9rem; }
}
@media (max-width: 480px) {
  .doors-grid { grid-template-columns: repeat(2, 1fr); padding: 1rem; gap: .75rem; }
  .home-mission, .home-vision { padding: 2rem 1.25rem; }
  .outline-list { padding: .5rem .75rem 2.5rem; }
  .resource-row { padding: .85rem 1rem .85rem 1.85rem; }
}

/* ============================================================
   FOCUS / A11Y
   ============================================================ */
:focus-visible { outline: 3px solid #5bacd4; outline-offset: 2px; }
