:root {
  --bg-primary: #fdfaf3;
  --bg-card: #ffffff;
  --bg-accent: #f7efe0;
  --maroon-deep: #5e1116;
  --maroon-mid: #821b22;
  --saffron: #d96b16;
  --gold-bright: #e0a938;
  --gold-soft: #f5dfb0;
  --text-main: #2a1810;
  --text-muted: #6e5549;
  --border-color: #e6d7c3;
  --green-visited: #177a46;
  --green-bg: #e7f6ed;
  --blue-radar: #155eef;
  --shadow-sm: 0 2px 8px rgba(94, 17, 22, 0.07);
  --shadow-md: 0 8px 24px rgba(94, 17, 22, 0.12);
  --radius-md: 14px;
  --radius-lg: 20px;
}

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

body {
  font-family: 'Inter', 'Noto Sans Tamil', 'Noto Sans Telugu', 'Noto Sans Devanagari', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.55;
  padding-bottom: 85px;
}

/* Top Spiritual Header */
.top-tirunamam-bar {
  background: linear-gradient(90deg, #3e080c 0%, var(--maroon-deep) 50%, #3e080c 100%);
  color: var(--gold-soft);
  text-align: center;
  font-size: 0.8rem;
  padding: 6px 12px;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--gold-bright);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.app-header {
  background: linear-gradient(135deg, var(--maroon-deep) 0%, var(--maroon-mid) 65%, #9c2b23 100%);
  color: #fff;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-area {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 2px solid #ffd54f;
  outline: 1.5px solid rgba(255, 213, 79, 0.82);
  outline-offset: -5px;
  border-radius: 10px;
  padding: 5px 12px 5px 9px;
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.25);
}

.brand-emblem {
  width: 28px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-title h1 {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  word-spacing: -2px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff6b7 0%, #f6c453 48%, #d49424 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #f6c453;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
  margin: 0;
  line-height: 1;
}

.brand-title p {
  font-size: 0.75rem;
  color: var(--gold-soft);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-menu-toggle {
  display: none;
}

.lang-switcher {
  display: flex;
  background: rgba(0, 0, 0, 0.28);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(224, 169, 56, 0.45);
}

.lang-btn {
  background: transparent;
  color: #f8e6c1;
  border: none;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--gold-bright);
  color: #2a1008;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.gps-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.gps-pill-btn.active {
  background: #12b76a;
  border-color: #6ce9a6;
  color: #fff;
  box-shadow: 0 0 14px rgba(18, 183, 106, 0.6);
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffd166;
  display: inline-block;
}

.gps-pill-btn.active .pulse-dot {
  background: #fff;
  animation: gpsPulse 1.4s infinite;
}

@keyframes gpsPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.45; }
  100% { transform: scale(1); opacity: 1; }
}

/* Main Container */
.main-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px 18px;
}

/* Divine Perumal Hero Slideshow Carousel */
.hero-slideshow {
  position: relative;
  width: 100%;
  height: 410px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 22px;
  border: 2px solid var(--gold-bright);
  box-shadow: var(--shadow-md);
  background: #1a0608;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.85s ease-in-out, transform 6s ease-out;
  transform: scale(1.03);
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(24, 5, 7, 0.92) 0%,
    rgba(42, 10, 14, 0.52) 48%,
    rgba(0, 0, 0, 0.15) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 32px;
  color: #fff;
}

.slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-bright);
  color: #290e04;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-slide-overlay h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  margin-bottom: 4px;
}

.hero-slide-overlay p {
  font-size: 0.95rem;
  color: var(--gold-soft);
  max-width: 780px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.slide-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.slide-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(20, 6, 8, 0.65);
  color: #fff;
  border: 1px solid var(--gold-bright);
  font-size: 1.15rem;
  cursor: pointer;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.slide-nav-btn:hover {
  background: var(--maroon-deep);
  transform: translateY(-50%) scale(1.08);
}

.slide-nav-btn.prev { left: 16px; }
.slide-nav-btn.next { right: 16px; }

.slide-dots {
  position: absolute;
  bottom: 16px;
  right: 24px;
  display: flex;
  gap: 8px;
  z-index: 15;
}

.slide-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--gold-bright);
  cursor: pointer;
  transition: all 0.25s;
}

