/* ==========================================================================
   BlueHopper Installer Network — design tokens
   Palette matches BlueHopper's blue brand: deep navy for backgrounds,
   a vivid electric-blue accent for CTAs and highlights, teal reserved
   for "verified/complete" checkmarks. If you have BlueHopper's exact
   brand hex codes, this is the only place you need to change them —
   every selector below references these variables, nothing is hardcoded.
   ========================================================================== */
.bh-installer, .bh-archive, .bh-state {
  --navy-deep:  #071A34;
  --navy:       #0E2A52;
  --navy-mid:   #14396E;
  --accent:      #2E8CFF;
  --accent-dark: #1868D6;
  --teal:       #1F7A6C;
  --paper:      #EFF3FA;
  --white:      #FFFFFF;
  --ink:        #142238;
  --slate:      #55677E;
  --slate-light:#8598AE;
  --line:       #DCE4F0;
  --radius:     10px;

  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

.bh-installer *, .bh-archive *, .bh-state * { box-sizing: border-box; }

.bh-installer h1, .bh-installer h2, .bh-installer h3,
.bh-archive h1, .bh-archive h2,
.bh-state h1, .bh-state h2, .bh-state h3 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.15;
  color: var(--navy-deep);
  margin: 0 0 0.5em;
}

.bh-installer a { color: var(--navy-mid); }
.bh-installer :focus-visible,
.bh-archive :focus-visible,
.bh-state :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .bh-installer *, .bh-archive *, .bh-state * { animation: none !important; transition: none !important; }
}

.bh-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.bh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 6px;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.bh-btn:hover { transform: translateY(-1px); }
.bh-btn-primary { background: var(--accent); color: #fff; }
.bh-btn-primary:hover { background: var(--accent-dark); color: #fff; }
.bh-btn-outline { background: transparent; border-color: rgba(255,255,255,0.5); color: #fff; }
.bh-btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.bh-btn-block { width: 100%; }

/* ==========================================================================
   HERO — single-installer.php
   ========================================================================== */
.bh-hero {
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-mid) 100%);
  color: #fff;
  padding: 64px 0 56px;
}
.bh-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.bh-state-badge {
  display: inline-block;
  background: rgba(46, 140, 255, 0.16);
  border: 1px solid rgba(46, 140, 255, 0.55);
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 0.4px;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.bh-hero h1 {
  color: #fff;
  font-size: clamp(32px, 4.2vw, 50px);
  max-width: 15ch;
}
.bh-hero-sub {
  font-size: 18px;
  color: #C8D3DE;
  max-width: 46ch;
  margin-bottom: 28px;
}
.bh-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.bh-hero-note { font-size: 14px; color: #9AABBB; margin-top: 14px; }

/* "Breaker panel" stat grid — a nod to the trade instead of a generic card grid */
.bh-panel {
  background: var(--navy-deep);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 6px;
}
.bh-panel-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.bh-switch {
  border: 1px solid rgba(255,255,255,0.08);
  padding: 22px 18px;
  position: relative;
}
.bh-switch::before {
  content: "";
  position: absolute;
  left: 18px; top: 18px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 2px rgba(46,140,255,0.75);
}
.bh-switch-num {
  font-family: var(--font-head);
  font-size: 30px;
  color: #fff;
  margin: 14px 0 4px;
}
.bh-switch-label { font-size: 13.5px; color: #9AABBB; }

/* ---------- Trust bar ---------- */
.bh-trustbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.bh-trustbar-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 15px;
  color: var(--slate);
}
.bh-trustbar-row strong { color: var(--navy); }

/* ==========================================================================
   TWO-COLUMN LAYOUT
   ========================================================================== */
.bh-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  padding: 56px 0 72px;
  align-items: start;
}
.bh-main section { margin-bottom: 56px; }
.bh-main section:last-child { margin-bottom: 0; }
.bh-eyebrow-text { color: var(--slate); font-size: 15px; margin-bottom: 24px; max-width: 60ch; }

.bh-intro-copy { font-size: 17px; color: var(--ink); max-width: 68ch; }
.bh-intro-copy p { margin: 0 0 1em; }

/* ---------- Benefits: accent-border list, not a card grid ---------- */
.bh-benefits-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.bh-benefits-list li {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding-left: 20px;
}
.bh-benefit-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: 17px;
}
.bh-benefit-title { font-family: var(--font-head); font-size: 18px; color: var(--navy-deep); margin: 0 0 4px; }
.bh-benefit-copy { color: var(--slate); font-size: 15px; margin: 0; }

/* ---------- Process: connected steps (a real sequence) ---------- */
.bh-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.bh-steps::before {
  content: "";
  position: absolute;
  top: 22px; left: 6%; right: 6%;
  height: 2px;
  background: var(--line);
}
.bh-step { position: relative; padding-right: 16px; }
.bh-step-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-head);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  position: relative; z-index: 1;
}
.bh-step-title { font-family: var(--font-head); font-size: 17px; margin-bottom: 6px; }
.bh-step-copy { color: var(--slate); font-size: 14.5px; }

