/* ═══════════════════════════════════════════════════
   BharatDevasthanam — style.css
   Aesthetic: Sacred Kerala — warm saffron & lamp gold,
   deep garnet, lush green. Traditional with modern clarity.
═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Mukta:wght@300;400;600;700&family=Noto+Serif+Malayalam:wght@400;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --saffron:      #E8651A;
  --saffron-deep: #C04E0A;
  --gold:         #D4A017;
  --gold-light:   #F7D97A;
  --gold-pale:    #FDF3D0;
  --garnet:       #7B1C2E;
  --garnet-deep:  #4A0D1A;
  --cream:        #FEF8EE;
  --ivory:        #FFFCF5;
  --ink:          #1C1008;
  --ink-soft:     #3D2B14;
  --stone:        #7A6850;
  --stone-light:  #B09A7A;
  --green:        #2D5A27;
  --green-soft:   #4A7C42;
  --border:       #E8D5A8;
  --border-soft:  #F0E4C0;
  --shadow:       rgba(28,16,8,0.12);
  --shadow-md:    rgba(28,16,8,0.20);

  --font-display: 'Libre Baskerville', Georgia, serif;
  --font-body:    'Mukta', 'Segoe UI', sans-serif;
  --font-mal:     'Noto Serif Malayalam', serif;

  --radius:     10px;
  --radius-lg:  18px;
  --transition: 0.25s ease;
  --max-w:      1280px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--saffron); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--saffron-deep); }
button { cursor: pointer; font-family: var(--font-body); }
ul { list-style: none; }

/* ── Utility ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/* ══════════════════════════
   COOKIE BANNER
══════════════════════════ */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--garnet-deep);
  color: #fff;
  padding: 1rem 1.5rem;
  display: flex; align-items: center; gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 3px solid var(--gold);
  box-shadow: 0 -4px 20px var(--shadow-md);
  transform: translateY(0);
  transition: transform 0.4s ease;
}
#cookie-banner.hidden { transform: translateY(110%); pointer-events: none; }
#cookie-banner p { flex: 1; font-size: 0.9rem; line-height: 1.5; min-width: 200px; }
#cookie-banner a { color: var(--gold-light); text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }
.btn-accept, .btn-decline {
  padding: 0.5rem 1.2rem;
  border: none; border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 600;
  transition: all var(--transition);
}
.btn-accept { background: var(--gold); color: var(--ink); }
.btn-accept:hover { background: var(--gold-light); }
.btn-decline { background: transparent; color: #ccc; border: 1px solid #666; }
.btn-decline:hover { color: #fff; border-color: #999; }

/* ══════════════════════════
   HEADER / NAV
══════════════════════════ */
header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--garnet-deep);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 16px var(--shadow-md);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-w); margin: 0 auto;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
}
.logo { display: flex; flex-direction: column; line-height: 1.1; }
.logo-main {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.01em;
}
.logo-sub { font-size: 0.72rem; color: var(--stone-light); letter-spacing: 0.08em; text-transform: uppercase; }

.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem; font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}
.nav-links a:hover { background: rgba(212,160,23,0.18); color: var(--gold-light); }
.nav-links a.active { color: var(--gold-light); }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none;
  padding: 6px;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px;
  background: var(--gold-light);
  border-radius: 2px; transition: all 0.3s;
}

/* ══════════════════════════
   STATE SWITCHER BAR
══════════════════════════ */
.state-switcher-bar {
  background: linear-gradient(to right, var(--ivory), #fff);
  border-bottom: 1.5px solid var(--border-soft);
  padding: 0.75rem 0;
  position: sticky;
  top: 64px; /* below sticky header */
  z-index: 990;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.state-switcher-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.state-switcher-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
}

.state-tabs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.state-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.2rem;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-soft);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.state-tab:hover {
  border-color: var(--saffron);
  color: var(--saffron);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.state-tab.active {
  background: var(--saffron);
  border-color: var(--saffron);
  color: #fff;
  box-shadow: 0 4px 15px rgba(232,101,26,0.25);
}

.state-tab.coming-soon {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--cream);
  font-weight: 500;
}

