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

:root {
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --gold-dark: #8b6914;
  --parchment: #f5edd6;
  --parchment-dark: #e8dcc0;
  --brown: #3e2723;
  --brown-light: #5d4037;
  --brown-medium: #4e342e;
  --cream: #faf6eb;
  --ivory: #fffff0;
  --burgundy: #6d1a36;
  --deep-red: #8b0000;
  --olive: #556b2f;
  --shadow: rgba(62, 39, 35, 0.3);
  --glow: rgba(201, 168, 76, 0.4);
  --font-display: 'Cinzel Decorative', serif;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Lora', serif;
  --font-tamil: 'Noto Serif Tamil', serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--brown);
  overflow-x: hidden;
  line-height: 1.8;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--parchment-dark); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ========== NAVBAR ========== */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: rgba(62, 39, 35, 0.95);
  backdrop-filter: blur(10px);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
  border-bottom: 2px solid var(--gold-dark);
  transition: all 0.4s ease;
}
.navbar.scrolled { height: 60px; background: rgba(62, 39, 35, 0.98); box-shadow: 0 4px 20px var(--shadow); }
.nav-logo {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a {
  color: var(--parchment);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--gold);
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 5px; }
.hamburger span { width: 25px; height: 2px; background: var(--gold); transition: all 0.3s; }

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  background: linear-gradient(135deg, #1a0e0a 0%, #3e2723 30%, #2c1a10 60%, #1a0e0a 100%);
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center top, rgba(201,168,76,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(139,105,20,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.hero-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.particle {
  position: absolute;
  width: 3px; height: 3px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: floatParticle 8s infinite;
}
@keyframes floatParticle {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  20% { opacity: 0.8; }
  80% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-20vh) scale(1); }
}
.hero-content { position: relative; z-index: 2; max-width: 900px; padding: 2rem; }
.hero-cross {
  font-size: 3rem; color: var(--gold);
  margin-bottom: 1.5rem;
  animation: glowPulse 3s ease-in-out infinite;
  text-shadow: 0 0 30px var(--glow);
}
@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 20px var(--glow), 0 0 40px rgba(201,168,76,0.2); }
  50% { text-shadow: 0 0 40px var(--glow), 0 0 80px rgba(201,168,76,0.3); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--gold-light);
  letter-spacing: 4px;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.hero-tamil {
  font-family: var(--font-tamil);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--gold);
  margin-bottom: 1rem;
  font-weight: 500;
}
.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--parchment);
  opacity: 0.85;
  margin-bottom: 2rem;
  font-style: italic;
}
.hero-divider {
  width: 120px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1.5rem auto;
}
.hero-btn {
  display: inline-block;
  padding: 1rem 3rem;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--brown);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 4px;
  border: 1px solid var(--gold-light);
  transition: all 0.4s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.4);
}
.hero-scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--gold); opacity: 0.6; animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ========== SECTIONS ========== */
.section {
  padding: 5rem 2rem;
  position: relative;
}
.section-parchment {
  background: linear-gradient(180deg, var(--cream), var(--parchment), var(--cream));
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.section-dark {
  background: linear-gradient(180deg, var(--brown), var(--brown-medium), var(--brown));
  color: var(--parchment);
}
.section-header { text-align: center; margin-bottom: 4rem; }
.section-icon-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}
.section-icon-wrap svg {
  filter: drop-shadow(0 0 5px var(--glow));
}
.section-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
}
.section-dark .section-title { color: var(--gold-light); }
.section-title-tamil {
  font-family: var(--font-tamil);
  font-size: 1.2rem;
  color: var(--gold-dark);
  margin-bottom: 1rem;
}
.section-dark .section-title-tamil { color: var(--gold); }
.section-line {
  width: 80px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto;
}
.container { max-width: 1200px; margin: 0 auto; }

