/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange:  #f97316;
  --orange2: #fb923c;
  --bg:      #111418;
  --card:    #1c1f26;
  --border:  #2a2e38;
  --text:    #e8e8ec;
  --muted:   #7a7a8c;
  --radius:  16px;
  --font-h:  'Space Grotesk', sans-serif;
  --font-b:  'Inter', sans-serif;
}

body { font-family: var(--font-b); background: var(--bg); color: var(--text); line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* ===== HEADER ===== */
header {
  background: #0d1015;
  padding: 1rem 2rem;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 2px solid var(--orange);
}
.header-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.logo { font-family: var(--font-h); font-weight: 700; font-size: 1.2rem; color: var(--orange); text-shadow: 0 0 14px rgba(249,115,22,0.45); white-space: nowrap; }

.header-search { display: flex; flex: 1; min-width: 200px; }
.header-search input { flex: 1; padding: 0.5rem 1.25rem; border: 1px solid var(--border); border-right: none; border-radius: 50px 0 0 50px; background: #1c1f26; color: var(--text); font-family: var(--font-b); font-size: 0.9rem; }
.header-search input::placeholder { color: #555; }
.header-search button { padding: 0.5rem 1.25rem; background: var(--orange); color: #0d1015; border: none; border-radius: 0 50px 50px 0; font-weight: 700; cursor: pointer; font-family: var(--font-b); font-size: 0.9rem; }
.header-search button:hover { background: var(--orange2); }

/* ===== HERO ===== */
.hero {
  background: #0d1015;
  background-image: radial-gradient(ellipse at 60% 0%, rgba(249,115,22,0.12) 0%, transparent 65%);
  color: var(--text);
  text-align: center;
  padding: 5.5rem 2rem 4.5rem;
}
.hero h1 { font-family: var(--font-h); font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem; }
.hero .accent { color: var(--orange); text-shadow: 0 0 24px rgba(249,115,22,0.4); }
.hero-sub { color: #a0aec0; font-size: 1.1rem; max-width: 540px; margin: 0 auto 2rem; }
.hero-count { margin-top: 1rem; color: #718096; font-size: 0.9rem; }

.search-bar { display: flex; justify-content: center; gap: 0; max-width: 540px; margin: 0 auto; }
.search-bar input { flex: 1; padding: 0.85rem 1.5rem; border: 2px solid var(--border); border-right: none; border-radius: 50px 0 0 50px; background: #1c1f26; color: var(--text); font-size: 1rem; font-family: var(--font-b); }
.search-bar input::placeholder { color: #555; }
.search-bar button { padding: 0.85rem 1.75rem; background: var(--orange); color: #0d1015; border: none; border-radius: 0 50px 50px 0; font-weight: 700; cursor: pointer; font-size: 1rem; white-space: nowrap; }
.search-bar button:hover { background: var(--orange2); }

/* ===== SECTIONS ===== */
.section-inner { max-width: 1100px; margin: 0 auto; }
.states-section, .featured-section { padding: 3.5rem 2rem; }
.states-section { background: #16191f; border-bottom: 1px solid var(--border); }
.featured-section { background: var(--bg); border-top: 1px solid var(--border); }

h2 { font-family: var(--font-h); font-size: 1.6rem; font-weight: 700; margin-bottom: 1.5rem; }

/* ===== STATE GRID ===== */
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.85rem; }
.state-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  color: var(--text);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  transition: border-left-color 0.2s, transform 0.15s;
}
.state-card:hover { border-left-color: var(--orange); transform: translateY(-2px); }
.state-code { font-family: var(--font-h); font-weight: 700; font-size: 1.1rem; }
.state-count { font-size: 0.78rem; color: var(--muted); }

/* ===== LISTINGS GRID (cards) ===== */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.business-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  transition: border-top-color 0.2s, transform 0.15s;
}
.business-card:hover { border-top-color: var(--orange); transform: translateY(-3px); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.card-top h3 { font-family: var(--font-h); font-size: 1rem; font-weight: 600; }
.card-location, .card-phone { font-size: 0.85rem; color: var(--muted); }

/* ===== LISTINGS LIST (rows) ===== */
.listings-section { padding: 2.5rem 2rem; }
.page-header { background: #16191f; border-bottom: 1px solid var(--border); padding: 1.75rem 2rem; }
.page-header h1 { font-family: var(--font-h); font-size: 1.8rem; font-weight: 700; }
.page-header p { color: var(--muted); margin-top: 0.25rem; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }

.listings-list { display: flex; flex-direction: column; gap: 0.65rem; }
.business-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  transition: border-left-color 0.2s, background 0.2s;
}
.business-row:hover { border-left-color: var(--orange); background: #202530; }
.row-main { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; min-width: 0; }
.row-name { font-family: var(--font-h); font-weight: 600; font-size: 1rem; }
.row-name:hover { color: var(--orange); }
.row-location { font-size: 0.83rem; color: var(--muted); }
.row-cats { font-size: 0.78rem; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-service-areas { font-size: 0.78rem; color: var(--orange); opacity: 0.85; }
.card-cats { font-size: 0.78rem; color: #94a3b8; }
.card-service-areas { font-size: 0.78rem; color: var(--orange); opacity: 0.85; }
.areas-toggle {
  display: inline;
  background: none;
  border: 1px solid rgba(249,115,22,0.3);
  color: var(--orange);
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 50px;
  cursor: pointer;
  margin-left: 0.3rem;
  vertical-align: middle;
  opacity: 0.75;
}
.areas-toggle:hover { opacity: 1; background: rgba(249,115,22,0.08); }
.row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; flex-shrink: 0; }
.row-phone { font-size: 0.9rem; font-weight: 600; color: var(--orange); white-space: nowrap; }
.row-phone:hover { text-decoration: underline; }

/* ===== RATING ===== */
.rating { color: var(--orange2); font-weight: 600; font-size: 0.9rem; }
.rating small { color: var(--muted); font-weight: 400; }

/* ===== BUSINESS DETAIL ===== */
.business-detail { padding: 2.5rem 2rem; }
.detail-inner { display: flex; gap: 3rem; align-items: flex-start; flex-wrap: wrap; }
.detail-main { flex: 1; min-width: 280px; }
.detail-main h1 { font-family: var(--font-h); font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; }
.rating-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.review-count { color: var(--muted); font-size: 0.9rem; }
.detail-facts { display: flex; flex-direction: column; gap: 1rem; }
.fact { display: flex; flex-direction: column; gap: 0.2rem; }
.fact-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.fact-value { font-size: 1rem; }
.fact-value.highlight { color: var(--orange); font-weight: 600; font-size: 1.2rem; }

.detail-sidebar { display: flex; flex-direction: column; gap: 0.75rem; width: 220px; }
.btn-call { display: block; background: var(--orange); color: #0d1015; text-align: center; padding: 1rem; border-radius: 50px; font-weight: 700; line-height: 1.4; }
.btn-call:hover { background: var(--orange2); }
.btn-call small { font-weight: 400; font-size: 0.85rem; }
.btn-website { display: block; border: 2px solid var(--border); text-align: center; padding: 0.75rem; border-radius: 50px; font-weight: 600; color: var(--text); }
.btn-website:hover { border-color: var(--orange); }

/* ===== PAGINATION ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }
.btn-page { padding: 0.5rem 1.5rem; border: 1px solid var(--border); border-radius: 50px; font-weight: 500; background: var(--card); color: var(--text); }
.btn-page:hover { border-color: var(--orange); }

/* ===== SEARCH ===== */
.inline-search { display: flex; gap: 0; max-width: 480px; margin-bottom: 1.5rem; }
.inline-search input { flex: 1; padding: 0.6rem 1.25rem; border: 1px solid var(--border); border-right: none; border-radius: 50px 0 0 50px; font-family: var(--font-b); background: var(--card); color: var(--text); }
.inline-search button { padding: 0.6rem 1.25rem; background: var(--orange); color: #0d1015; border: none; border-radius: 0 50px 50px 0; font-weight: 600; cursor: pointer; }
.no-results { color: var(--muted); margin-top: 1rem; }

/* ===== AMAZON PROMO (top) ===== */
.amazon-promo { background: #16191f; border-top: 1px solid rgba(249,115,22,0.15); border-bottom: 1px solid rgba(249,115,22,0.15); padding: 0.9rem 2rem; }
.amazon-promo a { display: flex; align-items: center; justify-content: space-between; max-width: 1100px; margin: 0 auto; text-decoration: none; transition: opacity 0.2s; }
.amazon-promo a:hover { opacity: 0.85; }
.promo-left { display: flex; align-items: center; gap: 0.85rem; }
.promo-icon { font-size: 1.6rem; }
.promo-title { display: block; font-family: var(--font-h); font-weight: 600; font-size: 0.95rem; color: var(--orange); }
.promo-sub { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.promo-cta { font-family: var(--font-h); font-weight: 700; font-size: 0.9rem; color: var(--orange2); white-space: nowrap; padding: 0.4rem 1.1rem; border: 1px solid rgba(249,115,22,0.3); border-radius: 50px; }
.amazon-promo a:hover .promo-cta { background: rgba(249,115,22,0.08); }

/* ===== AMAZON BANNER ===== */
.amazon-banner { background: #0d1015; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 0.85rem 2rem; }
.amazon-banner a { display: flex; align-items: center; gap: 0.75rem; max-width: 1100px; margin: 0 auto; color: var(--orange2); font-family: var(--font-h); font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: opacity 0.2s; }
.amazon-banner a:hover { opacity: 0.85; }
.amazon-icon { font-size: 1.2rem; }
.amazon-tag { font-size: 0.72rem; color: var(--muted); font-weight: 400; font-family: var(--font-b); margin-left: auto; }

/* ===== FOOTER ===== */
footer { background: #0d1015; color: #718096; padding: 1.25rem 2rem; border-top: 1px solid var(--border); }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; align-items: stretch; gap: 0.75rem; font-size: 0.85rem; }
.footer-inner strong { color: var(--orange); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-nav a { color: #a0aec0; transition: color 0.2s; }
.footer-nav a:hover { color: var(--orange2); }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; color: #718096; }

/* ===== CONTENT PAGES: About / Contact / Privacy / Solar Guide ===== */
.prose { max-width: 760px; padding: 2.5rem 0 3rem; color: var(--text); }
.prose p { margin-bottom: 1.1rem; }
.prose h2 { font-family: var(--font-h); font-size: 1.4rem; font-weight: 700; margin: 2rem 0 0.9rem; color: var(--text); }
.prose ul { margin: 0 0 1.1rem 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
.prose a { color: var(--orange2); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { opacity: 0.8; }
.prose strong { color: var(--text); font-weight: 600; }
.contact-email-block { font-size: 1.3rem; font-family: var(--font-h); font-weight: 700; margin: 0.5rem 0 1.5rem; }
.disclaimer { font-size: 0.82rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1.5rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.stat-num { font-family: var(--font-h); font-size: 1.6rem; font-weight: 700; color: var(--orange2); }
.stat-label { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: stretch; }
  .detail-inner { flex-direction: column; }
  .detail-sidebar { width: 100%; }
  .state-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .business-row { flex-direction: column; align-items: flex-start; }
  .row-meta { align-items: flex-start; }
}