.soon-badge {
  font-size: 0.6rem;
  background: var(--stone-light);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-left: 4px;
}

/* ══════════════════════════
   CONTRIBUTE SECTION
══════════════════════════ */
.contribute-section {
  background: var(--cream);
  padding: 5rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.contribute-section::before {
  content: '🪔';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  opacity: 0.15;
}

.contribute-section h2 {
  font-family: var(--font-display);
  color: var(--garnet-deep);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.contribute-section p {
  color: var(--ink-soft);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.contribute-section .map-btn {
  background: var(--saffron);
  color: #fff;
  border: none;
}

.contribute-section .map-btn:hover {
  background: var(--saffron-deep);
  color: #fff;
}

/* ══════════════════════════
   AD CONTAINERS
══════════════════════════ */
.ad-container {
  text-align: center;
  background: var(--cream);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem;
}
.ad-label {
  display: block; font-size: 0.65rem; color: var(--stone);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}
.ad-placeholder {
  background: var(--gold-pale);
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--stone); font-size: 0.8rem;
  min-height: 90px; margin: 0 auto;
}
.ad-top .ad-placeholder { max-width: 728px; height: 90px; }
.ad-mid .ad-placeholder { max-width: 728px; height: 90px; margin: 0 auto; }
.ad-sidebar { margin-top: 2rem; }
.ad-sidebar .ad-placeholder { max-width: 300px; height: 250px; margin: 0 auto; }
.ad-mid { padding: 1rem 1.5rem; }

/* ══════════════════════════
   HERO
══════════════════════════ */
.hero {
  background:
    linear-gradient(160deg, rgba(74,13,26,0.92) 0%, rgba(28,16,8,0.88) 55%, rgba(45,90,39,0.85) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%23D4A017' opacity='0.18'/%3E%3C/svg%3E");
  background-size: cover, 60px 60px;
  color: #fff;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(212,160,23,0.12), transparent);
  pointer-events: none;
}
/* decorative border top */
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--saffron), var(--gold), transparent);
}

.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }

.hero-eyebrow {
  font-size: 0.78rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold-light);
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.82);
  max-width: 560px; margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* Search Form */
.search-form {
  display: flex; gap: 0; max-width: 580px; margin: 0 auto 2.5rem;
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.search-form input {
  flex: 1; padding: 1rem 1.25rem;
  border: none; font-size: 1rem;
  font-family: var(--font-body);
  background: rgba(255,252,245,0.96);
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.search-form input::placeholder { color: var(--stone); }
.search-form button {
  padding: 1rem 1.75rem;
  background: var(--saffron);
  color: #fff;
  border: none;
  font-size: 1rem; font-weight: 700;
  letter-spacing: 0.03em;
  transition: background var(--transition);
  white-space: nowrap;
}
.search-form button:hover { background: var(--saffron-deep); }

/* Hero Stats */
.hero-stats {
  display: flex; justify-content: center; gap: 2.5rem;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat strong {
  font-family: var(--font-display);
  font-size: 1.8rem; color: var(--gold-light);
  line-height: 1;
}
.stat span { font-size: 0.78rem; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.2rem; }
/*Maps*/

/* ═════════ TEMPLE MAP SECTION ═════════ */

/* ═════════ MAP SECTION — hero background ═════════ */

.map-section {
  position: relative;
  padding: 4rem 0;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  /* minimum height so the bg image has room to breathe */
  min-height: 320px;
  display: flex;
  align-items: center;
}

/* Background image layer
   Replace hero-bg.jpg with your own temple photo.
   A free option: https://unsplash.com/s/photos/kerala-temple
   Download, rename hero-bg.jpg, place in same folder as index.html */
.map-section-bg {
  position: absolute;
  inset: 0;
  background:
    /* dark gradient over photo so text stays readable */
    linear-gradient(
      120deg,
      rgba(28,10,2,0.82) 0%,
      rgba(28,10,2,0.65) 50%,
      rgba(45,90,39,0.60) 100%
    ),
    url('hero-bg.jpg') center center / cover no-repeat;
  z-index: 0;
}

/* Fallback colour when hero-bg.jpg is missing */
.map-section-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #2d1200 0%, #1a3a0a 100%);
  z-index: -1;
}

/* Gold shimmer bar at bottom edge */
.map-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--saffron,#e8832a), var(--gold), transparent);
  z-index: 2;
}

.map-section-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  width: 100%;
}

