/* ============================================================
   CTR Automotive — Shared Component Styles
   StickyHeader, LeadForm, TrustBadges + Contrast Fixes
   ============================================================ */

/* ---- CONTRAST OVERRIDES — WCAG AA compliant --------------- */
/* Override --text-light (#a1a1aa) which fails WCAG on white */
:root {
  --text-light: #71717a !important;  /* zinc-500 — 4.6:1 on white */
}

/* Light-bg text: ensure ≥ 4.5:1 contrast on white */
.form-disclaimer,
.hero-form-wrap .form-disclaimer {
  color: #52525b !important;  /* zinc-600 — 7:1 on white */
}
.review-author span {
  color: #71717a !important;  /* zinc-500 — 4.6:1 on white */
}
.contact-card-label {
  color: #71717a !important;
}
.contact-detail-label {
  color: #71717a !important;
}
.contact-card-sub {
  color: #52525b !important;
}
.section-intro {
  color: #3f3f46 !important;  /* zinc-700 */
}
.body-text {
  color: #3f3f46 !important;
}
.trust-item {
  color: #3f3f46 !important;
}

/* Dark-bg text: ensure ≥ 4.5:1 contrast on #18181b */
.header-logo-text span {
  color: rgba(255,255,255,.70) !important;  /* ~10:1 */
}
.header-hours {
  color: rgba(255,255,255,.70) !important;
}
.section-label-accent {
  color: rgba(255,255,255,.70) !important;
}
.trust-lbl {
  color: rgba(255,255,255,.75) !important;
}
.stat-label {
  color: rgba(255,255,255,.70) !important;
}
.hero-desc {
  color: rgba(255,255,255,.82) !important;
}
.section-intro-light {
  color: rgba(255,255,255,.78) !important;
}
.body-text-light {
  color: rgba(255,255,255,.78) !important;
}
.faq-panel p {
  color: rgba(255,255,255,.78) !important;
}
.faq-cta p {
  color: rgba(255,255,255,.78) !important;
}
.faq-chevron,
.faq-btn svg.faq-chevron {
  color: rgba(255,255,255,.65) !important;
}
.accordion-btn .accordion-chevron {
  color: rgba(255,255,255,.65) !important;
}
.services-cta p {
  color: rgba(255,255,255,.75) !important;
}
.about-callout p,
.about-highlight p {
  color: rgba(255,255,255,.78) !important;
}
.footer-brand p,
.footer-contact p {
  color: rgba(255,255,255,.65) !important;
}
.footer-contact a {
  color: rgba(255,255,255,.75) !important;
}
.footer-bottom p,
.footer-links a {
  color: rgba(255,255,255,.60) !important;  /* ~6:1 on dark */
}
.footer-links a:hover {
  color: rgba(255,255,255,.80) !important;
}
.floating-bar-phone {
  color: rgba(255,255,255,.70) !important;
}
.map-info-bar .map-info-item strong {
  color: rgba(255,255,255,.70) !important;  /* dark bg, needs light text */
}
.map-info-item a {
  color: rgba(255,255,255,.78) !important;
}
.cta-banner p {
  color: rgba(255,255,255,.82) !important;
}