/* ---------- Requirements checklist ---------- */
.bh-req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
  list-style: none;
  margin: 0; padding: 0;
}
.bh-req-grid li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; }
.bh-req-grid li::before {
  content: "✓";
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
  border: 1.5px solid var(--teal);
  border-radius: 50%;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  margin-top: 2px;
}

/* ---------- Testimonials ---------- */
.bh-testimonial {
  border-left: 3px solid var(--navy);
  padding: 4px 0 4px 22px;
  margin-bottom: 28px;
}
.bh-testimonial p { font-size: 17px; color: var(--ink); margin: 0 0 10px; }
.bh-testimonial-name { font-family: var(--font-head); font-size: 14.5px; color: var(--navy); }
.bh-testimonial-role { font-size: 13.5px; color: var(--slate); }

/* ---------- FAQ (native accordion, no JS needed) ---------- */
.bh-faq-item {
  border-bottom: 1px solid var(--line);
}
.bh-faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 30px 18px 0;
  font-family: var(--font-head);
  font-size: 16.5px;
  color: var(--navy-deep);
  position: relative;
}
.bh-faq-item summary::-webkit-details-marker { display: none; }
.bh-faq-item summary::after {
  content: "+";
  position: absolute; right: 0; top: 16px;
  font-size: 22px; color: var(--accent-dark);
}
.bh-faq-item[open] summary::after { content: "–"; }
.bh-faq-item p { color: var(--slate); padding: 0 0 20px; margin: 0; max-width: 65ch; }

/* ---------- Final CTA banner ---------- */
.bh-final-cta {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 40px;
  text-align: left;
  color: #fff;
}
.bh-final-cta h2 { color: #fff; }
.bh-final-cta p { color: #C8D3DE; margin-bottom: 22px; max-width: 50ch; }

/* ==========================================================================
   APPLICATION FORM (sidebar card)
   ========================================================================== */
.bh-sidebar { position: relative; }
.bh-form-card {
  position: sticky;
  top: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 8px 24px rgba(16, 35, 58, 0.06);
}
.bh-form-card h3 { font-size: 21px; }
.bh-form-card .bh-form-sub { color: var(--slate); font-size: 14.5px; margin-bottom: 20px; }

.bh-field { margin-bottom: 14px; }
.bh-field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--navy); margin-bottom: 5px; }
.bh-field input,
.bh-field select,
.bh-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--paper);
}
.bh-field input:focus,
.bh-field select:focus,
.bh-field textarea:focus { outline: 2px solid var(--navy-mid); background: #fff; }
.bh-field textarea { resize: vertical; min-height: 76px; }
.bh-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bh-website-trap { position: absolute; left: -9999px; opacity: 0; }
.bh-form-legal { font-size: 12.5px; color: var(--slate-light); margin-top: 12px; }
.bh-form-msg { font-size: 14.5px; padding: 12px 14px; border-radius: 6px; margin-bottom: 14px; display: none; }
.bh-form-msg.is-success { display: block; background: rgba(31,122,108,0.1); color: var(--teal); }
.bh-form-msg.is-error { display: block; background: rgba(217,74,55,0.1); color: #B23A28; }

/* ---------- WPForms embed inside the sticky card ---------- */
.bh-form-card .wpforms-container { margin: 0 !important; font-family: var(--font-body) !important; }
.bh-form-card .wpforms-field { padding: 0 0 14px !important; }
.bh-form-card .wpforms-field-label {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--navy) !important;
  font-family: var(--font-body) !important;
}
.bh-form-card input[type="text"],
.bh-form-card input[type="email"],
.bh-form-card input[type="tel"],
.bh-form-card input[type="number"],
.bh-form-card select,
.bh-form-card textarea {
  border: 1px solid var(--line) !important;
  border-radius: 6px !important;
  background: var(--paper) !important;
  font-family: var(--font-body) !important;
  font-size: 14.5px !important;
}
.bh-form-card .wpforms-submit-container button,
.bh-form-card button[type="submit"] {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  font-family: var(--font-head) !important;
  font-weight: 600 !important;
  width: 100%;
  border-radius: 6px !important;
}
.bh-form-card .wpforms-submit-container button:hover,
.bh-form-card button[type="submit"]:hover {
  background: var(--accent-dark) !important;
  border-color: var(--accent-dark) !important;
}

/* Mobile sticky apply bar */
.bh-mobile-apply-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--navy-deep);
  padding: 12px 16px;
  z-index: 60;
  box-shadow: 0 -6px 18px rgba(0,0,0,0.2);
}

