/* styles.css - Sri Sathya Sai Baba Devotional Portal Aesthetic */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&family=Noto+Sans+Devanagari:wght@400;500;600;700&family=Noto+Sans+Telugu:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700&family=Tiro+Devanagari+Marathi:ital@0;1&display=swap');

:root {
  --primary: #c2410c;
  --primary-light: #ea580c;
  --primary-dark: #9a3412;
  --saffron: #f97316;
  --saffron-light: #ffedd5;
  --gold: #d97706;
  --gold-light: #fef3c7;
  --gold-glow: rgba(217, 119, 6, 0.25);
  --bg-creme: #fffaf0;
  --bg-card: #ffffff;
  --bg-card-subtle: #fefbf6;
  --text-dark: #292524;
  --text-muted: #57534e;
  --text-light: #78716c;
  --border-gold: #fde68a;
  --shadow-sm: 0 2px 4px rgba(67, 20, 7, 0.05);
  --shadow-md: 0 4px 12px rgba(67, 20, 7, 0.08);
  --shadow-lg: 0 10px 25px rgba(67, 20, 7, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --dock-height: 84px;
}

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

body {
  font-family: 'Outfit', 'Noto Sans Devanagari', 'Noto Sans Telugu', sans-serif;
  background-color: var(--bg-creme);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: calc(var(--dock-height) + 24px);
  overflow-x: hidden;
}

/* Lang specific font tuning */
body.lang-mr, body.lang-hi {
  font-family: 'Noto Sans Devanagari', 'Tiro Devanagari Marathi', 'Outfit', sans-serif;
}
body.lang-te {
  font-family: 'Noto Sans Telugu', 'Outfit', sans-serif;
}

/* Dedication Banner */
.dedication-top-banner {
  background: linear-gradient(135deg, #7c2d12, #9a3412, #b45309);
  color: #fffaf0;
  padding: 8px 16px;
  font-size: 0.85rem;
  text-align: center;
  border-bottom: 2px solid #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.dedication-top-banner .icon {
  font-size: 1.1rem;
  color: #fde047;
}
.dedication-text {
  font-weight: 500;
  letter-spacing: 0.2px;
}
.dedication-text strong {
  color: #fef08a;
}

/* Top Navigation Bar */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-gold);
  box-shadow: var(--shadow-sm);
}
.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}
.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
}
.brand-subtitle {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Language Switcher Buttons */
.lang-switcher {
  display: flex;
  background: var(--gold-light);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid var(--border-gold);
}
.lang-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  transition: all 0.25s ease;
}
.lang-btn.active {
  background: linear-gradient(135deg, var(--saffron), var(--primary));
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(194, 65, 12, 0.35);
}
.lang-btn:hover:not(.active) {
  background: rgba(217, 119, 6, 0.15);
}

/* Secondary Navigation Tabs */
.nav-tabs-wrapper {
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs-wrapper::-webkit-scrollbar {
  display: none;
}
.nav-tabs {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 6px 16px;
}
.nav-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.nav-tab-btn:hover {
  color: var(--primary);
  background: var(--saffron-light);
}
.nav-tab-btn.active {
  color: var(--primary-dark);
  background: var(--gold-light);
  border-bottom: 2px solid var(--primary);
}

/* Main Container */
.main-content {
  max-width: 1280px;
  margin: 24px auto;
  padding: 0 20px;
}

/* Hero Section / Thought of the Day */
.hero-card {
  background: linear-gradient(135deg, #fff7ed, #ffedd5, #fef3c7);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.hero-card::after {
  content: "ॐ";
  position: absolute;
  right: 20px;
  bottom: -10px;
  font-size: 9rem;
  color: rgba(217, 119, 6, 0.06);
  pointer-events: none;
  font-family: serif;
}
.hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.badge-gold {
  background: var(--gold);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hero-quote {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-dark);
  line-height: 1.5;
  margin-bottom: 8px;
  font-style: italic;
}
.hero-reflection {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Search and Filters */
.search-filter-section {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
  justify-content: space-between;
}
.search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
}
.search-input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  border: 1px solid var(--border-gold);
  border-radius: 30px;
  font-size: 0.95rem;
  background: white;
  color: var(--text-dark);
  transition: all 0.25s ease;
}
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.15);
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1rem;
}
.results-counter {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  background: #ffffff;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
}

