/* SuperCala Directory — Standalone CSS */

:root {
  --bg: #0f1117;
  --bg-soft: #181a24;
  --bg-card: #1e2030;
  --text: #e4e6f0;
  --text-muted: #8b8fa3;
  --accent: #6c63ff;
  --accent-hover: #7b73ff;
  --accent-glow: rgba(108, 99, 255, 0.15);
  --border: #2a2d3e;
  --star: #f5c518;
  --featured-bg: linear-gradient(135deg, rgba(108, 99, 255, 0.08), rgba(108, 99, 255, 0.02));
  --featured-border: #6c63ff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

.main-content { flex: 1; padding: 2rem 0; }

/* Navbar */
.navbar {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-inner { display: flex; align-items: center; gap: 1.5rem; }
.navbar-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.navbar-brand:hover { color: var(--accent); }
.navbar-search { display: flex; flex: 1; max-width: 400px; }
.search-input {
  flex: 1;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
}
.search-input:focus { border-color: var(--accent); }
.search-btn {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
}
.search-btn:hover { background: var(--accent-hover); }

/* Footer */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 3rem;
}
.footer-inner { text-align: center; font-size: 0.8rem; color: var(--text-muted); }
.footer-inner a { color: var(--text-muted); }
.footer-inner a:hover { color: var(--accent); }
.footer-links { margin-top: 0.5rem; display: flex; gap: 1.5rem; justify-content: center; }

/* Breadcrumbs */
.breadcrumbs { margin-bottom: 1.5rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; font-size: 0.85rem; }
.breadcrumbs a { color: var(--accent); }
.breadcrumb-sep { color: var(--text-muted); margin: 0 0.25rem; }
.breadcrumb-current { color: var(--text-muted); }

/* Page header */
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.3rem; }
.page-subtitle { color: var(--text-muted); font-size: 0.95rem; }

.empty-msg { color: var(--text-muted); font-size: 0.9rem; padding: 2rem 0; }

/* State grid */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, border-color 0.2s;
  text-align: center;
}
.state-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.state-card__abbr {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.state-card__name {
  font-size: 0.9rem;
  color: var(--text);
  margin-top: 0.3rem;
}
.state-card__count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* County list */
.county-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}
.county-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}
.county-card:hover { border-color: var(--accent); }
.county-card__name { color: var(--text); font-size: 0.9rem; }
.county-card__count { color: var(--text-muted); font-size: 0.8rem; }

/* County layout (sidebar + grid) */
.county-layout { display: flex; gap: 2rem; }
.category-sidebar {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.category-sidebar h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.category-link {
  display: block;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.category-link:hover { background: var(--accent-glow); color: var(--accent); }
.category-link--active { background: var(--accent-glow); color: var(--accent); font-weight: 600; }
.category-count { color: var(--text-muted); font-size: 0.75rem; }

/* Business grid */
.business-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* Business card */
.business-card {
  position: relative;
  padding: 1.1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.business-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.business-card--featured {
  background: var(--featured-bg);
  border-color: var(--featured-border);
}
.featured-tag {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}
.business-card__name { font-size: 1rem; font-weight: 600; margin-bottom: 0.3rem; }
.business-card__name a { color: var(--text); }
.business-card__name a:hover { color: var(--accent); }
.business-card__category { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.business-card__location { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.business-card__rating { display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.5rem; font-size: 0.85rem; }
.star { color: var(--star); font-size: 0.8rem; }
.rating-value { color: var(--text); font-weight: 600; }
.review-count { color: var(--text-muted); font-size: 0.75rem; }
.business-card__badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }

/* Badge pills */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
}
.badge-pill i { font-size: 0.65rem; }

/* Business detail */
.business-detail__header { margin-bottom: 1.5rem; }
.business-detail__header h1 { font-size: 1.6rem; }
.business-detail__category { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0.5rem; }
.business-detail__badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.business-detail__body { display: flex; gap: 2.5rem; }
.business-detail__info { flex: 1; }
.business-detail__info h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  color: var(--text);
}
.business-detail__info h2:first-child { margin-top: 0; }
.info-list { display: grid; gap: 0.6rem; }
.info-list dt {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.info-list dd { font-size: 0.9rem; margin-left: 1.3rem; margin-bottom: 0.3rem; }
.info-list dd a { color: var(--accent); }
.services-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.services-list li {
  padding: 0.3rem 0.7rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
}

/* Sidebar / Claim CTA */
.business-detail__sidebar { flex: 0 0 300px; }
.claim-cta {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.claim-cta h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.claim-cta p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.btn-claim {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: opacity 0.2s;
}
.btn-claim:hover { opacity: 0.9; color: #fff; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  margin-top: 2rem;
}
.page-link {
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color 0.15s;
}
.page-link:hover { border-color: var(--accent); color: var(--accent); }
.page-current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.page-ellipsis { border: none; background: none; color: var(--text-muted); }

/* Search page */
.search-form { margin-bottom: 2rem; }
.search-form__row { display: flex; gap: 0; margin-bottom: 0.75rem; }
.search-form__input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}
.search-form__input:focus { border-color: var(--accent); }
.search-form__btn {
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}
.search-form__btn:hover { background: var(--accent-hover); }
.search-form__filters { display: flex; gap: 0.75rem; }
.search-form__select {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.85rem;
}
.results-summary { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 768px) {
  .county-layout { flex-direction: column; }
  .category-sidebar { flex: none; flex-direction: row; flex-wrap: wrap; gap: 0.4rem; }
  .business-detail__body { flex-direction: column; }
  .business-detail__sidebar { flex: none; }
  .state-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .navbar-search { max-width: 200px; }
}

@media (max-width: 480px) {
  .page-header h1 { font-size: 1.4rem; }
  .state-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .business-grid { grid-template-columns: 1fr; }
  .navbar-inner { flex-wrap: wrap; }
  .navbar-search { max-width: 100%; flex: 1 1 100%; order: 2; margin-top: 0.5rem; }
}