/* ========== TIMELINE ========== */
.timeline { position: relative; padding: 2rem 0; }
.timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--gold), var(--gold), transparent);
  transform: translateX(-50%);
}
.timeline-item {
  display: flex; align-items: center; margin-bottom: 3rem;
  position: relative; cursor: pointer;
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s, transform 0.6s;
}
.timeline-item.visible { opacity: 1; transform: translateY(0); }
.timeline-item:nth-child(odd) { flex-direction: row; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }
.timeline-dot {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 20px; height: 20px;
  background: var(--gold);
  border: 3px solid var(--brown);
  border-radius: 50%;
  z-index: 2;
  transition: all 0.3s;
}
.timeline-item:hover .timeline-dot {
  transform: translateX(-50%) scale(1.4);
  box-shadow: 0 0 20px var(--glow);
}
.timeline-content {
  width: 42%;
  background: rgba(255,255,240,0.95);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.4s;
}
.section-dark .timeline-content {
  background: rgba(93,64,55,0.6);
  border-color: rgba(201,168,76,0.3);
}
.timeline-item:hover .timeline-content {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.2);
  border-color: var(--gold);
}
.timeline-item:nth-child(odd) .timeline-content { margin-right: auto; }
.timeline-item:nth-child(even) .timeline-content { margin-left: auto; }
.timeline-era {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--gold-dark);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.section-dark .timeline-era { color: var(--gold-light); }
.timeline-title {
  font-family: var(--font-tamil);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.timeline-desc {
  font-size: 0.9rem;
  opacity: 0.85;
  line-height: 1.6;
}
.timeline-detail {
  max-height: 0; overflow: hidden;
  transition: max-height 0.5s ease;
  font-size: 0.85rem;
  line-height: 1.7;
  margin-top: 0;
}
.timeline-item.expanded .timeline-detail {
  max-height: 500px;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(201,168,76,0.2);
}

/* ========== BOOKS SEARCH & PROGRESS ========== */
.books-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
  align-items: center;
}
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 1rem;
  font-size: 1.2rem;
  color: var(--gold-dark);
}
#book-search {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  background: var(--ivory);
  border: 2px solid var(--gold-dark);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--brown);
  transition: all 0.3s;
}
#book-search:focus {
  outline: none;
  box-shadow: 0 0 15px var(--glow);
  border-color: var(--gold);
}
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.progress-stats {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--brown-light);
  letter-spacing: 1px;
}
.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: var(--parchment-dark);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.3);
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 20px;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 10px var(--glow);
}
.book-card.completed {
  border-color: var(--gold);
  background: linear-gradient(145deg, var(--ivory), #fdfcf0);
}
.completed-badge {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: var(--gold);
  color: var(--brown);
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 2px 8px rgba(201, 168, 76, 0.4);
}
.book-check-btn {
  background: none;
  border: 1px solid var(--gold-dark);
  color: var(--gold-dark);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-family: var(--font-tamil);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.book-check-btn:hover {
  background: var(--gold);
  color: var(--brown);
}
.book-check-btn.active {
  background: var(--gold-dark);
  color: var(--parchment);
}

/* ========== BOOK TABS ========== */
.tabs-container { margin-bottom: 3rem; }
.tab-buttons {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0.8rem;
  margin-bottom: 2.5rem;
}
.tab-btn {
  padding: 0.8rem 2rem;
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-tamil);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s;
  letter-spacing: 1px;
}
.tab-btn:hover, .tab-btn.active {
  background: var(--gold);
  color: var(--brown);
  box-shadow: 0 4px 15px rgba(201,168,76,0.3);
}
.tab-panel { display: none; animation: fadeIn 0.5s ease; }
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ========== BOOK CARDS ========== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}
.book-card {
  background: linear-gradient(145deg, var(--ivory), var(--parchment));
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.4s;
  cursor: pointer;
  position: relative;
}
.book-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
}
.book-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(62,39,35,0.15), 0 0 0 1px var(--gold);
}
.book-card-header {
  padding: 1.5rem 1.5rem 1rem;
  display: flex; align-items: center; gap: 1rem;
}
.book-icon {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: var(--brown);
  flex-shrink: 0;
}
.book-card-header h3 {
  font-family: var(--font-tamil);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brown);
}
.book-card-header h3 small {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--gold-dark);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 2px;
}
.book-meta {
  padding: 0 1.5rem;
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--brown-light);
}
.book-meta span {
  display: flex; align-items: center; gap: 0.3rem;
}
.book-card-body {
  padding: 1rem 1.5rem 1.5rem;
}
.book-summary {
  font-family: var(--font-tamil);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--brown-light);
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-card.expanded .book-summary {
  line-clamp: unset;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.book-expand-btn {
  display: inline-block;
  margin-top: 0.8rem;
  background: none; border: none;
  color: var(--gold-dark);
  font-family: var(--font-tamil);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s;
}
.book-expand-btn:hover { color: var(--gold); }

/* ========== SCHOLAR'S QUIZ ========== */
.quiz-container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--ivory);
  padding: 3rem;
  border-radius: 12px;
  border: 1px solid var(--gold);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  text-align: center;
  position: relative;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.quiz-welcome {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--brown);
  margin-bottom: 0.5rem;
}
.quiz-welcome-tamil {
  font-family: var(--font-tamil);
  color: var(--gold-dark);
  margin-bottom: 2rem;
}
.quiz-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  text-align: left;
}
#quiz-progress {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--gold-dark);
}
.quiz-timer-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--parchment-dark);
  border-radius: 10px;
  overflow: hidden;
}
.quiz-timer-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--gold);
  transition: width 0.1s linear;
}
.quiz-question {
  font-family: var(--font-tamil);
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--brown);
  margin-bottom: 2rem;
}
.quiz-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.quiz-opt {
  padding: 1rem 1.5rem;
  background: var(--cream);
  border: 2px solid var(--parchment-dark);
  border-radius: 8px;
  font-family: var(--font-tamil);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
}
.quiz-opt:hover {
  border-color: var(--gold);
  background: var(--ivory);
}
.quiz-opt.correct {
  background: #eaffea;
  border-color: #2e7d32;
  color: #1b5e20;
}
.quiz-opt.wrong {
  background: #ffebee;
  border-color: #c62828;
  color: #b71c1c;
}
.result-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: glowPulse 2s infinite;
}
#result-text {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--brown);
  margin-bottom: 0.5rem;
}
#result-score {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--gold-dark);
  margin-bottom: 2rem;
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(26,14,10,0.85);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 2rem;
  opacity: 0; transition: opacity 0.3s;
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal {
  background: linear-gradient(145deg, var(--ivory), var(--parchment));
  border: 2px solid var(--gold);
  border-radius: 12px;
  max-width: 800px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.modal-close {
  position: absolute; top: 1rem; right: 1.5rem;
  background: none; border: none;
  font-size: 1.8rem; color: var(--brown-light);
  cursor: pointer; transition: color 0.3s;
}
.modal-close:hover { color: var(--deep-red); }
.modal h2 {
  font-family: var(--font-tamil);
  font-size: 1.8rem;
  color: var(--brown);
  margin-bottom: 0.3rem;
}
.modal h2 small {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--gold-dark);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.modal-divider {
  width: 60px; height: 2px;
  background: var(--gold);
  margin: 1rem 0 1.5rem;
}
.modal-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(201,168,76,0.2);
}
.modal-meta-item {
  font-family: var(--font-tamil);
  font-size: 0.9rem;
}
.modal-meta-item strong { color: var(--gold-dark); }
.modal-body {
  font-family: var(--font-tamil);
  font-size: 0.95rem;
  line-height: 2;
  color: var(--brown-light);
}
.modal-body h3 {
  font-family: var(--font-tamil);
  color: var(--brown);
  font-size: 1.1rem;
  margin: 1.5rem 0 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(201,168,76,0.2);
}
.modal-body ul, .modal-body ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}
.modal-body li { margin-bottom: 0.4rem; }

