/* ═══════════════════════════════════════════════════════════════
   dharma.css — Gopuram Dusk · Dharma tab + Bottom Nav
   Divya Sutra v3.0 · Single unified temple theme
═══════════════════════════════════════════════════════════════ */

/* ── Bottom Navigation Bar ──────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: auto;
  min-height: 58px;
  background: rgba(10,4,0,.97);
  border-top: 1px solid rgba(240,192,72,.12);
  display: flex;
  align-items: center;
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 32px rgba(0,0,0,.65),
              0 -1px 0 rgba(240,192,72,.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.bnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(240,192,72,.32);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.12s ease;
  padding: 8px 2px;
  min-height: 54px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.bnav-btn:active { transform: scale(0.90); }

.bnav-btn:hover { color: rgba(240,192,72,.6); }

.bnav-btn.active { color: var(--gold, #F0C060); }

.bnav-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 2.5px;
  background: linear-gradient(90deg, #C07010, #F0C060);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(240,192,72,.35);
}

.bnav-btn.active svg {
  filter: drop-shadow(0 0 5px rgba(240,192,72,.35));
  stroke-width: 2.2;
}

.bnav-btn svg {
  width: 20px; height: 20px;
  stroke-width: 1.8;
}

/* Push content above fixed bottom nav */
.content-wrap {
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
}

/* ── Dharma Tab — Hero Card ─────────────────────────────────── */
.dharma-hero {
  position: relative;
  overflow: hidden;
  padding: 1.25rem 1rem 1rem;
  background: linear-gradient(135deg, rgba(224,120,32,.07) 0%, rgba(196,32,48,.05) 100%);
}

.dharma-color-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #C07010, #F0C060, #FF8C00);
  box-shadow: 0 0 14px rgba(240,192,72,.2);
}

.dharma-headline {
  font-family: 'Spectral', 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 .45rem;
  line-height: 1.35;
}

.dharma-meta {
  font-size: .77rem;
  color: var(--text3);
  letter-spacing: .03em;
}

/* ── Mantra Card ────────────────────────────────────────────── */
.mantra-card {
  text-align: center;
  padding: 1.1rem 1rem;
  background: rgba(240,192,72,.04);
}

.mantra-label {
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: .5rem;
  font-weight: 800;
}

