:root {
  --saffron: #d95d1e;
  --saffron-dark: #b3430c;
  --saffron-light: #fff0e6;
  --maroon: #5c1616;
  --gold: #c89b3c;
  --gold-light: #f6e7c1;
  --bg: #fffdf8;
  --bg-alt: #fdf6ea;
  --card-bg: #ffffff;
  --text: #2a1d17;
  --text-muted: #6b584f;
  --border: #eadbc8;
  --shadow: 0 8px 24px rgba(92, 22, 22, 0.08);
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans Devanagari', 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

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

.hidden {
  display: none !important;
}

/* Top Bar */
.top-bar {
  background: var(--maroon);
  color: var(--gold-light);
  text-align: center;
  padding: 7px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--maroon);
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  background: #fff;
  flex-shrink: 0;
}

.brand-om {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--saffron), var(--maroon));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
}

.brand-text strong {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
}

.brand-text small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--saffron);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-lang {
  background: var(--saffron-light);
  color: var(--saffron-dark);
  border: 1px solid var(--saffron);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-lang:hover {
  background: var(--saffron);
  color: #fff;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--maroon);
}

/* Hero */
.hero {
  position: relative;
  background: radial-gradient(circle at top, #7d2116 0%, #4b1010 65%, #2d0909 100%);
  color: #fff;
  padding: 72px 0 64px;
  text-align: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(200, 155, 60, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero-badge {
  display: inline-block;
  background: rgba(200, 155, 60, 0.2);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.hero-portrait-wrap {
  margin: 0 auto 18px;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, var(--gold), var(--saffron));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero-portrait {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #fff8ec;
  display: block;
}

.hero h1 {
  font-size: clamp(1.65rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.hero-location {
  color: var(--gold-light);
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.hero-quote {
  font-style: italic;
  color: rgba(255, 255, 255, 0.88);
  max-width: 600px;
  margin: 0 auto 26px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--saffron), var(--saffron-dark));
  color: #fff;
  box-shadow: 0 4px 14px rgba(217, 93, 30, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #e56a2b, var(--saffron));
}

.btn-outline {
  border: 1.5px solid var(--gold-light);
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.06);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-outline-dark {
  border: 1.5px solid var(--border);
  color: var(--text);
  background: #fff;
}

.btn-danger {
  background: #c62828;
  color: #fff;
}

.btn-danger-outline {
  border: 1px solid #c62828 !important;
  color: #c62828 !important;
  background: #fff !important;
}

/* Sections */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 36px;
}

.section-tag {
  display: inline-block;
  color: var(--saffron-dark);
  background: var(--saffron-light);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  color: var(--maroon);
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  color: var(--gold);
}

.divider::before,
.divider::after {
  content: '';
  height: 1.5px;
  width: 60px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Biography */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.bio-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.bio-card h3 {
  color: var(--maroon);
  margin-bottom: 12px;
}

.bio-card p + p {
  margin-top: 12px;
}

.bio-chapter {
  margin-top: 20px;
  margin-bottom: 6px;
  color: var(--saffron-dark);
  font-size: 1.05rem;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 4px;
}

.bio-vani {
  margin: 14px 0;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  font-style: italic;
  font-weight: 600;
  color: var(--maroon);
  text-align: center;
}

.bio-highlights {
  display: grid;
  gap: 14px;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.hi-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.highlight-item strong {
  color: var(--maroon);
  display: block;
  margin-bottom: 2px;
}

.highlight-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.gurudev-card {
  margin-top: 28px;
  background: linear-gradient(135deg, #fffaf0 0%, #fffdf8 100%);
  border: 1px solid var(--gold);
  border-left: 5px solid var(--maroon);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
}

.gurudev-card h3 {
  color: var(--maroon);
  margin: 6px 0 10px;
}

.guru-doha {
  font-style: italic;
  font-weight: 600;
  color: var(--saffron-dark);
  margin-bottom: 10px;
}

.gurudev-card p + p {
  margin-top: 10px;
}

/* Miracles Section */
.miracle-search-wrap {
  max-width: 460px;
  margin: 0 auto 24px;
}

.miracle-search-wrap input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.miracles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.miracle-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--saffron);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.15s, box-shadow 0.2s;
}

.miracle-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(92, 22, 22, 0.12);
}

.miracle-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--saffron-dark);
}

.miracle-card h3 {
  font-size: 1.04rem;
  color: var(--maroon);
  line-height: 1.35;
}

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

.miracle-btn {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--saffron);
  background: var(--saffron-light);
  color: var(--saffron-dark);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.miracle-btn:hover {
  background: var(--saffron);
  color: #fff;
}

/* Main Temple Golden Frame Showcase */
.main-temple-showcase {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px dashed var(--gold);
}

.main-temple-heading {
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  color: var(--maroon);
  margin: 6px 0 8px;
}

.golden-frame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
}

.golden-frame-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(92, 22, 22, 0.12);
  border: 1px solid var(--gold-light);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.golden-frame-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(92, 22, 22, 0.18);
}

.golden-frame-border {
  padding: 7px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8e38a 0%, #d4af37 30%, #9b7016 55%, #f5dc7b 80%, #c89b3c 100%);
  box-shadow: inset 0 0 0 2px #6b1d1d, 0 4px 12px rgba(0, 0, 0, 0.18);
}

.golden-frame-border img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #fff8e7;
}

.golden-frame-card figcaption {
  margin-top: 12px;
  padding: 4px 6px;
}

.golden-frame-card figcaption strong {
  display: block;
  color: var(--maroon);
  font-size: 0.98rem;
  margin-bottom: 3px;
}

.golden-frame-card figcaption span {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* YouTube Video Slider */
.video-slider-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.video-main-player {
  max-width: 780px;
  margin: 0 auto 22px;
}

.video-iframe-ratio {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #1a0c0a;
}

.video-iframe-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-now-playing {
  margin-top: 10px;
  text-align: center;
  font-weight: 700;
  color: var(--maroon);
  font-size: 0.96rem;
}

.video-slider-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.video-slider-header h3 {
  color: var(--maroon);
  font-size: 1.05rem;
}

.video-slider-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-slider-nav a {
  text-decoration: none;
}

.video-slider-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
}

.video-slide-card {
  flex: 0 0 230px;
  scroll-snap-align: start;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}

.video-slide-card:hover {
  transform: translateY(-2px);
  border-color: var(--saffron);
}

.video-slide-card.active-slide {
  border-color: var(--saffron);
  background: var(--saffron-light);
  box-shadow: 0 6px 16px rgba(217, 93, 30, 0.2);
}

.video-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a0c0a;
}