/* ========== THEMES SECTION ========== */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
}
.theme-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: rgba(255,255,240,0.1);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 10px;
  transition: all 0.4s;
  cursor: default;
}
.theme-card:hover {
  transform: translateY(-8px);
  background: rgba(201,168,76,0.1);
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(201,168,76,0.15);
}
.theme-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}
.theme-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.3rem;
}
.theme-title-tamil {
  font-family: var(--font-tamil);
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.8rem;
}
.theme-desc {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.6;
}

/* ========== INTERACTIVE MAP ========== */
.map-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  background: var(--ivory);
  border: 1px solid var(--gold-dark);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(62, 39, 35, 0.15);
}
.map-wrapper {
  position: relative;
  background: #e8dcc0;
  overflow: hidden;
  cursor: grab;
}
.map-img {
  width: 100%;
  display: block;
}
.map-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 20;
}
.hotspot-pulse {
  width: 24px;
  height: 24px;
  background: rgba(201, 168, 76, 0.8);
  border: 2px solid white;
  border-radius: 50%;
  position: relative;
}
.hotspot-pulse::after {
  content: '';
  position: absolute;
  inset: -10px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  animation: mapPulse 2s infinite;
}
@keyframes mapPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}
.hotspot-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(62, 39, 35, 0.9);
  color: var(-- gold);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  white-space: nowrap;
  margin-top: 8px;
  opacity: 0.8;
  transition: opacity 0.3s;
}
.map-hotspot:hover .hotspot-label {
  opacity: 1;
  background: var(--gold-dark);
}
.map-info-panel {
  padding: 2.5rem;
  border-left: 1px solid rgba(201, 168, 76, 0.2);
  background: linear-gradient(145deg, var(--ivory), var(--parchment));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.map-info-placeholder {
  text-align: center;
  color: var(--brown-light);
  font-style: italic;
}
.map-info-hint {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  color: var(--gold-dark);
}
.map-info-content h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--brown);
  margin-bottom: 0.2rem;
  letter-spacing: 1px;
}
.map-loc-tamil {
  font-family: var(--font-tamil);
  font-size: 1.1rem;
  color: var(--gold-dark);
  margin-bottom: 1rem;
}
.map-loc-divider {
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 1.5rem;
}
.map-loc-desc {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--brown-light);
  margin-bottom: 1.5rem;
}
.map-loc-books {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.map-loc-tag {
  background: var(--parchment-dark);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--brown);
  font-family: var(--font-heading);
}
@media (max-width: 900px) {
  .map-container {
    grid-template-columns: 1fr;
  }
  .map-info-panel {
    border-left: none;
    border-top: 1px solid rgba(201, 168, 76, 0.2);
  }
}

