/* ==========================================================================
   Satkripa Foundation · Maa Adi Shakti Sati Giri Ji Maharaj
   Custom Stylesheet (Mobile-Responsive & Zero External Dependencies)
   ========================================================================== */

/* Universal Mobile Overflow Protection (Zero Horizontal Overflow Guarantee) */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body {
  font-family: 'DM Sans', sans-serif;
  background-color: #FBF8F0;
  color: #221E16;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  position: relative;
}

/* ==========================================================================
   Modern Drawer Nav (Pure CSS State + Hybrid JS Sync)
   Guarantees 100% Reliable Toggle with ZERO Horizontal Overflow
   ========================================================================== */
#satkripa-drawer-toggle {
  position: fixed;
  top: -100px;
  left: -100px;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

/* When drawer is closed: completely hidden from layout flow */
.satkripa-drawer {
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.3s ease;
}

.satkripa-drawer .drawer-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.satkripa-drawer .drawer-panel {
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* When drawer is open: either via CSS checkbox checked OR via .active class */
#satkripa-drawer-toggle:checked ~ #satkripaDrawer,
#satkripaDrawer.active {
  visibility: visible !important;
  pointer-events: auto !important;
}

#satkripa-drawer-toggle:checked ~ #satkripaDrawer .drawer-backdrop,
#satkripaDrawer.active .drawer-backdrop {
  opacity: 1 !important;
  pointer-events: auto !important;
}

#satkripa-drawer-toggle:checked ~ #satkripaDrawer .drawer-panel,
#satkripaDrawer.active .drawer-panel {
  transform: translateX(0) !important;
}

/* Scroll Reading Progress Bar */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #FFA751 0%, #FF8E53 50%, #E67E22 100%);
  z-index: 9999;
  transition: width 0.08s ease-out;
  pointer-events: none;
  box-shadow: 0 1px 6px rgba(255, 142, 83, 0.6);
}

/* Scroll Reveal Animations (Robust Native Fallback + Companion to AOS) */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.font-heading {
  font-family: 'Merriweather', serif;
}

/* Prevent AOS from creating horizontal scrollbars on mobile */
[data-aos] {
  max-width: 100%;
}

@media (max-width: 768px) {
  /* On mobile screens, translate along Y axis instead of X to completely prevent horizontal overflow */
  [data-aos="fade-left"],
  [data-aos="fade-right"] {
    transform: translate3d(0, 24px, 0) !important;
  }
}

/* Gradient Text */
.text-gradient-orange {
  background: linear-gradient(135deg, #FFA751 0%, #FF8E53 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Primary Orange Action Buttons */
.btn-orange {
  background: linear-gradient(135deg, #FFD194 0%, #FFA751 50%, #FF8E53 100%);
  box-shadow: 0 8px 24px -8px rgba(255, 142, 83, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-orange:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px rgba(255, 142, 83, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Outline Buttons */
.btn-outline-cream {
  border: 1px solid rgba(245, 240, 225, 0.5);
  transition: all 0.35s ease;
}

.btn-outline-cream:hover {
  background: rgba(245, 240, 225, 0.1);
  border-color: rgba(245, 240, 225, 0.9);
}

/* Hero Overlay */
.hero-overlay {
  background: linear-gradient(180deg, rgba(31, 42, 20, 0.55) 0%, rgba(31, 42, 20, 0.35) 40%, rgba(31, 42, 20, 0.75) 100%);
}

/* Scrolled Header */
.header-scrolled {
  box-shadow: 0 4px 24px -8px rgba(31, 42, 20, 0.1);
}

/* Nav Links Underline Effect */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
  color: #344524;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1.5px;
  background: #FF8E53;
  transition: width 0.35s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Animations */
@keyframes kenburns {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.kenburns {
  animation: kenburns 12s ease-in-out infinite alternate;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(6deg); }
}

.float-slow {
  animation: float-slow 7s ease-in-out infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track {
  animation: marquee 38s linear infinite;
  display: flex;
  width: max-content;
}

/* Glassmorphism Card */
.glass-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 240, 225, 0.12);
}

/* Parallax Background */
.parallax-bg {
  background-attachment: scroll;
  background-position: center;
  background-size: cover;
}

@media (min-width: 768px) {
  .parallax-bg {
    background-attachment: fixed;
  }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F7F2E6;
}

::-webkit-scrollbar-thumb {
  background: #FF8E53;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #E67E22;
}

.mobile-menu {
  scrollbar-width: none;
}

.mobile-menu::-webkit-scrollbar {
  display: none;
}

/* Interactive Cards */
.teaching-card {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
}

@media (min-width: 1024px) {
  .teaching-card:hover {
    transform: translateY(-8px);
  }
}

/* Leaf / Ornamental Divider */
.divider-leaf {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FF8E53, transparent);
}

/* Dynamic Footer Watermark Sacred Words */
#footerWatermarkWord {
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

#footerWatermarkSub {
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}