.video-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 1.5rem;
}

.video-slide-title {
  padding: 9px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 6-Layer Vanshavali Toolbar */
.tree-toolbar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  display: grid;
  gap: 12px;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.search-box {
  flex: 1 1 220px;
}

.search-box input,
.filter-group select {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
}

.view-toggle {
  display: flex;
  gap: 6px;
}

.btn-tab {
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

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

.zoom-controls,
.edit-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.btn-sm {
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-sm:hover {
  background: var(--saffron-light);
}

.btn-accent {
  background: var(--saffron-light);
  border-color: var(--saffron);
  color: var(--saffron-dark);
}

.btn-accent.active-edit {
  background: var(--saffron);
  color: #fff;
}

/* Legend */
.tree-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.82rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.legend-btn {
  cursor: pointer;
  transition: all 0.2s;
}

.legend-btn:hover {
  border-color: var(--saffron);
  background: var(--saffron-light);
}

.legend-btn.active-layer {
  background: var(--maroon);
  color: #fff;
  border-color: var(--maroon);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot.l1 { background: #5c1616; }
.dot.l2 { background: #d95d1e; }
.dot.l3 { background: #c89b3c; }
.dot.l4 { background: #2e7d32; }
.dot.l5 { background: #1565c0; }
.dot.l6 { background: #6a1b9a; }

/* Tree Viewport & Connectors */
.tree-viewport {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: auto;
  padding: 28px 20px;
  min-height: 440px;
  max-height: 75vh;
}

.tree-canvas {
  transform-origin: top center;
  transition: transform 0.2s ease;
  display: inline-block;
  min-width: 100%;
  text-align: center;
}

.tree ul {
  padding-top: 22px;
  position: relative;
  display: flex;
  justify-content: center;
  list-style: none;
}

.tree li {
  float: left;
  text-align: center;
  list-style-type: none;
  position: relative;
  padding: 22px 8px 0 8px;
}

/* Connectors */
.tree li::before,
.tree li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 2px solid #d5bfa6;
  width: 50%;
  height: 22px;
}

.tree li::after {
  right: auto;
  left: 50%;
  border-left: 2px solid #d5bfa6;
}

.tree li:only-child::after,
.tree li:only-child::before {
  display: none;
}

.tree li:only-child {
  padding-top: 0;
}

.tree li:first-child::before,
.tree li:last-child::after {
  border: 0 none;
}

.tree li:last-child::before {
  border-right: 2px solid #d5bfa6;
  border-radius: 0 6px 0 0;
}

.tree li:first-child::after {
  border-radius: 6px 0 0 0;
}

.tree ul ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid #d5bfa6;
  width: 0;
  height: 22px;
}

/* Member Card inside Tree */
.node-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px 8px;
  width: 148px;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.node-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(92, 22, 22, 0.14);
}

.node-card.highlight-match {
  border-color: #d95d1e !important;
  background: #fff3e0;
  box-shadow: 0 0 0 4px rgba(217, 93, 30, 0.25);
}

.node-card.layer-1 { border-top: 5px solid #5c1616; width: 190px; background: #fff9f0; }
.node-card.layer-2 { border-top: 4px solid #d95d1e; width: 160px; }
.node-card.layer-3 { border-top: 4px solid #c89b3c; }
.node-card.layer-4 { border-top: 4px solid #2e7d32; }
.node-card.layer-5 { border-top: 4px solid #1565c0; }
.node-card.layer-6 { border-top: 4px solid #6a1b9a; }

.node-photo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  background: #fff;
  margin-bottom: 6px;
}

.node-card.layer-1 .node-photo {
  width: 72px;
  height: 72px;
}

.node-layer-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--saffron-light);
  color: var(--maroon);
  margin-bottom: 4px;
}

.node-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  word-break: break-word;
}

.node-rel {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.node-toggle-btn {
  margin-top: 6px;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  color: var(--maroon);
  font-weight: 600;
}

.node-edit-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--saffron);
  color: #fff;
  font-size: 0.7rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Layer List View */
.layer-list-view {
  display: grid;
  gap: 20px;
}

.layer-group {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.layer-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.layer-group-header h3 {
  color: var(--maroon);
  font-size: 1.05rem;
}

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

.list-member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.2s;
}

.list-member-card:hover {
  border-color: var(--saffron);
}

.list-member-card img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.list-member-card strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
}

.list-member-card small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Info Cards, Events, Gallery, Contact */
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.info-card,
.schedule-card,
.contact-card,
.bhajan-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.info-card h3,
.schedule-card h3,
.contact-card h3 {
  color: var(--maroon);
  margin-bottom: 10px;
}

.events-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-table td {
  padding: 10px 6px;
  border-bottom: 1px dashed var(--border);
}

.schedule-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--saffron-dark);
}

.event-list {
  list-style: none;
  display: grid;
  gap: 14px;
}

.event-list li strong {
  display: block;
  color: var(--saffron-dark);
}

.event-list li span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  aspect-ratio: 4/3;
}

.gal-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 2.2rem;
  padding: 16px;
  text-align: center;
}

.gal-placeholder span {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--maroon);
}

.bhajan-box h3 {
  color: var(--maroon);
  margin-bottom: 14px;
  text-align: center;
}

.bhajan-card h4 {
  color: var(--saffron-dark);
  margin-bottom: 6px;
}

.contact-meta {
  margin: 14px 0 18px;
  color: var(--text-muted);
}

.upi-box {
  background: var(--bg-alt);
  border: 1px dashed var(--gold);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0 18px;
  font-size: 0.9rem;
}

.contact-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.contact-form input,
.contact-form textarea,
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.92rem;
}

.form-status {
  padding: 10px 12px;
  border-radius: 8px;
  background: #e8f5e9;
  color: #1b5e20;
  font-weight: 600;
  font-size: 0.88rem;
}

/* Footer */
.footer {
  background: var(--maroon);
  color: var(--gold-light);
  text-align: center;
  padding: 26px 16px;
}

.footer-sub {
  margin-top: 4px;
  font-size: 0.88rem;
  opacity: 0.85;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 10, 8, 0.65);
}

.modal-content {
  position: relative;
  z-index: 2;
  background: #fff;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
}

.modal-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  flex-shrink: 0;
}

.layer-badge {
  display: inline-block;
  background: var(--saffron-light);
  color: var(--saffron-dark);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.relation-text {
  color: var(--maroon);
  font-weight: 600;
  font-size: 0.88rem;
}

.modal-details {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: var(--bg-alt);
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.92rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--maroon);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1100;
  background: var(--maroon);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .bio-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fffdf8;
    flex-direction: column;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-block;
  }
}