/* ========== ARTIFACTS GALLERY ========== */
.artifacts-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
}
.artifact-card {
  width: 320px;
  background: rgba(255, 255, 240, 0.05);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.5s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.artifact-img-wrapper {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.artifact-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.8s ease;
}
.artifact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(62, 39, 35, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.5s ease;
  padding: 2rem;
  text-align: center;
}
.artifact-meaning {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  transition: all 0.5s ease;
}
.artifact-meaning-tamil {
  font-family: var(--font-tamil);
  color: var(--parchment);
  font-size: 1rem;
  transform: translateY(20px);
  transition: all 0.5s ease 0.1s;
}
.artifact-card:hover {
  transform: translateY(-10px);
  border-color: var(--gold);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}
.artifact-card:hover .artifact-img {
  transform: scale(1.1);
  filter: grayscale(0.5) blur(2px);
}
.artifact-card:hover .artifact-overlay {
  opacity: 1;
}
.artifact-card:hover .artifact-meaning,
.artifact-card:hover .artifact-meaning-tamil {
  transform: translateY(0);
}
.artifact-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.artifact-title {
  font-family: var(--font-tamil);
  font-size: 1.1rem;
  color: var(--gold-light);
  margin-bottom: 0.8rem;
  line-height: 1.4;
}
.artifact-title small {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.artifact-desc {
  font-family: var(--font-tamil);
  font-size: 0.9rem;
  color: var(--parchment);
  opacity: 0.8;
  line-height: 1.6;
  flex-grow: 1;
}

/* ========== VERSE HIGHLIGHT ========== */
.verse-banner {
  padding: 6rem 2rem;
  background: linear-gradient(135deg, #1a0e0a, #331d17, #1a0e0a);
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 2px solid var(--gold-dark);
  border-bottom: 2px solid var(--gold-dark);
}

.verse-banner::before {
  content: ''; position: absolute; inset: 0;
  background-image: url('https://www.transparenttextures.com/patterns/p6.png');
  opacity: 0.15;
  pointer-events: none;
}

.verse-banner::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.12) 0%, transparent 80%);
  pointer-events: none;
}

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

.verse-quote-icon {
  position: absolute;
  font-size: 8rem;
  font-family: serif;
  color: var(--gold);
  opacity: 0.12;
  line-height: 1;
  pointer-events: none;
}

