/* =============================================
   Krishna Futuristic Animations
   Kakkamvelly Sreekrishna Temple
   ============================================= */

/* ── Extra CSS Variables ── */
:root {
  --krishna-blue:       #1a3a6b;
  --krishna-blue-light: #4a90d9;
  --krishna-cyan:       #00c8ff;
  --peacock-green:      #0a7a4a;
  --peacock-teal:       #00b4a0;
  --peacock-eye:        #1a6b4a;
  --divine-gold:        #ffd700;
  --divine-glow:        rgba(255, 215, 0, 0.6);
  --lotus-pink:         #ff6b9d;
  --lotus-light:        #ffb3d0;
  --flute-purple:       #9b59b6;
  --aura-blue:          rgba(74, 144, 217, 0.4);
}

/* ══════════════════════════════════════════════
   1. CANVAS PARTICLE LAYER (behind content)
══════════════════════════════════════════════ */
#krishna-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* ══════════════════════════════════════════════
   2. CURSOR SPARKLE TRAIL
══════════════════════════════════════════════ */
.cursor-sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: sparkle-fade 0.8s ease-out forwards;
}
@keyframes sparkle-fade {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(180deg); }
}

/* ══════════════════════════════════════════════
   3. HERO ENHANCEMENTS
══════════════════════════════════════════════ */

/* Divine light rays sweeping behind the hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    conic-gradient(from 200deg at 30% 40%,
      transparent 0deg,
      rgba(255,215,0,0.06) 15deg,
      transparent 30deg,
      rgba(255,180,0,0.04) 60deg,
      transparent 75deg),
    conic-gradient(from 20deg at 70% 60%,
      transparent 0deg,
      rgba(74,144,217,0.05) 20deg,
      transparent 40deg);
  animation: divine-rays 12s linear infinite;
  pointer-events: none;
}

@keyframes divine-rays {
  0%   { transform: rotate(0deg) scale(1.1); opacity: 0.7; }
  50%  { transform: rotate(180deg) scale(1.2); opacity: 1; }
  100% { transform: rotate(360deg) scale(1.1); opacity: 0.7; }
}

/* Floating hero glow orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: orb-float ease-in-out infinite;
  filter: blur(30px);
  z-index: 1;
}
.hero-orb-1 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,215,0,0.18) 0%, transparent 70%);
  top: 10%; left: 15%;
  animation-duration: 8s;
}
.hero-orb-2 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(74,144,217,0.2) 0%, transparent 70%);
  top: 50%; right: 10%;
  animation-duration: 11s;
  animation-delay: -3s;
}
.hero-orb-3 {
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(255,107,157,0.15) 0%, transparent 70%);
  bottom: 20%; left: 40%;
  animation-duration: 9s;
  animation-delay: -6s;
}
@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.1); }
}

/* Peacock feather particles in hero */
.peacock-feather {
  position: absolute;
  font-size: 1.6rem;
  pointer-events: none;
  z-index: 2;
  animation: feather-drift linear infinite;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(0,180,160,0.8));
}
@keyframes feather-drift {
  0%   { opacity: 0; transform: translateY(-20px) rotate(-15deg) scale(0.7); }
  10%  { opacity: 0.8; }
  80%  { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(110vh) rotate(20deg) scale(1.1); }
}

/* ── Flute Sound Wave ── */
.flute-wave-container {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 3;
  opacity: 0.65;
}
.flute-bar {
  width: 3px;
  background: linear-gradient(180deg, var(--divine-gold), var(--krishna-cyan));
  border-radius: 3px;
  box-shadow: 0 0 6px var(--krishna-cyan);
  animation: flute-beat ease-in-out infinite alternate;
}
@keyframes flute-beat {
  0%   { transform: scaleY(0.3); opacity: 0.5; }
  100% { transform: scaleY(1);   opacity: 1;   }
}

/* ══════════════════════════════════════════════
   4. OM SYMBOL PULSE (nav brand)
══════════════════════════════════════════════ */
.om-symbol {
  position: relative;
  display: inline-block;
}
.om-symbol::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--divine-gold);
  animation: om-pulse 2.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes om-pulse {
  0%, 100% { transform: scale(1);   opacity: 0.8; box-shadow: 0 0 0 0 var(--divine-glow); }
  50%       { transform: scale(1.12); opacity: 1;  box-shadow: 0 0 0 10px transparent; }
}

