/* MD-Shield Directory — Self-Contained Stylesheet */
/* Fonts: loaded from Google Fonts CDN. Fallbacks are safe for offline use. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #0f2240;
  --navy-mid:   #1a3a5c;
  --navy-light: #2a5298;
  --blue-tint:  #e8f0fb;
  --blue-pale:  #f0f5ff;
  --white:      #ffffff;
  --off-white:  #f8f9fc;
  --border:     #dde3ef;
  --border-mid: #c4cfdf;
  --text-1:     #0f2240;
  --text-2:     #4a5568;
  --text-3:     #8896ab;
  --green:      #16a34a;
  --green-bg:   #dcfce7;
  --green-text: #14532d;
  --amber:      #d97706;
  --amber-bg:   #fef3c7;
  --amber-text: #78350f;
  --red:        #dc2626;
  --red-bg:     #fee2e2;
  --red-text:   #7f1d1d;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --shadow-sm:  0 1px 3px rgba(15,34,64,0.08);
  --shadow-md:  0 4px 12px rgba(15,34,64,0.10);
  font-size: 16px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--off-white);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-light); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; color: var(--navy); }
h1 { font-size: 1.875rem; }
h2 { font-size: 1.25rem; margin-bottom: 0.75rem; }
h3 { font-size: 1rem; }
p  { color: var(--text-2); }
code, .mono { font-family: 'DM Mono', monospace; font-size: 0.8125rem; }

/* ─── Layout ─── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 1.25rem; }

/* ─── Site Header / Nav ─── */
.site-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 100;
}
.site-nav {
  display: flex; align-items: center; gap: 1.5rem;
  height: 56px; padding: 0 1.25rem;
  max-width: 1100px; margin: 0 auto;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 600; font-size: 0.9375rem;
  white-space: nowrap; text-decoration: none;
}
.logo-shield {
  width: 28px; height: 28px; background: var(--navy-light);
  border-radius: 6px 6px 12px 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
}
.site-logo:hover { text-decoration: none; }
.nav-items { display: flex; gap: 1.25rem; margin-left: auto; }
.nav-items a {
  color: rgba(255,255,255,0.72); font-size: 0.875rem; font-weight: 500;
  transition: color 0.15s;
}
.nav-items a:hover { color: #fff; text-decoration: none; }
.nav-items a.active { color: #fff; }

/* ─── Breadcrumb ─── */
.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.625rem 1.25rem;
}
.breadcrumb ol {
  list-style: none; display: flex; flex-wrap: wrap;
  gap: 0.25rem; align-items: center;
  max-width: 1100px; margin: 0 auto;
  font-size: 0.8125rem; color: var(--text-3);
}
.breadcrumb li + li::before { content: "›"; margin-right: 0.25rem; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb li:last-child { color: var(--text-1); font-weight: 500; }

/* ─── Hero ─── */
.hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 1.25rem 2rem;
}
.hero-inner { max-width: 1100px; margin: 0 auto; }
.hero-tag {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--navy-light);
  margin-bottom: 0.5rem;
}
.hero h1 { font-size: 2rem; margin-bottom: 0.625rem; }
.hero .lead { font-size: 1rem; color: var(--text-2); max-width: 540px; }
.hero-stats {
  display: flex; gap: 2rem; margin-top: 1.5rem; flex-wrap: wrap;
}
.stat-block { }
.stat-block strong { display: block; font-size: 1.5rem; color: var(--navy); }
.stat-block span { font-size: 0.8125rem; color: var(--text-3); }

/* ─── Cards & Grid ─── */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 0.75rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 1rem; }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: var(--border-mid); box-shadow: var(--shadow-sm); }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover { text-decoration: none; }

/* Contractor card */
.c-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; gap: 0.5rem; }
.c-name { font-size: 0.9375rem; font-weight: 600; color: var(--navy); line-height: 1.4; }
.c-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.875rem; font-size: 0.8125rem; color: var(--text-3); margin-bottom: 0.625rem; }
.c-license { font-family: 'DM Mono', monospace; font-size: 0.75rem; color: var(--text-3); margin-bottom: 0.75rem; }
.c-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.c-rating { font-size: 0.875rem; font-weight: 600; color: var(--navy); }
.c-rating-sub { font-weight: 400; font-size: 0.75rem; color: var(--text-3); }
.c-phone { font-size: 0.8125rem; color: var(--navy-light); }

/* Category card */
.cat-card { text-align: center; padding: 1.25rem 1rem; cursor: pointer; }
.cat-icon { font-size: 1.75rem; margin-bottom: 0.375rem; }
.cat-label { font-size: 0.875rem; font-weight: 600; color: var(--navy); margin-bottom: 0.25rem; }
.cat-count { font-size: 0.75rem; color: var(--text-3); }
.cat-card:hover { border-color: var(--navy-light); }

/* ─── Status Badges ─── */
.badge {
  display: inline-block; font-size: 0.6875rem; font-weight: 600;
  padding: 3px 9px; border-radius: 20px;
  letter-spacing: 0.02em; white-space: nowrap; flex-shrink: 0;
}
.badge-active  { background: var(--green-bg);  color: var(--green-text); }
.badge-pending { background: var(--amber-bg);  color: var(--amber-text); }
.badge-expired { background: var(--red-bg);    color: var(--red-text); }

/* ─── Detail Page ─── */
.detail-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2rem 1.25rem 1.5rem;
}
.detail-hero-inner { max-width: 800px; margin: 0 auto; }
.detail-name { font-size: 1.625rem; margin-bottom: 0.375rem; }
.detail-sub { font-size: 1rem; color: var(--text-2); margin-bottom: 0.875rem; }
.detail-contact { font-size: 1rem; font-weight: 500; color: var(--navy-light); }

