/* ═══════════════════════════════════════════
   SRM — Shared Resources Manager for Public Safety
   Shared Stylesheet  |  srm.css
   Brand: Navy #1B2A4A  |  Amber #E8952D
═══════════════════════════════════════════ */

/* ── Brand Tokens ── */
:root {
  --navy:       #1B2A4A;
  --amber:      #E8952D;
  --white:      #FFFFFF;
  --light-gray: #F2F4F7;
  --dark-gray:  #444444;
  --border:     #D0D5DF;
}

/* ── Reset & Base ── */
html {
  width: 100%;
  overflow-x: hidden;
}

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

body {
  width: 100%;
  overflow-x: hidden;
  font-family: Calibri, 'Gill Sans', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--dark-gray);
  background: var(--white);
}

/* ═══════════════════════════════════════════
   SITE HEADER & NAV
═══════════════════════════════════════════ */
.site-header {
  width: 100%;
  left: 0;
  right: 0;
  background: var(--navy);
  border-bottom: 4px solid var(--amber);
  position: sticky;
  top: 0;
  z-index: 100;
  box-sizing: border-box;
}

.header-inner {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 clamp(20px, 3vw, 48px);
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
  box-sizing: border-box;
  min-width: 0;
}

/* Logo — must be allowed to shrink, or it pushes the nav/hamburger
   past the right edge of a phone screen. */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}

.logo-text-wrap {
  min-width: 0;
}

.logo-svg {
  width: 46px;
  height: 43px;
  flex-shrink: 0;
}

.logo-text-wrap .logo-acronym {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--white);
  line-height: 1;
  display: block;
}

.logo-text-wrap .logo-sub {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* On phones the tagline is dropped entirely — the SRM mark carries it */
@media (max-width: 560px) {
  .logo-text-wrap .logo-sub { display: none; }
}

/* Nav links */
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.site-nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-family: Calibri, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 8px 14px;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

.site-nav a.nav-cta {
  background: var(--amber);
  color: var(--white);
  margin-left: 8px;
  padding: 8px 18px;
}

.site-nav a.nav-cta:hover {
  background: #d4841e;
}

/* ── Dropdown groups (SRM-EC / SRM-EM) ── */
.nav-group {
  position: relative;
}

.nav-group > a::after {
  content: " ▾";
  font-size: 10px;
  opacity: 0.7;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,0.15);
  border-top: 3px solid var(--amber);
  padding: 6px 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  z-index: 200;
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 10px 16px;
  border-radius: 0;
  font-weight: 400;
  font-size: 14px;
}

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.2s, opacity 0.2s;
}

/* Mobile nav
   Breakpoint is 1150px, not 820px: the full desktop nav row plus the logo
   needs roughly 1100px, so a landscape phone (typically 844–932px wide) was
   still being served the desktop nav and overflowing the navy bar. */
@media (max-width: 1150px) {
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    max-width: 100%;
    /* In landscape the open menu is taller than the screen — cap its height
       and let it scroll instead of running off the bottom. */
    max-height: calc(100vh - 76px);
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--navy);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 4px solid var(--amber);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 12px;
    box-sizing: border-box;
  }

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

  .site-nav a {
    padding: 12px 24px;
    border-radius: 0;
    font-size: 15px;
  }

  .site-nav a.nav-cta {
    margin: 8px 24px 0;
    text-align: center;
    border-radius: 3px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-header {
    position: relative;
  }

  /* Dropdowns become flat, always-visible sub-lists on mobile */
  .nav-group > a::after { content: ""; }

  .nav-dropdown {
    display: block;
    position: static;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: 0;
  }

  .nav-dropdown a {
    padding: 10px 24px 10px 42px;
    font-size: 14px;
    color: rgba(255,255,255,0.65);
  }
}

/* ═══════════════════════════════════════════
   PAGE LAYOUT
═══════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 56px clamp(20px, 3.5vw, 56px) 96px;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .container { padding: 40px 20px 32px; }
}

/* ── Page intro block ── */
.page-intro {
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 2px solid var(--border);
}

.page-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  display: block;
  margin-bottom: 12px;
}

.page-headline {
  font-family: Calibri, sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 18px;
}

.page-rule {
  height: 3px;
  width: 48px;
  background: var(--amber);
  margin-bottom: 20px;
}

.page-intro-text {
  font-size: 18px;
  color: var(--dark-gray);
  max-width: none;
  line-height: 1.8;
}

