/* ==========================================================================
   SHRICHAKRA DIVINE WEB PORTAL - STYLESHEET
   Aesthetics: Deep Sacred Maroon, Temple Gold, Glassmorphism, Warm Ambiance
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800;900&family=Lora:ital,wght@0,400;0,600;1,400&family=Noto+Sans+Kannada:wght@400;500;600;700&family=Noto+Serif+Kannada:wght@400;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-maroon: #7a1122;
  --primary-dark: #580c18;
  --primary-light: #9e1b2f;
  --accent-gold: #d49a38;
  --accent-gold-light: #f5c469;
  --accent-gold-dark: #a8731d;
  
  --bg-dark: #191012;
  --bg-dark-card: #27171b;
  --bg-dark-card-trans: rgba(39, 23, 27, 0.85);
  --bg-light: #fdfaf4;
  --bg-light-card: #ffffff;
  --bg-card-sand: #f5edd8;
  
  --text-dark: #2c1a1d;
  --text-muted: #6b5559;
  --text-light: #ffffff;
  --text-gold: #f3c162;
  
  --border-gold: rgba(212, 154, 56, 0.35);
  --border-light: #eae0cf;
  
  --font-divine: 'Cinzel', serif;
  --font-sans: 'Outfit', sans-serif;
  --font-kannada: 'Noto Sans Kannada', sans-serif;
  --font-kannada-serif: 'Noto Serif Kannada', serif;
  --font-vedic: 'Lora', 'Noto Serif Kannada', serif;
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 20px rgba(122, 17, 34, 0.12);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.22);
  --shadow-gold: 0 0 25px rgba(212, 154, 56, 0.35);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 50px;
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: none;
}
*::-webkit-scrollbar {
  display: none;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-divine {
  font-family: var(--font-divine);
  letter-spacing: 0.5px;
}

.font-kannada {
  font-family: var(--font-kannada);
}

/* Specific reader fonts that ONLY apply to the stotra/mantra content box */
.reader-font-kannada {
  font-family: 'Noto Serif Kannada', var(--font-kannada), serif !important;
}

.reader-font-clean {
  font-family: 'Noto Sans Kannada', var(--font-sans), sans-serif !important;
}

.reader-font-serif {
  font-family: 'Lora', 'Noto Serif Kannada', serif !important;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(25, 16, 18, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-gold);
  transition: var(--transition);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  object-fit: cover;
  box-shadow: 0 0 12px rgba(212, 154, 56, 0.4);
}