/* ══════════════════════════════════════════════
   5. SECTION ENTRANCE – DIVINE GLOW REVEAL
══════════════════════════════════════════════ */
.krishna-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
  filter: blur(4px);
}
.krishna-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ══════════════════════════════════════════════
   6. FESTIVAL CARDS – DIVINE HOVER AURA
══════════════════════════════════════════════ */
.festival-card {
  position: relative;
  overflow: hidden;
}
.festival-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--angle, 0deg),
    #ffd700, #00c8ff, #ff6b9d, #0a7a4a, #ffd700
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: spin-border 3s linear infinite;
}
.festival-card:hover::before { opacity: 1; }

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes spin-border {
  to { --angle: 360deg; }
}

/* ══════════════════════════════════════════════
   7. LOTUS BLOOM DIVIDER
══════════════════════════════════════════════ */
.title-divider {
  position: relative;
  overflow: visible;
}
.title-divider span {
  position: relative;
  display: inline-block;
  font-size: 1.4rem;
  animation: lotus-spin 6s linear infinite;
  filter: drop-shadow(0 0 8px var(--divine-gold));
  color: var(--divine-gold);
}
@keyframes lotus-spin {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.3); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Lotus petals appearing on either side */
.title-divider::before,
.title-divider::after {
  content: '🪔';
  position: absolute;
  top: 50%; transform: translateY(-50%);
  font-size: 1.2rem;
  opacity: 0;
  animation: lotus-appear 3s ease-in-out infinite;
  filter: drop-shadow(0 0 4px var(--lotus-pink));
}
.title-divider::before { right: calc(50% + 30px); animation-delay: 0.5s; }
.title-divider::after  { left:  calc(50% + 30px); animation-delay: 1s; }

@keyframes lotus-appear {
  0%, 100% { opacity: 0; transform: translateY(-50%) scale(0.5); }
  50%       { opacity: 0.9; transform: translateY(-50%) scale(1.1); }
}




/* ══════════════════════════════════════════════
   9. TIMING CARDS – DEEPAM FLICKER
══════════════════════════════════════════════ */
.timing-card-header i {
  filter: drop-shadow(0 0 6px var(--divine-gold));
  animation: deepam-flicker 2s ease-in-out infinite;
}
@keyframes deepam-flicker {
  0%, 100% { opacity: 1;   filter: drop-shadow(0 0 6px var(--divine-gold)); }
  20%       { opacity: 0.8; filter: drop-shadow(0 0 3px var(--color-saffron)); }
  40%       { opacity: 1;   filter: drop-shadow(0 0 10px var(--divine-gold)); }
  60%       { opacity: 0.9; filter: drop-shadow(0 0 4px #ff9933); }
  80%       { opacity: 1;   filter: drop-shadow(0 0 8px var(--divine-gold)); }
}

/* ══════════════════════════════════════════════
   10. HERO TITLE – HOLOGRAPHIC SHIMMER
══════════════════════════════════════════════ */
.hero-title {
  background: linear-gradient(
    135deg,
    #fff5cc 0%,
    #ffd700 20%,
    #fffde7 40%,
    #ffd700 60%,
    #fff5cc 80%,
    #ffd700 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gold-shimmer 4s linear infinite;
}
@keyframes gold-shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* ══════════════════════════════════════════════
   11. ABOUT SECTION – KRISHNA PORTRAIT GLOW
══════════════════════════════════════════════ */
.about-image-wrapper {
  position: relative;
}
.about-image-wrapper::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 20px;
  background: conic-gradient(
    from 0deg,
    var(--divine-gold), var(--krishna-cyan), var(--peacock-teal),
    var(--lotus-pink), var(--divine-gold)
  );
  z-index: -1;
  animation: spin-border 4s linear infinite;
  opacity: 0.7;
  filter: blur(4px);
}

/* ══════════════════════════════════════════════
   12. FLOATING KRISHNA ELEMENTS (DOM)
══════════════════════════════════════════════ */
.krishna-float-element {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  font-size: 1.8rem;
  animation: elem-float linear infinite;
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(255,215,0,0.7));
  user-select: none;
}
@keyframes elem-float {
  0%   { opacity: 0;   transform: translateY(100vh) rotate(0deg)   scale(0.8); }
  5%   { opacity: 0.4; }
  80%  { opacity: 0.35; }
  95%  { opacity: 0; }
  100% { opacity: 0;   transform: translateY(-10vh) rotate(360deg) scale(1.1); }
}

/* ══════════════════════════════════════════════
   13. FOOTER – STARFIELD DIVIDER
══════════════════════════════════════════════ */
.site-footer::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--krishna-cyan) 20%,
    var(--divine-gold) 50%,
    var(--krishna-cyan) 80%,
    transparent 100%
  );
  animation: footer-glow 3s ease-in-out infinite;
}
@keyframes footer-glow {
  0%, 100% { opacity: 0.5; filter: blur(1px); }
  50%       { opacity: 1;   filter: blur(0px) drop-shadow(0 0 4px var(--divine-gold)); }
}

