:root {
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --text: #1f2937;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f3f4f6;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* Mobile-first base: narrow-viewport styles are the default; larger
   viewports get progressively enhanced below via min-width queries. */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* Header — stacked on mobile, single row from 640px up */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary-dark);
  text-decoration: none;
}

.header-inner nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  order: 3;
}

.header-inner nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.1rem;
}

.header-inner nav a.active,
.header-inner nav a:hover {
  color: var(--primary);
}

.phone-cta {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  font-size: 1.05rem;
}

@media (min-width: 640px) {
  .container {
    padding: 2rem 1.5rem;
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
  }

  .brand {
    font-size: 1.25rem;
  }

  .header-inner nav {
    order: initial;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
  }
}

/* Hero */
.hero {
  background: var(--primary-dark);
  color: white;
  text-align: center;
}

.hero h1 {
  font-size: 1.6rem;
  margin-top: 0;
}

.hero p {
  color: #dbeafe;
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 2rem;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  margin-top: 0.5rem;
}

.btn:hover {
  background: var(--primary-dark);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  background: var(--bg-alt);
}

.card h3 {
  margin-top: 0;
}

/* Trust list */
.trust-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.trust-list li {
  background: var(--bg-alt);
  border-radius: 6px;
  padding: 0.75rem 1rem;
}

/* Services */
.service {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.service:last-child {
  border-bottom: none;
}

/* Service areas */
.area-list {
  list-style: none;
  padding: 0;
  column-count: 1;
  column-gap: 1.5rem;
}

.area-list li {
  break-inside: avoid;
  margin-bottom: 0.5rem;
}

.area-list a {
  text-decoration: underline;
}

.area-list a:hover {
  color: var(--primary);
}

@media (min-width: 640px) {
  .area-list {
    column-count: 3;
  }
}

/* ZIP badge on service-area detail pages */
.zip-badge {
  display: inline-block;
  background: var(--bg-alt);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* Breadcrumb — collapsed on mobile to save vertical space above the fold,
   full trail restored once there's room */
.breadcrumb {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  white-space: nowrap;
  overflow-x: auto;
}

.breadcrumb .crumb-home {
  display: none;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: underline;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .sep {
  color: var(--muted);
}

@media (min-width: 480px) {
  .breadcrumb {
    font-size: 0.9rem;
    gap: 0.4rem;
    margin-bottom: 1rem;
  }

  .breadcrumb .crumb-home {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }
}

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.faq-item h2 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.faq-item p {
  margin-bottom: 0;
}

/* Contact */
.contact-info p {
  margin: 0.4rem 0;
}

/* CTA section */
.cta-section {
  text-align: center;
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  margin: 2rem 0;
}

/* Page layout — content + optional sidebar */
.page-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.page-content {
  min-width: 0;
}

@media (min-width: 768px) {
  .page-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    align-items: start;
    gap: 2.5rem;
  }

  .page-layout.no-sidebar {
    display: block;
  }
}

/* Sidebar contact form */
.sidebar-form-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  position: sticky;
  top: 1.5rem;
}

.sidebar-form-box h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.sidebar-form-box form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-form-box label {
  font-weight: 600;
  font-size: 0.9rem;
}

.sidebar-form-box input,
.sidebar-form-box textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

.sidebar-form-box .btn {
  border: none;
  cursor: pointer;
  margin-top: 0.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 2rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer a {
  color: var(--muted);
  text-decoration: underline;
}

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