/* Pillars Grid */
.pillars-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.pillar-card-btn {
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pillar-card-btn:hover {
  transform: translateY(-2px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md);
}
.pillar-card-btn.active {
  border-color: var(--primary);
  background: linear-gradient(to bottom, #ffffff, #fff7ed);
  box-shadow: 0 4px 14px rgba(194, 65, 12, 0.15);
}
.pillar-card-btn.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
}
.pillar-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.pillar-code-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--saffron-light);
  padding: 2px 8px;
  border-radius: 12px;
}
.pillar-count-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
}
.pillar-title-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
}

/* Topics / Lectures Grid */
.lectures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}
.lecture-card {
  background: var(--bg-card);
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
}
.lecture-card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.lecture-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.lecture-id-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #9a3412;
  background: #fed7aa;
  padding: 2px 8px;
  border-radius: 10px;
}
.lecture-duration {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.lecture-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}
.lecture-card-snippet {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lecture-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #f8fafc;
}
.btn-play-mini {
  background: linear-gradient(135deg, var(--saffron), var(--primary));
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-play-mini:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 2px 8px rgba(194, 65, 12, 0.3);
}
.btn-view-notes {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border-gold);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-view-notes:hover {
  background: var(--gold-light);
}

/* Modal Drawer for Lecture Study Notes */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
}
.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-gold);
}
.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.modal-close-btn:hover {
  background: #e2e8f0;
}
.modal-shloka-box {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
}
.modal-shloka-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
  font-family: 'Noto Sans Devanagari', 'Noto Sans Telugu', serif;
}
.modal-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 20px 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-body-p {
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* Japa Mala Counter & Likhit Japam */
.japa-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.japa-card {
  background: white;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.japa-mala-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 6px solid #fde68a;
  margin: 0 auto 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fffbeb, #ffedd5);
  box-shadow: inset 0 0 15px rgba(217, 119, 6, 0.15);
}
.japa-counter-num {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1;
}
.japa-counter-max {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
}
.japa-btn-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}
.btn-bead-tap {
  background: linear-gradient(135deg, var(--saffron), var(--primary));
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(194, 65, 12, 0.3);
  transition: transform 0.1s ease;
}
.btn-bead-tap:active {
  transform: scale(0.96);
}
.btn-japa-reset {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Likhit Japam Box */
.likhit-input-area {
  width: 100%;
  height: 100px;
  border: 2px dashed var(--border-gold);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 1.1rem;
  text-align: center;
  margin-top: 16px;
  background: #fffdfa;
}
.likhit-input-area:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
}
.likhit-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 16px;
  padding: 12px;
  background: var(--gold-light);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--primary-dark);
}

/* Bal Vikas Quiz */
.quiz-container {
  max-width: 760px;
  margin: 0 auto;
}
.quiz-card {
  background: white;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.quiz-scenario {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 20px;
  line-height: 1.5;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quiz-opt-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}
.quiz-opt-btn:hover {
  background: var(--gold-light);
  border-color: var(--border-gold);
}
.quiz-opt-btn.correct {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
  font-weight: 600;
}
.quiz-opt-btn.wrong {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

/* Persistent Bottom Audio Dock */
.audio-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--dock-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-gold);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}
.dock-track-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 220px;
  max-width: 320px;
}
.dock-track-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.dock-track-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dock-track-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.dock-controls-center {
  flex: 1;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.dock-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-dock-ctrl {
  background: transparent;
  border: none;
  color: var(--text-dark);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn-dock-ctrl:hover {
  color: var(--primary);
  background: #f1f5f9;
}
.btn-dock-play {
  background: linear-gradient(135deg, var(--saffron), var(--primary));
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(194, 65, 12, 0.35);
}
.dock-progress-bar-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dock-progress-slider {
  flex: 1;
  height: 4px;
  appearance: none;
  background: #e2e8f0;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.dock-progress-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
}
.dock-time-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  min-width: 38px;
}
.dock-extras {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-sleep-timer {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.btn-sleep-timer.active {
  background: var(--gold-light);
  border-color: var(--gold);
  color: var(--primary-dark);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
    padding: 10px 14px;
    gap: 10px;
  }
  .lang-switcher {
    width: 100%;
    justify-content: space-around;
  }
  .audio-dock {
    padding: 0 12px;
    gap: 8px;
  }
  .dock-track-info {
    min-width: 120px;
    max-width: 140px;
  }
  .dock-track-thumb {
    width: 38px;
    height: 38px;
  }
  .dock-extras {
    display: none;
  }
}
