/* ==========================================================================
   STOTRA DARSHAN - MAIN STYLESHEET
   A calm, sacred devotional library inspired by a quiet, lamp-lit puja room.
   Palette: Sandalwood Cream, Pale Chandan, Pure Tulsi, and Turmeric-Gold.
   ========================================================================== */

:root {
  /* Sandalwood & Tulsi Palette (Light Mode) */
  --bg-page: #F6EBDD;
  --bg-card: #EFDFC9;
  --bg-card-hover: #E8D5BC;
  --bg-banner: #EFDFC9;
  --primary: #3F6B3A;
  --primary-hover: #2C4E2A;
  --accent-gold: #C9922E;
  --accent-gold-soft: rgba(201, 146, 46, 0.15);
  --text-main: #2E2218;
  --text-muted: #6B5A48;
  --border-color: #D9C3A5;
  --border-gold: #C9922E;
  --shadow-sm: 0 2px 8px rgba(46, 34, 24, 0.06);
  --shadow-md: 0 4px 18px rgba(46, 34, 24, 0.1);
  --shadow-lg: 0 10px 30px rgba(46, 34, 24, 0.14);

  /* Deity Accent Tokens */
  --deity-shiva: #6E7F8D;
  --deity-vishnu: #3B5B8C;
  --deity-lakshmi: #C2607A;
  --deity-hanuman: #C8512B;
  --deity-durga: #A52A3A;
  --deity-saraswati: #5FA5A0;
  --deity-ganesha: #D96B27;
  --deity-surya: #D4881E;

  /* Typography */
  --font-serif: "Cormorant Garamond", "Cinzel", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-verse: "Noto Serif", "Noto Serif Devanagari", "Tiro Devanagari Sanskrit", Georgia, serif;
  --font-size-verse: 1.35rem;

  /* Layout */
  --header-height: 72px;
  --banner-height: 44px;
  --max-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.25s ease;
}

/* Dark Theme (Lamp-lit Puja Room) */
[data-theme="dark"] {
  --bg-page: #1B1812;
  --bg-card: #26221A;
  --bg-card-hover: #312C22;
  --bg-banner: #231E16;
  --primary: #8DB77F;
  --primary-hover: #A6D298;
  --accent-gold: #E3B454;
  --accent-gold-soft: rgba(227, 180, 84, 0.15);
  --text-main: #F1E6D3;
  --text-muted: #BDB09E;
  --border-color: #3D3528;
  --border-gold: #E3B454;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Base Resets & Global Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--banner-height) + 16px);
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 50% 0%, rgba(201, 146, 46, 0.03) 0%, transparent 70%);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover, a:focus-visible {
  color: var(--primary-hover);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text-main);
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 3.5vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }

p {
  margin-bottom: 1rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  background-color: var(--bg-page);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.browse-menu-open .site-header {
  z-index: 3000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1.25rem;
  position: relative;
  z-index: 3000;
}

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

.brand-wrap:hover {
  text-decoration: none;
}

.brand-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-gold-soft) 0%, transparent 70%);
  border: 1px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--accent-gold);
  font-family: var(--font-serif);
  box-shadow: 0 0 10px rgba(201, 146, 46, 0.2);
}

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

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--accent-gold);
  font-weight: 600;
  letter-spacing: 1px;
}

/* Navigation Structure & Uniform Spacing */
.header-inner > nav,
nav[aria-label="Main Navigation"] {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 780px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 0.35rem 0.25rem;
  position: relative;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  text-decoration: none;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  text-decoration: none;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-gold);
  border-radius: 2px;
}

/* Header Dropdown Menu for All Stotrams */
.nav-dropdown {
  position: relative;
  display: inline-block;
  z-index: 3100;
}

.nav-dropdown:hover,
.nav-dropdown:focus-within {
  z-index: 3200;
}

.nav-dropdown-arrow {
  font-size: 0.75rem;
  margin-left: 3px;
  transition: transform 0.2s ease;
  display: inline-block;
}

.nav-dropdown:hover .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  min-width: 250px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 4000;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.15rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-dropdown-item:hover {
  background: var(--bg-card-hover);
  color: var(--primary);
  padding-left: 1.35rem;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.4rem 0;
}

/* Mobile Sub-Links in Drawer */
.mobile-sub-links {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.mobile-sub-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-sub-link:hover {
  color: var(--primary);
  background: var(--bg-card);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Hide empty mobile actions on desktop to maintain pure flex distribution */
@media (min-width: 769px) {
  .header-actions {
    display: none !important;
  }
}

.header-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-family: inherit;
  transition: var(--transition);
}

.header-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
}

/* 3-in-1 Language Dropdown */
.lang-dropdown-wrap {
  position: relative;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  width: 320px;
  display: none;
  z-index: 1050;
}

.lang-menu.open {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

.lang-group {
  margin-bottom: 1rem;
}

.lang-group:last-child {
  margin-bottom: 0;
}

.lang-group-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.lang-select {
  width: 100%;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
}

.lang-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.25rem;
}

/* Mobile Menu Drawer - Strictly hidden on desktop */
.mobile-menu-drawer {
  display: none;
}

@media (min-width: 769px) {
  .mobile-menu-drawer {
    display: none !important;
  }
}

/* ==========================================================================
   BROWSE DIRECTORY MEGA MENU (Header Dropdown Directory)
   ========================================================================== */

.header-brand-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Browse Pill Button */
.browse-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  color: var(--text-main);
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  user-select: none;
  white-space: nowrap;
}

.browse-nav-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
  color: var(--primary);
  box-shadow: 0 0 12px rgba(201, 146, 46, 0.22);
  transform: translateY(-1px);
}

.browse-nav-btn:active {
  transform: translateY(0);
}

.browse-nav-btn.active,
.browse-nav-btn[aria-expanded="true"] {
  background: var(--primary);
  color: #FFFFFF !important;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(63, 107, 58, 0.3);
}

.browse-nav-btn .browse-icon {
  font-size: 1rem;
  line-height: 1;
}

.browse-nav-btn .browse-arrow {
  display: inline-block;
  font-size: 0.75rem;
  transition: transform 0.25s ease;
  line-height: 1;
}

.browse-nav-btn.active .browse-arrow,
.browse-nav-btn[aria-expanded="true"] .browse-arrow {
  transform: rotate(180deg);
}

.mobile-browse-btn {
  display: none;
}