.map-section-text { flex: 1; min-width: 260px; }

/* Override section-label colour for dark bg */
.map-section .section-label {
  color: var(--gold, #C8932A);
  opacity: 1;
}

.map-section h2 {
  margin-top: 0.4rem;
  margin-bottom: 0.8rem;
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.map-text {
  color: rgba(255,255,255,0.82);
  max-width: 560px;
  font-size: 1rem;
  line-height: 1.8;
  margin: 0 0 1.25rem;
}

/* Feature bullet list */
.map-features {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.map-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
}
.map-features li svg { color: var(--gold, #C8932A); flex-shrink: 0; }

/* Button */
.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  background: var(--gold, #C8932A);
  color: #1C0A02;
  text-decoration: none;
  padding: 16px 32px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35), 0 0 0 2px rgba(200,147,42,0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.map-btn:hover {
  color: #1C0A02;
  background: #E8B84B;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.45), 0 0 0 3px rgba(200,147,42,0.5);
}
.map-btn svg { flex-shrink: 0; }

/* Mobile */
@media (max-width: 760px) {
  .map-section { padding: 2.5rem 0; }
  .map-section-inner { flex-direction: column; align-items: flex-start; }
  .map-btn { width: 100%; justify-content: center; }
}



/* ══════════════════════════
   DISTRICTS BAR
══════════════════════════ */
.districts-bar {
  background: var(--cream);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.districts-bar .section-label {
  font-family: var(--font-display);
  font-size: 0.85rem; font-weight: 700;
  color: var(--garnet);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 1rem;
}
.district-chips,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;   /* ← force horizontal, overrides any list default */
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.chip {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--ink-soft);
  transition: all var(--transition);
  white-space: nowrap;
}
.chip:hover, .chip.active {
  background: var(--garnet);
  border-color: var(--garnet);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(123,28,46,0.3);
}

/* ══════════════════════════
   MAIN LAYOUT — 2 columns
══════════════════════════ */
.main-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
  align-items: start;
}

/* ── FILTERS SIDEBAR ── */
.filters {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky; top: 80px;
}
.filter-heading {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--garnet);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-soft);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.filter-group { margin-bottom: 1.25rem; }
.filter-group label {
  display: block; font-size: 0.78rem; font-weight: 700;
  color: var(--stone); text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.filter-group select,
.filter-group input {
  width: 100%; padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem; font-family: var(--font-body);
  color: var(--ink);
  background: var(--ivory);
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A6850' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
}
.filter-group input { background-image: none; }
.filter-group select:focus,
.filter-group input:focus { border-color: var(--saffron); }

#clear-filters {
  width: 100%;
  padding: 0.6rem; border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: transparent; color: var(--stone);
  font-size: 0.85rem; font-weight: 600;
  transition: all var(--transition);
}
#clear-filters:hover { background: var(--cream); color: var(--garnet); border-color: var(--garnet); }

/* ── RESULTS HEADER ── */
.results-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  margin-bottom: 1.5rem;
}
#results-heading {
  font-family: var(--font-display);
  font-size: 1.15rem; color: var(--ink);
}
#results-count { color: var(--saffron); }
.sort-row { display: flex; align-items: center; gap: 0.5rem; }
.sort-row label { font-size: 0.82rem; color: var(--stone); font-weight: 600; }
.sort-row select {
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem; font-family: var(--font-body); color: var(--ink);
  background: var(--ivory);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A6850' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 12px;
  cursor: pointer;
}

/* ══════════════════════════
   TEMPLE GRID & CARDS
══════════════════════════ */
.temple-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.temple-card {
  background: #fff;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  animation: fadeUp 0.4s ease both;
}
.temple-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.temple-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--shadow-md);
  border-color: var(--gold);
}
.temple-card:hover::before { transform: scaleX(1); }

