:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --accent: #6366f1;
  --bg: #f8fafc;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-blur: blur(16px);
  --text: #0f172a;
  --text-muted: #64748b;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-premium: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@700;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, hsla(243, 75%, 58%, 0.03) 0, transparent 50%),
    radial-gradient(at 100% 100%, hsla(243, 75%, 58%, 0.03) 0, transparent 50%);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

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

/* --- Navigation (Glassmorphism) --- */
.top-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  transition: all 0.3s ease;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.desktop-nav {
  display: none;
  gap: 32px;
}

@media (min-width: 768px) {
  .desktop-nav { display: flex; }
}

.desktop-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
}

.desktop-nav a:hover, .desktop-nav a.active {
  color: var(--primary);
}

.desktop-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* --- Hero & Typography --- */
.hero-section {
  padding: 80px 0 40px;
  text-align: center;
}

.heritage-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 48px 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Business Directory: Compact List Layout --- */
.dir-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.dir-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.view-toggle {
  display: flex;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.view-btn {
  background: none;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all 0.2s ease;
  line-height: 1;
}

.view-btn.active {
  background: var(--primary);
  color: white;
}

/* LIST VIEW (default) */
.business-list-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 100px;
}

.business-row {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
  min-height: 76px;
}

.business-row:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.12);
  transform: translateX(3px);
}

.br-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
}

.br-thumb-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.br-body {
  flex: 1;
  min-width: 0;
}

.br-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.br-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.br-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(79, 70, 229, 0.08);
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.br-addr {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.br-rating {
  font-size: 0.75rem;
  font-weight: 700;
  color: #b45309;
  white-space: nowrap;
}

.br-verified {
  width: 16px;
  height: 16px;
  color: #059669;
  flex-shrink: 0;
  font-size: 1rem;
}

.br-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.br-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.br-btn.call {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}

.br-btn.call:hover { background: #4338ca; }

.br-btn.info {
  background: #f1f5f9;
  color: var(--text);
}

.br-btn.info:hover { background: #e2e8f0; }

/* GRID VIEW (toggled) */
.business-grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding-bottom: 100px;
}

.business-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(226, 232, 240, 0.6);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.19, 1, 0.22, 1);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.business-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-premium);
  border-color: var(--primary-light);
}

.b-images {
  height: 160px;
  position: relative;
  background: #f1f5f9;
  overflow: hidden;
}

.b-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s ease;
}

.business-card:hover .b-images img { transform: scale(1.08); }