.mantra-text {
  font-family: 'Noto Sans Devanagari', 'Noto Sans Kannada', serif;
  font-size: 1.55rem;
  font-weight: 600;
  background: linear-gradient(135deg, #F8DC80, #E8A820);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.4;
  margin-bottom: .35rem;
}

.mantra-deity {
  font-size: .8rem;
  color: var(--text3);
}

/* ── Do / Avoid Cards ───────────────────────────────────────── */
.do-card, .avoid-card {
  padding: .85rem .9rem;
}

.do-card   { border-left: 3px solid var(--green); }
.avoid-card{ border-left: 3px solid var(--red);   }

.card-title {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.do-card .card-title   { color: var(--green); }
.avoid-card .card-title{ color: var(--red);   }

.do-card ul, .avoid-card ul {
  margin: 0; padding: 0 0 0 1.1rem;
  list-style: disc;
}

.do-card li, .avoid-card li {
  font-size: .83rem;
  color: var(--text2);
  margin-bottom: .28rem;
  line-height: 1.4;
}

.do-card   { background: rgba(104,204,128,.06); }
.avoid-card{ background: rgba(255,112,112,.06); }

/* ── Guidance Cards ─────────────────────────────────────────── */
.guidance-card {
  padding: .9rem 1rem;
  border-left: 3px solid rgba(240,192,72,.25);
  background: rgba(240,192,72,.03);
  border-radius: 14px;
  transition: border-color .2s, box-shadow .2s;
}

.guidance-card:hover {
  border-left-color: rgba(240,192,72,.5);
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
}

.guidance-card.guidance-auspicious,
.guidance-card.guidance-highly\ auspicious {
  border-left-color: var(--accent);
  background: rgba(224,120,32,.06);
}

.guidance-card.guidance-inauspicious,
.guidance-card.guidance-highly\ inauspicious {
  border-left-color: var(--red);
  background: rgba(255,112,112,.06);
}

.guidance-header {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .55rem;
}

.guidance-icon   { font-size: 1.4rem; flex-shrink: 0; }

.guidance-source {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text3);
  line-height: 1;
  font-weight: 800;
}

.guidance-value {
  font-family: 'Spectral', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.guidance-deity {
  margin-left: auto;
  font-size: .72rem;
  color: var(--text3);
  white-space: nowrap;
}

.guidance-action {
  font-size: .84rem;
  color: var(--text2);
  margin: 0;
  line-height: 1.5;
}

.guidance-mantra {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: .95rem;
  background: linear-gradient(135deg, #F8DC80, #E8A820);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: .4rem;
}

/* ── Dharma timing row ──────────────────────────────────────── */
.timing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .35rem 0;
  font-size: .84rem;
  color: var(--text2);
  border-bottom: 1px solid rgba(240,192,72,.1);
}

.timing-row:last-child { border-bottom: none; }
.timing-row.inauspicious { color: var(--red); }

/* ── Color of Day swatch ────────────────────────────────────── */
.dharma-color-swatch {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  color: var(--text3);
  margin-top: .5rem;
}

.color-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(240,192,72,.15);
  flex-shrink: 0;
}

/* ── Dharma Skeleton ────────────────────────────────────────── */
.dharma-skeleton {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: .75rem 0;
}

.dharma-skeleton .skel-card {
  height: 80px;
  border-radius: 12px;
  background: var(--surface);
  animation: shimmer-dusk 1.6s infinite;
}

@keyframes shimmer-dusk {
  0%   { opacity: .5; }
  50%  { opacity: .9; }
  100% { opacity: .5; }
}

/* ── Knowledge Tree (Explore tab) ───────────────────────────── */
.knowledge-wrap { padding: .75rem 0; }

.tree-intro {
  font-size: .82rem;
  color: var(--text3);
  margin-bottom: 1rem;
  padding: 0 .15rem;
}

.tree-section {
  border: 1px solid rgba(240,192,72,.1);
  border-radius: 14px;
  margin-bottom: .65rem;
  overflow: hidden;
  background: var(--surface);
  transition: border-color .2s;
}

.tree-section:hover { border-color: rgba(240,192,72,.22); }

.tree-section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  gap: .75rem;
}

.tree-section-title {
  font-family: 'Spectral', serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.tree-section-sub {
  font-size: .75rem;
  color: var(--text3);
  margin-top: .15rem;
}

.tree-chevron {
  width: 18px; height: 18px;
  flex-shrink: 0;
  stroke: var(--text3);
  transition: transform .2s ease;
  fill: none;
  stroke-width: 2.5;
}

.tree-chevron.open { transform: rotate(180deg); }

.tree-section-body {
  border-top: 1px solid rgba(240,192,72,.08);
  padding: .85rem 1rem 1rem;
}

.tree-desc {
  font-size: .82rem;
  color: var(--text3);
  margin-bottom: .75rem;
  font-style: italic;
}

.tree-node { margin-bottom: .85rem; }
.tree-node:last-child { margin-bottom: 0; }

.tree-node-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: .4rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.tree-node-name::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.tree-items {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding-left: .75rem;
}

.tree-chip {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .75rem;
  background: rgba(240,192,72,.1);
  color: var(--gold);
  font-weight: 600;
  border: 1px solid rgba(240,192,72,.2);
}

.tree-category { margin-bottom: .65rem; }

.tree-category-label {
  font-size: .72rem;
  font-weight: 800;
  color: var(--text3);
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: .35rem;
  padding-left: .75rem;
}

.tree-category-deity {
  font-size: .72rem;
  color: var(--text3);
  margin-left: .4rem;
  font-weight: 400;
}

/* ── Dharma festival rows ────────────────────────────────────── */
.dharma-fest-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 0;
  border-bottom: 1px solid rgba(240,192,72,.08);
  font-size: .84rem;
  color: var(--text2);
  transition: color .15s;
}

.dharma-fest-row:last-child { border-bottom: none; }
.dharma-fest-row:hover { color: var(--text); }
.dharma-fest-icon { font-size: 1.1rem; }

/* ── Hide footer — bottom nav replaces it ─────────────────── */
.app-footer { display: none !important; }

/* ── Responsive tweaks ──────────────────────────────────────── */
@media (min-width: 600px) {
  .bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 16px 16px 0 0;
    border-left: 1px solid rgba(240,192,72,.1);
    border-right: 1px solid rgba(240,192,72,.1);
  }
}