/* Famous badge */
.badge-famous {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--garnet);
  color: #fff;
  font-size: 0.62rem; font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 100px; letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-deity {
  font-size: 0.72rem; font-weight: 700; color: var(--saffron);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
}
.card-name {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  color: var(--garnet-deep);
  line-height: 1.3;
  margin-bottom: 0.75rem;
  padding-right: 3rem; /* room for badge */
}
.card-desc {
  font-size: 0.875rem; color: var(--ink-soft);
  line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
  margin-bottom: 1rem;
}
.card-meta {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-soft);
}
.card-meta-row {
  display: flex; align-items: flex-start; gap: 0.5rem;
  font-size: 0.8rem; color: var(--stone);
}
.card-meta-row svg { flex-shrink: 0; margin-top: 1px; color: var(--saffron); }
.card-meta-row span { line-height: 1.4; }

.card-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1rem;
  color: var(--garnet);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card-open::after {
  content: '→';
  color: var(--saffron);
  transition: transform var(--transition);
}
.temple-card:hover .card-open::after { transform: translateX(3px); }

/* No results */
.no-results {
  text-align: center;
  padding: 4rem 2rem; color: var(--stone);
  grid-column: 1/-1;
}
.no-results svg { margin: 0 auto 1rem; opacity: 0.4; }
.no-results p { font-size: 1rem; }

/* ══════════════════════════
   PAGINATION
══════════════════════════ */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 0.4rem; margin-top: 2.5rem; flex-wrap: wrap;
}
.pagination button {
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff; color: var(--ink-soft);
  font-size: 0.9rem; font-weight: 600;
  transition: all var(--transition);
  min-width: 40px;
}
.pagination button:hover { border-color: var(--saffron); color: var(--saffron); }
.pagination button.active {
  background: var(--saffron); border-color: var(--saffron);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232,101,26,0.3);
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ══════════════════════════
   INFO SECTION
══════════════════════════ */
.info-section {
  background: var(--cream);
  border-top: 3px solid var(--border);
  padding: 4rem 0;
}
.info-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.info-text h2 {
  font-family: var(--font-display);
  font-size: 1.9rem; color: var(--garnet-deep);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}
.info-text p {
  color: var(--ink-soft); font-size: 0.95rem;
  line-height: 1.75; margin-bottom: 0.9rem;
}
.info-cards { display: flex; flex-direction: column; gap: 1rem; }
.info-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--saffron);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.info-card strong {
  display: block; font-family: var(--font-display);
  font-size: 1rem; color: var(--garnet);
  margin-bottom: 0.4rem;
}
.info-card p { font-size: 0.875rem; color: var(--stone); line-height: 1.6; }

/* ══════════════════════════
   FOOTER
══════════════════════════ */
footer {
  background: var(--garnet-deep);
  color: rgba(255,255,255,0.75);
  padding-top: 0;
  margin-top: 0;
}

/* Gold decorative top border */
footer::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--saffron), var(--gold), transparent);
}

.footer-inner {
  display: grid;
  grid-template-columns: 240px 1fr 1fr 1fr;
  gap: 2.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
}

.footer-brand {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem; color: var(--gold-light);
  font-weight: 700;
}
.footer-tagline {
  font-size: 0.8rem; color: var(--stone-light);
  font-style: italic; line-height: 1.5;
}
.footer-brand p {
  font-size: 0.78rem; color: rgba(255,255,255,0.45);
  line-height: 1.6; margin-top: 0.5rem;
}

/* The nav inside footer */
.footer-links {
  display: contents; /* let footer-col children sit directly in the grid */
}