.slide-dot.active {
  width: 28px;
  background: var(--gold-bright);
}

.card-darshan-thumb {
  width: 100%;
  height: 145px;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  border-bottom: 2px solid var(--gold-bright);
}

@media (max-width: 768px) {
  .hero-slideshow {
    height: 290px;
  }
  .hero-slide-overlay {
    padding: 18px 18px 28px;
  }
  .hero-slide-overlay h2 {
    font-size: 1.22rem;
  }
  .hero-slide-overlay p {
    font-size: 0.82rem;
  }
}

/* Live Proximity Alert Banner (Core Feature requested by User) */
.proximity-live-banner {
  background: linear-gradient(135deg, #1b365d 0%, #0f203c 100%);
  color: #fff;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1.5px solid var(--gold-bright);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.proximity-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.radar-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radar-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(224, 169, 56, 0.2);
  border: 1.5px solid var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.radar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.radar-select, .sim-select {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
}

.radar-select option, .sim-select option {
  color: #111;
  background: #fff;
}

.btn-gold {
  background: var(--gold-bright);
  color: #2b1206;
  border: none;
  padding: 6px 12px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

.btn-gold:hover {
  background: #f0bc4c;
  transform: translateY(-1px);
}

.btn-outline-light {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 6px 11px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.76rem;
  cursor: pointer;
}

/* Nearby Alert Cards Strip */
.nearby-alerts-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.nearby-alert-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(224, 169, 56, 0.5);
  border-radius: 10px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  backdrop-filter: blur(6px);
}

.nearby-alert-card.arrived-highlight {
  background: linear-gradient(135deg, rgba(23, 122, 70, 0.45), rgba(13, 74, 42, 0.65));
  border: 2px solid #4ade80;
}

.nearby-distance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gold-bright);
  color: #241004;
  font-weight: 700;
  font-size: 0.73rem;
  padding: 2px 8px;
  border-radius: 999px;
}

.nearby-alert-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.nearby-alert-actions a, .nearby-alert-actions button {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.btn-map-link {
  background: #3b82f6;
  color: #fff;
}

.btn-checkin-now {
  background: #10b981;
  color: #fff;
}

/* Stats Summary Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-info h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--maroon-deep);
}

.stat-info p {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-icon {
  font-size: 1.45rem;
  background: var(--bg-accent);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navigation Tabs */
.nav-tabs-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  overflow-x: auto;
}

.tab-btn {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.74rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--maroon-deep);
  color: #fff;
  border-color: var(--maroon-deep);
  box-shadow: var(--shadow-sm);
}

/* Filter & Search Bar */
.filters-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 2;
  min-width: 220px;
  position: relative;
}