.logo-text h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 30%, var(--accent-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.logo-text span {
  font-size: 0.7rem;
  color: var(--accent-gold-light);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  list-style: none;
  flex-wrap: nowrap;
  margin: 0 auto;
}

.nav-link {
  color: #f1e4e6;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 4px 2px;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-gold-light);
}

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

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

.lang-selector select {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid var(--border-gold);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
  white-space: nowrap;
}

.lang-selector select option {
  background: #27171b;
  color: #fff;
}

.btn-icon-search {
  background: transparent;
  color: #fff;
  font-size: 1.1rem;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-icon-search:hover {
  color: var(--accent-gold);
}

.btn-login-nav {
  background: var(--primary-maroon);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid var(--accent-gold);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-login-nav:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(122, 17, 34, 0.4);
}

.btn-guest-nav {
  background: rgba(212, 154, 56, 0.15);
  color: var(--accent-gold-light);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 500;
  border: 1px solid var(--accent-gold);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-guest-nav:hover {
  background: rgba(212, 154, 56, 0.28);
}

.hamburger {
  display: none;
  color: #fff;
  font-size: 1.5rem;
  background: none;
}

/* ==========================================================================
   HERO SECTION (DIVINE BANNER)
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 520px;
  background: radial-gradient(circle at center, #3d1921 0%, #170d10 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  overflow: hidden;
  color: #fff;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url('../images/hero-banner.jpg') center/cover no-repeat;
  opacity: 0.25;
  filter: blur(2px);
}

.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 154, 56, 0.35) 0%, rgba(122, 17, 34, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.hero-deity-badge {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  border: 3px solid var(--accent-gold);
  padding: 4px;
  background: radial-gradient(circle, rgba(212, 154, 56, 0.4) 0%, rgba(39, 23, 27, 0.9) 100%);
  box-shadow: 0 0 35px rgba(212, 154, 56, 0.6);
  animation: floatDeity 4s ease-in-out infinite;
}

.hero-deity-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

@keyframes floatDeity {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 20%, #fbd588 60%, #e29d1d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero-tagline {
  font-size: 1.45rem;
  color: var(--accent-gold-light);
  font-family: var(--font-divine);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #e2d1d4;
  max-width: 650px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-hero-primary {
  background: linear-gradient(135deg, var(--primary-maroon), var(--primary-light));
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-size: 1.05rem;
  font-weight: 600;
  border: 1px solid var(--accent-gold);
  box-shadow: 0 4px 18px rgba(122, 17, 34, 0.6);
  transition: var(--transition);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 154, 56, 0.4);
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-dark);
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-size: 1.05rem;
  font-weight: 600;
  border: 1px solid var(--accent-gold);
  transition: var(--transition);
}

.btn-hero-secondary:hover {
  background: #fff;
  color: var(--primary-maroon);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

/* ==========================================================================
   CATEGORY BAR PILLS
   ========================================================================== */
.category-bar-section {
  max-width: 1280px;
  margin: 1.5rem auto 2.5rem;
  position: relative;
  z-index: 10;
  padding: 0 1.5rem;
}

.category-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  background: #ffffff;
  padding: 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.category-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border-radius: var(--radius-md);
  background: #faf6ed;
  border: 1px solid transparent;
  color: var(--primary-dark);
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
}

.category-pill:hover, .category-pill.active {
  background: #fff;
  border-color: var(--accent-gold);
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(212, 154, 56, 0.2);
  color: var(--primary-maroon);
}

.category-pill-icon {
  font-size: 1.7rem;
  margin-bottom: 6px;
}

.category-pill-name {
  font-size: 0.88rem;
  font-weight: 600;
}

/* ==========================================================================
   FEATURED STOTRAS & GRID SECTIONS
   ========================================================================== */
.section-wrap {
  max-width: 1280px;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.8rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
}

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

.btn-view-all {
  background: transparent;
  color: var(--primary-maroon);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 6px 14px;
  border: 1px solid var(--primary-maroon);
  border-radius: var(--radius-pill);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-view-all:hover {
  background: var(--primary-maroon);
  color: #fff;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.card-deity {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

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

.card-deity-img-wrap {
  width: 100%;
  height: 160px;
  position: relative;
  overflow: hidden;
  background: #2a151b;
}

.card-deity-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-deity:hover .card-deity-img {
  transform: scale(1.05);
}

.card-deity-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(25, 16, 18, 0.8);
  color: var(--accent-gold-light);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-gold);
}

.card-deity-body {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-deity-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 4px;
  line-height: 1.3;
}

.card-deity-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   TODAY'S PANCHANGA BANNER WIDGET
   ========================================================================== */
.panchanga-widget-banner {
  background: radial-gradient(circle at 10% 50%, #4a131e 0%, #200e13 100%);
  border-radius: var(--radius-lg);
  padding: 2rem 2.2rem;
  color: #fff;
  border: 1px solid var(--border-gold);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  margin-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
}

.panchanga-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.panchanga-banner-title h3 {
  font-size: 1.7rem;
  color: #fff;
  background: linear-gradient(135deg, #fff, var(--accent-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.panchanga-banner-title p {
  font-size: 0.95rem;
  color: var(--accent-gold-light);
}

.panchanga-grid-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.panchanga-item-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 154, 56, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.panchanga-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(212, 154, 56, 0.2);
  border: 1px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--accent-gold-light);
  flex-shrink: 0;
}

.panchanga-item-info span {
  font-size: 0.78rem;
  color: #d1b8bc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.panchanga-item-info h4 {
  font-size: 1.08rem;
  color: #ffffff;
  font-weight: 600;
  margin-top: 2px;
}

/* ==========================================================================
   OUR FEATURES 6-CARD GRID
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.feature-icon-wrap {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #faf2df;
  border: 1px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--primary-maroon);
}

.feature-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.feature-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   CALL TO ACTION BANNER (COMMUNITY)
   ========================================================================== */
.cta-community-banner {
  background: radial-gradient(circle at center, #6b1424 0%, #200d11 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  color: #fff;
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.cta-community-banner h3 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff, var(--accent-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cta-community-banner p {
  font-size: 1.05rem;
  color: #dfced1;
  max-width: 600px;
  margin: 0 auto 1.8rem;
}

/* ==========================================================================
   DYNAMIC MAIN VIEWS (STOTRAS BROWSER, DETAIL/AUDIO, PANCHANGA, SEVAS)
   ========================================================================== */
.view-container {
  display: none;
  animation: fadeIn 0.35s ease;
}

.view-container.active-view {
  display: block;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.breadcrumb a {
  color: var(--primary-maroon);
  font-weight: 500;
}

.breadcrumb span {
  color: var(--accent-gold-dark);
}

/* Filter Pills */
.filter-pills-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 1.8rem;
}

.filter-pill {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--border-light);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.filter-pill:hover, .filter-pill.active {
  background: var(--primary-maroon);
  color: #fff;
  border-color: var(--primary-maroon);
}

/* Search Bar */
.search-bar-wrap {
  position: relative;
  max-width: 600px;
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  padding: 12px 18px 12px 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-gold);
}

.search-icon-inside {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ==========================================================================
   STOTRA DETAIL & AUDIO PLAYER VIEW
   ========================================================================== */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
}

.detail-main {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}

.detail-thumb {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-md);
  border: 2px solid var(--accent-gold);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.detail-title h2 {
  font-size: 1.8rem;
  color: var(--primary-dark);
}

.detail-title p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Audio Player Card */
.audio-player-box {
  background: radial-gradient(circle at top, #38121a, #1a0b0e);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  color: #fff;
  border: 1px solid var(--border-gold);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.audio-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.btn-play-master {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: var(--primary-dark);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(212, 154, 56, 0.5);
  transition: var(--transition);
}

.btn-play-master:hover {
  transform: scale(1.08);
  background: var(--accent-gold-light);
}

.audio-progress-wrap {
  flex: 1;
}

.audio-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
  accent-color: var(--accent-gold);
}

.audio-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #d1b8bc;
  margin-top: 4px;
}

/* Tab Bar */
.detail-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: none;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  transition: var(--transition);
}

.tab-btn.active {
  color: var(--primary-maroon);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-maroon);
  border-radius: 3px;
}

/* Script & Font Size Controls */
.reader-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-sand);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}

