/* CarMed — Red + Dark Navy Theme */
:root {
  --red: #e63946;
  --red-dark: #c1121f;
  --navy: #0d1b2a;
  --navy-mid: #1b2a3b;
  --navy-light: #243447;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-500: #adb5bd;
  --gray-700: #495057;
  --text: #e0e6ed;
  --text-muted: #8fa3b1;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --radius: 12px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--navy);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

img { max-width: 100%; }

/* ── HEADER ── */
header {
  background: var(--navy);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}
.logo span { color: var(--red); }
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
nav { display: flex; gap: 8px; align-items: center; }
nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
}
nav a:hover { color: var(--white); background: var(--navy-light); }
.btn-nav {
  background: var(--red) !important;
  color: var(--white) !important;
  font-weight: 600;
  padding: 8px 18px !important;
  border-radius: 8px !important;
}
.btn-nav:hover { background: var(--red-dark) !important; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, #1a0a0e 100%);
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(230,57,70,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(230,57,70,0.15);
  border: 1px solid rgba(230,57,70,0.3);
  color: #ff8589;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -1px;
}
.hero h1 em {
  color: var(--red);
  font-style: normal;
}
.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 36px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover { background: var(--red-dark); color: var(--white); transform: translateY(-1px); }
.btn-secondary {
  background: var(--navy-light);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--navy-mid); color: var(--white); }

.hero-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-top: 48px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--white);
  display: block;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── HOW IT WORKS ── */
.how-it-works {
  padding: 72px 24px;
  background: var(--navy-mid);
}
.section-label {
  text-align: center;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 48px;
  letter-spacing: -0.5px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.step {
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  position: relative;
  transition: transform 0.2s;
}
.step:hover { transform: translateY(-3px); }
.step-num {
  width: 40px;
  height: 40px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  margin: 0 auto 16px;
}
.step-icon { font-size: 2rem; margin-bottom: 12px; display: block; }
.step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.step p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }

/* ── DIAGNOSIS TOOL ── */
.tool-section {
  padding: 72px 24px;
  background: var(--navy);
}
.tool-container {
  max-width: 720px;
  margin: 0 auto;
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tool-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.tool-tab {
  flex: 1;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tool-tab.active {
  color: var(--white);
  border-bottom-color: var(--red);
  background: rgba(230,57,70,0.05);
}
.tool-tab:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.03); }

.tool-pane { display: none; padding: 28px; }
.tool-pane.active { display: block; }

.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input, .form-textarea {
  width: 100%;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.95rem;
  padding: 12px 16px;
  transition: border-color 0.2s;
  outline: none;
  font-family: inherit;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(230,57,70,0.1);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 100px; resize: vertical; }

.vin-row { display: flex; gap: 12px; }
.vin-row .form-input { flex: 1; }

.vehicle-summary {
  background: var(--navy);
  border: 1px solid rgba(230,57,70,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 10px;
}
.vehicle-summary.visible { display: flex; }
.vehicle-summary-icon { font-size: 1.2rem; }
.vehicle-summary-text { font-size: 0.9rem; color: var(--white); font-weight: 600; }

.btn-full { width: 100%; justify-content: center; padding: 14px; font-size: 1rem; }
.btn-loading { opacity: 0.7; cursor: not-allowed; pointer-events: none; }

.skip-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.skip-link a { color: var(--red); }

/* ── RESULTS ── */
#results-panel {
  display: none;
  padding: 0 28px 28px;
}
#results-panel.visible { display: block; }

.results-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 24px;
}