.footer-col h3 {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(212,160,23,0.25);
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col li a {
  font-size: 0.875rem; color: rgba(255,255,255,0.6);
  transition: color var(--transition);
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.footer-col li a:hover { color: var(--gold-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.1rem 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem; color: rgba(255,255,255,0.35);
  max-width: var(--max-w); margin: 0 auto;
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--gold-light); }

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

/* ══════════════════════════
   MODAL / DETAIL OVERLAY
══════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(28,16,8,0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--ivory);
  border-radius: var(--radius-lg);
  max-width: 600px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(30px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.temple-detail-modal { max-width: 760px; }
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  background: linear-gradient(135deg, var(--garnet-deep), var(--garnet));
  padding: 1.5rem 2rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
}
.modal-deity { font-size: 0.72rem; font-weight: 700; color: var(--gold-light); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 0.4rem; }
.modal-name { font-family: var(--font-display); font-size: 1.5rem; color: #fff; line-height: 1.2; }
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.15); border: none;
  color: #fff; width: 36px; height: 36px;
  border-radius: 50%; font-size: 1.1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.3); }
.modal-body { padding: 1.75rem 2rem; }
.modal-body p { font-size: 0.95rem; color: var(--ink-soft); line-height: 1.75; margin-bottom: 1.25rem; }
.modal-info { display: flex; flex-direction: column; gap: 0.75rem; }
.modal-info-row { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.9rem; }
.modal-info-label { font-weight: 700; color: var(--garnet); min-width: 80px; flex-shrink: 0; }
.modal-info-value { color: var(--ink-soft); }

/* ══════════════════════════
   RESPONSIVE
══════════════════════════ */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .main-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .info-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--garnet-deep);
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 3px solid var(--gold);
    gap: 0.1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 0.65rem 1rem; width: 100%; }
  .nav-toggle { display: flex; }
  header { position: sticky; }

  .hero { padding: 3.5rem 1.25rem 3rem; }
  .hero-stats { gap: 1.5rem; }
  .stat strong { font-size: 1.4rem; }

  .search-form { flex-direction: column; border-radius: var(--radius); }
  .search-form input { border-radius: var(--radius) var(--radius) 0 0; }
  .search-form button { border-radius: 0 0 var(--radius) var(--radius); }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .temple-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 1.25rem; }
  .modal-header { padding: 1.25rem; }
}

/* ══════════════════════════
   DECORATIVE DIVIDER
══════════════════════════ */
.section-divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 0 auto 2rem;
  max-width: var(--max-w); padding: 0 1.5rem;
}
.section-divider::before, .section-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.section-divider span {
  font-size: 1.1rem; color: var(--saffron); flex-shrink: 0;
}

/* ══════════════════════════
   BACK TO TOP
══════════════════════════ */
#back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 500;
  width: 44px; height: 44px;
  background: var(--garnet);
  border: none; border-radius: 50%;
  color: #fff; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(123,28,46,0.4);
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: all var(--transition);
}
#back-to-top.visible { opacity: 1; pointer-events: all; transform: translateY(0); }
#back-to-top:hover { background: var(--saffron); transform: translateY(-2px); }