.search-input-wrap input {
  width: 100%;
  padding: 7px 12px 7px 34px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.8rem;
  background: var(--bg-primary);
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.filter-select {
  flex: 1;
  min-width: 155px;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
}

.nadu-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.nadu-pill {
  background: var(--bg-accent);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.nadu-pill.active {
  background: var(--maroon-deep);
  color: #fff;
  border-color: var(--maroon-deep);
}

/* Temple Directory Cards Grid */
.temples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

.temple-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.temple-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.temple-card.is-visited {
  border: 2px solid var(--green-visited);
}

.card-top-band {
  background: linear-gradient(90deg, var(--maroon-deep) 0%, var(--maroon-mid) 100%);
  color: #fff;
  padding: 7px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
}

.dd-badge {
  background: var(--gold-bright);
  color: #2b1006;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.73rem;
}

.distance-pill {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.72rem;
}

.card-body {
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kshetram-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--maroon-deep);
  line-height: 1.3;
}

.location-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.deity-box {
  background: var(--bg-accent);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-left: 3px solid var(--saffron);
}

.deity-row strong {
  color: var(--maroon-deep);
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.71rem;
}

.meta-tag {
  background: #f2ebe1;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 600;
}

.legend-preview {
  font-size: 0.78rem;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

.card-footer {
  padding: 9px 13px;
  border-top: 1px solid var(--border-color);
  background: #faf6ee;
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-card {
  flex: 1;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-main);
  text-align: center;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-card:hover {
  background: var(--bg-accent);
}

.btn-card.btn-visit-toggle.visited {
  background: var(--green-visited);
  color: #fff;
  border-color: var(--green-visited);
}

.btn-card.btn-primary-maroon {
  background: var(--maroon-deep);
  color: #fff;
  border-color: var(--maroon-deep);
}

/* Interactive Map Section */
#map-container {
  width: 100%;
  height: 560px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-md);
  z-index: 10;
}

/* Modals (Temple Details + Arrival Confirmation Check-In Modal) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 8, 5, 0.72);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  border: 2px solid var(--gold-bright);
}

.modal-header {
  background: linear-gradient(135deg, var(--maroon-deep), var(--maroon-mid));
  color: #fff;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.modal-close {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}

.modal-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.detail-item {
  background: var(--bg-accent);
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
}

.detail-item span {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.detail-item strong {
  color: var(--maroon-deep);
  font-size: 0.92rem;
}

/* Phone Notification Toast (Simulated / Real Local Notification) */
.phone-notification-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  max-width: 390px;
  width: calc(100% - 36px);
  background: #141b2d;
  color: #fff;
  border-left: 6px solid var(--gold-bright);
  border-radius: 14px;
  padding: 15px 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 3000;
  display: none;
  flex-direction: column;
  gap: 10px;
  animation: slideInRight 0.35s ease-out;
}

.phone-notification-toast.show {
  display: flex;
}

@keyframes slideInRight {
  from { transform: translateX(110%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Mobile Bottom App Navigation Bar */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 253, 249, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1.5px solid #e5cfa3;
  display: none;
  justify-content: space-around;
  align-items: center;
  padding: 6px 6px 8px;
  z-index: 1200;
  box-shadow: 0 -6px 20px rgba(94, 17, 22, 0.12);
}

.mobile-nav-item {
  flex: 1;
  background: none;
  border: none;
  color: #6b5a4c;
  font-size: 0.71rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-nav-icon {
  width: 34px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mobile-nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.namam-bordered-icon {
  border: 1.5px solid #d49424;
  border-radius: 6px;
  padding: 2px;
  background: #fffdf8;
  box-shadow: 0 1px 4px rgba(94, 17, 22, 0.22);
}

.mobile-nav-item.active {
  color: var(--maroon-deep);
}

.mobile-nav-item.active .mobile-nav-icon {
  background: rgba(224, 169, 56, 0.24);
  color: var(--maroon-deep);
}

.mobile-nav-item.active .namam-bordered-icon {
  border-color: var(--maroon-deep);
  background: #fff9eb;
  box-shadow: 0 2px 6px rgba(94, 17, 22, 0.3);
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }
}

/* Sacred Site Footer */
.site-footer {
  background: linear-gradient(135deg, #2b060a 0%, var(--maroon-deep) 50%, #3d0910 100%);
  color: rgba(255, 255, 255, 0.9);
  border-top: 3px solid var(--gold-bright);
  margin-top: 48px;
  padding: 36px 24px 28px;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
}

.site-footer-inner {
  max-width: 1380px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.site-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
}

.site-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 480px;
}

.site-footer-brand p {
  font-size: 0.79rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  margin: 0;
}

.site-footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-footer-link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.35);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.site-footer-link:hover {
  background: var(--gold-bright);
  color: #2b1006;
  border-color: var(--gold-bright);
  transform: translateY(-1px);
}

.site-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.8);
}