.font-scale-btn {
  background: #fff;
  border: 1px solid var(--border-light);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  font-weight: 700;
}

/* Lyrics Content Box */
.lyrics-text-box {
  font-size: 1.15rem;
  line-height: 2.1;
  color: #211316;
  white-space: pre-line;
  background: #fffdf9;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid #f0e6d6;
}

/* Sidebar Quick Access */
.sidebar-box {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.quick-action-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-dark);
  cursor: pointer;
  transition: var(--transition);
}

.quick-action-item:hover {
  background: var(--bg-card-sand);
  color: var(--primary-maroon);
}

/* ==========================================================================
   SEVA BOOKING & CARDS
   ========================================================================== */
.seva-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card-seva {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

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

.card-seva-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-seva-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-seva-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.card-seva-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.card-seva-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

.seva-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-maroon);
}

.btn-book-seva {
  background: var(--primary-maroon);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-book-seva:hover {
  background: var(--primary-light);
  box-shadow: 0 4px 12px rgba(122, 17, 34, 0.4);
}

/* ==========================================================================
   MODAL DIALOGS (LOGIN, SEVA BOOKING, DEVOTEE DRAWER)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 8, 10, 0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: zoomIn 0.3s ease;
  position: relative;
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0,0,0,0.1);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.modal-header-banner {
  background: radial-gradient(circle, #45121b, #1e0b0e);
  color: #fff;
  padding: 1.75rem 1.5rem;
  text-align: center;
}

.modal-header-banner h3 {
  font-size: 1.5rem;
  color: var(--accent-gold-light);
}

.modal-body {
  padding: 1.5rem;
  max-height: 75vh;
  overflow-y: auto;
}

.form-group {
  margin-bottom: 1.1rem;
}

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 8px rgba(212, 154, 56, 0.3);
}

.qr-code-box {
  text-align: center;
  background: var(--bg-card-sand);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin: 1rem 0;
  border: 1px dashed var(--accent-gold);
}

.qr-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin: 0 auto 8px;
  display: block;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: #140a0c;
  color: #e5d2d5;
  border-top: 1px solid var(--border-gold);
  padding: 3.5rem 1.5rem 1.5rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-about h3 {
  font-size: 1.5rem;
  color: var(--accent-gold-light);
  margin-bottom: 0.8rem;
}

.footer-about p {
  font-size: 0.9rem;
  color: #bfaab0;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(212, 154, 56, 0.3);
  padding-bottom: 6px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.88rem;
  color: #c9b4b9;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-gold-light);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #9e898e;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Category Section Filter Tabs */
.section-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
}