/* Mobile drawer quick browse button */
.browse-drawer-trigger-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--accent-gold-soft);
  border: 1px solid var(--border-gold);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  margin-bottom: 0.5rem;
}

.browse-drawer-trigger-btn:hover {
  background: var(--accent-gold);
  color: #FFFFFF;
}

/* Mega Menu Container */
.browse-mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--bg-card);
  border-bottom: 2px solid var(--accent-gold);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
  z-index: 2500;
  max-height: calc(100vh - var(--header-height) - 12px);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.browse-mega-menu.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 3100 !important;
}

/* Sacred Backdrop Dimmer when Browse Mega Menu is Open on Desktop */
body.browse-menu-open::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1950;
  animation: fadeIn 0.2s ease-in-out;
  pointer-events: auto;
}

.mega-menu-container {
  padding: 1.75rem 1.5rem 1.5rem;
}

/* Top bar in Mega Menu */
.mega-menu-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}

.mega-title-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mega-om {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  border: 1px solid var(--border-gold);
}

.mega-title-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.mega-title-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 1px solid var(--border-color);
  padding-left: 0.75rem;
}

.mega-close-btn {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.mega-close-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--accent-gold);
}

/* Mega Menu Columns Grid */
.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}

.mega-menu-col {
  display: flex;
  flex-direction: column;
}

.mega-col-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 0.6rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-gold-soft);
}

.mega-col-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.mega-col-sanskrit {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-verse);
}

.mega-col-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  flex: 1;
}

.mega-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-main);
  font-size: 0.9rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  text-decoration: none;
}

.mega-link .link-bullet {
  font-size: 0.85rem;
  opacity: 0.85;
  flex-shrink: 0;
}

.mega-link:hover {
  background: var(--bg-card-hover);
  color: var(--primary);
  text-decoration: none;
  transform: translateX(3px);
}

.mega-col-footer-link {
  display: inline-block;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-color);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-gold);
  transition: color 0.18s ease, transform 0.18s ease;
  text-decoration: none;
}

.mega-col-footer-link:hover {
  color: var(--primary);
  text-decoration: underline;
  transform: translateX(2px);
}

/* Bottom Strip: Scripts info & CTA */
.mega-menu-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  gap: 1.5rem;
  flex-wrap: wrap;
}

.mega-scripts-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.mega-btn-cta {
  background: var(--primary);
  color: #FFFFFF !important;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.mega-btn-cta:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(63, 107, 58, 0.35);
}


/* ==========================================================================
   SACRED VERSE ROTATING BANNER (Brihadaranyaka Upanishad 1.3.28)
   ========================================================================== */

.verse-banner {
  background-color: var(--bg-banner);
  border-bottom: 1px solid var(--accent-gold);
  font-size: 0.92rem;
  position: relative;
  z-index: 50;
  transition: var(--transition);
}

.verse-banner[hidden] {
  display: none !important;
}

.verse-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--banner-height);
  padding: 0.35rem 1rem;
  gap: 1rem;
}

.banner-content {
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: opacity 0.4s ease;
}

.banner-sanskrit {
  font-family: var(--font-verse);
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.banner-translit {
  font-style: italic;
  color: var(--text-muted);
}

.banner-meaning {
  color: var(--accent-gold);
  font-weight: 500;
}

.banner-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.banner-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.banner-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

/* ==========================================================================
   UNIFIED HEADER DEVOTIONAL BAR (Search, Language & Theme Controls)
   ========================================================================== */

.header-search-bar {
  border-top: 1px solid var(--border-color);
  background: var(--bg-page);
  padding: 0.65rem 0;
  position: relative;
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-search-bar .container {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.main-devotional-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.15rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.main-devotional-bar:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 4px 16px rgba(201, 146, 46, 0.12);
}

.header-search-bar .main-devotional-bar {
  margin-bottom: 0;
}

/* Compact Search Wrap */
.devotional-search-wrap {
  position: relative;
  flex: 0 1 360px;
  min-width: 200px;
}

.devotional-search-wrap.compact-search {
  flex: 0 1 340px;
  max-width: 380px;
}

.devotional-search-wrap .search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 2;
}

.devotional-search-input {
  width: 100%;
  padding: 0.52rem 0.9rem 0.52rem 2.35rem;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.devotional-search-input:focus {
  border-color: var(--accent-gold);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-gold-soft);
}

.devotional-search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 2500;
  max-height: 380px;
  overflow-y: auto;
}

.devotional-search-dropdown a:hover {
  background: var(--accent-gold-soft);
}

/* Parallel Controls (Script, Language & Theme Toggle) */
.devotional-bar-parallel-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.15rem;
  flex: 1 1 auto;
}

.lang-direct-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.lang-direct-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.lang-direct-select {
  padding: 0.42rem 0.75rem;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.86rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  min-width: 135px;
}

#devotionalLangSelect {
  min-width: 215px;
  max-width: 260px;
}

#uiLangSelect {
  min-width: 130px;
  max-width: 160px;
}

.lang-direct-select:hover {
  border-color: var(--accent-gold);
}

.lang-direct-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px var(--accent-gold-soft);
}

.devotional-bar-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.devotional-control-btn {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 500;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.devotional-control-btn:hover {
  background: var(--accent-gold-soft);
  border-color: var(--accent-gold);
  color: var(--primary);
  transform: translateY(-1px);
}

.meaning-fallback-badge {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.2px;
  padding: 0.12rem 0.45rem;
  margin-left: 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(201, 146, 46, 0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(201, 146, 46, 0.25);
  vertical-align: middle;
  font-style: normal;
  font-weight: 600;
}

/* Backward-compatibility support for any two-row container */
.devotional-bar-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
}
.devotional-bar-lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.lang-direct-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.lang-section-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.lang-section-label .lang-icon {
  font-size: 1.2rem;
  color: var(--accent-gold);
}
.lang-section-label .lang-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
  letter-spacing: 0.2px;
}
.lang-section-label .lang-hint {
  font-size: 0.83rem;
  color: var(--text-muted);
}

/* Fallback legacy section styling if ever present */
.devotional-lang-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 0.85rem;
}

/* ==========================================================================
   Responsive Devotional Bar Media Queries
   ========================================================================== */

/* Medium / Tablet screens (992px to 1080px): Compact dropdowns & search */
@media (max-width: 1080px) {
  .main-devotional-bar {
    gap: 0.85rem;
    padding: 0.6rem 0.95rem;
  }
  .devotional-search-wrap.compact-search {
    flex: 0 1 280px;
    min-width: 180px;
  }
  #devotionalLangSelect {
    min-width: 185px;
    max-width: 220px;
  }
  #uiLangSelect {
    min-width: 110px;
  }
  .devotional-bar-parallel-controls {
    gap: 0.85rem;
  }
}