/* ==========================================================================
   ARCHIVE — archive-installer.php  (grid of states)
   ========================================================================== */
.bh-archive-hero {
  background: linear-gradient(160deg, var(--navy-deep), var(--navy));
  color: #fff;
  padding: 60px 0 44px;
  text-align: left;
}
.bh-archive-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 44px); max-width: 22ch; }
.bh-archive-hero p { color: #C8D3DE; font-size: 17px; max-width: 55ch; }

.bh-state-search {
  margin: 28px 0 0;
  max-width: 420px;
}
.bh-state-search input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 6px;
  border: none;
  font-size: 15px;
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.bh-state-search input::placeholder { color: #B7C3CE; }

.bh-state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  padding: 48px 0 72px;
}
.bh-state-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.bh-state-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.bh-state-card-name { font-family: var(--font-head); font-size: 19px; color: var(--navy-deep); margin-bottom: 4px; }
.bh-state-card-count { font-size: 13.5px; color: var(--slate); }
.bh-state-card-arrow { color: var(--accent-dark); font-family: var(--font-head); font-size: 14px; margin-top: 12px; display: block; }
.bh-empty-state { padding: 60px 0; text-align: center; color: var(--slate); }

/* ==========================================================================
   TAXONOMY — taxonomy-installer_category.php (single state hub)
   ========================================================================== */
.bh-state-hero {
  background: linear-gradient(160deg, var(--navy-deep), var(--navy));
  color: #fff;
  padding: 56px 0 40px;
}
.bh-state-hero h1 { color: #fff; font-size: clamp(28px, 3.8vw, 42px); }
.bh-state-hero p { color: #C8D3DE; max-width: 60ch; font-size: 16.5px; }
.bh-state-crumb { color: var(--accent); font-size: 14px; margin-bottom: 12px; }
.bh-state-crumb a { color: var(--accent); text-decoration: none; }

.bh-state-posts {
  padding: 48px 0 72px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.bh-post-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.bh-post-card:hover { border-color: var(--accent); }
.bh-post-card img { width: 100%; height: 150px; object-fit: cover; }
.bh-post-card-body { padding: 20px; }
.bh-post-card-title { font-family: var(--font-head); font-size: 18px; color: var(--navy-deep); margin-bottom: 8px; }
.bh-post-card-excerpt { font-size: 14.5px; color: var(--slate); margin-bottom: 14px; }
.bh-post-card-cta { color: var(--accent-dark); font-family: var(--font-head); font-size: 14px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 920px) {
  .bh-hero-grid { grid-template-columns: 1fr; }
  .bh-layout { grid-template-columns: 1fr; }
  .bh-sidebar { order: 2; }
  .bh-form-card { position: static; }
  .bh-steps { grid-template-columns: 1fr 1fr; row-gap: 28px; }
  .bh-steps::before { display: none; }
  .bh-req-grid { grid-template-columns: 1fr; }
  .bh-mobile-apply-bar { display: block; }
  body { padding-bottom: 64px; } /* room for the fixed apply bar */
}

@media (max-width: 560px) {
  .bh-panel-row { grid-template-columns: 1fr 1fr; }
  .bh-steps { grid-template-columns: 1fr 1fr; }
  .bh-field-row { grid-template-columns: 1fr; }
}
