/* ==========================================================================
   ABR Greens Infrastructure — Diwali Celebration & Header Decorations
   1. 3-Second Full-Screen Diwali Celebration Intro Animation
      - Smooth 3s timer with cinematic fade-out
      - Grand 3D Golden HAPPY DIWALI & From ABR Greens Family typography
      - Full-screen colorful bursting fireworks & floating golden sparkles
      - Traditional glowing diyas with realistic flickering flame
      - No square box container; ambient, premium, and responsive
   2. Hanging Diwali Header Decorations
      - Underneath ABR Greens Logo (Left)
      - Underneath Book Meeting button (Right)
      - Non-blocking (pointer-events: none) & clear navigation
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 3-SECOND FULL-SCREEN DIWALI CELEBRATION INTRO OVERLAY
   -------------------------------------------------------------------------- */
.diwali-intro-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 45%, rgba(10, 22, 48, 0.62) 0%, rgba(4, 9, 22, 0.86) 100%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.85s ease;
  overflow: hidden;
  user-select: none;
}

.diwali-intro-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Full-Screen Fireworks Canvas */
.diwali-intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Ambient Celebration Content Container (No Box) */
.diwali-intro-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  width: 90%;
  padding: 1.5rem 1rem;
  animation: introReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

@keyframes introReveal {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(18px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Brand Badge Above Greeting */
.diwali-intro-brand {
  margin-bottom: 0.85rem;
}

.diwali-intro-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 16px rgba(255, 215, 0, 0.25);
}

.diwali-intro-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.diwali-intro-brand-text {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #FFF59D;
  text-transform: uppercase;
}

/* Festive Ornamental Arch */
.diwali-intro-motif {
  margin: 0 auto 0.5rem;
  width: 260px;
  max-width: 80%;
}

.diwali-motif-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Grand 3D Golden HAPPY DIWALI Typography */
.diwali-intro-title {
  margin: 0;
  padding: 0;
  font-family: 'Cinzel', 'Playfair Display', 'Georgia', serif;
  font-size: clamp(2.8rem, 7.5vw, 5.8rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFE082;
  background: linear-gradient(135deg, #FFFDE7 0%, #FFF59D 20%, #FFD54F 40%, #FFB300 65%, #FFA000 85%, #FFD700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(255, 179, 0, 0.75)) drop-shadow(0 0 35px rgba(255, 215, 0, 0.45));
  animation: titleGlow 2.2s ease-in-out infinite alternate;
}

.diwali-intro-title .diwali-word {
  display: inline-block;
  margin: 0 0.15em;
}

@keyframes titleGlow {
  0% {
    filter: drop-shadow(0 4px 14px rgba(255, 179, 0, 0.65)) drop-shadow(0 0 24px rgba(255, 215, 0, 0.35));
  }
  100% {
    filter: drop-shadow(0 6px 24px rgba(255, 179, 0, 0.95)) drop-shadow(0 0 45px rgba(255, 235, 120, 0.65));
  }
}

/* From ABR Greens Family */
.diwali-intro-family-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.65rem;
  margin-bottom: 1.5rem;
}

.diwali-family-line {
  flex: 0 1 70px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.8), transparent);
}

.diwali-family-text {
  font-family: inherit;
  font-size: clamp(0.95rem, 2.2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #FFF9C4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 16px rgba(255, 215, 0, 0.65);
}

/* Diyas at Base of Greeting */
.diwali-intro-diyas {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(1rem, 3.5vw, 2.5rem);
  margin-top: 0.5rem;
}

.diwali-diya {
  position: relative;
  display: flex;
  justify-content: center;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.6));
}

.diwali-diya.diya-center {
  width: clamp(100px, 14vw, 130px);
}

.diwali-diya.diya-flank {
  width: clamp(75px, 10vw, 95px);
  opacity: 0.95;
}

.diya-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* --------------------------------------------------------------------------
   2. HANGING DIWALI HEADER DECORATIONS (LEFT & RIGHT)
   -------------------------------------------------------------------------- */
.diwali-hanging {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 45;
  pointer-events: none;
  user-select: none;
  overflow: visible;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
  transform: translateX(-50%);
}

.brand-wrap,
.nav-actions-wrap {
  min-height: 48px;
}

