/* ==========================================================================
   EventWiki Kerala (ഉത്സവം വിക്കി) - Authentic Kerala Cultural Design System
   Inspired by Kerala Temple Architecture, Kasavu Gold, Nilavilakku Brass Glow,
   Theyyam Vermilion, Backwater Emerald, and CurrentUndo.com's real-time accuracy engine.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Anek+Malayalam:wght@300;400;500;600;700;800&family=Manjari:wght@400;700&family=Outfit:wght@400;500;600;700;800&family=Cinzel:wght@600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Kerala Cultural Palette: Dark Mode (Temple Dusk & Nilavilakku Glow) */
  --bg-base: #0c0906;              /* Deep Kerala teakwood & sanctum night */
  --bg-surface: #15100a;           /* Dark wooden pagoda & temple sanctum */
  --bg-surface-elevated: #1e1710;  /* Carved rosewood & brass fixtures */
  --bg-surface-highlight: #281f16; /* Warm oil lamp illuminated surface */

  --kasavu-gold: #d4af37;          /* Authentic Kerala Kasavu Zari Gold */
  --kasavu-gold-bright: #fbbf24;
  --kasavu-gold-dark: #b48316;
  --kasavu-glow: rgba(212, 175, 55, 0.28);

  --theyyam-vermilion: #dc2626;    /* Sacred Theyyam red & Sindooram */
  --theyyam-crimson: #991b1b;
  --theyyam-glow: rgba(220, 38, 38, 0.25);

  --emerald-backwater: #059669;    /* Kerala monsoon greenery & betel leaf */
  --emerald-glow: rgba(5, 150, 105, 0.25);

  --nilavilakku-amber: #f59e0b;    /* Brass oil lamp flame */
  --sand-ivory: #faf5eb;           /* Kerala Kasavu Mundu Off-White */
  --sandalwood: #e5d5be;           /* Chandanam / Sandalwood paste */

  --border-subtle: rgba(212, 175, 55, 0.14);
  --border-strong: rgba(212, 175, 55, 0.32);
  --border-glow: rgba(245, 158, 11, 0.45);

  --text-main: #fdfaf3;
  --text-muted: #bfa98e;
  --text-dim: #7f6e5a;

  --status-verified: #10b981;
  --status-verified-glow: rgba(16, 185, 129, 0.3);
  --status-disputed: #ef4444;
  --status-disputed-glow: rgba(239, 68, 68, 0.35);

  --card-radius: 12px;
  --card-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.85);
  --transition-smooth: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  /* Kerala Cultural Palette: Light Mode (Kasavu Mundu, Sandalwood & Morning Temple) */
  --bg-base: #f9f5ed;              /* Kerala Kasavu Mundu natural off-white */
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f2ebd9;  /* Sandalwood cream tone */
  --bg-surface-highlight: #e6dac1;
  --border-subtle: rgba(180, 131, 22, 0.22);
  --border-strong: rgba(180, 131, 22, 0.45);
  --border-glow: rgba(212, 175, 55, 0.5);

  --text-main: #1f1408;
  --text-muted: #6b553c;
  --text-dim: #947e65;

  --card-shadow: 0 10px 30px -8px rgba(139, 90, 43, 0.12);
}

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

body {
  font-family: 'Anek Malayalam', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Kerala Traditional Kasavu Ribbon Strip at top of pages/cards */
.kasavu-kara {
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--kasavu-gold),
    var(--kasavu-gold) 12px,
    var(--theyyam-crimson) 12px,
    var(--theyyam-crimson) 16px,
    var(--kasavu-gold-bright) 16px,
    var(--kasavu-gold-bright) 28px
  );
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Anek Malayalam', 'Outfit', sans-serif;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.font-malayalam {
  font-family: 'Manjari', 'Anek Malayalam', sans-serif !important;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace !important;
}

/* Ambient Nilavilakku Glow Backdrop */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background: radial-gradient(circle 900px at 50% -120px, rgba(212, 175, 55, 0.18), rgba(220, 38, 38, 0.05), transparent 75%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .ambient-glow {
  background: radial-gradient(circle 900px at 50% -120px, rgba(212, 175, 55, 0.12), rgba(220, 38, 38, 0.04), transparent 75%);
}

/* Top Navbar with Kerala Cultural Motifs */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 12, 8, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-strong);
  height: 70px;
}