/* ---- STICKY HEADER ---------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h, 68px);
  background: var(--dark, #18181b);
  border-bottom: 1px solid var(--dark-border, #3f3f46);
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.header-logo img { width: 90px; height: auto; }
.header-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.header-logo-text strong {
  font-family: var(--font-display, 'Work Sans', sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}
.header-logo-text span {
  font-size: 0.72rem;
  color: rgba(255,255,255,.70);
  font-weight: 500;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-header-call {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--red, #E31837);
  color: #fff;
  font-family: var(--font-display, 'Work Sans', sans-serif);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0 18px;
  height: 40px;
  border-radius: var(--radius-sm, 8px);
  transition: background 0.22s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(227,24,55,.25);
}
.btn-header-call:hover { background: var(--red-hover, #c91530); }

.btn-header-estimate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #fff;
  font-family: var(--font-display, 'Work Sans', sans-serif);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0 18px;
  height: 40px;
  border-radius: var(--radius-sm, 8px);
  border: 2px solid rgba(255,255,255,.40);
  transition: background 0.22s ease, border-color 0.22s ease;
  white-space: nowrap;
}
.btn-header-estimate:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.70);
}

/* ---- HERO TRUST BADGES ------------------------------------ */
.hero-trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 32px;
}
.hero-trust-item {
  text-align: center;
  padding: 14px 8px 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-sm, 8px);
  backdrop-filter: blur(4px);
}
.trust-val {
  font-family: var(--font-display, 'Work Sans', sans-serif);
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  display: block;
  line-height: 1.15;
}
.trust-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  display: block;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- HERO FORM (above-the-fold) --------------------------- */
.hero-form-wrap {
  background: #fff;
  border-radius: var(--radius, 12px);
  padding: 28px 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.30), 0 0 0 1px rgba(255,255,255,.10);
}
.hero-form-header {
  text-align: center;
  margin-bottom: 20px;
}
.hero-form-header h3 {
  font-family: var(--font-display, 'Work Sans', sans-serif);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark, #18181b);
  margin-bottom: 4px;
}
.hero-form-header p {
  font-size: 0.88rem;
  color: #52525b;
}
.hero-form-wrap .contact-form { display: flex; flex-direction: column; gap: 14px; }
.hero-form-wrap .form-group { display: flex; flex-direction: column; gap: 5px; }
.hero-form-wrap .form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-dark, #18181b); }
.hero-form-wrap .form-group input,
.hero-form-wrap .form-group textarea,
.hero-form-wrap .form-group select {
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 0.9rem;
  color: var(--text-dark, #18181b);
  background: #fff;
  border: 1.5px solid var(--light-border, #e4e4e7);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 12px;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  width: 100%;
}
.hero-form-wrap .form-group input:focus,
.hero-form-wrap .form-group textarea:focus,
.hero-form-wrap .form-group select:focus {
  outline: none;
  border-color: var(--red, #E31837);
  box-shadow: 0 0 0 3px rgba(227,24,55,.12);
}
.hero-form-wrap .form-group input.invalid,
.hero-form-wrap .form-group textarea.invalid { border-color: var(--red, #E31837); }

/* SMS consent */
.sms-consent-group {
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 10px !important;
}
.sms-consent-group input[type="checkbox"] {
  margin-top: 3px;
  width: 18px !important;
  height: 18px;
  accent-color: #E31837;
  flex-shrink: 0;
  cursor: pointer;
}
.sms-consent-group label {
  font-size: 0.72rem !important;
  color: #52525b !important;
  line-height: 1.45 !important;
  cursor: pointer;
}

.hero-form-wrap .form-disclaimer {
  font-size: 0.72rem;
  color: #52525b;
  text-align: center;
  line-height: 1.45;
  margin-top: 4px;
}
.hero-form-wrap .form-disclaimer a { color: var(--red, #E31837); text-decoration: underline; }

/* Form success / error */
.form-success {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm, 8px);
  padding: 16px;
  color: #166534;
}
.form-success strong { display: block; font-weight: 700; margin-bottom: 4px; }
.form-success p { font-size: 0.88rem; line-height: 1.5; }
.form-success a { color: var(--red, #E31837); font-weight: 600; text-decoration: underline; }

.form-error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm, 8px);
  padding: 16px;
  color: #991b1b;
}
.form-error strong { display: block; font-weight: 700; margin-bottom: 4px; }
.form-error p { font-size: 0.88rem; line-height: 1.5; }
.form-error a { color: var(--red, #E31837); font-weight: 600; text-decoration: underline; }

/* ---- MOBILE RESPONSIVE ------------------------------------ */
@media (max-width: 900px) {
  .hero-trust-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .hero-form-wrap { padding: 24px 20px 20px; }
}

@media (max-width: 768px) {
  .header-right { gap: 8px; }
  .btn-header-estimate {
    font-size: 0.78rem;
    padding: 0 12px;
    height: 36px;
  }
  .btn-header-call {
    font-size: 0;
    padding: 0 10px;
    height: 36px;
    gap: 0;
  }
  .btn-header-call svg { width: 18px; height: 18px; }
  .header-logo img { width: 70px; }
  .header-logo-text strong { font-size: 0.85rem; }
  .hero-form-wrap { max-width: 480px; }
}

@media (max-width: 480px) {
  .btn-header-estimate {
    font-size: 0.72rem;
    padding: 0 10px;
    height: 34px;
  }
}
