/*
 * ps-pw-styles.css
 * Page-specific styles for Public Works pages built on the new
 * cp-*-root.dwt template (first page: traffic-AB98-TruckRoutes.html).
 * Patterned on departments/fire/css/ps-lhmp-styles.css.
 *
 *   main-style.css   ->  site layout (section, subnav, eyebrow/title)
 *   grid-styles.css  ->  layout: .grid, .grid--2/3
 *   card-styles.css  ->  boxes: .card, .card__body, .card__title ...
 *   THIS FILE        ->  page-specific design.  Every class below is `ps-`.
 *
 * Contents:
 *   1. Page tokens (:root)        5. Accordions (<details>) — FAQ + Q&A
 *   2. Sub-nav tokens             6. Lists, table, map, contact band
 *   3. Photo hero                 7. Accessibility / responsive
 *   4. Cards, buttons, sidebar
 */

/* ==========================================================================
   1. PAGE TOKENS  — Public Works maroon accent over the City brand blue
   --------------------------------------------------------------------------
   Text-bearing colors pass WCAG AA (4.5:1) on white.
   ========================================================================== */
:root {
  --ps-blue:     var(--brand-blue, #2e5a93);
  --ps-blue-dk:  #0e3a8c;
  --ps-red:      #8a1c2b;   /* maroon, ~9:1 on white */
  --ps-red-dk:   #6b1421;
  --ps-gold:     var(--vims-accent, #f5a800);   /* decoration only on white */
  --ps-surface:  #f1f1f2;
  --ps-text:     var(--neutral-gray-dark, #4d515f);
  --ps-radius:   10px;

  --font-display: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body:    'Source Sans 3', 'Lato', 'Helvetica Neue', Arial, sans-serif;
}

/* ==========================================================================
   2. SUB-NAV TOKENS  (main-style.css .subnav reads these)
   ========================================================================== */
:root {
  --alert-text-muted: #4d515f;
  --alert-blue:       var(--ps-blue);
  --alert-red:        var(--ps-red);
  --alert-amber:      var(--ps-gold);
  --alert-transition: 0.2s ease;
}

/* In-page jump targets sit below the sticky sub-nav */
[id] { scroll-margin-top: 90px; }

/* ==========================================================================
   3. PHOTO HERO  — title is live text over a darkened photo, so it scales
   and reads to screen readers. Swap the photo with a --modifier class.
   ========================================================================== */
.ps-photo-hero {
  position: relative;
  display: block;
  padding: clamp(3rem, 5vw, 5rem) 0;
  background-color: var(--ps-blue-dk);
  background-size: cover;
  background-position: center;
  border-top: 3px solid var(--ps-gold);
  text-align: center;
}
.ps-photo-hero--truck { background-image: url("../../../cdd/img/page-tops/RedTruckAB98.jpg"); }

/* Gradient scrim keeps white text above 4.5:1 on any part of the photo */
.ps-photo-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,28,70,0.6) 0%, rgba(8,28,70,0.85) 100%);
}
.ps-photo-hero .container { position: relative; }

.ps-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ps-gold);
  margin-bottom: 1.2rem;
}
.ps-hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.5vw, 5.4rem);
  font-weight: 700; line-height: 1.1;
  color: #fff; text-transform: uppercase;
  margin: 0 0 2rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.ps-hero-title span { display: block; color: #8fd3ff; }
.ps-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2vw, 2.1rem);
  font-weight: 500; line-height: 1.5;
  color: #fff;
  max-width: 900px; margin: 0 auto;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* ==========================================================================
   4. CARDS, BUTTONS, SIDEBAR
   ========================================================================== */
.ps-intro { max-width: 840px; font-family: var(--font-body); font-size: 1.7rem; line-height: 1.65; color: var(--ps-text); }
.ps-body p, .ps-body li { font-family: var(--font-body); font-size: 1.6rem; line-height: 1.65; color: var(--ps-text); }
.ps-body h3 { font-family: var(--font-display); font-size: 2.1rem; color: var(--ps-blue-dk); margin: 2.4rem 0 0.8rem; }