.section-filter-tabs::-webkit-scrollbar {
  display: none;
}

.section-filter-tab {
  background: #fff;
  border: 1px solid var(--border-light);
  color: var(--primary-dark);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-filter-tab:hover, .section-filter-tab.active {
  background: var(--primary-maroon);
  color: #fff;
  border-color: var(--primary-maroon);
  box-shadow: 0 4px 12px rgba(122, 17, 34, 0.25);
}

/* Weekly Horoscope Cards */
.horoscope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card-horoscope {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.card-horoscope::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-gold), var(--primary-maroon));
}

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

.horoscope-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.horoscope-icon {
  font-size: 2.2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-card-sand);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-gold);
}

.horoscope-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
}

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

.horoscope-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #3b282c;
  margin-bottom: 14px;
}

.horoscope-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.horoscope-badge {
  background: var(--bg-card-sand);
  border: 1px solid rgba(212, 154, 56, 0.4);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.horoscope-parihara {
  background: rgba(122, 17, 34, 0.05);
  border-left: 3px solid var(--primary-maroon);
  padding: 8px 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: var(--primary-dark);
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS & PHONES) - COMPREHENSIVE FIX
   ========================================================================== */

/* ---- Large Tablets (1024px) ---- */
@media (max-width: 1024px) {
  .hero-title { font-size: 2.6rem; }
  .detail-layout { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr 1fr; }
  .nav-links { gap: 0.75rem; }
  .nav-link { font-size: 0.82rem; }
}

/* ---- Tablets (768px) ---- */
@media (max-width: 768px) {
  /* Header: collapse nav, show hamburger only */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(25, 16, 18, 0.98);
    flex-direction: column;
    padding: 1rem 1.25rem;
    gap: 6px;
    border-bottom: 1px solid var(--border-gold);
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  }
  .nav-links.mobile-open { display: flex; }
  .nav-link { 
    font-size: 1rem; 
    padding: 10px 8px;
    border-bottom: 1px solid rgba(212,154,56,0.12);
  }
  .hamburger { display: flex; }

  /* Hide lang selector and login/guest buttons on tablet - show in mobile menu */
  .lang-selector { display: none; }
  .btn-login-nav, .btn-guest-nav { display: none; }
  .btn-icon-search { display: none; }

  /* Nav container spacing */
  .nav-container { padding: 0.5rem 1rem; }

  /* Hero */
  .hero-section { min-height: 420px; padding: 3rem 1.25rem; }
  .hero-title { font-size: 2.1rem; }
  .hero-tagline { font-size: 1.1rem; }
  .hero-subtitle { font-size: 0.92rem; margin-bottom: 1.5rem; }
  .hero-deity-badge { width: 110px; height: 110px; }

  /* Category bar */
  .category-bar-section { margin-top: -10px; padding: 0 0.75rem; }
  .category-pill-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0.75rem; }
  .category-pill { padding: 10px 6px; }
  .category-pill-icon { font-size: 1.4rem; }
  .category-pill-name { font-size: 0.78rem; }

  /* Cards grid */
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }

  /* Section headers */
  .section-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; margin-bottom: 1.25rem; }
  .section-title { font-size: 1.55rem; }

  /* Panchanga */
  .panchanga-grid-items { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .panchanga-widget-banner { padding: 1.5rem 1.25rem; }

  /* Seva grid */
  .seva-grid { grid-template-columns: 1fr; }

  /* Horoscope */
  .horoscope-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-container { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Reader controls: allow wrap */
  .reader-controls-bar { flex-wrap: wrap; gap: 8px; }

  /* Search bar: full width */
  .search-bar-wrap { max-width: 100%; }

  /* Detail view */
  .detail-layout { grid-template-columns: 1fr; }
  .detail-main { padding: 1.25rem; }
  .detail-header { gap: 1rem; }
  .detail-title h2 { font-size: 1.4rem; }

  /* Modals: more screen space on tablet */
  .modal-backdrop { padding: 1rem; align-items: flex-end; }
  .modal-box { 
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-body { padding: 1.25rem; }

  /* CTA banner */
  .cta-community-banner { padding: 2rem 1.25rem; }
  .cta-community-banner h3 { font-size: 1.7rem; }
}

/* ---- Mobile Phones (480px) ---- */
@media (max-width: 480px) {
  /* Category pills: 2 columns */
  .category-pill-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* Cards: single column */
  .cards-grid { grid-template-columns: 1fr; gap: 0.9rem; }

  /* Hero */
  .hero-title { font-size: 1.8rem; }
  .hero-tagline { font-size: 1rem; }
  .hero-subtitle { font-size: 0.88rem; }
  .hero-deity-badge { width: 90px; height: 90px; }
  .hero-buttons { flex-direction: column; gap: 0.75rem; }
  .btn-hero-primary, .btn-hero-secondary { width: 100%; text-align: center; font-size: 0.95rem; }

  /* Section title */
  .section-title { font-size: 1.35rem; }

  /* Panchanga widget */
  .panchanga-grid-items { grid-template-columns: 1fr 1fr; }
  .panchanga-item-card { padding: 10px 12px; gap: 10px; }
  .panchanga-banner-header { flex-direction: column; align-items: flex-start; }

  /* Features grid */
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .feature-card { padding: 1rem 0.75rem; }
  .feature-icon-wrap { width: 46px; height: 46px; font-size: 1.3rem; }
  .feature-title { font-size: 0.88rem; }
  .feature-desc { font-size: 0.72rem; }

  /* Footer */
  .footer { padding: 2.5rem 1rem 1.5rem; }

  /* Modal: full screen bottom sheet */
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-box { 
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100%;
    max-height: 92vh;
    overflow-y: auto;
  }
  .modal-header-banner { padding: 1.25rem 1rem; }
  .modal-header-banner h3 { font-size: 1.25rem; }
  .modal-body { padding: 1rem; max-height: none; }

  /* Section wrap padding */
  .section-wrap { padding: 0 0.85rem; }

  /* Filter pills: scrollable row */
  .filter-pills-wrap { gap: 6px; }
  .filter-pill { padding: 5px 12px; font-size: 0.82rem; }

  /* Section filter tabs */
  .section-filter-tab { padding: 7px 14px; font-size: 0.84rem; }

  /* Breadcrumb */
  .breadcrumb { font-size: 0.8rem; }

  /* Audio player */
  .audio-player-box { padding: 1rem; }

  /* Detail header: stack image and title */
  .detail-header { flex-direction: column; text-align: center; align-items: center; }
  .detail-thumb { width: 80px; height: 80px; }
  .detail-title h2 { font-size: 1.3rem; }

  /* Reader controls: two rows */
  .reader-controls-bar { flex-direction: column; gap: 6px; align-items: flex-start; }

  /* CTA banner */
  .cta-community-banner { padding: 1.75rem 1rem; }
  .cta-community-banner h3 { font-size: 1.45rem; }
  .cta-community-banner p { font-size: 0.92rem; }

  /* Quick actions sidebar box */
  .sidebar-box { padding: 1rem; }

  /* Horoscope cards: single col */
  .horoscope-grid { grid-template-columns: 1fr; }
}

/* ---- Very small phones (360px and below) ---- */
@media (max-width: 360px) {
  .logo-text span { display: none; }
  .category-pill-name { font-size: 0.72rem; }
  .hero-title { font-size: 1.55rem; }
  .section-title { font-size: 1.2rem; }
}


/* ==========================================================================
   PRINT MEDIA QUERY (For PDF Download)
   ========================================================================== */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .breadcrumb, aside, .footer-wrap, .detail-content-tabs, .reader-controls-bar, .mobile-bottom-nav, #tabContentVideo, #tabContentAudio, .audio-player-box, .audio-controls {
    display: none !important;
  }
  .detail-layout {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .detail-main {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
  .lyrics-text-box {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    border: none !important;
  }
  
  /* Show a minimal header just for print if needed, or hide everything else */
}

@media print {
  .nav-links, .header-actions, .mobile-bottom-nav {
    display: none !important;
  }
  .header {
    background: #fff !important;
    border-bottom: 2px solid #000 !important;
    position: relative !important;
    box-shadow: none !important;
  }
  .logo-text h1 {
    -webkit-text-fill-color: #000 !important;
    color: #000 !important;
  }
  .logo-text span {
    color: #555 !important;
  }
}


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