/* Small Tablets / Large Phones (769px to 900px): Wrap into two balanced rows if needed */
@media (max-width: 900px) {
  .main-devotional-bar {
    flex-wrap: wrap;
    gap: 0.65rem;
  }
  .devotional-search-wrap.compact-search {
    flex: 1 1 260px;
    max-width: none;
  }
  .devotional-bar-parallel-controls {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border-color);
  }
}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  .header-search-bar {
    padding: 0.4rem 0;
  }
  .header-search-bar .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .main-devotional-bar,
  .header-search-bar .main-devotional-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.55rem 0.75rem;
    gap: 0.5rem;
    margin-bottom: 0;
  }

  .devotional-search-wrap,
  .devotional-search-wrap.compact-search {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .devotional-search-input {
    padding: 0.48rem 0.65rem 0.48rem 2.1rem;
    font-size: 0.86rem;
    text-overflow: ellipsis;
  }

  .devotional-search-wrap .search-icon {
    left: 0.7rem;
    font-size: 0.88rem;
  }

  .devotional-bar-parallel-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border-color);
  }

  .lang-direct-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    width: 100%;
  }

  .lang-direct-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
  }

  .lang-direct-select,
  #devotionalLangSelect,
  #uiLangSelect {
    width: 100%;
    max-width: 100%;
    font-size: 0.8rem;
    padding: 0.38rem 0.5rem;
    box-sizing: border-box;
  }

  .devotional-bar-actions {
    justify-content: flex-end;
    width: 100%;
  }

  .devotional-bar-actions .devotional-control-btn {
    padding: 0.45rem 0.7rem;
    font-size: 0.82rem;
    gap: 0.35rem;
    width: 100%;
    justify-content: center;
  }

  .lang-menu {
    right: 0;
    max-width: calc(100vw - 2.5rem);
    width: 300px;
  }
}

/* Extra Small Phones (<= 480px) */
@media (max-width: 480px) {
  .header-search-bar .container {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .main-devotional-bar,
  .header-search-bar .main-devotional-bar {
    padding: 0.45rem 0.55rem;
    gap: 0.45rem;
  }

  .devotional-search-input {
    padding: 0.42rem 0.5rem 0.42rem 1.85rem;
    font-size: 0.82rem;
  }

  .devotional-search-wrap .search-icon {
    left: 0.6rem;
    font-size: 0.82rem;
  }

  .lang-direct-select,
  #devotionalLangSelect,
  #uiLangSelect {
    max-width: 185px;
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {
  .devotional-bar-parallel-controls {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .lang-direct-select,
  #devotionalLangSelect,
  #uiLangSelect {
    max-width: 100%;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   HERO FULL-VERSE BANNER (Home & About Us)
   ========================================================================== */

.hero-sacred-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  text-align: center;
  margin: 2rem 0 3rem 0;
  position: relative;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.hero-sacred-card::before {
  content: "ॐ";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14rem;
  color: var(--accent-gold);
  opacity: 0.035;
  pointer-events: none;
  font-family: var(--font-serif);
}

.sacred-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.sacred-item {
  padding: 1rem;
  background: var(--bg-page);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.sacred-item .item-sanskrit {
  font-family: var(--font-verse);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.sacred-item .item-iast {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.sacred-item .item-english {
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 500;
}

.sacred-shanti {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--border-color);
  font-family: var(--font-verse);
  font-size: 1.45rem;
  color: var(--accent-gold);
  font-weight: 700;
}

/* ==========================================================================
   TODAY'S DARSHAN (Featured Deity & Hymn)
   ========================================================================== */

.darshan-section {
  margin: 3.5rem 0;
}

.darshan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.darshan-media {
  position: relative;
  background-color: var(--bg-card-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  overflow: hidden;
}

.darshan-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.darshan-card:hover .darshan-media img {
  transform: scale(1.03);
}

.darshan-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: var(--accent-gold);
  color: #1B1812;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.darshan-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.darshan-deity-title {
  color: var(--primary);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.darshan-stotram-title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.darshan-desc {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
}

.darshan-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-gold {
  background-color: var(--accent-gold);
  color: #1B1812;
}

.btn-gold:hover {
  background-color: #b58223;
  color: #1B1812;
}

/* ==========================================================================
   CARDS & GRIDS (Deities, Stotrams, Categories)
   ========================================================================== */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.section-title {
  margin-bottom: 0.25rem;
}

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

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3.5rem;
}

.deity-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.deity-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
  text-decoration: none;
}

.deity-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.25rem;
  border: 2px solid var(--accent-gold);
  box-shadow: var(--shadow-sm);
  background: var(--bg-page);
}

.deity-name {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.deity-sanskrit {
  font-family: var(--font-verse);
  color: var(--accent-gold);
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
}

.deity-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-page);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   STOTRAM LIBRARY FILTERS & SEARCH
   ========================================================================== */
.library-filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.library-filter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
  flex-wrap: wrap;
}

.library-filter-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.library-filter-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.library-count-pill {
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--accent-gold-soft);
  color: var(--primary);
  border: 1px solid rgba(197, 160, 89, 0.35);
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
}

.library-reset-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-fast);
}

.library-reset-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--bg-card);
}

.library-search-wrap {
  position: relative;
  margin-bottom: 1.25rem;
}

.library-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.library-search-input {
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 2.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.library-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-gold-soft);
}

.library-search-clear {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem;
  display: none;
  line-height: 1;
}

.library-search-clear:hover {
  color: var(--text-main);
}

.library-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 1rem;
  align-items: end;
}

.filter-group label {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 0.4rem;
  letter-spacing: 0.5px;
}

.active-chips-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  background: var(--accent-gold-soft);
  color: var(--text-main);
  border: 1px solid rgba(197, 160, 89, 0.4);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.active-chip:hover {
  background: rgba(197, 160, 89, 0.3);
  color: var(--primary);
}

/* ==========================================================================
   STOTRAM LIBRARY LIST VIEW & TOOLBAR
   ========================================================================== */
.library-results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0 0.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.library-results-summary {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 600;
}

.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.2rem;
}

.view-toggle-btn {
  background: none;
  border: none;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-fast);
}

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