/* ══════════════════════════
   MODAL — extra fields & actions
══════════════════════════ */
.modal-badge {
  display: inline-block;
  font-size: 0.72rem;
  margin-bottom: 0.5rem;
}
.modal-desc {
  font-size: 0.93rem;
  color: var(--stone, #888);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-style: italic;
}
.modal-story {
  position: relative;
  margin: 1.25rem 0 1.5rem;
  padding: 1.25rem 1.35rem 1.25rem 1.5rem;
  background:
    linear-gradient(135deg, rgba(253,243,208,0.82), rgba(255,255,255,0.94));
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}
.modal-story::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 92% 12%, rgba(212,160,23,0.16), transparent 32%);
  pointer-events: none;
}
.modal-story-label {
  position: relative;
  display: inline-flex;
  margin-bottom: 0.65rem;
  color: var(--garnet);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.modal-story p {
  position: relative;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.8;
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.modal-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--garnet, #7B1C1C);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.15s, transform 0.15s;
}
.modal-map-btn:hover { background: #9a2424; color: #fff; transform: translateY(-1px); }
.modal-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: transparent;
  border: 1.5px solid var(--border, rgba(100,60,20,0.2));
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink, #2A1A0A);
  cursor: pointer;
  font-family: var(--font-body, sans-serif);
  transition: border-color 0.15s, background 0.15s;
}
.modal-submit-btn:hover { border-color: var(--saffron, #e8832a); background: rgba(232,131,42,0.06); }

/* ══════════════════════════
   SUBMIT FORM MODAL
══════════════════════════ */
.submit-overlay .modal { max-width: 580px; }

.submit-form { display: flex; flex-direction: column; gap: 0.9rem; }

.sf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 480px) { .sf-row { grid-template-columns: 1fr; } }

.sf-group { display: flex; flex-direction: column; gap: 4px; }
.sf-group label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--stone, #888);
}
.sf-req { color: var(--saffron, #e8832a); }

.sf-group input,
.sf-group select,
.sf-group textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--border, rgba(100,60,20,0.2));
  border-radius: 8px;
  font-family: var(--font-body, sans-serif);
  font-size: 0.9rem;
  color: var(--ink, #2A1A0A);
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}
.sf-group input:focus,
.sf-group select:focus,
.sf-group textarea:focus { border-color: var(--saffron, #e8832a); }

.sf-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.sf-cancel {
  padding: 10px 22px;
  background: transparent;
  border: 1.5px solid var(--border, rgba(100,60,20,0.2));
  border-radius: 999px;
  font-family: var(--font-body, sans-serif);
  font-size: 0.9rem;
  color: var(--stone, #888);
  cursor: pointer;
  transition: border-color 0.15s;
}
.sf-cancel:hover { border-color: #aaa; }

.sf-submit {
  padding: 10px 26px;
  background: var(--garnet, #7B1C1C);
  border: none;
  border-radius: 999px;
  font-family: var(--font-body, sans-serif);
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.sf-submit:hover { background: #9a2424; transform: translateY(-1px); }

.sf-msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}
.sf-msg--success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.sf-msg--error   { background: #fff1f2; color: #9f1239; border: 1px solid #fecdd3; }

/* ══════════════════════════
   PLEDGE SECTION
══════════════════════════ */
.pledge-section {
  background: linear-gradient(135deg, #1C0A02 0%, #2d1200 60%, #1a3a0a 100%);
  padding: 3.5rem 1.5rem;
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--gold, #C8932A);
}
.pledge-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 10% 50%, rgba(200,147,42,0.10), transparent);
  pointer-events: none;
}
.pledge-inner {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}
.pledge-lamp {
  font-size: 3.5rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(200,147,42,0.6));
  animation: lamp-flicker 3s ease-in-out infinite alternate;
}
@keyframes lamp-flicker {
  0%   { filter: drop-shadow(0 0 8px rgba(200,147,42,0.5)); }
  100% { filter: drop-shadow(0 0 18px rgba(232,131,42,0.9)); }
}
.pledge-body { flex: 1; }
.pledge-body h2 {
  font-family: var(--font-display, Georgia, serif);
  color: var(--gold, #C8932A);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin-bottom: 0.9rem;
}
.pledge-text {
  color: rgba(255,255,255,0.90);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 0.75rem;
}
.pledge-text strong { color: #fff; font-weight: 800; }
.pledge-sub {
  color: rgba(255,255,255,0.65);
  font-size: 0.92rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-style: italic;
}
.pledge-seal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border: 1.5px solid rgba(200,147,42,0.5);
  border-radius: 999px;
  color: var(--gold, #C8932A);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
@media (max-width: 600px) {
  .pledge-inner { flex-direction: column; gap: 1rem; }
  .pledge-lamp { font-size: 2.5rem; }
}

/* ══════════════════════════
   QUICK DISTRICTS SECTION
══════════════════════════ */
.quick-districts {
  background: var(--cream-dark, #F0E6CC);
  border-top: 1px solid var(--border, rgba(100,60,20,0.18));
  border-bottom: 1px solid var(--border, rgba(100,60,20,0.18));
  padding: 1rem 0;
  overflow-x: auto;   /* scroll on very narrow screens */
}
.quick-districts .container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