.quote-left { top: -2rem; left: -1rem; }
.quote-right { bottom: -3rem; right: -1rem; transform: rotate(180deg); }

.verse-text {
  font-family: var(--font-tamil);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--parchment);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  letter-spacing: 0.5px;
}

.verse-divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 1.5rem auto;
  position: relative;
}

.verse-divider::after {
  content: '⬥';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gold);
  background: #2a1610; /* Match average bg color */
  padding: 0 8px;
  font-size: 0.8rem;
}

.verse-ref {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.9;
}

/* ========== INSPIRATION SCROLL ========== */
.scroll-container {
  display: flex;
  justify-content: center;
  padding: 4rem 0;
}
.scroll-unroll {
  position: relative;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.scroll-wood {
  width: 106%;
  height: 40px;
  background: linear-gradient(to bottom, #4e342e, #3e2723, #4e342e);
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
  z-index: 5;
  position: relative;
}
.scroll-wood::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  background: radial-gradient(#c9a84c, #8e6d1c);
  border-radius: 50%;
  top: 5px;
}
.scroll-top::after { left: -15px; box-shadow: 5px 0 10px rgba(0,0,0,0.3); }
.scroll-bottom::after { right: -15px; box-shadow: -5px 0 10px rgba(0,0,0,0.3); }

.scroll-content-wrap {
  width: 100%;
  height: 100px; /* Initially rolled up */
  background: #f4e4bc;
  transition: height 1.5s cubic-bezier(0.19, 1, 0.22, 1);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 50px rgba(62, 39, 35, 0.2);
  margin: -5px 0;
  border-left: 15px solid #e3d2a7;
  border-right: 15px solid #e3d2a7;
}
.scroll-container:hover .scroll-content-wrap,
.scroll-container.reveal.active .scroll-content-wrap {
  height: 400px; /* Unrolled height */
}
.scroll-paper {
  padding: 3rem 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: url('https://www.transparenttextures.com/patterns/p6.png'); /* Subtle paper texture */
  opacity: 0;
  transition: opacity 1s ease 0.5s;
}
.scroll-container:hover .scroll-paper,
.scroll-container.reveal.active .scroll-paper {
  opacity: 1;
}
.scroll-verse-text {
  font-family: var(--font-tamil);
  font-size: 1.5rem;
  color: var(--brown);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-style: italic;
}
.scroll-verse-ref {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--gold-dark);
  letter-spacing: 2px;
}
.scroll-refresh-btn {
  margin-top: 2rem;
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold-dark);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.scroll-refresh-btn:hover {
  background: var(--gold);
  color: white;
  transform: rotate(180deg);
}

/* ========== YOUTUBE PLAYLIST ========== */
.youtube-section {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}
.youtube-embed-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(62, 39, 35, 0.2), 0 0 0 2px var(--gold);
  background: var(--brown);
}
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
}
.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.video-overlay:hover .video-thumb {
  transform: scale(1.05);
}
.video-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  opacity: 0.7;
  transition: opacity 0.3s;
}
.video-overlay:hover::after {
  opacity: 0.9;
}
.play-trigger {
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(196, 48, 43, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
  border: 3px solid #fff;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 30px rgba(196, 48, 43, 0.5);
}
.video-overlay:hover .play-trigger {
  transform: scale(1.1);
  background: #ff0000;
  box-shadow: 0 0 50px rgba(255, 0, 0, 0.6);
}
.play-icon {
  color: #fff;
  font-size: 2rem;
  margin-left: 5px;
}
.youtube-embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 5;
}
.youtube-info {
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(145deg, var(--ivory), var(--parchment));
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(62, 39, 35, 0.08);
}
.youtube-info-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: glowPulse 3s ease-in-out infinite;
}
.youtube-info-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--brown);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.youtube-info-tamil {
  font-family: var(--font-tamil);
  font-size: 1rem;
  color: var(--gold-dark);
  margin-bottom: 1rem;
}
.youtube-info-desc {
  font-size: 0.95rem;
  color: var(--brown-light);
  line-height: 1.7;
  margin-bottom: 1.8rem;
}
.youtube-playlist-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2.2rem;
  background: linear-gradient(135deg, #c4302b, #ff0000);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 6px;
  transition: all 0.4s;
  box-shadow: 0 4px 15px rgba(196, 48, 43, 0.3);
}
.youtube-playlist-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(196, 48, 43, 0.45);
  background: linear-gradient(135deg, #a52722, #d40000);
}
.yt-btn-icon {
  font-size: 1.1rem;
}
@media (max-width: 768px) {
  .youtube-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ========== FOOTER ========== */
.footer {
  background: var(--brown);
  color: var(--parchment);
  padding: 3rem 2rem 1.5rem;
  text-align: center;
  border-top: 3px solid var(--gold-dark);
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
}
.footer-links {
  display: flex; justify-content: center; gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.footer-links a {
  color: var(--parchment);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--gold); }
.footer-social {
  display: flex; justify-content: center; gap: 1rem;
  margin-bottom: 1.5rem;
}
.footer-social a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold-dark);
  border-radius: 50%;
  color: var(--gold);
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s;
}
.footer-social a:hover {
  background: var(--gold);
  color: var(--brown);
}
.footer-copy {
  font-size: 0.8rem;
  opacity: 0.6;
  padding-top: 1rem;
  border-top: 1px solid rgba(201,168,76,0.2);
}