/* ══════════════════════════════════════════════
   14. SECTION TAGS – NEON BADGE EFFECT
══════════════════════════════════════════════ */
.section-tag {
  position: relative;
  overflow: hidden;
}
.section-tag::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: tag-shine 3s ease-in-out infinite;
}
@keyframes tag-shine {
  0%   { left: -100%; }
  60%  { left: 100%; }
  100% { left: 100%; }
}

/* ══════════════════════════════════════════════
   15. BUTTONS – DIVINE ENERGY PULSE
══════════════════════════════════════════════ */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.25) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.5s ease;
  border-radius: inherit;
}
.btn-primary:hover::after {
  transform: scale(2);
  transition: transform 0.3s ease;
}

/* ══════════════════════════════════════════════
   16. BACK-TO-TOP – DIVINE CHAKRA
══════════════════════════════════════════════ */
.back-to-top {
  position: relative;
  overflow: visible;
}
.back-to-top::before {
  content: '☸';
  position: absolute;
  inset: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: var(--divine-gold);
  opacity: 0;
  animation: chakra-spin 4s linear infinite;
  pointer-events: none;
  transition: opacity 0.3s;
}
.back-to-top:hover::before { opacity: 0.6; }

@keyframes chakra-spin {
  to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════
   17. HIGHLIGHT ITEMS – ICON GLOW
══════════════════════════════════════════════ */
.highlight-item i {
  animation: icon-glow 2s ease-in-out infinite;
}
@keyframes icon-glow {
  0%, 100% { filter: drop-shadow(0 0 3px var(--color-gold)); }
  50%       { filter: drop-shadow(0 0 10px var(--divine-gold)) brightness(1.4); }
}

/* ══════════════════════════════════════════════
   18. GALLERY ITEMS – DIVINE FRAME
══════════════════════════════════════════════ */
.gmaps-photo-item:hover {
  box-shadow: 0 0 20px var(--divine-glow), 0 0 40px rgba(0,200,255,0.3);
  border-color: var(--divine-gold) !important;
}

/* ══════════════════════════════════════════════
   19. HERO TAGLINE – DANCING TEXT
══════════════════════════════════════════════ */
.hero-tagline {
  animation: tagline-dance 3s ease-in-out infinite;
  display: inline-block;
  letter-spacing: 0.15em;
}
@keyframes tagline-dance {
  0%, 100% { transform: scale(1) translateY(0);    letter-spacing: 0.15em; }
  50%       { transform: scale(1.05) translateY(-3px); letter-spacing: 0.22em; }
}

/* ══════════════════════════════════════════════
   20. FOOTER TAGLINE – GOLDEN WAVE
══════════════════════════════════════════════ */
.footer-tagline {
  background: linear-gradient(
    90deg,
    var(--divine-gold) 0%,
    #fff 40%,
    var(--krishna-cyan) 60%,
    var(--divine-gold) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: wave-text 3s linear infinite;
}
@keyframes wave-text {
  to { background-position: 200% center; }
}

/* ══════════════════════════════════════════════
   REDUCED MOTION SUPPORT
══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  #krishna-canvas { display: none; }
}

/* ══════════════════════════════════════════════
   FEATURED BK CARD (Navaneetha Krishna)
══════════════════════════════════════════════ */
.bk-card-featured {
  grid-column: span 1;
  background: linear-gradient(135deg, rgba(26,26,80,0.95) 0%, rgba(10,60,40,0.95) 100%);
  border: 2px solid var(--divine-gold) !important;
  box-shadow: 0 0 30px rgba(255,215,0,0.25), 0 0 60px rgba(0,200,255,0.1);
  position: relative;
}
.bk-card-featured::after {
  content: '★ ക്ഷേത്ര മൂർത്തി ★';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--divine-gold), var(--color-saffron));
  color: var(--color-dark);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 12px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.bk-card-featured .bk-name-ml,
.bk-card-featured .bk-name-en {
  color: var(--divine-gold) !important;
  text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

/* Mobile responsive enhancements */
@media (max-width: 480px) {
  .bk-card-featured::after {
    font-size: 0.55rem;
    padding: 2px 8px;
  }
  .flute-wave-container {
    bottom: 70px;
    transform: translateX(-50%) scale(0.8);
  }
  .hero-orb-1 { width: 180px; height: 180px; }
  .hero-orb-2 { width: 120px; height: 120px; }
  .hero-orb-3 { width: 100px; height: 100px; }
  .peacock-feather { font-size: 1.2rem; }
}
@media (max-width: 360px) {
  .flute-wave-container { display: none; }
  #krishna-canvas { opacity: 0.3; }
}

/* ══════════════════════════════════════════════
   REAL PHOTO STYLES
══════════════════════════════════════════════ */

/* ── Hero with real photo background ── */
.hero-photo {
  background-size: cover !important;
  background-position: center 30% !important;
  background-repeat: no-repeat !important;
}
/* Stronger dark overlay so text remains readable */
.hero-photo .hero-overlay {
  background: rgba(0, 0, 0, 0.55) !important;
}
/* Extra warm gradient over photo */
.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(80, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.15) 40%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 1;
  pointer-events: none;
}
.hero-photo .hero-content { z-index: 3; }
.hero-photo .flute-wave-container { z-index: 3; }
.hero-photo .hero-scroll-indicator { z-index: 3; }
.hero-photo .hindu-anim-layer { z-index: 2; }

/* ── Gallery real photo cards ── */
.gallery-photo-card {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid rgba(240,192,64,0.3);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.gallery-photo-card:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 48px rgba(0,0,0,0.55), 0 0 24px rgba(255,180,0,0.25);
  border-color: var(--color-gold-light);
}
.gallery-photo-card .gallery-card-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}
.gallery-real-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-photo-card:hover .gallery-real-photo {
  transform: scale(1.06);
}
/* Overlay that appears on hover */
.gallery-photo-card .gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.82) 0%,
    rgba(0,0,0,0.3) 50%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.2rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.gallery-photo-card:hover .gallery-card-overlay,