.view-toggle-btn.active {
  background: var(--primary);
  color: #ffffff;
}

.stotrams-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.stotram-list-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.75rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.stotram-list-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
}

.stotram-list-main {
  flex: 1;
  min-width: 0;
}

.stotram-list-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.stotram-list-title {
  font-size: 1.35rem;
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
}

.stotram-list-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.stotram-list-title a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.stotram-list-sanskrit {
  font-family: var(--font-verse);
  color: var(--accent-gold);
  font-size: 1.05rem;
  margin-bottom: 0.65rem;
  letter-spacing: 0.3px;
}

.stotram-list-excerpt {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stotram-list-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stotram-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  color: var(--text-main);
}

.stotram-meta-badge.deity-badge {
  background: var(--accent-gold-soft);
  color: var(--primary);
  border-color: rgba(197, 160, 89, 0.4);
  font-weight: 600;
}

.stotram-list-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .stotram-list-item {
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
    gap: 1.25rem;
  }

  .stotram-list-actions {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 0.85rem;
  }
}

.stotram-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stotram-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-gold);
}

.stotram-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stotram-badge {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(63, 107, 58, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
}

.favorite-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
}

.favorite-btn:hover, .favorite-btn.active {
  color: #d94b4b;
}

.stotram-card-title {
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}

.stotram-card-sanskrit {
  font-family: var(--font-verse);
  color: var(--accent-gold);
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}

.stotram-card-excerpt {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stotram-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   STOTRAM READER VIEW (Verse-by-verse, Font controls, Darshan Mode)
   ========================================================================== */

.reader-hero {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  background: radial-gradient(circle at 50% 30%, var(--bg-card) 0%, transparent 80%);
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.reader-sanskrit-title {
  font-family: var(--font-verse);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.reader-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.reader-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.reader-toolbar {
  position: sticky;
  top: calc(var(--header-height) + var(--banner-height));
  z-index: 100;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reader-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.reader-btn:hover {
  border-color: var(--accent-gold);
  background: var(--bg-card-hover);
}

.reader-btn.active {
  background: var(--accent-gold);
  color: #1B1812;
  border-color: var(--accent-gold);
  font-weight: 600;
}

/* ========================================================
   COLLAPSIBLE INTRODUCTION & SIGNIFICANCE CARD
   ======================================================== */
.stotram-intro-collapsible {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg, 16px);
  margin-bottom: 2.25rem;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(46, 34, 24, 0.06));
}

.stotram-intro-collapsible:hover,
.stotram-intro-collapsible.is-expanded {
  border-color: var(--accent-gold);
  box-shadow: 0 4px 18px rgba(201, 146, 46, 0.12);
}

.intro-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.6rem;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: background 0.2s ease;
  gap: 1rem;
}

.intro-toggle-bar:hover {
  background: rgba(201, 146, 46, 0.08);
}

.intro-toggle-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.intro-toggle-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.intro-toggle-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.3;
}

.intro-toggle-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.intro-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  padding: 0.35rem 0.95rem;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.intro-toggle-bar:hover .intro-toggle-btn,
.stotram-intro-collapsible.is-expanded .intro-toggle-btn {
  background: var(--accent-gold);
  color: #1B1812;
}

.intro-toggle-arrow {
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.25s ease;
  display: inline-block;
}

.stotram-intro-collapsible.is-expanded .intro-toggle-arrow {
  transform: rotate(180deg);
}

.intro-content-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 1px dashed transparent;
}

.stotram-intro-collapsible.is-expanded .intro-content-collapse {
  grid-template-rows: 1fr;
  border-top-color: var(--border-color);
}

.intro-content-inner {
  overflow: hidden;
  padding: 0 1.75rem;
  transition: padding 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.stotram-intro-collapsible.is-expanded .intro-content-inner {
  padding: 1.6rem 1.75rem 1.85rem;
}

.intro-main-text {
  white-space: pre-line;
  color: var(--text-main);
  font-size: 1.02rem;
  line-height: 1.85;
}

.intro-meta-grid {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border-color);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.intro-meta-heading {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 0.35rem 0;
  color: var(--primary);
  font-weight: 700;
}

.intro-meta-heading.best-time-heading {
  color: var(--accent-gold);
}

.intro-meta-body {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.65;
}

.intro-close-row {
  margin-top: 1.25rem;
  padding-top: 1rem;
  text-align: right;
  border-top: 1px dotted var(--border-color);
}

.btn-intro-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-intro-close:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .intro-toggle-bar {
    padding: 0.85rem 1rem;
  }
  .intro-toggle-title {
    font-size: 1.15rem;
  }
  .intro-toggle-btn {
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
  }
  .intro-content-inner {
    padding: 0 1rem;
  }
  .stotram-intro-collapsible.is-expanded .intro-content-inner {
    padding: 1.25rem 1rem 1.4rem;
  }
}

/* Verses Layout */
.verse-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.verse-item:hover {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-md);
}

.verse-number-badge {
  display: inline-block;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.2rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}

.verse-text {
  font-family: var(--font-verse);
  font-size: var(--font-size-verse);
  line-height: 2;
  color: var(--text-main) !important; /* Verse text is never green */
  white-space: pre-line;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.verse-iast {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.8;
  white-space: pre-line;
  margin-bottom: 1.75rem;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 1.5rem;
}

.verse-meaning {
  text-align: left;
  background: var(--bg-page);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary);
  font-size: 1rem;
  line-height: 1.7;
}

.verse-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

/* ==========================================================================
   EXAMPLE 2: TEMPLE MANUSCRIPT CHITRA-KAVYA PARALLEL DARSHAN
   ========================================================================== */
.manuscript-section-intro {
  text-align: center;
  margin: 2.5rem auto 2rem;
  max-width: 680px;
}
.manuscript-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  padding: 0.35rem 1rem;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}
.manuscript-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Manuscript Card (Side-by-Side Split) */
.verse-manuscript-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl, 24px);
  padding: 2.25rem 2.5rem;
  margin-bottom: 2.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 0 1px rgba(201, 146, 46, 0.2);
  transition: all 0.35s ease;
  position: relative;
  text-align: left;
}
.verse-manuscript-card:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 16px 45px rgba(201, 146, 46, 0.18), 0 0 20px rgba(201, 146, 46, 0.12);
  transform: translateY(-2px);
}

/* 2-Column Manuscript Grid */
.manuscript-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  width: 100%;
}