.b-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.b-tag {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.b-verified {
  background: #059669;
  color: white;
  padding: 4px 8px;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 3px;
}

.b-content {
  padding: 14px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.b-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.b-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.i-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.i-row i { font-size: 0.9rem; color: var(--primary); opacity: 0.8; }

.b-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 10px;
}

.b-btn {
  padding: 8px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.b-btn.primary { background: var(--primary); color: white; }
.b-btn.primary:hover { background: #4338ca; }
.b-btn.secondary { background: #f1f5f9; color: var(--text); }
.b-btn.secondary:hover { background: #e2e8f0; }

/* --- Facts Page (Magazine Style) --- */
.facts-magazine {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 80px;
}

@media (min-width: 992px) {
  .facts-magazine {
    grid-template-columns: 2fr 1fr;
  }
}

.magazine-section {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  box-shadow: var(--shadow-md);
}

.mag-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 24px;
  color: var(--text);
}

.mag-text {
  font-size: 1.1rem;
  color: #334155;
  margin-bottom: 20px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.fact-item {
  background: #f8fafc;
  padding: 20px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
}

.fact-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.fact-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* News Cards */
.news-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-card {
  padding: 16px;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  transition: transform 0.2s ease;
}

.news-card:hover { border-color: var(--primary); }

.news-date {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.news-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
}

/* --- Placeholders & Helpers --- */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

.name-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: white;
  height: 100%;
  padding: 20px;
  text-align: center;
}

.pc-title { font-weight: 800; font-size: 1.5rem; text-transform: uppercase; }
.pc-subtitle { font-size: 0.8rem; opacity: 0.8; font-weight: 500; margin-top: 4px; }

/* --- Verified Glow Effect --- */
@keyframes verified-glow {
  0%, 100% { box-shadow: 0 0 6px 1px rgba(5, 150, 105, 0.35), var(--shadow-sm); border-color: rgba(5, 150, 105, 0.5); }
  50%       { box-shadow: 0 0 18px 4px rgba(5, 150, 105, 0.55), var(--shadow-md); border-color: rgba(5, 150, 105, 0.9); }
}

.business-row.verified-glow {
  animation: verified-glow 2.8s ease-in-out infinite;
  border-color: rgba(5, 150, 105, 0.5);
}

.business-card.verified-glow {
  animation: verified-glow 2.8s ease-in-out infinite;
  border-color: rgba(5, 150, 105, 0.5);
}

/* Pause glow on hover so hover shadow takes over cleanly */
.business-row.verified-glow:hover,
.business-card.verified-glow:hover {
  animation-play-state: paused;
  box-shadow: 0 0 22px 5px rgba(5, 150, 105, 0.45), var(--shadow-premium);
  border-color: #059669;
}

/* --- Profile: Premium Design --- */
.profile-hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 40px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.profile-logo {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  border: 4px solid #fff;
  flex-shrink: 0;
}

.profile-title-box {
  flex: 1;
  min-width: 300px;
}

.p-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

.p-stats-row {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.p-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.p-stat i {
  color: var(--primary);
  font-size: 1.1rem;
}

/* Menu Section */
.menu-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
  margin-bottom: 60px;
}

.menu-category {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  box-shadow: var(--shadow-sm);
}

.cat-name {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--primary);
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 10px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.menu-item:last-child { border-bottom: none; }

.item-name {
  font-weight: 600;
  color: var(--text);
}

.item-price {
  font-weight: 700;
  color: var(--primary);
  font-family: 'Inter', sans-serif;
}

/* Feature Tags */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.feature-pill {
  background: #f1f5f9;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-pill i { color: #059669; }

/* Photo Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 80px;
}

.gallery-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.gallery-img:hover {
  transform: scale(1.04);
}

/* Verification CTA Banner */
.verification-cta {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: white;
  padding: 48px;
  border-radius: var(--radius-xl);
  text-align: center;
  margin-top: 100px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
}

.verification-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
  z-index: 0;
}

.cta-content { position: relative; z-index: 1; }

.cta-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.04em;
}

.cta-text {
  font-size: 1.1rem;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto 32px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  color: var(--primary);
  padding: 16px 32px;
  border-radius: 100px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.3s;
}

.cta-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* --- Footer Nav & Mobile --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-around;
  padding: 12px 0 24px;
  z-index: 1001;
}

@media (min-width: 768px) { .bottom-nav { display: none; } }

.bottom-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bottom-nav a.active { color: var(--primary); }
.bottom-nav a i { font-size: 1.4rem; }

/* Custom Preloader */
#loader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f1f5f9;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: rotate 0.8s linear infinite;
}

@keyframes rotate { to { transform: rotate(360deg); } }

/* Utility Animations */
.fade-in {
  animation: reveal 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Mosaic Engine (High Performance Morphing) --- */
#bhitarwarMosaic {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  background: var(--bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.03);
  margin: 32px 0 80px;
}

.mosaic-pixel {
  position: absolute;
  object-fit: cover;
  border-radius: 50%; /* Circular for cloudy effect */
  transition: transform 2.2s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s ease;
  will-change: transform;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15); /* Stronger shadow for depth */
  filter: blur(0.4px); /* Soften the edges for bloom */
  top: 0;
  left: 0;
}

.mosaic-pixel.sparkle {
  opacity: 0.1 !important;
  transform: scale(0.3) translate(var(--rx), var(--ry)) !important;
}