/* SD Service Finder — directory styles
   Clean utility design. Light surface. Card-based listings.
   Distinct from money-site emergency design and review-site editorial design. */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --border: #e3e8ef;
  --border-strong: #cdd5df;
  --text: #1a2028;
  --text-muted: #5b6573;
  --text-faint: #8a94a3;
  --primary: #1f6feb;
  --primary-dark: #1858c4;
  --primary-tint: #eaf2ff;
  --accent: #f59e0b;
  --accent-tint: #fff5e1;
  --featured-tint: #fff8e6;
  --featured-border: #f1c463;
  --shadow: 0 1px 2px rgba(20, 30, 50, 0.04), 0 1px 3px rgba(20, 30, 50, 0.06);
  --radius: 6px;
  --radius-lg: 10px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { color: var(--text); line-height: 1.25; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: .95rem; }
p { margin: 0 0 1em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  padding: 14px 20px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
  background: var(--primary); color: #fff; width: 32px; height: 32px;
  border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; letter-spacing: .02em;
}
.primary-nav { flex: 1; }
.primary-nav ul { list-style: none; display: flex; gap: 18px; padding: 0; margin: 0; flex-wrap: wrap; }
.primary-nav a { color: var(--text-muted); font-size: .92rem; }
.primary-nav a:hover { color: var(--primary); }
.header-search { display: flex; gap: 0; }
.header-search input {
  border: 1px solid var(--border-strong); border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: 7px 12px; font-size: .9rem; min-width: 220px;
  background: #fafbfc; outline: none;
}
.header-search input:focus { background: #fff; border-color: var(--primary); }
.header-search button {
  border: 1px solid var(--primary); background: var(--primary); color: #fff;
  padding: 7px 14px; border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer; font-size: 1rem;
}

/* ---------- Hero / Page Header ---------- */
.page-header { background: #fff; border-bottom: 1px solid var(--border); padding: 36px 0 28px; }
.page-header h1 { margin: 8px 0 6px; }
.page-header .lede { color: var(--text-muted); max-width: 760px; margin: 0; }

.hero {
  background: linear-gradient(180deg, #fff 0%, #f0f5fb 100%);
  border-bottom: 1px solid var(--border);
  padding: 52px 0 44px;
}
.hero h1 { font-size: 2.4rem; margin-bottom: 10px; }
.hero p.lede { font-size: 1.05rem; color: var(--text-muted); max-width: 680px; }

.search-hero {
  display: flex; gap: 0; max-width: 620px; margin: 24px 0 0;
}
.search-hero input {
  flex: 1; padding: 14px 18px; font-size: 1rem;
  border: 1px solid var(--border-strong); border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  background: #fff;
}
.search-hero button {
  padding: 14px 24px; border: none; background: var(--primary); color: #fff;
  border-radius: 0 var(--radius) var(--radius) 0; font-weight: 600; cursor: pointer;
}

/* ---------- Sections ---------- */
section { padding: 36px 0; }
section.tight { padding: 24px 0; }
section + section { border-top: 1px solid var(--border); }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.section-header h2 { margin: 0; }
.section-header a { font-size: .9rem; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: transparent; padding: 14px 0 0;
  font-size: .85rem; color: var(--text-faint);
}
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb .sep { margin: 0 6px; color: var(--text-faint); }
.breadcrumb a { color: var(--text-muted); }

/* ---------- Listing card ---------- */
.listing-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}
.listing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: border-color .15s, box-shadow .15s;
}
.listing-card:hover { border-color: var(--border-strong); }
.listing-card--featured {
  border: 1px solid var(--featured-border);
  background: linear-gradient(180deg, var(--featured-tint) 0%, #ffffff 32%);
}
.listing-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.listing-header h3 { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.listing-name { color: var(--text); }
.listing-name:hover { color: var(--primary); }
.listing-badges { display: flex; flex-wrap: wrap; gap: 5px; flex-shrink: 0; }

.featured-badge {
  background: var(--accent); color: #fff;
  font-size: .7rem; font-weight: 600;
  padding: 3px 8px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .03em;
  white-space: nowrap;
}
.verified-badge {
  background: #e8f1fd; color: #1858c4;
  font-size: .7rem; font-weight: 600;
  padding: 3px 8px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .03em;
  white-space: nowrap;
}
.category-badge {
  background: #f0f3f7; color: var(--text-muted);
  font-size: .7rem; padding: 3px 8px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .03em;
}

.listing-rating { font-size: .9rem; margin-bottom: 8px; }
.star { color: var(--text-faint); font-size: 1rem; }
.star.star-on { color: #f5b301; }
.star.star-off { color: #d8dde4; }
.rating-num { font-weight: 600; color: var(--text); margin-left: 2px; }
.review-count { color: var(--text-faint); font-size: .82rem; }

.listing-desc { color: var(--text-muted); margin: 6px 0 8px; font-size: .9rem; }
.listing-area, .listing-services { color: var(--text-faint); font-size: .82rem; margin: 0 0 4px; }
.listing-services .label { color: var(--text-muted); font-weight: 500; }

.listing-footer {
  margin-top: auto; padding-top: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border-top: 1px solid var(--border);
}
.listing-phone { color: var(--text); font-weight: 500; font-size: .92rem; }
.listing-cta {
  background: var(--primary); color: #fff !important;
  padding: 7px 14px; border-radius: var(--radius);
  font-size: .85rem; font-weight: 500;
}
.listing-cta:hover { background: var(--primary-dark); text-decoration: none; }
.listing-card--featured .listing-cta { background: var(--accent); }
.listing-card--featured .listing-cta:hover { background: #d97f06; }

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: 0 0 22px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-label { font-size: .85rem; color: var(--text-muted); margin-right: 4px; }
.filter-pill {
  font-size: .82rem; padding: 5px 11px;
  background: #f0f3f7; color: var(--text-muted);
  border-radius: 20px;
}
.filter-pill:hover { background: var(--primary-tint); color: var(--primary); text-decoration: none; }
.filter-pill.active { background: var(--primary); color: #fff; }

/* ---------- Category grid ---------- */
.category-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.category-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px 20px;
  text-align: center; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: border-color .15s, transform .15s;
}
.category-card:hover {
  border-color: var(--primary); transform: translateY(-1px);
  text-decoration: none;
}
.category-card .icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--primary-tint); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 6px;
}
.category-card h3 { margin: 0; font-size: 1rem; }
.category-card p { margin: 0; font-size: .82rem; color: var(--text-faint); }

/* ---------- City grid ---------- */
.city-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.city-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  color: var(--text); display: flex; flex-direction: column;
}
.city-card:hover { border-color: var(--primary); text-decoration: none; }
.city-card strong { color: var(--text); font-size: .95rem; }
.city-card span { font-size: .78rem; color: var(--text-faint); }

/* ---------- FAQ ---------- */
.faq-section { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 26px; margin-top: 8px; }
.faq-section h2 { margin-top: 0; }
.faq-item { border-top: 1px solid var(--border); padding: 12px 0; }
.faq-item:first-of-type { border-top: none; }
.faq-item summary { font-weight: 600; cursor: pointer; padding: 4px 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+ "; color: var(--primary); font-weight: 700; }
.faq-item[open] summary::before { content: "− "; }
.faq-item p { margin: 8px 0 4px; color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer { background: #1a2028; color: #c5cdd9; margin-top: 60px; padding: 40px 0 22px; font-size: .88rem; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #c5cdd9; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1.4fr 1fr 1fr 1fr; padding-bottom: 28px; border-bottom: 1px solid #2a323e; }
.footer-tagline { color: #95a0b1; }
.footer-updated { color: #6b7585; font-size: .78rem; }
.footer-bottom { padding-top: 18px; color: #6b7585; font-size: .8rem; }

/* ---------- Article / blog ---------- */
.article-body { max-width: 720px; }
.article-body h2 { font-size: 1.25rem; margin-top: 1.6em; }
.article-body p { color: var(--text); font-size: 1rem; line-height: 1.7; }

/* ---------- Misc ---------- */
.intro { color: var(--text-muted); max-width: 780px; margin: 0 0 22px; font-size: 1rem; }
.section-divider { height: 1px; background: var(--border); margin: 32px 0; border: none; }
.muted { color: var(--text-faint); font-size: .85rem; }

.related-services {
  background: var(--primary-tint); border: 1px solid #cfe0fb;
  border-radius: var(--radius-lg); padding: 18px 22px; margin-top: 28px;
}
.related-services h3 { margin: 0 0 8px; font-size: 1rem; color: #1858c4; }
.related-services ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.related-services a {
  background: #fff; padding: 6px 12px; border-radius: 20px;
  font-size: .85rem; border: 1px solid #cfe0fb;
}

.featured-section {
  background: linear-gradient(180deg, var(--featured-tint) 0%, #fff 100%);
  border: 1px solid var(--featured-border);
  border-radius: var(--radius-lg);
  padding: 24px 26px; margin-bottom: 26px;
}
.featured-section h2 { display: flex; align-items: center; gap: 10px; }
.featured-section h2::before { content: "★"; color: var(--accent); }

@media (max-width: 720px) {
  .header-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .header-search input { min-width: 0; flex: 1; }
  .header-search { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 36px 0 28px; }
  .hero h1 { font-size: 1.7rem; }
  .listing-grid { grid-template-columns: 1fr; }
}