/* Left: Directly underneath ABR Greens Logo */
.diwali-hanging-left {
  width: clamp(170px, 15vw, 190px);
  height: clamp(116px, 10.5vw, 140px);
  transform-origin: top center;
}

/* Right: Directly underneath Book Meeting button */
.diwali-hanging-right {
  width: clamp(130px, 12vw, 160px);
  height: clamp(100px, 9vw, 120px);
  transform-origin: top center;
  transform: translateX(-50%);
}

/* SVG Rendering */
.diwali-hanging-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

/* Gentle Natural Swaying Animation */
.hanging-strand {
  transform-origin: top center;
  animation: strandSway 4.8s ease-in-out infinite alternate;
}

.strand-1 { animation-delay: 0s; animation-duration: 4.6s; }
.strand-2 { animation-delay: -1.2s; animation-duration: 5.2s; }
.strand-3 { animation-delay: -2.4s; animation-duration: 4.9s; }
.strand-4 { animation-delay: -0.7s; animation-duration: 5.4s; }

@keyframes strandSway {
  0% { transform: rotate(-2deg); }
  50% { transform: rotate(0.8deg); }
  100% { transform: rotate(2deg); }
}

/* Realistic Diya Flame Flicker */
.diya-flame-core {
  transform-origin: 50% 100%;
  animation: diyaFlameFlicker 0.16s ease-in-out infinite alternate;
}

@keyframes diyaFlameFlicker {
  0% {
    transform: rotate(-2deg) scale(0.96, 0.94);
    opacity: 0.94;
  }
  50% {
    transform: rotate(1deg) scale(1.02, 1.05);
    opacity: 1;
  }
  100% {
    transform: rotate(2.5deg) scale(1.05, 1.1);
    opacity: 0.98;
  }
}

/* Flame Light Halo Pulse */
.diya-flame-glow {
  transform-origin: center;
  animation: diyaGlowPulse 0.9s ease-in-out infinite alternate;
}

@keyframes diyaGlowPulse {
  0% {
    opacity: 0.72;
    transform: scale(0.92);
  }
  100% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* Golden Beads & Ornaments Shimmer */
.gold-shimmer {
  animation: goldShimmer 2.4s ease-in-out infinite alternate;
}

@keyframes goldShimmer {
  0% { filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.5)); opacity: 0.85; }
  100% { filter: drop-shadow(0 0 8px rgba(255, 235, 120, 0.95)) drop-shadow(0 0 14px rgba(255, 170, 0, 0.6)); opacity: 1; }
}

/* Header Canvas for Background Sparkles */
.diwali-header-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.site-header.scrolled .diwali-hanging {
  visibility: hidden;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .diwali-hanging-left {
    width: clamp(150px, 22vw, 170px);
    height: clamp(100px, 14vw, 116px);
  }
  .diwali-hanging-right {
    width: clamp(110px, 16vw, 130px);
    height: clamp(90px, 12vw, 104px);
    transform: translateX(-70%);
  }
}

@media (min-width: 993px) and (max-width: 1100px) {
  .diwali-hanging-right {
    transform: translateX(-70%);
  }
}

@media (max-width: 640px) {
  .diwali-intro-title {
    font-size: 2.5rem;
  }
  .diwali-family-text {
    font-size: 0.85rem;
    letter-spacing: 0.16em;
  }
  .diwali-intro-brand-text {
    font-size: 0.72rem;
  }
  .diwali-hanging-left {
    width: clamp(160px, 46vw, 184px);
    height: clamp(90px, 27vw, 105px);
  }
  .diwali-hanging-right {
    width: clamp(90px, 25vw, 104px);
    height: clamp(80px, 22.4vw, 93px);
    transform: translateX(-75%);
  }
}

@media (min-width: 993px) and (min-height: 481px) {
  .hero {
    padding-top: 230px;
  }
}

@media (max-height: 480px) {
  .hero {
    align-items: flex-start;
    padding-top: 190px;
  }
}

@media (max-width: 992px) and (max-height: 480px) {
  .diwali-hanging-left,
  .diwali-hanging-right {
    height: clamp(82px, 11vw, 100px);
  }
}

@media (min-width: 993px) and (max-height: 480px) {
  .hero {
    padding-top: 240px;
  }
}