/* ── Intro text + product logo, side by side (SRM-EC / SRM-EM pages) ── */
.page-intro-split {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-intro-split .page-intro-text { flex: 1; min-width: 0; }

.page-intro-logo {
  display: block;
  width: 150px;
  height: auto;
  flex-shrink: 0;
}

@media (max-width: 680px) {
  .page-intro-split { flex-direction: column; align-items: flex-start; }
  .page-intro-logo { margin-top: 16px; width: 120px; }
}

/* ── Home page dashboard image — full width, below the intro text ── */
.page-intro-image {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 32px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(27, 42, 74, 0.12);
}

/* ── Section labels & headings ── */
.section-label {
  font-family: Calibri, sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-top: 12px;
  margin-bottom: 18px;
  display: block;
}

.subheading {
  font-family: Calibri, sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 8px;
  margin-top: 24px;
  line-height: 1.35;
}

/* ── Body text ── */
p {
  font-size: 17px;
  color: var(--dark-gray);
  margin-bottom: 14px;
  max-width: none;
  line-height: 1.75;
}

ul, ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

li {
  font-size: 17px;
  color: var(--dark-gray);
  margin-bottom: 6px;
  line-height: 1.7;
}

strong { color: var(--navy); font-weight: 700; }

.content-block { margin-bottom: 40px; }

.inner-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ═══════════════════════════════════════════
   COMPONENTS
═══════════════════════════════════════════ */

/* ── Unified box — amber left border, used sitewide ── */
.box {
  background: var(--light-gray);
  border-left: 4px solid var(--amber);
  padding: 24px 28px;
  margin-bottom: 20px;
}

.box:last-child { margin-bottom: 0; }

.box .subheading { margin-top: 0; }

.box p { margin-bottom: 8px; }

.box p:last-child { margin-bottom: 0; }

/* ── Card row — home page three-column ── */
.card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 8px 0 0;
}

.card {
  background: var(--light-gray);
  border-left: 4px solid var(--amber);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-family: Calibri, sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--navy);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.3;
}

.card p { font-size: 16px; margin: 0; }

.card-icon { flex-shrink: 0; }

@media (max-width: 820px) {
  .card-row { grid-template-columns: 1fr; }
}

/* ── Stats row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 8px 0 0;
}

.stat {
  background: var(--light-gray);
  border-left: 4px solid var(--amber);
  padding: 24px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-label {
  font-family: Calibri, sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.stat-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--amber);
  line-height: 1.2;
}

@media (max-width: 820px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* ── CTA block ── */
.cta-block {
  background: var(--light-gray);
  border-left: 4px solid var(--amber);
  padding: 28px 32px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.cta-block p {
  margin: 0;
  font-size: 18px;
  flex: 0 0 auto;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--amber);
  color: var(--white);
  font-family: Calibri, sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  padding: 12px 26px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border-radius: 3px;
}

.btn-primary:hover { background: #d4841e; }

.btn-secondary {
  background: transparent;
  color: var(--white);
  font-family: Calibri, sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid rgba(255,255,255,0.5);
  padding: 12px 26px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border-radius: 3px;
}

.btn-secondary:hover { border-color: var(--white); }

@media (max-width: 600px) {
  .cta-block { flex-direction: column; align-items: flex-start; }
}

/* ── Feature list — open, no boxes ── */
.feature-list { margin: 8px 0 0; }

.feature-list-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.feature-list-item:last-child { border-bottom: none; }

.feature-list-item .subheading { margin-top: 0; margin-bottom: 6px; }

.feature-list-item p { margin: 0; max-width: none; }

/* ── Two-column feature grid (How It Works) ── */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
}

.feature-grid .feature-list-item {
  border-bottom: 1px solid var(--border);
}

@media (max-width: 820px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ── Generic feature split — text block left, image right.
     Used where there are exactly two children (e.g. PACE on the
     Standards page). ── */
.feature-split {
  display: flex;
  align-items: center;
  gap: 56px;
}

.feature-split > * { flex: 1; min-width: 0; }

.feature-split-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 400px;
  margin: 0;
}

.feature-split-image {
  width: 100%;
  max-width: 367px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(27, 42, 74, 0.12);
}

.feature-split-media figcaption {
  margin-top: 12px;
  font-family: Calibri, sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber);
  text-align: center;
}

@media (max-width: 820px) {
  .feature-split { flex-direction: column; }
  .feature-split-media { margin-top: 28px; margin-bottom: 80px; flex: 0 0 auto; }
  .feature-split-image { margin-bottom: 0; }
  .standards-item:has(.feature-split) { padding-bottom: 8px; }
}

/* ── Ordered feature split — three stacked items + image, with
     explicit placement per breakpoint via named grid areas
     (Three Ways to Work). ── */
.feature-split-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  grid-template-areas:
    "qcw      image"
    "dash     image"
    "entity   image";
  gap: 0 56px;
  align-items: center;
}

