/* ═══════════════════════════════════════════════════════
   MAA BAGLAMUKHI TEMPLE — ANIMATIONS CSS
   CSS animations, keyframes, GSAP helper classes
   ═══════════════════════════════════════════════════════ */

/* ── INITIAL STATES (GSAP sets these via JS too) ── */
.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
}

.animate-fade-in {
  opacity: 0;
}

.animate-slide-left {
  opacity: 0;
  transform: translateX(-40px);
}

.animate-slide-right {
  opacity: 0;
  transform: translateX(40px);
}

.animate-scale {
  opacity: 0;
  transform: scale(0.92);
}

/* ── SCROLL REVEAL (fallback without GSAP) ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ── KEYFRAME ANIMATIONS ── */

/* Gentle float — temple, icons */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

.anim-float {
  animation: float 4s ease-in-out infinite;
}

/* Flame flicker */
@keyframes flicker {
  0%   { transform: scaleX(1)   scaleY(1)    rotate(-2deg); opacity: 0.9; }
  25%  { transform: scaleX(0.82) scaleY(1.12) rotate(2deg);  opacity: 1;   }
  50%  { transform: scaleX(1.1)  scaleY(0.9)  rotate(-1deg); opacity: 0.85;}
  75%  { transform: scaleX(0.9)  scaleY(1.08) rotate(3deg);  opacity: 0.95;}
  100% { transform: scaleX(1)   scaleY(1)    rotate(-2deg); opacity: 0.9; }
}

.anim-flicker {
  animation: flicker 1.8s ease-in-out infinite;
  transform-origin: bottom center;
}

/* Slow rotation — mandala, rangoli */
@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.anim-rotate {
  animation: rotate-slow 30s linear infinite;
}

.anim-rotate-reverse {
  animation: rotate-slow 25s linear infinite reverse;
}

/* Pulse glow */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(201,146,42,0.2); }
  50%       { box-shadow: 0 0 30px rgba(201,146,42,0.5), 0 0 60px rgba(201,146,42,0.2); }
}

.anim-pulse-glow {
  animation: pulse-glow 2.5s ease-in-out infinite;
}

/* Shimmer on gold text */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

.anim-shimmer {
  background: linear-gradient(90deg, var(--gold) 25%, var(--gold-light) 50%, var(--gold) 75%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* Twinkle — spark particles */
@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50%       { opacity: 1;    transform: scale(1.4); }
}

/* Petal fall */
@keyframes petal-fall {
  0%   { transform: translateY(-20px) rotate(0deg);   opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* Wave for info strip */
@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50%       { transform: scaleY(1.3); }
}

/* ── CARD HOVER EFFECTS ── */
.card-hover {
  transition: transform 0.4s cubic-bezier(0.23,1,0.32,1),
              box-shadow 0.4s cubic-bezier(0.23,1,0.32,1),
              border-color 0.4s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(90,10,10,0.15);
}

/* 3D tilt effect (applied via JS) */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.23,1,0.32,1);
}

/* ── BUTTON ANIMATIONS ── */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.3s ease;
}

.btn:hover::after {
  background: rgba(255,255,255,0.08);
}

.btn:active {
  transform: translateY(0) scale(0.98) !important;
}

/* ── NAV UNDERLINE ANIMATION ── */
.nav-link {
  position: relative;
}

/* ── PAGE TRANSITION ── */
.page-transition {
  animation: pageIn 0.5s ease both;
}

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

/* ── LOADING SPINNER (for booking/payment) ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(201,146,42,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* ── DIYA FLAME (CSS only fallback) ── */
.flame {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 22px solid #FF6B00;
  border-radius: 50% 50% 0 0;
  animation: flicker 1.5s ease-in-out infinite;
  transform-origin: bottom center;
  filter: drop-shadow(0 0 6px rgba(255,107,0,0.7));
}

/* ── SECTION BACKGROUND PATTERNS ── */
.bg-pattern-dots {
  background-image: radial-gradient(circle, rgba(139,26,26,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

.bg-pattern-lines {
  background-image:
    repeating-linear-gradient(90deg, rgba(201,146,42,0.05) 0, rgba(201,146,42,0.05) 1px, transparent 0, transparent 50%);
  background-size: 40px 40px;
}

.bg-pattern-cross {
  background-image:
    repeating-linear-gradient(45deg,  rgba(139,26,26,0.03) 0, rgba(139,26,26,0.03) 1px, transparent 0, transparent 20px),
    repeating-linear-gradient(-45deg, rgba(139,26,26,0.03) 0, rgba(139,26,26,0.03) 1px, transparent 0, transparent 20px);
}

/* ── GOLD BORDER GLOW ── */
.gold-border {
  border: 1px solid var(--gold-border);
  position: relative;
}

.gold-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, var(--gold), transparent 50%, var(--gold));
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
  z-index: -1;
}

.gold-border:hover::before { opacity: 0.3; }