[data-theme="light"] .site-header {
  background: rgba(249, 245, 237, 0.95);
  border-bottom: 1px solid var(--border-strong);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-icon-kerala {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d4af37, #991b1b);
  border: 1.5px solid var(--kasavu-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  box-shadow: 0 0 18px var(--kasavu-glow);
  position: relative;
}

.brand-text-kerala {
  display: flex;
  flex-direction: column;
}

.brand-title-malayalam {
  font-family: 'Manjari', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--kasavu-gold-bright);
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  letter-spacing: 0.02em;
}

.brand-title-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-header-action {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-header-action:hover {
  background: var(--bg-surface-highlight);
  color: var(--text-main);
  border-color: var(--kasavu-gold);
}

.btn-primary-accent {
  background: linear-gradient(135deg, #d4af37 0%, #b48316 60%, #991b1b 100%);
  color: #1a0f00 !important;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0.5rem 1.15rem;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  box-shadow: 0 4px 18px var(--kasavu-glow);
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.5);
  color: #000 !important;
}

/* Status Beacon (CurrentUndo signature glowing dot with Nilavilakku Flame pulse) */
.status-beacon {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.status-beacon.beacon-verified {
  background-color: var(--status-verified);
  box-shadow: 0 0 10px var(--status-verified);
}

.status-beacon.beacon-verified::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--status-verified);
  animation: beacon-pulse 2s infinite ease-out;
}

.status-beacon.beacon-disputed {
  background-color: var(--status-disputed);
  box-shadow: 0 0 10px var(--status-disputed);
}

.status-beacon.beacon-disputed::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--status-disputed);
  animation: beacon-pulse 1.3s infinite ease-out;
}

@keyframes beacon-pulse {
  0% { transform: scale(0.9); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Main Container */
.main-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

/* Live Signal Bar with Kerala Temple Bell / Percussion Theme */
.live-signal-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  font-size: 0.85rem;
  box-shadow: var(--card-shadow);
  border-left: 4px solid var(--kasavu-gold);
}

.live-signal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Manjari', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--kasavu-gold-bright);
  white-space: nowrap;
  padding-right: 1.25rem;
  border-right: 1px solid var(--border-subtle);
}

.live-ticker-track {
  display: flex;
  gap: 2rem;
  padding-left: 1rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.live-ticker-track::-webkit-scrollbar {
  display: none;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.ticker-item strong {
  color: var(--text-main);
}

/* Kerala Cultural Hero Section */
.hero-kerala-culture {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  margin-bottom: 2rem;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.9);
  display: grid;
  grid-template-columns: 1.35fr 360px;
  min-height: 400px;
  background-color: #0c0906;
}

.hero-background-art {
  position: absolute;
  inset: 0;
  background-image: url('/images/kerala_festival_hero.jpg');
  background-size: cover;
  background-position: center right;
  opacity: 0.55;
  filter: contrast(110%) saturate(120%);
  z-index: 0;
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(12, 9, 6, 0.96) 0%,
    rgba(12, 9, 6, 0.88) 45%,
    rgba(12, 9, 6, 0.45) 80%,
    rgba(12, 9, 6, 0.2) 100%
  );
  z-index: 1;
}

[data-theme="light"] .hero-gradient-overlay {
  background: linear-gradient(
    90deg,
    rgba(249, 245, 237, 0.96) 0%,
    rgba(249, 245, 237, 0.9) 45%,
    rgba(249, 245, 237, 0.5) 80%,
    rgba(249, 245, 237, 0.25) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 2rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-traditional-greeting {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Manjari', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--kasavu-gold-bright);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.65rem;
}

.hero-kerala-title {
  font-family: 'Manjari', 'Outfit', sans-serif;
  font-size: 2.65rem;
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 1rem;
}

.hero-kerala-title span.gold-shimmer {
  background: linear-gradient(135deg, #fbbf24 0%, #d4af37 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.35);
}

.hero-kerala-subtitle {
  color: var(--sandalwood);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 620px;
  margin-bottom: 1.75rem;
}

[data-theme="light"] .hero-kerala-subtitle {
  color: #4a3823;
}

.hero-stats-panel {
  position: relative;
  z-index: 2;
  margin: 2rem 2rem 2rem 0;
  background: rgba(21, 16, 10, 0.88);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.15rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .hero-stats-panel {
  background: rgba(255, 255, 255, 0.92);
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.6rem;
}

.stat-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-label {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.stat-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--kasavu-gold-bright);
}

/* Kerala Cultural Filter Console */
.filter-console {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--card-radius);
  padding: 1.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--card-shadow);
  border-top: 3px solid var(--kasavu-gold);
}

.filter-row-top {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap svg {
  position: absolute;
  left: 1rem;
  color: var(--kasavu-gold);
  pointer-events: none;
}

.filter-input {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 8px;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition-smooth);
}

.filter-input:focus {
  border-color: var(--kasavu-gold);
  box-shadow: 0 0 0 3px var(--kasavu-glow);
}

.filter-select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-select:focus {
  border-color: var(--kasavu-gold);
  box-shadow: 0 0 0 3px var(--kasavu-glow);
}

.category-tags-row {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
}

.category-pill {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 0.4rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
  user-select: none;
}

.category-pill:hover,
.category-pill.active {
  background: var(--bg-surface-highlight);
  color: var(--kasavu-gold-bright);
  border-color: var(--kasavu-gold);
}

.category-pill.active {
  background: var(--kasavu-glow);
  color: var(--kasavu-gold-bright);
  border-color: var(--kasavu-gold);
  font-weight: 700;
  box-shadow: 0 0 12px var(--kasavu-glow);
}

/* View Mode Switcher */
.view-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-strong);
  margin-bottom: 1.5rem;
}

