/* Bhagavad Gita under /books — chapter cards, theme diagrams, shloka reader */
.gita-page .gita-orientation {
  margin-bottom: 2rem;
}

.gita-chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.85rem;
  margin: 1.5rem 0 2rem;
}

a.gita-chapter-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.05rem;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 252, 246, 0.88);
  border: 1px solid rgba(28, 20, 16, 0.1);
  border-radius: 0.35rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

a.gita-chapter-card:hover {
  border-color: rgba(180, 83, 9, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(42, 28, 18, 0.08);
}

.gita-ch-num {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #f7f1e8;
  background: linear-gradient(145deg, #8b4513, #b45309);
  border-radius: 999px;
}

.gita-chapter-card strong {
  display: block;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.25;
  margin-bottom: 0.15rem;
}

.gita-chapter-card .sa {
  display: block;
  font-family: "Noto Serif Devanagari", Georgia, serif;
  color: #5c534c;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.gita-chapter-card .meta {
  font-size: 0.8rem;
  color: #7a7168;
}

.gita-theme-panel {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.25rem;
  align-items: center;
  margin: 0.5rem 0 1.75rem;
  padding: 1.25rem 1.35rem;
  background:
    radial-gradient(420px 180px at 90% 10%, rgba(180, 83, 9, 0.14), transparent 60%),
    linear-gradient(165deg, rgba(255, 252, 246, 0.95), rgba(239, 230, 216, 0.75));
  border: 1px solid rgba(28, 20, 16, 0.1);
  border-radius: 0.4rem;
}

.gita-theme-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b45309;
}

.gita-theme-copy h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.gita-theme-copy p:last-child {
  margin: 0;
  color: #5c534c;
}

.gita-diagram {
  min-height: 12.5rem;
  position: relative;
  display: grid;
  place-items: center;
}

.gita-diagram svg {
  width: min(100%, 280px);
  height: auto;
  overflow: visible;
}

.gita-diagram .gd-pulse {
  transform-origin: center;
  animation: gita-pulse 3.2s ease-in-out infinite;
}

.gita-diagram .gd-spin {
  transform-origin: center;
  animation: gita-spin 18s linear infinite;
}

.gita-diagram .gd-breathe {
  transform-origin: center;
  animation: gita-breathe 4s ease-in-out infinite;
}

@keyframes gita-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes gita-spin {
  to { transform: rotate(360deg); }
}

@keyframes gita-breathe {
  0%, 100% { transform: scale(0.96); }
  50% { transform: scale(1.04); }
}

.gita-ch-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}

.gita-ch-nav a {
  color: #b45309;
  text-decoration: none;
  font-weight: 500;
}

.gita-ch-nav a:hover {
  text-decoration: underline;
}

.gita-ch-nav-muted {
  color: #a39a90;
}

.gita-section-title {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  margin: 0 0 0.85rem;
}

.gita-shloka-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

a.gita-shloka-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.7rem 0.85rem;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 252, 246, 0.7);
  border: 1px solid transparent;
  border-bottom-color: rgba(28, 20, 16, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease;
}

a.gita-shloka-row:hover {
  background: rgba(255, 252, 246, 0.98);
  border-color: rgba(180, 83, 9, 0.28);
}

.gita-ref {
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: #b45309;
}

.gita-shloka-row .sa {
  font-family: "Noto Serif Devanagari", Georgia, serif;
  font-size: 0.98rem;
  color: #2a1c12;
  line-height: 1.45;
}

.gita-author-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.gita-author-label {
  font-size: 0.8rem;
  color: #5c534c;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gita-author-select {
  min-width: min(100%, 16rem);
  max-width: 22rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(28, 20, 16, 0.18);
  border-radius: 0.3rem;
  background: #fffaf3;
  color: #1c1410;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.92rem;
}

.gita-shloka-text .sr-sa,
.gita-shloka-text .gita-translit {
  white-space: pre-line;
}

.gita-translit {
  margin: 0.85rem 0 0;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.95rem;
  color: #5c534c;
  font-style: italic;
  line-height: 1.55;
}

.gita-interpretation {
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(58, 36, 18, 0.18);
  text-align: left;
}

.gita-interp-author {
  margin: 0 0 0.85rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.05rem;
  color: #8b4513;
}

.gita-field {
  margin-bottom: 1rem;
}

.gita-field h3 {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a7168;
  font-weight: 600;
}

.gita-field p {
  margin: 0;
  font-family: Outfit, Georgia, serif;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #2a1c12;
  white-space: pre-line;
}

.gita-field p.sa {
  font-family: "Noto Serif Devanagari", Georgia, serif;
}

.gita-empty {
  margin: 0;
  color: #7a7168;
  font-style: italic;
}

.gita-verse-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 48rem;
  margin: 1.25rem auto 2.5rem;
  padding: 0 1rem;
}

.gita-verse-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(28, 20, 16, 0.14);
  border-radius: 0.3rem;
  background: rgba(255, 252, 246, 0.9);
  color: #1c1410;
  text-decoration: none;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.9rem;
}

.gita-verse-nav-btn:hover {
  border-color: rgba(180, 83, 9, 0.4);
  color: #b45309;
}

.gita-verse-nav-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.gita-verse-nav-mid {
  color: #b45309;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.gita-verse-nav-mid:hover {
  text-decoration: underline;
}

.books-page .bk-scroll-thumb.bk-gita-thumb {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 236, 200, 0.55), transparent 55%),
    linear-gradient(160deg, #5c3310, #b45309 55%, #2a1c12);
}

@media (max-width: 720px) {
  .gita-theme-panel {
    grid-template-columns: 1fr;
  }

  .gita-diagram {
    min-height: 10rem;
    order: -1;
  }

  a.gita-shloka-row {
    grid-template-columns: 2.8rem 1fr;
  }
}