.gallery-photo-card:focus-within .gallery-card-overlay {
  opacity: 1;
}
/* Always show caption on mobile */
@media (max-width: 768px) {
  .gallery-photo-card .gallery-card-overlay { opacity: 1; }
}
.gallery-caption-ml {
  font-family: 'Noto Serif Malayalam', serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
  margin-bottom: 0.3rem;
}
.gallery-photo-tag {
  font-size: 0.72rem;
  color: var(--color-gold-light);
  letter-spacing: 0.06em;
  font-family: 'Cinzel', serif;
}

/* ── LAMP CORRIDOR PARALLAX STRIP ── */
.lamp-parallax-strip {
  position: relative;
  height: 260px;
  background-image: url('images/hanging-lamps-corridor.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;   /* parallax */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Mobile: disable fixed (parallax) – not supported on iOS */
@media (max-width: 768px) {
  .lamp-parallax-strip {
    background-attachment: scroll;
    height: 200px;
  }
}
.lamp-parallax-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(80, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.45) 50%,
    rgba(10, 20, 40, 0.65) 100%
  );
}
.lamp-parallax-text {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.lamp-mantra {
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: #ffd700;
  letter-spacing: 0.12em;
  text-shadow: 0 0 20px rgba(255,180,0,0.7), 0 2px 8px rgba(0,0,0,0.8);
  animation: mantra-glow 3s ease-in-out infinite;
}
.lamp-mantra-en {
  font-family: 'Lato', sans-serif;
  font-size: clamp(0.8rem, 2vw, 1rem);
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.1em;
  font-style: italic;
}

/* ── About section real photo ── */
.about-real-photo-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
  border: 2px solid rgba(200,134,10,0.4);
}
.about-real-photo {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: transform 0.6s ease;
}
@media (max-width: 768px) {
  .about-real-photo { height: 260px; object-position: center 10%; }
}
.about-real-photo-card:hover .about-real-photo { transform: scale(1.04); }
.about-photo-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, transparent 100%);
  padding: 1.2rem 1rem 0.8rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.about-photo-label {
  font-family: 'Noto Serif Malayalam', serif;
  font-size: 0.88rem;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.about-maps-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(200,134,10,0.85);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
  font-family: 'Lato', sans-serif;
}
.about-maps-link-pill:hover { background: var(--color-gold); }