.detail-main { max-width: 800px; margin: 0 auto; padding: 1.5rem 1.25rem; }

.detail-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.375rem 1.5rem;
  margin-bottom: 1rem;
}
.detail-section h2 { font-size: 0.9375rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; font-weight: 600; }

.fact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem;
}
.fact-item dt { font-size: 0.75rem; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }
.fact-item dd { font-size: 0.9375rem; font-weight: 600; color: var(--navy); }
.fact-item dd.mono { font-family: 'DM Mono', monospace; font-size: 0.8125rem; }
.fact-item dd.status-active  { color: var(--green); }
.fact-item dd.status-pending { color: var(--amber); }
.fact-item dd.status-expired { color: var(--red); }

.verify-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 1rem; font-size: 0.8125rem; font-weight: 500;
  color: var(--navy-light); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.verify-link:hover { background: var(--blue-tint); text-decoration: none; }

/* ─── Status Banner ─── */
.status-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem; font-weight: 500;
  margin-bottom: 1rem;
}
.status-banner-active  { background: var(--green-bg);  color: var(--green-text); border: 1px solid #bbf7d0; }
.status-banner-pending { background: var(--amber-bg);  color: var(--amber-text); border: 1px solid #fde68a; }
.status-banner-expired { background: var(--red-bg);    color: var(--red-text);   border: 1px solid #fecaca; }

/* ─── FAQ ─── */
.faq-list { display: flex; flex-direction: column; gap: 0.625rem; }
details.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
details.faq-item summary {
  padding: 0.875rem 1.125rem;
  font-size: 0.9375rem; font-weight: 500; color: var(--navy);
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--white);
  transition: background 0.15s;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+"; font-size: 1.125rem; font-weight: 400;
  color: var(--text-3); flex-shrink: 0; margin-left: 1rem;
}
details.faq-item[open] summary::after { content: "−"; }
details.faq-item summary:hover { background: var(--off-white); }
details.faq-item .faq-body {
  padding: 0 1.125rem 0.875rem;
  font-size: 0.875rem; color: var(--text-2); line-height: 1.7;
  border-top: 1px solid var(--border); background: var(--off-white);
}

/* ─── Related Links ─── */
.related-list { display: flex; flex-direction: column; gap: 0.5rem; }
.related-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.625rem 0.875rem;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: border-color 0.15s;
}
.related-item:hover { border-color: var(--border-mid); }
.related-item a { font-weight: 500; color: var(--navy); }
.related-item-meta { font-size: 0.75rem; color: var(--text-3); }

/* ─── CTA ─── */
.cta-section {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.75rem;
  margin-bottom: 1rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.cta-section h2 { color: #fff; font-size: 1.125rem; margin-bottom: 0.375rem; }
.cta-section p { color: rgba(255,255,255,0.72); font-size: 0.875rem; line-height: 1.7; }
.cta-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-primary {
  display: inline-block;
  background: #fff; color: var(--navy);
  font-size: 0.875rem; font-weight: 600;
  padding: 0.625rem 1.25rem; border-radius: var(--radius-sm);
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.9; text-decoration: none; }
.btn-secondary {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.35); color: rgba(255,255,255,0.85);
  font-size: 0.875rem; font-weight: 500;
  padding: 0.625rem 1.25rem; border-radius: var(--radius-sm);
  transition: border-color 0.15s;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.65); text-decoration: none; }

/* ─── Category Index / City Index ─── */
.page-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2rem 1.25rem 1.5rem;
}
.page-hero-inner { max-width: 1100px; margin: 0 auto; }
.page-hero h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.page-hero .lead { font-size: 0.9375rem; color: var(--text-2); max-width: 520px; }
.page-hero .meta-line { font-size: 0.8125rem; color: var(--text-3); margin-top: 0.625rem; }

.main-content { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem; }

.section-label {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-3); margin-bottom: 0.875rem;
}

.city-chip-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.city-chip {
  display: inline-block;
  padding: 5px 14px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 20px; font-size: 0.8125rem; color: var(--text-2);
  transition: all 0.15s;
}
.city-chip:hover { border-color: var(--navy-light); color: var(--navy-light); text-decoration: none; }

/* ─── Homepage ─── */
.home-hero {
  background: var(--navy);
  padding: 3rem 1.25rem;
}
.home-hero-inner { max-width: 1100px; margin: 0 auto; }
.home-hero .tag {
  display: inline-block; background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85); font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 1rem;
}
.home-hero h1 { color: #fff; font-size: 2.25rem; margin-bottom: 0.75rem; line-height: 1.2; }
.home-hero .lead { color: rgba(255,255,255,0.72); font-size: 1.0625rem; max-width: 520px; line-height: 1.7; }
.home-hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2rem; }
.home-stat strong { display: block; font-size: 1.75rem; font-weight: 600; color: #fff; }
.home-stat span { font-size: 0.8125rem; color: rgba(255,255,255,0.55); }

.section-block { padding: 2rem 1.25rem; }
.section-block-inner { max-width: 1100px; margin: 0 auto; }

/* ─── Footer ─── */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
}
.footer-brand { font-size: 0.875rem; color: var(--text-2); }
.footer-brand strong { color: var(--navy); }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.8125rem; color: var(--text-3); }
.footer-links a:hover { color: var(--navy); }
.footer-legal { font-size: 0.75rem; color: var(--text-3); width: 100%; }

/* ─── Utilities ─── */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-3); }
.font-mono { font-family: 'DM Mono', monospace; }

/* ─── Responsive ─── */
@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }
  .home-hero h1 { font-size: 1.75rem; }
  .fact-grid { grid-template-columns: 1fr; }
  .hero-stats, .home-hero-stats { gap: 1.25rem; }
  .nav-items { display: none; }
  .cta-section { padding: 1.25rem; }
}