.ps-grid-cards { margin-top: 2.4rem; }

/* card-styles.css pads .card (10px) at height:100% without border-box, so
   cards overflow their grid track by 20px. Contain it on this sheet's grids. */
.ps-grid-cards > .card,
.ps-sidebar > .card { box-sizing: border-box; min-width: 0; }

/* Per-card accent: drives the bottom bar + title color in card-styles.css */
.ps-card--red  { --card-accent: var(--ps-red); }
.ps-card--blue { --card-accent: var(--ps-blue-dk); }

.ps-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--card-accent); color: #fff; font-size: 2rem;
  margin-bottom: 1rem;
}
.card .card__title { font-family: var(--font-display); }
.ps-grid-cards .card__text { font-family: var(--font-body); font-size: 1.55rem; line-height: 1.6; }

/* Body copy + sidebar */
.ps-overview { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) {
  .ps-overview { grid-template-columns: 1fr; }
}
.ps-sidebar { display: flex; flex-direction: column; gap: 2rem; }
.ps-sidebar .card { height: auto; }

/* Primary action button. card-styles.css colors every .card__body a — re-assert. */
.ps-btn,
.card__body a.ps-btn {
  display: inline-flex; align-items: center; gap: 0.8rem;
  margin-top: 0.6rem;
  padding: 1.1rem 1.6rem;
  background: var(--ps-red); color: #fff;
  border-radius: 8px;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}
