/* ===========================
   VUKA LOCAL – STYLESHEET
   South African Township Business Directory
   =========================== */

:root {
  --green: #00A550;
  --green-dark: #007A3D;
  --green-light: #E6F7EE;
  --gold: #FFB300;
  --gold-light: #FFF8E1;
  --dark: #0E1A14;
  --dark-2: #182A1F;
  --mid: #3A5247;
  --text: #1A2E24;
  --text-muted: #5A7A6A;
  --border: #D4E8DC;
  --white: #FFFFFF;
  --off-white: #F4FAF6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.15);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ── CONTAINER ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-solid {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-solid:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,165,80,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn-outline:hover {
  background: var(--green);
  color: var(--white);
}

.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ── HEADER / NAV ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--dark);
}

.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--green);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
}

.logo strong { color: var(--green); }
.logo-light { color: var(--white); }
.logo-light strong { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:not(.btn):hover { color: var(--green); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
  background: var(--white);
  border-top: 1px solid var(--border);
  font-weight: 500;
}
.mobile-menu.open { display: flex; }

/* ── HERO ── */
.hero {
  position: relative;
  background: var(--dark);
  overflow: hidden;
  padding: 80px 0 100px;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(0,165,80,0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,179,0,0.15) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(0,165,80,0.1) 0%, transparent 40%);
}

/* SA flag stripe accent */
.hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg,
    #007A3D 0%, #007A3D 33%,
    #FFB300 33%, #FFB300 66%,
    #E03C31 66%, #E03C31 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 20px;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero-title em {
  font-style: normal;
  color: var(--gold);
}

.hero-sub {
  color: rgba(255,255,255,0.7);
  font-size: 1.15rem;
  font-weight: 300;
  max-width: 580px;
  margin-bottom: 40px;
  animation: fadeUp 0.6s 0.2s ease both;
}

/* ── SEARCH BAR ── */
.search-bar {
  display: flex;
  gap: 12px;
  background: var(--white);
  padding: 10px;
  border-radius: 60px;
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  margin-bottom: 48px;
  animation: fadeUp 0.6s 0.3s ease both;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  color: var(--text-muted);
  min-width: 200px;
}

.search-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
}

.search-bar select {
  border: none;
  border-left: 1px solid var(--border);
  outline: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  padding: 8px 16px;
  background: transparent;
  cursor: pointer;
}

.hero-stats {
  display: flex;
  gap: 40px;
  animation: fadeUp 0.6s 0.4s ease both;
}

.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.stat span:last-child {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
  margin-top: 4px;
}

/* ── SECTIONS ── */
.section { padding: 80px 0; }
.section-dark {
  background: var(--dark-2);
}

.section-head {
  margin-bottom: 48px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}
.section-head p { color: var(--text-muted); font-size: 1rem; }
.section-head.light h2 { color: var(--white); }
.section-head.light p { color: rgba(255,255,255,0.5); }

/* ── CATEGORIES ── */
.categories-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--off-white);
  border: 2px solid var(--border);
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}

.cat-card:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-light);
}

.cat-card.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.cat-icon { font-size: 1.2rem; }

/* ── BUSINESSES GRID ── */
.businesses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.biz-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  animation: fadeUp 0.4s ease both;
}

.biz-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.biz-card-img {
  height: 180px;
  background: var(--green-light);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.biz-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.biz-card-img-placeholder {
  font-size: 3rem;
  opacity: 0.4;
}

.biz-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--green);
  color: white;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.biz-card-body { padding: 20px; }

.biz-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.biz-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.biz-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.biz-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.biz-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.biz-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--gold);
}

.biz-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: white;
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}
.biz-whatsapp:hover { background: #128C7E; }

/* ── SKELETON LOADING ── */
.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.skeleton-card {
  height: 300px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── EMPTY / ERROR STATES ── */
.empty-state, .error-state {
  text-align: center;
  padding: 80px 20px;
  color: rgba(255,255,255,0.6);
}
.empty-state span, .error-state span { font-size: 3rem; display: block; margin-bottom: 20px; }
.empty-state h3, .error-state h3 { font-family: var(--font-display); font-size: 1.4rem; color: rgba(255,255,255,0.85); margin-bottom: 10px; }
.empty-state a { color: var(--gold); }
.error-state .btn { margin-top: 24px; }

/* ── CTA SECTION ── */
.cta-section {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
}

.cta-text p {
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 30px;
}

.cta-text .btn-solid {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
  font-weight: 700;
}
.cta-text .btn-solid:hover {
  background: #E6A200;
  border-color: #E6A200;
  box-shadow: 0 8px 24px rgba(255,179,0,0.4);
}

.cta-art { flex-shrink: 0; }

.cta-blob {
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  place-items: center;
  font-size: 2.5rem;
  gap: 10px;
}

/* ── TOWNSHIPS ── */
.townships-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.township-card {
  padding: 28px 24px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--white);
  transition: var(--transition);
  position: relative;
}

.township-card.active {
  border-color: var(--green);
  background: var(--green-light);
}

.township-card.coming {
  opacity: 0.65;
}

.township-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  margin: 12px 0 4px;
  color: var(--dark);
}

.township-card p { font-size: 0.88rem; color: var(--text-muted); }

.township-badge {
  display: inline-block;
  background: var(--green);
  color: white;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.township-badge.coming {
  background: var(--border);
  color: var(--text-muted);
}

.township-count {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
}

/* ── FOOTER ── */
.footer {
  background: var(--dark);
  padding: 60px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand p {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  margin-top: 16px;
  max-width: 260px;
  line-height: 1.6;
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  font-size: 1.3rem;
}

.footer-links { display: contents; }
.footer-links > div { display: flex; flex-direction: column; gap: 12px; }
.footer-links h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.footer-links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  padding: 20px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
}

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  backdrop-filter: blur(4px);
}

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 201;
  background: var(--white);
  border-radius: 20px;
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0;
}

.modal.open, .modal-overlay.open {
  display: block;
  opacity: 1;
}

.modal.open { transform: translate(-50%, -50%) scale(1); }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: var(--off-white);
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 1;
}
.modal-close:hover { background: var(--border); }

.modal-img {
  height: 220px;
  background: var(--green-light);
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  overflow: hidden;
}
.modal-img img { width: 100%; height: 100%; object-fit: cover; }

.modal-body { padding: 28px; }

.modal-category {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.modal-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 10px;
}

.modal-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 0.9rem;
  color: var(--text);
}

.modal-detail-row {
  display: flex;
  gap: 10px;
}

.modal-detail-row span:first-child {
  width: 20px;
  flex-shrink: 0;
  text-align: center;
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .cta-inner { flex-direction: column; text-align: center; }
  .cta-art { display: none; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .hero { padding: 60px 0 80px; }
  .search-bar {
    flex-direction: column;
    border-radius: var(--radius);
    padding: 16px;
  }
  .search-bar select { border-left: none; border-top: 1px solid var(--border); padding: 8px 0; }
  .search-bar .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 24px; }
  .businesses-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { display: flex; flex-direction: column; gap: 32px; }
  .footer-links > div { gap: 10px; }
}
