/* ==========================================================================
   KAALCHAKRA — GLOBAL VEDIC COSMIC STYLESHEET
   Unified styles for Home, Articles, Granthalaya, and Responsive Mobile UI
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;600;700;900&family=Tiro+Devanagari+Sanskrit:ital@0;1&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --cosmic-void: #060714;
  --deep-obsidian: #0c0e1a;
  --dark-indigo: #070918;
  --vedic-gold: #ffd15c;
  --divine-gold: #ffd700;
  --deep-gold: #b8860b;
  --sacred-saffron: #ff9933;
  --vedic-saffron: #ff7722;
  --sacred-ember: #ff4500;
  --incandescent: #fff5e1;
  --border-gold-subtle: rgba(255, 209, 92, 0.18);
  --border-gold-glow: rgba(255, 209, 92, 0.65);
}

/* Base Reset & Smooth Scrolling */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--cosmic-void);
  color: #e5e7eb;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--cosmic-void);
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 70px; /* Space for mobile bottom dock on small screens */
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: var(--cosmic-void);
}
::-webkit-scrollbar-thumb {
  background: #3d2b12;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--divine-gold);
}

/* Typography Classes */
.font-cinzel-deco, .font-cinzel-dec {
  font-family: 'Cinzel Decorative', serif;
}
.font-cinzel {
  font-family: 'Cinzel', serif;
}
.font-sanskrit {
  font-family: 'Tiro Devanagari Sanskrit', serif;
}
.font-sans {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Glow Effects */
.gold-glow-text {
  text-shadow: 0 0 18px rgba(255, 215, 0, 0.65), 0 0 35px rgba(255, 153, 51, 0.35);
}
.sanskrit-glow {
  text-shadow: 0 0 14px rgba(255, 225, 150, 0.85);
}
.saffron-glow {
  text-shadow: 0 0 18px rgba(255, 119, 34, 0.7);
}

/* Cosmic Background Grid */
.cosmic-grid {
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(255, 209, 92, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 209, 92, 0.03) 1px, transparent 1px);
}

/* Glassmorphism Panels */
.glass-panel {
  background: rgba(8, 10, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 209, 92, 0.16);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.85), inset 0 0 16px rgba(255, 180, 50, 0.02);
}

.glass-panel-active {
  border: 1px solid var(--border-gold-glow);
  box-shadow: 0 0 25px rgba(255, 170, 40, 0.25), inset 0 0 20px rgba(255, 190, 50, 0.08);
}

.glass-panel-hover {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-panel-hover:hover {
  border-color: rgba(255, 209, 92, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 209, 92, 0.15);
}

/* Nav links indicator */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: linear-gradient(90deg, var(--divine-gold), var(--sacred-saffron));
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link:hover,
.nav-link.active {
  color: var(--divine-gold);
}

/* Floating Social & Action Sidebar (Desktop) */
.floating-sidebar {
  position: fixed;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.6rem 0.4rem;
  border-radius: 9999px;
  background: rgba(12, 14, 26, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 209, 92, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.sidebar-btn {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  items-center: center;
  justify-content: center;
  color: #ffd15c;
  background: rgba(255, 209, 92, 0.06);
  border: 1px solid rgba(255, 209, 92, 0.15);
  transition: all 0.25s ease;
}
.sidebar-btn:hover {
  background: rgba(255, 209, 92, 0.2);
  border-color: #ffd15c;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 209, 92, 0.4);
}

/* Sidebar Tooltip */
.sidebar-btn .tooltip {
  position: absolute;
  right: calc(100% + 0.75rem);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(6, 7, 20, 0.95);
  color: #ffd15c;
  border: 1px solid rgba(255, 209, 92, 0.3);
  padding: 0.25rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.68rem;
  font-family: 'Cinzel', serif;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}
.sidebar-btn:hover .tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(-4px);
}

/* Mobile Bottom Navigation Dock */
.mobile-dock {
  position: fixed;
  bottom: 0.75rem;
  left: 1rem;
  right: 1rem;
  z-index: 50;
  background: rgba(8, 10, 24, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 209, 92, 0.35);
  border-radius: 1.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.5rem 0.25rem;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 245, 225, 0.7);
  font-size: 0.65rem;
  font-family: 'Cinzel', serif;
  gap: 0.2rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}
.dock-item:hover, .dock-item.active {
  color: #ffd15c;
  background: rgba(255, 209, 92, 0.12);
}

/* Dropdown Menu Animations */
.dropdown-menu {
  transform-origin: top right;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Pulse Keyframes */
@keyframes subtlePulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 0 10px rgba(255,209,92,0.6)); }
}
.subtle-pulse {
  animation: subtlePulse 4s infinite ease-in-out;
}