.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.urgency-critical { background: rgba(230,57,70,0.2); color: #ff6b6b; border: 1px solid rgba(230,57,70,0.4); }
.urgency-high { background: rgba(255,140,0,0.2); color: #ffaa40; border: 1px solid rgba(255,140,0,0.4); }
.urgency-medium { background: rgba(255,200,0,0.15); color: #ffd040; border: 1px solid rgba(255,200,0,0.3); }
.urgency-low { background: rgba(40,167,69,0.15); color: #66bb6a; border: 1px solid rgba(40,167,69,0.3); }

.results-summary {
  font-size: 1.05rem;
  color: var(--white);
  line-height: 1.6;
  margin-bottom: 24px;
  font-weight: 500;
}

.results-section { margin-bottom: 24px; }
.results-section h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.cause-card {
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.cause-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.cause-name { font-weight: 700; color: var(--white); font-size: 0.95rem; }
.cause-meta { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.likelihood-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.likelihood-high { background: rgba(230,57,70,0.2); color: #ff6b6b; }
.likelihood-medium { background: rgba(255,140,0,0.2); color: #ffaa40; }
.likelihood-low { background: rgba(255,255,255,0.1); color: var(--text-muted); }
.cause-cost { font-size: 0.82rem; color: #66bb6a; font-weight: 600; }
.cause-desc { font-size: 0.87rem; color: var(--text-muted); line-height: 1.5; }

.safety-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.safety-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}
.safety-list li::before {
  content: '⚠️';
  flex-shrink: 0;
}

.action-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.action-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.action-num {
  width: 24px;
  height: 24px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}
.action-text { font-size: 0.9rem; color: var(--text); line-height: 1.5; }
.diy-badge {
  font-size: 0.72rem;
  background: rgba(102,187,106,0.15);
  color: #66bb6a;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.drive-status {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--navy);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border: 1px solid var(--border);
}
.drive-icon { font-size: 1.4rem; }
.drive-text { font-size: 0.95rem; color: var(--white); font-weight: 600; }
.drive-sub { font-size: 0.82rem; color: var(--text-muted); }

.results-cta {
  background: linear-gradient(135deg, rgba(230,57,70,0.1), rgba(230,57,70,0.05));
  border: 1px solid rgba(230,57,70,0.25);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  margin-top: 20px;
}
.results-cta p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 12px; }
.results-cta strong { color: var(--white); }

/* ── TRUST / FEATURES ── */
.features-section {
  padding: 72px 24px;
  background: var(--navy-mid);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.feature-card {
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(230,57,70,0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.feature-card p { font-size: 0.87rem; color: var(--text-muted); line-height: 1.6; }

/* ── LOCAL SECTION ── */
.local-section {
  padding: 72px 24px;
  background: var(--navy);
}
.local-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.local-inner p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.local-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(230,57,70,0.1);
  border: 1px solid rgba(230,57,70,0.25);
  color: #ff8589;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

/* ── FAQ ── */
.faq-section {
  padding: 72px 24px;
  background: var(--navy-mid);
}
.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: inherit;
}
.faq-question:hover { background: rgba(255,255,255,0.03); }
.faq-chevron { transition: transform 0.2s; flex-shrink: 0; color: var(--red); font-size: 1.1rem; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 20px 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* ── FOOTER ── */
footer {
  background: var(--navy);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}
.footer-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 8px;
}
.footer-logo span { color: var(--red); }
footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ── SPINNER ── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ERROR/SUCCESS MESSAGES ── */
.msg {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: none;
}
.msg.visible { display: block; }
.msg-error { background: rgba(230,57,70,0.12); border: 1px solid rgba(230,57,70,0.3); color: #ff8589; }
.msg-success { background: rgba(40,167,69,0.12); border: 1px solid rgba(40,167,69,0.3); color: #66bb6a; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .header-inner { height: 56px; }
  nav a:not(.btn-nav) { display: none; }
  .hero { padding: 48px 20px 40px; }
  .hero-stats { gap: 20px; }
  .tool-pane { padding: 20px; }
  #results-panel { padding: 0 20px 20px; }
  .vin-row { flex-direction: column; }
}

/* ── MECHANIC DIRECTORY ── */
.mechanic-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 24px;
}
.shops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.shop-loading { grid-column: 1/-1; text-align: center; color: var(--text-muted); padding: 32px; }
.shop-card {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, transform 0.15s;
}
.shop-card:hover { border-color: rgba(230,57,70,0.4); transform: translateY(-2px); }
.shop-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.shop-name { font-size: 1.05rem; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.shop-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shop-stars { color: #f9c74f; font-size: 0.85rem; }
.shop-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}
.badge-mobile { background: rgba(79,195,247,0.15); color: #4fc3f7; border: 1px solid rgba(79,195,247,0.3); }
.badge-shop { background: rgba(129,199,132,0.15); color: #81c784; border: 1px solid rgba(129,199,132,0.3); }
.shop-specialty { color: var(--text-muted); font-size: 0.875rem; flex: 1; }
.shop-quote-btn { margin-top: auto; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 520px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
}
.modal-close:hover { background: var(--navy-light); color: var(--white); }
.modal-box h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 8px; padding-right: 32px; }

/* ── FORM ROW ── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }


/* ── PRICING ── */
.pricing-section {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 0;
}
.pricing-card {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pricing-card-featured {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red), 0 8px 32px rgba(230,57,70,0.15);
}
.pricing-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(143,163,177,0.12);
  color: var(--text-muted);
  width: fit-content;
}
.pricing-badge-pro {
  background: rgba(230,57,70,0.15);
  color: var(--red);
}
.pricing-price {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}
.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}
.pricing-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-top: -8px;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.pricing-features li {
  font-size: 0.9rem;
  color: var(--text);
}