.view-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Anek Malayalam', 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.view-tab-btn:hover {
  color: var(--text-main);
}

.view-tab-btn.active {
  color: var(--kasavu-gold-bright);
}

.view-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--kasavu-gold);
  box-shadow: 0 0 10px var(--kasavu-gold);
}

/* Event Cards Grid */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.75rem;
}

.event-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--card-shadow);
}

.event-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.9);
}

.card-top-bar {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-elevated);
}

.card-category-badge {
  font-size: 0.75rem;
  font-family: 'Manjari', sans-serif;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.cat-badge-pooram { background: rgba(212, 175, 55, 0.18); color: var(--kasavu-gold-bright); border: 1px solid var(--kasavu-gold); }
.cat-badge-perunaal { background: rgba(129, 140, 248, 0.18); color: #a5b4fc; border: 1px solid rgba(129, 140, 248, 0.4); }
.cat-badge-nercha { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.cat-badge-show { background: rgba(244, 63, 94, 0.18); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.4); }
.cat-badge-theyyam { background: rgba(220, 38, 38, 0.22); color: #fca5a5; border: 1px solid var(--theyyam-vermilion); }
.cat-badge-boat { background: rgba(6, 182, 212, 0.18); color: #67e8f9; border: 1px solid rgba(6, 182, 212, 0.4); }

.card-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.event-card-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.event-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.event-card-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.15s ease;
}

.event-card-title a:hover {
  color: var(--kasavu-gold-bright);
}

.event-malayalam-title {
  font-family: 'Manjari', sans-serif;
  font-size: 1.1rem;
  color: var(--kasavu-gold-bright);
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.event-meta-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.event-meta-line svg {
  color: var(--kasavu-gold);
  flex-shrink: 0;
}

.event-highlights-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
  margin-bottom: 1rem;
}

.highlight-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 0.74rem;
  padding: 3px 8px;
  color: var(--sandalwood);
}

[data-theme="light"] .highlight-chip {
  color: #5c4731;
}

/* Dispute Alert in Card */
.card-dispute-alert {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  color: #fca5a5;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

/* Card Action Footer */
.event-card-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-elevated);
}

.btn-card-action {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0.38rem 0.7rem;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-card-action:hover {
  background: var(--bg-surface-highlight);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-verify {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.btn-verify:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--status-verified);
  color: #6ee7b7;
}

.btn-dispute {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.btn-dispute:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: var(--status-disputed);
  color: #fca5a5;
}

/* Details Page Styles */
.event-details-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--card-radius);
  padding: 2.2rem;
  margin-bottom: 2rem;
  box-shadow: var(--card-shadow);
  position: relative;
  border-top: 4px solid var(--kasavu-gold);
}

.details-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.details-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.details-breadcrumb a:hover {
  color: var(--kasavu-gold-bright);
}

.details-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.details-title-wrap h1 {
  font-size: 2.3rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.details-action-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Dispute Banner */
.dispute-banner-box {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.45);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.dispute-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.22);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dispute-banner-content h4 {
  color: #fca5a5;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.dispute-banner-content p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

/* Schedule Timeline Stepper */
.schedule-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--card-radius);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--card-shadow);
}

.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.timeline-stream {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  padding-left: 2rem;
}

.timeline-stream::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--kasavu-gold);
  opacity: 0.4;
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 2px solid var(--kasavu-gold);
  box-shadow: 0 0 8px var(--kasavu-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--kasavu-gold-bright);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.timeline-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--card-radius);
  width: 100%;
  max-width: 540px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  animation: modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 4px solid var(--kasavu-gold);
}

@keyframes modal-pop {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--bg-surface-elevated);
}

/* Form controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-input, .form-textarea, .form-select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 8px;
  padding: 0.7rem 0.95rem;
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--kasavu-gold);
  box-shadow: 0 0 0 3px var(--kasavu-glow);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

/* Map View Leaflet Container */
#kerala-events-map {
  width: 100%;
  height: 580px;
  border-radius: var(--card-radius);
  border: 1px solid var(--border-strong);
  z-index: 10;
}

[data-theme="dark"] .leaflet-layer,
[data-theme="dark"] .leaflet-control-zoom-in,
[data-theme="dark"] .leaflet-control-zoom-out,
[data-theme="dark"] .leaflet-control-attribution {
  filter: invert(100%) hue-rotate(180deg) brightness(90%) contrast(90%);
}

.leaflet-popup-content-wrapper {
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-strong);
  border-radius: 10px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
}

.leaflet-popup-tip {
  background: var(--bg-surface) !important;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-kerala-culture {
    grid-template-columns: 1fr;
  }
  .hero-stats-panel {
    margin: 0 1.5rem 1.5rem 1.5rem;
  }
  .filter-row-top {
    grid-template-columns: 1fr;
  }
  .details-header-row {
    flex-direction: column;
  }
  .events-grid {
    grid-template-columns: 1fr;
  }
}