/* Left: Illuminated Artwork Column */
.manuscript-artwork-col {
  width: 100%;
  min-width: 0;
}
.manuscript-artwork-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  border: 2.5px solid var(--accent-gold);
  background: rgba(14, 10, 6, 0.45);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22), 0 0 25px rgba(201, 146, 46, 0.2);
  cursor: pointer;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.manuscript-artwork-frame:hover {
  transform: scale(1.015);
  border-color: #FFE6A3;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), 0 0 35px rgba(227, 180, 84, 0.35);
}
.manuscript-illustration {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  display: block;
  transition: transform 0.5s ease;
  background: radial-gradient(circle at center, rgba(201, 146, 46, 0.08) 0%, rgba(0, 0, 0, 0.2) 100%);
}
.manuscript-artwork-frame:hover .manuscript-illustration {
  transform: scale(1.03);
}

/* Bottom Floating Darshan Bar */
.manuscript-artwork-badge {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  background: rgba(18, 14, 10, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(227, 180, 84, 0.45);
  border-radius: var(--radius-md, 10px);
  padding: 0.5rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #FFF2D6;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  transition: all 0.25s ease;
  gap: 0.5rem;
}
.manuscript-artwork-frame:hover .manuscript-artwork-badge {
  background: rgba(18, 14, 10, 0.95);
  border-color: var(--accent-gold);
}
.manuscript-badge-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #FFEAA7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.manuscript-zoom-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold);
  white-space: nowrap;
  background: rgba(201, 146, 46, 0.15);
  border: 1px solid rgba(201, 146, 46, 0.35);
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}
.manuscript-artwork-frame:hover .manuscript-zoom-pill {
  background: var(--accent-gold);
  color: #1B1812;
}

/* Right: Sacred Scripture Column */
.manuscript-scripture-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-width: 0;
  text-align: left;
}
.manuscript-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.verse-manuscript-card .verse-number-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1.5px solid var(--accent-gold);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.verse-manuscript-card .verse-text {
  font-family: var(--font-verse);
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.75;
  color: var(--text-main) !important;
  margin-bottom: 0.75rem;
  white-space: pre-line;
  letter-spacing: 0.3px;
  text-align: left;
}
.verse-manuscript-card .verse-iast {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.15rem;
  white-space: pre-line;
  text-align: left;
  border-bottom: none;
  padding-bottom: 0;
}
.verse-manuscript-card .verse-meaning {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md, 10px);
  padding: 0.95rem 1.25rem;
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-main);
  text-align: left;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
  position: relative;
}
.verse-manuscript-card .verse-meaning::before {
  content: "🌾 Meaning:";
  display: block;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  letter-spacing: 0.4px;
}
.verse-manuscript-card .verse-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0;
}
.btn-visual-darshan {
  border-color: var(--accent-gold) !important;
  color: var(--accent-gold) !important;
  font-weight: 600;
}
.btn-visual-darshan:hover {
  background: var(--accent-gold) !important;
  color: #1B1812 !important;
}

/* Single column fallback for verses without images */
.verse-manuscript-card.no-image .manuscript-layout {
  display: block;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}
.verse-manuscript-card.no-image .manuscript-scripture-col {
  text-align: center;
}
.verse-manuscript-card.no-image .verse-text {
  text-align: center;
}
.verse-manuscript-card.no-image .verse-iast {
  text-align: center;
}
.verse-manuscript-card.no-image .verse-actions {
  justify-content: center;
}