.ps-btn:visited,
.card__body a.ps-btn:visited { color: #fff; }
.ps-btn:hover,
.card__body a.ps-btn:hover { background: var(--ps-red-dk); color: #fff; text-decoration: none; }
.ps-btn:focus-visible { outline: 3px solid var(--ps-gold); outline-offset: 3px; }

.ps-btn--blue,
.card__body a.ps-btn--blue { background: var(--ps-blue-dk); }
.ps-btn--blue:hover,
.card__body a.ps-btn--blue:hover { background: var(--ps-blue); }

.ps-btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }

/* ==========================================================================
   5. ACCORDIONS  (native <details>/<summary> — keyboard + screen reader
   support for free, no JS). Used for both the Q&A and the FAQ.
   ========================================================================== */
.ps-faq { max-width: 960px; margin-top: 2.4rem; }
.ps-faq details {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-left: 5px solid var(--ps-blue-dk);
  border-radius: var(--ps-radius);
  margin-bottom: 1.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.ps-faq details[open] { border-left-color: var(--ps-red); }
.ps-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
  padding: 1.6rem 1.8rem;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.75rem; font-weight: 600; line-height: 1.35;
  color: var(--ps-blue-dk);
}
.ps-faq summary::-webkit-details-marker { display: none; }
.ps-faq summary::after {
  content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  font-size: 1.3rem; color: var(--ps-red);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.ps-faq details[open] summary::after { transform: rotate(180deg); }
.ps-faq summary:hover { color: var(--ps-red); }
.ps-faq summary:focus-visible { outline: 3px solid var(--ps-gold); outline-offset: 2px; border-radius: var(--ps-radius); }
.ps-faq .ps-faq-body { padding: 0 1.8rem 1.6rem; }
.ps-faq .ps-faq-body > :first-child { margin-top: 0; }
.ps-faq .ps-faq-body > :last-child { margin-bottom: 0; }
/* mv-main.css sets ul { list-style: none } — restore bullets in answers */
.ps-faq .ps-faq-body ul,
.ps-faq .ps-faq-body ol { margin: 0 0 1.2rem 2.2rem; padding-left: 0; }
.ps-faq .ps-faq-body ul { list-style: disc outside; }
.ps-faq .ps-faq-body ol { list-style: lower-alpha outside; }
.ps-faq .ps-faq-body li { margin-bottom: 0.4rem; }

/* ==========================================================================
   6. LISTS, TABLE, MAP, CONTACT BAND
   ========================================================================== */
.ps-link-list { list-style: none; margin: 0; padding: 0; }
.ps-link-list li {
  display: flex; gap: 0.6rem;
  font-size: 1.55rem; line-height: 1.5; color: #23282f;
  padding: 0.9rem 0; border-bottom: 1px solid rgba(0,0,0,0.08);
}
.ps-link-list li:last-child { border-bottom: none; }
.ps-link-list i { color: var(--card-accent); width: 1.2em; text-align: center; padding-top: 0.25em; flex-shrink: 0; }

/* Requirement list — mv-main.css strips list styles, so draw our own markers */
.ps-check-list { list-style: none; margin: 0; padding: 0; max-width: 900px; }
.ps-check-list li { position: relative; padding-left: 3rem; margin-bottom: 1.2rem; }
.ps-check-list li::before {
  content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 0; top: 0.1em; color: var(--ps-red);
}

/* Dated outreach notices */
.ps-notice {
  margin: 0 0 1.6rem; padding: 1.4rem 1.6rem;
  background: #fff; border-left: 5px solid var(--ps-gold); border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.ps-notice time { display: block; font-family: var(--font-display); font-weight: 700; color: var(--ps-blue-dk); margin-bottom: 0.3rem; }
.ps-notice p { margin: 0; }

/* Outreach meetings table */
.ps-table-wrap { overflow-x: auto; margin-top: 2.4rem; border-radius: var(--ps-radius); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.ps-table { width: 100%; border-collapse: collapse; background: #fff; font-family: var(--font-body); font-size: 1.55rem; margin: 0; }
.ps-table caption { text-align: left; font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; color: var(--ps-blue-dk); padding: 0 0 1rem; }
.ps-table th, .ps-table td { padding: 1.1rem 1.4rem; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(0,0,0,0.08); }
.ps-table thead th { background: var(--ps-blue-dk); color: #fff; font-family: var(--font-display); font-weight: 600; }
.ps-table tbody tr:nth-child(even) { background: var(--ps-surface); }
.ps-table tbody th { font-weight: 600; color: #23282f; }
.ps-table .ps-sub { display: block; font-size: 1.35rem; color: var(--ps-text); font-weight: 400; }

/* Embedded ArcGIS map */
.ps-map { margin-top: 2.4rem; border-radius: var(--ps-radius); overflow: hidden; border: 1px solid rgba(0,0,0,0.12); line-height: 0; }
.ps-map iframe { display: block; width: 100%; height: 640px; border: 0; }

/* Contact band: two contact blocks side by side */
.ps-contact-band .container { text-align: center; }
.ps-contact-grid { text-align: left; margin-top: 2rem; }
.ps-contact-grid > div {
  background: rgba(255,255,255,0.08); border-radius: var(--ps-radius);
  padding: 2rem 2.2rem; border-left: 5px solid var(--ps-gold);
}
.ps-contact-band h3 { font-family: var(--font-display); font-size: 1.9rem; color: #fff; margin: 0 0 0.6rem; }
.ps-contact-band p { font-family: var(--font-body); font-size: 1.65rem; line-height: 1.7; color: #fff; margin: 0; }
.ps-contact-band a, .ps-contact-band a:visited { color: #fff; text-decoration: underline; }
.ps-contact-band i { color: var(--ps-gold); width: 1.4em; }

/* ==========================================================================
   7. ACCESSIBILITY (WCAG AA) + RESPONSIVE
   ========================================================================== */
.section-eyebrow { color: var(--ps-red); }
.bk-blue .section-eyebrow { color: var(--ps-gold); }

/* Inline links in body copy must not rely on color alone (WCAG 1.4.1) */
.ps-intro a,
.ps-body p a,
.ps-body li a,
.ps-faq-body a,
.ps-notice a,
.card__text a { text-decoration: underline; }

@media (max-width: 670px) {
  .ps-faq summary { font-size: 1.6rem; padding: 1.4rem 1.4rem; }
  .ps-faq .ps-faq-body { padding: 0 1.4rem 1.4rem; }
  .ps-map iframe { height: 480px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