.feature-split-grid .fs-qcw     { grid-area: qcw; }
.feature-split-grid .fs-dashboard { grid-area: dash; }
.feature-split-grid .fs-entity  { grid-area: entity; border-bottom: none; }
.feature-split-grid .fs-image   { grid-area: image; }

@media (max-width: 820px) {
  .feature-split-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "qcw"
      "image"
      "dash"
      "entity";
  }
  .feature-split-grid .fs-qcw { border-bottom: none; }
  .feature-split-grid .fs-image { margin: 24px 0 28px; }
}

/* Custom diagrams (not product screenshots) get a lighter frame */
.diagram-image {
  box-shadow: none;
  border: none;
}

/* ── Resource sections — box treatment ── */
.resource-section {
  background: var(--light-gray);
  border-left: 4px solid var(--amber);
  padding: 26px 28px;
  margin-bottom: 24px;
}

.resource-section:last-child { margin-bottom: 0; }

/* ── Side-by-side pair of resource boxes (EC/EM: Also Tracked) ── */
.resource-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.resource-pair .resource-section { margin-bottom: 0; }

@media (max-width: 820px) {
  .resource-pair { grid-template-columns: 1fr; }
}

.resource-section .subheading { margin-top: 0; font-size: 20px; }

.resource-tagline {
  font-size: 14px;
  font-style: italic;
  color: var(--amber);
  font-weight: 400;
  margin-bottom: 14px;
  opacity: 0.85;
}

/* ── Standards — open, ruled rows ── */
.standards-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.standards-item:first-child { padding-top: 8px; }

.standards-item:last-child { border-bottom: none; }

.standards-org {
  font-family: Calibri, sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.35;
}

/* ── Contact ── */
.contact-info {
  margin: 8px 0 32px;
}

.contact-info .subheading { margin-top: 0; margin-bottom: 6px; }

.contact-info a {
  color: var(--amber);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}

.form-preview {
  background: var(--light-gray);
  border-left: 4px solid var(--amber);
  padding: 26px 28px;
  margin: 8px 0 0;
}

.form-preview ul { list-style: none; padding: 0; }

.form-preview li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}

.form-preview li:last-child { border-bottom: none; }

/* ── Customer resources — two-column grid ── */
.resource-section-group { margin-bottom: 40px; }

.resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 820px) {
  .resource-grid { grid-template-columns: 1fr; }
}

.resource-box {
  background: var(--light-gray);
  border-left: 4px solid var(--amber);
  padding: 24px 28px;
  text-decoration: none;
  color: var(--dark-gray);
  display: block;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  line-height: 1.5;
}

.resource-box:hover {
  background: #e8ecf2;
  box-shadow: 0 4px 12px rgba(27, 42, 74, 0.12);
  transform: translateY(-2px);
}

.unpublished-badge {
  display: inline-block;
  background: var(--amber);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  margin-left: 10px;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════
   IMAGE & GRAPHIC PLACEHOLDERS
═══════════════════════════════════════════ */
.media {
  background: var(--light-gray);
  border: 2px dashed var(--border);
  border-left: 4px solid var(--amber);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 28px;
  margin: 8px 0 0;
  min-height: 200px;
}

.media svg { opacity: 0.5; margin-bottom: 16px; }

.media .media-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}

.media .media-desc {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  max-width: 360px;
  line-height: 1.6;
}

/* Hero image — full-width, taller */
.media-hero {
  min-height: 320px;
  margin-bottom: 40px;
}

/* Two-up media + text row */
.media-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  margin: 8px 0 0;
}

.media-split .media { margin: 0; height: 100%; }

@media (max-width: 680px) {
  .media-split { grid-template-columns: 1fr; }
}

/* Small inline thumbnail inside a resource box */
.media-thumb {
  min-height: 140px;
  margin-top: 16px;
}

/* ═══════════════════════════════════════════
   SITE FOOTER
═══════════════════════════════════════════ */
.site-footer {
  width: 100%;
  background: var(--navy);
  border-top: 3px solid var(--amber);
  color: var(--white);
  font-size: 12px;
  text-align: center;
  padding: 22px 32px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  box-sizing: border-box;
}

.site-footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.site-footer a:hover { color: var(--amber); }

.footer-legal {
  display: inline;
  font-size: 12px;
}

/* ═══════════════════════════════════════════
   PRINT
═══════════════════════════════════════════ */
@media print {
  .site-header, .site-footer { display: none; }
  .container { padding: 20px; }
  .cta-block { background: var(--light-gray) !important; }
  .cta-block p { color: var(--navy) !important; }
  .media { border: 1px solid var(--border); min-height: 120px; }
}
