/* ============================================================
   Allen Strong — Stylesheet
   Palette: Steel #345E6F | Orange #F35225 | White #FFFFFF
   Style: Airbnb-inspired, modern, mobile-first
   ============================================================ */

:root {
  --navy:        #345E6F;
  --navy-dark:   #274856;
  --red:         #F35225;
  --red-dark:    #d0441d;
  --white:       #FFFFFF;
  --bg:          #F7F7F7;
  --border:      #E8E8E8;
  --text:        #1A1A1A;
  --text-muted:  #717171;
  --text-light:  #AAAAAA;
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.08);
  --shadow:      0 2px 16px rgba(0,0,0,0.09);
  --shadow-hover:0 6px 28px rgba(0,0,0,0.14);
  --radius:      14px;
  --radius-sm:   8px;
  --radius-pill: 100px;
  --transition:  0.2s ease;
  --max-width:   1200px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200,16,46,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--text);
}


/* ---- Header (business pages) ---- */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo-link { display: inline-flex; align-items: center; }
.logo { height: 48px; width: auto; }

.hero-logo-link { display: inline-block; margin-bottom: 24px; }
.hero-logo { height: 240px; width: auto; }

/* Compact hero for business detail pages */
.hero.hero-biz { padding: 36px 0; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: #dde8ed;
  padding: 72px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 100% 50%, rgba(243,82,37,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 0% 50%, rgba(52,94,111,0.15) 0%, transparent 55%);
  pointer-events: none;
  z-index: 1;
}
.hero .container { position: relative; z-index: 2; }
.hero-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 800;
  color: var(--navy-dark);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-muted);
  margin-bottom: 36px;
  font-weight: 400;
}
.hero-br { display: block; }

/* Search */
.search-wrap {
  max-width: 600px;
  margin: 0 auto;
}
.search-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 6px 8px 6px 20px;
  gap: 12px;
  box-shadow: 0 4px 24px rgba(52,94,111,0.18);
  transition: box-shadow var(--transition);
}
.search-bar:focus-within {
  box-shadow: 0 4px 24px rgba(52,94,111,0.25), 0 0 0 3px rgba(243,82,37,0.2);
}
.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  min-width: 0;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-btn {
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition);
  flex-shrink: 0;
}
.search-btn:hover { background: var(--red-dark); }

.btn-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  background: transparent;
  color: var(--navy-dark);
  border: 2px solid rgba(52,94,111,0.4);
  transition: all var(--transition);
}
.btn-hero-cta:hover {
  background: rgba(52,94,111,0.08);
  border-color: var(--navy);
}

/* ============================================================
   CATEGORIES
   ============================================================ */
.categories-section {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 90;
}
.categories-scroll-wrap {
  position: relative;
}
.categories-scroll-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 100%;
  background: linear-gradient(to right, transparent, var(--white));
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.categories-scroll-wrap.scrolled-end::after {
  opacity: 0;
}
.categories-scroll-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 100%;
  background: linear-gradient(to left, transparent, var(--white));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1;
}
.categories-scroll-wrap.scrolled::before {
  opacity: 1;
}
.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1.5px solid var(--border);
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
}
.category-pill:hover {
  border-color: var(--text);
  color: var(--text);
}
.category-pill.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.pill-icon { display: flex; align-items: center; }
.pill-icon svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Scroll hint arrow button */
.cat-scroll-hint {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  z-index: 3;
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.cat-scroll-hint svg { width: 14px; height: 14px; color: var(--text); }
.cat-scroll-hint:hover { background: var(--navy); border-color: var(--navy); }
.cat-scroll-hint:hover svg { color: var(--white); }

/* ============================================================
   DIRECTORY
   ============================================================ */
.directory-section {
  padding: 40px 0 80px;
}
.directory-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.results-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.active-filter {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Business Grid ---- */
.business-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Section headers inside the grid */
.biz-section-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 4px;
}
.biz-section-header:first-child { padding-top: 0; }
.biz-section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.biz-section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}
.biz-section-featured .biz-section-label { color: var(--red); }

/* Extra breathing room before the regular listings divider */
.biz-section-regular {
  padding-top: 40px;
}
.biz-section-regular::after {
  height: 2px;
  background: var(--border);
}

/* Featured card accent — top border strip */
.business-card.card-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--red);
  z-index: 1;
}

/* Show more button */
.show-more-wrap {
  grid-column: 1 / -1;
  text-align: center;
  padding: 8px 0 0;
}

/* ---- Business Card ---- */
.business-card {
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
}
.business-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: transparent;
}

/* Stretched link — covers the whole card, sits below phone/website links */
.card-detail-link {
  color: inherit;
  text-decoration: none;
}
.card-detail-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Phone and website links must sit above the stretched link overlay */
.card-phone,
.card-website {
  position: relative;
  z-index: 1;
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f0f3fa 0%, #e8ecf5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.card-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
}
.card-logo-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.card-featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-category {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-address {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.card-address::before {
  content: '📍';
  font-size: 12px;
  margin-top: 1px;
  flex-shrink: 0;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.card-phone {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  transition: color var(--transition);
}
.card-phone:hover { color: var(--red); }
.card-website {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}
.card-website:hover { gap: 7px; }

/* ---- Empty & Loading States ---- */
.empty-state, .loading-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state p {
  margin-bottom: 24px;
  font-size: 15px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.65);
  padding: 48px 0 0;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo {
  height: 108px;
  width: auto;
  margin-bottom: 14px;
}
.footer-tagline {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 140px;
}
.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  padding: 20px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--white); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .business-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero { padding: 52px 0 60px; }
  .hero-br { display: none; }
  .business-grid { grid-template-columns: 1fr; gap: 16px; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .categories-section { top: 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-logo { height: 120px; }
  .search-bar input { font-size: 14px; }
}