/* ========== ANIMATIONS ========== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left { transform: translateX(-40px); }
.reveal-left.visible { transform: translateX(0); }
.reveal-right { transform: translateX(40px); }
.reveal-right.visible { transform: translateX(0); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 70px; left: 0; width: 100%; background: rgba(62,39,35,0.98); flex-direction: column; padding: 1.5rem; gap: 1.2rem; }
  .nav-links.active { display: flex; }
  .hamburger { display: flex; }
  .timeline::before { left: 20px; }
  .timeline-item, .timeline-item:nth-child(even) { flex-direction: row; }
  .timeline-dot { left: 20px; }
  .timeline-content, .timeline-item:nth-child(odd) .timeline-content, .timeline-item:nth-child(even) .timeline-content { width: calc(100% - 50px); margin-left: 50px; margin-right: 0; }
  .books-grid { grid-template-columns: 1fr; }
  .themes-grid { grid-template-columns: repeat(2, 1fr); }
  .modal { padding: 1.5rem; margin: 1rem; }
}
@media (max-width: 480px) {
  .themes-grid { grid-template-columns: 1fr; }
  .tab-buttons { gap: 0.5rem; }
  .tab-btn { padding: 0.6rem 1.2rem; font-size: 0.85rem; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

/* ========== LOGIN OVERLAY STYLES ========== */
.login-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--dark-bg);
  background-image: linear-gradient(rgba(10, 10, 15, 0.8), rgba(10, 10, 15, 0.8)), url('tabernacle.png'); 
  background-size: cover;
  background-position: center;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.1);
}
.login-card {
  background: var(--cream);
  border: 1px solid var(--gold);
  padding: 40px;
  border-radius: 8px;
  width: 90%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(201, 168, 76, 0.05);
  animation: cardIn 1s ease-out;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-logo { margin-bottom: 15px; }
.login-logo h2 {
  color: var(--brown);
  font-family: var(--font-heading);
  letter-spacing: 2px;
  margin-top: 10px;
}
.login-subtitle {
  color: var(--brown-light);
  font-family: var(--font-tamil);
  font-size: 0.9rem;
  margin-bottom: 30px;
}
.login-form { text-align: left; }
.input-group { margin-bottom: 20px; }
.input-group label {
  display: block;
  color: var(--brown-light);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.input-group input {
  width: 100%;
  background: var(--ivory);
  border: 1px solid rgba(201, 168, 76, 0.5);
  padding: 12px 15px;
  color: var(--brown);
  font-family: var(--font-body);
  border-radius: 4px;
  transition: all 0.3s ease;
}
.input-group input:focus {
  outline: none;
  border-color: var(--gold-dark);
  background: #ffffff;
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.3);
}
.login-error {
  color: var(--deep-red);
  font-family: var(--font-body);
  font-size: 0.85rem;
  margin-top: 15px;
  text-align: center;
  min-height: 1.2rem;
}