/* Responsive adjustments for mobile & small screens */
@media (max-width: 859px) {
  .verse-manuscript-card {
    padding: 1.25rem 1.15rem;
    border-radius: var(--radius-lg, 16px);
    margin-bottom: 1.75rem;
  }
  .manuscript-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  .manuscript-artwork-frame {
    aspect-ratio: auto;
    width: 100%;
    max-width: min(96vw, 440px);
    min-height: 280px;
    max-height: min(78vh, 600px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .manuscript-illustration {
    width: 100%;
    height: auto;
    max-height: min(75vh, 580px);
    aspect-ratio: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }
  .verse-manuscript-card .verse-text {
    font-size: clamp(1.22rem, 4.6vw, 1.48rem);
    line-height: 1.65;
    text-align: center;
  }
  .verse-manuscript-card .verse-iast {
    font-size: 1.0rem;
    line-height: 1.55;
    text-align: center;
  }
  .manuscript-header-row {
    justify-content: center;
  }
  .verse-manuscript-card .verse-actions {
    justify-content: center;
    gap: 0.45rem;
  }
}

@media (max-width: 480px) {
  .verse-manuscript-card {
    padding: 1rem 0.85rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-md, 12px);
  }
  .manuscript-layout {
    gap: 1rem;
  }
  .manuscript-artwork-frame {
    aspect-ratio: auto;
    width: 100%;
    max-width: min(98vw, 420px);
    min-height: 260px;
    max-height: min(78vh, 560px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .manuscript-illustration {
    width: 100%;
    height: auto;
    max-height: min(75vh, 540px);
    aspect-ratio: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }
  .manuscript-artwork-badge {
    padding: 0.35rem 0.65rem;
    bottom: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    gap: 0.35rem;
  }
  .manuscript-badge-title {
    font-size: 0.72rem;
  }
  .manuscript-zoom-pill {
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
  }
  .verse-manuscript-card .verse-meaning {
    padding: 0.75rem 0.95rem;
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 1rem;
  }
  .verse-manuscript-card .verse-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
  }
  .verse-manuscript-card .verse-actions .reader-btn {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 70px;
    font-size: 0.78rem;
    padding: 0.35rem 0.5rem;
    min-height: 38px;
    justify-content: center;
  }
}

/* ==========================================================================
   DARSHAN MODE (Distraction-Free Reading)
   ========================================================================== */

body.darshan-mode-active {
  background-color: var(--bg-page);
}

body.darshan-mode-active .site-header,
body.darshan-mode-active .verse-banner,
body.darshan-mode-active .site-footer,
body.darshan-mode-active .ad-slot,
body.darshan-mode-active .reader-toolbar,
body.darshan-mode-active .related-stotrams-section {
  display: none !important;
}

body.darshan-mode-active .verse-item {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 3.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

body.darshan-mode-active .verse-text {
  font-size: 2rem !important;
  line-height: 2.2 !important;
}

.darshan-exit-bar {
  display: none;
}

body.darshan-mode-active .darshan-exit-bar {
  display: flex;
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--accent-gold);
  border-radius: 30px;
  padding: 0.65rem 1.75rem;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  align-items: center;
  gap: 1rem;
}

/* ==========================================================================
/* ==========================================================================
   ADSENSE POLICY-COMPLIANT SLOTS (WIDE SLIM HORIZONTAL BANNER)
   ========================================================================== */

.ad-slot {
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  max-width: 860px !important; /* Wide horizontal width matching manuscript cards */
  height: 54px !important;      /* Reduced slim banner height */
  min-height: 54px !important;
  max-height: 54px !important;
  background-color: rgba(239, 223, 201, 0.35);
  border: 1px dashed rgba(201, 146, 46, 0.45);
  border-radius: var(--radius-md, 12px) !important;
  padding: 0.15rem 0.75rem !important;
  text-align: center;
  position: relative;
  overflow: hidden !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

[data-theme="dark"] .ad-slot {
  background-color: rgba(38, 34, 26, 0.45);
  border-color: rgba(201, 146, 46, 0.3);
}

.ad-slot::before {
  content: "ADVERTISEMENT";
  display: block;
  font-size: 0.52rem;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
  line-height: 1;
}

.ad-slot.collapsed {
  display: none !important;
}

/* Specific Slot Margins */
.ad-slot-top {
  margin-top: 0.75rem !important;
  margin-bottom: 1.25rem !important;
}

.ad-slot-infeed {
  margin-top: 1.25rem !important;
  margin-bottom: 2rem !important;
}

.ad-slot-bottom {
  margin-top: 1.75rem !important;
  margin-bottom: 1.25rem !important;
}

/* Ad Size Variants (Configurable via Admin Panel) */
.ad-slot,
.ad-slot.ad-size-wide,
.ad-slot.ad-size-small {
  max-width: 860px !important;
  height: 54px !important;
  min-height: 54px !important;
  max-height: 54px !important;
}

.ad-slot.ad-size-leaderboard {
  max-width: 728px !important;
  height: 54px !important;
  min-height: 54px !important;
  max-height: 54px !important;
}

.ad-slot.ad-size-compact {
  max-width: 468px !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  border-radius: var(--radius-sm, 8px) !important;
}

.ad-slot.ad-size-mini {
  max-width: 320px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  border-radius: var(--radius-sm, 8px) !important;
}

.ad-slot.ad-size-full {
  max-width: 100% !important;
  height: 54px !important;
  min-height: 54px !important;
  max-height: 54px !important;
}

@media (max-width: 768px) {
  .ad-slot,
  .ad-slot.ad-size-wide,
  .ad-slot.ad-size-small,
  .ad-slot.ad-size-leaderboard,
  .ad-slot.ad-size-compact,
  .ad-slot.ad-size-mini,
  .ad-slot.ad-size-full {
    max-width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 0.15rem 0.35rem !important;
  }
  .ad-slot-top {
    margin-top: 0.5rem !important;
    margin-bottom: 1rem !important;
  }
  .ad-slot-infeed {
    margin-top: 1rem !important;
    margin-bottom: 1.5rem !important;
  }
  .ad-slot-bottom {
    margin-top: 1.25rem !important;
    margin-bottom: 0.75rem !important;
  }
}

.ad-slot ins.adsbygoogle {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 34px !important;
  min-height: 26px !important;
  max-height: 34px !important;
  overflow: hidden !important;
}

.ad-slot ins.adsbygoogle iframe,
.ad-slot iframe,
.ad-slot div[id^="aswift"] {
  max-height: 34px !important;
  height: 34px !important;
  overflow: hidden !important;
}

.ad-slot ins.adsbygoogle:empty::after {
  content: "Google AdSense Responsive Unit · Wide & Slim";
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.75;
  line-height: 34px;
  text-align: center;
  letter-spacing: 0.5px;
}

/* Visual Gallery Top Actions Lock in Single Row */
.gallery-top-actions {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.gallery-controls-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.gallery-controls-group .gallery-lang-control,
.gallery-controls-group .gallery-action-pill {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* Visual Gallery Ad Banner (Placed Directly Under Sanskrit Verse & Meaning) */
.gallery-ad-wrap {
  width: 100%;
  max-width: 520px;
  margin: 0.85rem auto 0 auto;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 10;
  transition: all 0.3s ease;
}
.ad-slot.ad-slot-gallery {
  background: rgba(18, 14, 10, 0.88) !important;
  border: 1px dashed rgba(227, 180, 84, 0.45) !important;
  border-radius: var(--radius-sm, 6px) !important;
  max-width: 520px !important;
  width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  padding: 3px 8px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}
.ad-slot.ad-slot-gallery::before {
  color: rgba(227, 180, 84, 0.75) !important;
  font-size: 0.55rem !important;
  margin-bottom: 2px !important;
  letter-spacing: 1px !important;
}
.ad-slot.ad-slot-gallery ins.adsbygoogle {
  max-width: 500px !important;
  width: 100% !important;
  height: 34px !important;
  max-height: 34px !important;
  min-height: 34px !important;
  margin: 0 auto !important;
  overflow: hidden !important;
}
.ad-slot.ad-slot-gallery ins.adsbygoogle:empty::after {
  content: "Google AdSense Responsive Unit · Banner (468×34 / Responsive)";
  display: block;
  font-size: 0.72rem;
  color: rgba(241, 230, 211, 0.7);
  line-height: 34px;
  text-align: center;
  letter-spacing: 0.5px;
}
.ad-slot.ad-slot-gallery .adsbygoogle-placeholder {
  color: rgba(241, 230, 211, 0.7) !important;
  font-size: 0.72rem !important;
  background: rgba(201, 146, 46, 0.08) !important;
  border-color: rgba(201, 146, 46, 0.3) !important;
  height: 34px !important;
  line-height: 34px !important;
  padding: 0 0.5rem !important;
}

@media (max-width: 768px) {
  .gallery-ad-wrap {
    width: 100% !important;
    max-width: 300px !important;
    margin: 0.15rem auto 0 auto !important;
    padding: 0 !important;
  }
  .ad-slot.ad-slot-gallery {
    max-width: 300px !important;
    width: 100% !important;
    min-height: 28px !important;
    height: 28px !important;
    max-height: 28px !important;
    padding: 1px 4px !important;
  }
  .ad-slot.ad-slot-gallery ins.adsbygoogle {
    max-width: 300px !important;
    height: 20px !important;
    max-height: 20px !important;
    min-height: 20px !important;
  }
  .ad-slot.ad-slot-gallery ins.adsbygoogle:empty::after {
    content: "Google AdSense Responsive Unit · Mobile";
    line-height: 20px !important;
    font-size: 0.62rem !important;
  }
}

/* ==========================================================================
   VERSE CARD MODAL (Canvas Sharing)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-canvas-wrap {
  text-align: center;
  margin: 1.5rem 0;
  background: var(--bg-page);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

#verseCardCanvas {
  max-width: 100%;
  height: auto;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
}

.card-templates {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.template-pill {
  padding: 0.45rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--bg-page);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.88rem;
  transition: var(--transition);
}

.template-pill.active {
  border-color: var(--accent-gold);
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  font-weight: 600;
}

@media (max-width: 640px) {
  .modal-dialog {
    padding: 1.25rem 1rem;
    margin: 0.5rem;
    width: calc(100% - 1rem);
    max-height: 94vh;
    border-radius: var(--radius-md);
  }
  .card-templates {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }
  .template-pill {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ========================================================
   WELCOME DARSHAN & VISUAL GALLERY ONBOARDING MODAL
   ======================================================== */
.welcome-darshan-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(14, 11, 8, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.welcome-darshan-modal.open {
  display: flex;
  opacity: 1;
}

.welcome-darshan-dialog {
  background: var(--bg-card);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-lg, 20px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45), 0 0 25px rgba(201, 146, 46, 0.2);
  max-width: 660px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem 2.25rem 2rem;
  position: relative;
  text-align: left;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
}

.welcome-darshan-modal.open .welcome-darshan-dialog {
  transform: translateY(0) scale(1);
}

.welcome-darshan-close {
  position: absolute;
  top: 1.15rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-darshan-close:hover {
  color: var(--accent-gold);
  transform: scale(1.15);
}

.welcome-darshan-header {
  text-align: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed var(--border-color);
}

.welcome-diya-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 0.65rem;
}

.welcome-darshan-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.35rem 0;
  line-height: 1.25;
}

.welcome-darshan-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Feature Spotlight: Visual Gallery */
.welcome-gallery-spotlight {
  background: linear-gradient(135deg, rgba(201, 146, 46, 0.12) 0%, rgba(63, 107, 58, 0.08) 100%);
  border: 1.5px solid rgba(201, 146, 46, 0.45);
  border-radius: var(--radius-md, 14px);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}

.welcome-spotlight-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.welcome-spotlight-pill {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(201, 146, 46, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 146, 46, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.welcome-spotlight-heading {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.45rem 0;
  line-height: 1.35;
}

.welcome-spotlight-desc {
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
}

.welcome-spotlight-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.welcome-spotlight-highlights span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Language Selection Grid */
.welcome-lang-section {
  margin-bottom: 1.75rem;
}

.welcome-lang-title-row {
  margin-bottom: 0.85rem;
}

.welcome-lang-heading {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.2rem 0;
}

.welcome-lang-hint {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
}

.welcome-lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 0.65rem;
}

.welcome-lang-card {
  background: var(--bg-page);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md, 12px);
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.welcome-lang-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 146, 46, 0.12);
}

.welcome-lang-card.selected {
  border-color: var(--accent-gold);
  background: rgba(201, 146, 46, 0.12);
  box-shadow: 0 0 0 1px var(--accent-gold);
}

.welcome-lang-radio {
  margin-top: 0.15rem;
  width: 16px;
  height: 16px;
  accent-color: var(--accent-gold);
  cursor: pointer;
  flex-shrink: 0;
}

.welcome-lang-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.welcome-lang-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.welcome-lang-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Modal Actions */
.welcome-darshan-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-color);
}

.btn-welcome-primary {
  background: var(--accent-gold);
  color: #1B1812;
  font-weight: 700;
  padding: 0.65rem 1.6rem;
  border-radius: 24px;
  border: 1.5px solid var(--accent-gold);
  font-size: 0.96rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(201, 146, 46, 0.25);
}

.btn-welcome-primary:hover {
  background: #E5B454;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 146, 46, 0.4);
}

.btn-welcome-secondary {
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-welcome-secondary:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.btn-welcome-gallery {
  background: rgba(38, 30, 20, 0.85);
  color: #FFE6A3;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 24px;
  border: 1.5px solid var(--accent-gold);
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-welcome-gallery:hover {
  background: var(--accent-gold);
  color: #1B1812;
}

@media (max-width: 640px) {
  .welcome-darshan-dialog {
    padding: 1.5rem 1.25rem 1.25rem;
  }
  .welcome-darshan-title {
    font-size: 1.6rem;
  }
  .welcome-lang-grid {
    grid-template-columns: 1fr;
  }
  .welcome-darshan-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-welcome-primary,
  .btn-welcome-gallery,
  .btn-welcome-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   COOKIE CONSENT BANNER
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--accent-gold);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem 2rem;
  z-index: 9999;
  display: none;
}

.cookie-banner.open {
  display: block;
}

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-text {
  font-size: 0.92rem;
  color: var(--text-main);
  flex: 1;
  min-width: 280px;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: auto;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.75rem;
}

.footer-col-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-verse-line {
  font-family: var(--font-verse);
  color: var(--accent-gold);
  font-size: 1.05rem;
  font-weight: 600;
}

/* ==========================================================================
   ANIMATIONS & RESPONSIVE BREAKPOINTS
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header & Mega Menu Responsive Layout Across Screen Sizes */
@media (max-width: 1200px) {
  .header-inner {
    gap: 1rem;
  }
  .header-inner > nav,
  nav[aria-label="Main Navigation"] {
    max-width: 700px;
  }
  .nav-link {
    font-size: 0.86rem;
    padding: 0.3rem 0.15rem;
  }
  .header-brand-group {
    gap: 0.85rem;
  }
  .brand-name {
    font-size: 1.35rem;
  }
  .browse-nav-btn {
    font-size: 0.85rem;
    padding: 0.38rem 0.8rem;
  }
  .mega-menu-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 1.75rem;
  }
}

@media (max-width: 1024px) {
  .header-inner {
    gap: 0.8rem;
  }
  .header-inner > nav,
  nav[aria-label="Main Navigation"] {
    max-width: 630px;
  }
  .nav-link {
    font-size: 0.8rem;
    padding: 0.25rem 0.12rem;
  }
  .brand-logo-mark {
    width: 38px;
    height: 38px;
    font-size: 1.35rem;
  }
  .brand-name {
    font-size: 1.25rem;
  }
  .brand-tagline {
    font-size: 0.68rem;
  }
  .browse-nav-btn {
    font-size: 0.82rem;
    padding: 0.34rem 0.68rem;
  }
}

@media (max-width: 992px) {
  .mega-title-sub {
    display: none;
  }
  .mega-menu-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem 1.5rem;
  }
}