.site-footer-bottom strong {
  color: var(--gold-bright);
  font-weight: 700;
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .top-tirunamam-bar {
    justify-content: center;
    text-align: center;
    font-size: 0.7rem;
    padding: 5px 10px;
    gap: 4px;
  }

  .top-tirunamam-bar #current-coords-badge {
    display: none;
  }

  .app-header {
    padding: 8px 12px;
  }

  .header-inner {
    position: relative;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .brand-area {
    align-self: center;
    padding: 4px 10px 4px 8px;
  }

  .brand-title h1 {
    font-size: 1.02rem;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1.5px solid var(--gold-bright);
    background: rgba(0, 0, 0, 0.32);
    color: var(--gold-bright);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
  }

  .mobile-menu-toggle.open {
    background: var(--gold-bright);
    color: #2b1006;
  }

  .header-controls {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    width: 100%;
    z-index: 2500;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
    margin-top: 0;
    background: rgba(28, 4, 7, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 213, 79, 0.5);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
  }

  .header-controls.mobile-menu-open {
    display: flex;
    animation: mobileMenuOverlayIn 0.18s ease-out;
  }

  @keyframes mobileMenuOverlayIn {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .header-controls #devotee-auth-area {
    width: 100%;
    justify-content: center !important;
    flex-wrap: wrap;
  }

  .header-controls #devotee-auth-area button,
  .header-controls .gps-pill-btn,
  .header-controls .fb-btn {
    width: 100%;
    justify-content: center !important;
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
  }

  .lang-switcher {
    width: 100%;
    justify-content: center;
  }

  .lang-btn {
    flex: 1;
    text-align: center;
    padding: 7px 6px;
    font-size: 0.75rem;
  }

  .main-container {
    padding: 12px 10px;
  }

  .hero-slideshow {
    height: 270px;
    margin-bottom: 14px;
    border-radius: 14px;
  }

  .slide-nav-btn {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
    top: 24%;
  }

  .slide-nav-btn.prev { left: 8px; }
  .slide-nav-btn.next { right: 8px; }

  .hero-slide-overlay {
    padding: 14px 14px 26px;
  }

  .slide-badge {
    font-size: 0.68rem;
    padding: 3px 9px;
    margin-bottom: 5px;
  }

  .hero-slide-overlay h2 {
    font-size: 1.08rem;
    line-height: 1.25;
  }

  .hero-slide-overlay p {
    font-size: 0.76rem;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .slide-actions {
    margin-top: 8px;
    gap: 6px;
  }

  .slide-dots {
    bottom: 8px;
    right: 12px;
    gap: 5px;
  }

  .proximity-live-banner {
    padding: 12px;
    margin-bottom: 14px;
  }

  .proximity-banner-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .radar-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .radar-select,
  .sim-select {
    width: 100%;
    max-width: 100%;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }

  .stat-card {
    padding: 10px 12px;
  }

  .stat-info h3 {
    font-size: 1.12rem;
  }

  .stat-info p {
    font-size: 0.68rem;
  }

  .stat-icon {
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
  }

  .nav-tabs-bar {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 6px;
  }

  .nav-tabs-bar .tab-btn {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    font-size: 0.71rem;
    padding: 6px 8px;
  }

  .filters-panel {
    padding: 10px 12px;
  }

  .search-row {
    flex-direction: column;
    gap: 8px;
  }

  .search-input-wrap,
  .filter-select {
    width: 100%;
    min-width: 0;
    flex: none;
  }

  .temples-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #map-container {
    height: 380px;
  }

  .site-footer {
    padding-bottom: 84px; /* Space for mobile bottom nav */
  }
  .site-footer-top,
  .site-footer-bottom {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .site-footer-links {
    justify-content: center;
  }
}