@media (max-width: 900px) {
  .darshan-card {
    grid-template-columns: 1fr;
  }
  .darshan-media {
    min-height: 240px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) and (min-width: 769px) {
  .header-inner {
    gap: 0.6rem;
  }
  .header-inner > nav,
  nav[aria-label="Main Navigation"] {
    max-width: 530px;
  }
  .nav-link {
    font-size: 0.75rem;
    padding: 0.2rem 0.08rem;
  }
  .brand-tagline {
    display: none;
  }
  .brand-name {
    font-size: 1.15rem;
  }
  .brand-logo-mark {
    width: 34px;
    height: 34px;
    font-size: 1.25rem;
  }
  .browse-nav-btn {
    font-size: 0.78rem;
    padding: 0.3rem 0.55rem;
    gap: 0.25rem;
  }
  .browse-nav-btn .browse-icon {
    font-size: 0.82rem;
  }
}

@media (max-width: 768px) {
  .header-actions {
    display: flex !important;
    align-items: center;
    gap: 0.4rem;
  }
  .nav-links {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .mobile-menu-drawer {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    z-index: 1050;
  }
  .mobile-menu-drawer.open {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .mobile-menu-drawer .nav-link {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    width: 100%;
    white-space: normal;
  }
  .mobile-menu-drawer .nav-link.active::after {
    display: none;
  }
  .mobile-menu-drawer .nav-link.active {
    background: var(--accent-gold-soft);
    font-weight: 600;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .desktop-browse-btn {
    display: none !important;
  }
  .mobile-browse-btn {
    display: inline-flex !important;
    padding: 0.38rem 0.75rem;
    font-size: 0.84rem;
    gap: 0.3rem;
  }
  
  /* Mobile drawer takes full viewport under header */
  .browse-mega-menu {
    position: fixed !important;
    top: var(--header-height) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: calc(100vh - var(--header-height)) !important;
    max-height: calc(100vh - var(--header-height)) !important;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 !important;
    background: var(--bg-card) !important;
    box-shadow: none !important;
  }

  body.browse-menu-open {
    overflow: hidden !important;
  }
  body.browse-menu-open::after {
    display: none !important;
  }

  .mega-menu-container {
    padding: 1.25rem 1rem 3.5rem;
  }

  .mega-menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }

  .mega-link {
    font-size: 0.88rem;
    padding: 0.45rem 0.4rem;
    min-height: 40px;
  }

  .mega-menu-bottom {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .mega-btn-cta {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .mega-menu-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .mega-menu-col {
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
  }

  .mega-col-header {
    border-bottom: 1px solid var(--border-gold);
    margin-bottom: 0.6rem;
  }

  .mega-link {
    padding: 0.5rem 0.4rem;
    font-size: 0.92rem;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
  }

  [data-theme="dark"] .mega-link {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  }

  .mobile-browse-btn .browse-text {
    display: inline;
  }
}

@media (max-width: 360px) {
  .mobile-browse-btn {
    padding: 0.35rem 0.55rem;
    font-size: 0.78rem;
  }
  .mobile-browse-btn .browse-icon {
    font-size: 0.82rem;
  }
}

/* ==========================================================================
   STOTRAM READER RESPONSIVE REFINEMENTS (Mobile, Tablet, Desktop)
   ========================================================================== */

@media (max-width: 768px) {
  .reader-hero {
    padding: 2rem 1rem 1.5rem;
    margin-bottom: 1.5rem;
  }
  .reader-sanskrit-title {
    font-size: clamp(1.6rem, 5.5vw, 2.3rem);
    margin-bottom: 0.35rem;
  }
  .reader-title {
    font-size: clamp(1.5rem, 5vw, 2.1rem);
    margin-bottom: 0.5rem;
  }
  .reader-meta-bar {
    gap: 0.35rem 0.65rem;
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .reader-toolbar {
    top: calc(var(--header-height) + var(--banner-height));
    padding: 0.45rem 0.65rem;
    gap: 0.45rem;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
  }
  .reader-toolbar::-webkit-scrollbar {
    display: none;
  }
  .reader-toolbar .toolbar-group {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
    gap: 0.35rem;
  }
  .reader-toolbar #printBtn {
    display: none; /* Hide print on mobile phones */
  }
  .reader-btn,
  .reader-toolbar .btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    min-height: 38px;
    flex-shrink: 0;
    white-space: nowrap;
    border-radius: var(--radius-sm);
  }

  .verse-item {
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
  }
  .verse-number-badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.65rem;
    margin-bottom: 1rem;
  }
  .verse-text {
    font-size: clamp(1.2rem, 4.2vw, 1.45rem);
    line-height: 1.75;
    margin-bottom: 1rem;
  }
  .verse-iast {
    font-size: clamp(0.92rem, 3.4vw, 1.05rem);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
  }
  .verse-meaning {
    padding: 0.85rem 1rem;
    font-size: clamp(0.88rem, 3.2vw, 0.98rem);
    line-height: 1.55;
  }
  .verse-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
  }
  .verse-actions .reader-btn {
    flex: 1 1 auto;
    min-width: 85px;
    justify-content: center;
    min-height: 38px;
  }
  .verse-illustration {
    max-height: 220px !important;
  }
}

@media (max-width: 480px) {
  .reader-hero {
    padding: 1.5rem 0.75rem 1.25rem;
  }
  .reader-toolbar {
    padding: 0.35rem 0.5rem;
    gap: 0.35rem;
  }
  .reader-toolbar .btn,
  .reader-toolbar .reader-btn {
    font-size: 0.76rem;
    padding: 0.3rem 0.55rem;
    min-height: 36px;
  }
  .verse-item {
    padding: 1.15rem 0.75rem;
    margin-bottom: 1.15rem;
  }
  .verse-illustration {
    max-height: 200px !important;
  }
}

/* Print Stylesheet */
@media print {
  .site-header, .verse-banner, .site-footer, .ad-slot, .reader-toolbar, .btn, .favorite-btn {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .verse-item {
    border: none;
    box-shadow: none;
    page-break-inside: avoid;
  }
}
