@import url('https://fonts.googleapis.com/css2?family=Yatra+One&display=swap');
/* Diwali theme - loaded ONLY when "Diwali" is selected in Admin > Site Setting.
   Everything is scoped under .theme-diwali / #festive-layer so nothing else is touched. */

#festive-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }

/* warm glow from the big diya + a soft one on the right */
#festive-layer .fd-glow { position: absolute; bottom: 0; width: 38vw; max-width: 520px; height: 60vh; opacity: .55; animation: fd-breathe 4s ease-in-out infinite; }
#festive-layer .fd-glow.l { left: 0;  background: radial-gradient(ellipse at 0% 100%, rgba(255,150,30,.22), rgba(255,150,30,0) 65%); }
#festive-layer .fd-glow.r { right: 0; background: radial-gradient(ellipse at 100% 100%, rgba(255,150,30,.18), rgba(255,150,30,0) 65%); animation-delay: 1.3s; }
@keyframes fd-breathe { 0%,100% { opacity: .65; } 50% { opacity: 1; } }

/* warm yellow light covering the whole page, two layers breathing against each other */
#festive-layer .fd-ambient { position: absolute; inset: 0; opacity: .22; animation: fd-breathe 5s ease-in-out infinite;
  background:
    radial-gradient(circle at 10% 18%, rgba(255,200,90,.17), rgba(255,200,90,0) 30%),
    radial-gradient(circle at 50% 10%, rgba(255,190,70,.12), rgba(255,190,70,0) 32%),
    radial-gradient(circle at 90% 22%, rgba(255,200,90,.17), rgba(255,200,90,0) 30%),
    radial-gradient(circle at 28% 52%, rgba(255,196,80,.12), rgba(255,196,80,0) 30%),
    radial-gradient(circle at 72% 50%, rgba(255,196,80,.12), rgba(255,196,80,0) 30%),
    radial-gradient(circle at 12% 84%, rgba(255,190,70,.18), rgba(255,190,70,0) 32%),
    radial-gradient(circle at 50% 92%, rgba(255,190,70,.14), rgba(255,190,70,0) 32%),
    radial-gradient(circle at 90% 82%, rgba(255,190,70,.18), rgba(255,190,70,0) 32%); }
#festive-layer .fd-ambient.b { animation-delay: -2.5s;
  background:
    radial-gradient(circle at 30% 14%, rgba(255,205,100,.12), rgba(255,205,100,0) 28%),
    radial-gradient(circle at 70% 16%, rgba(255,205,100,.12), rgba(255,205,100,0) 28%),
    radial-gradient(circle at 8% 50%, rgba(255,200,90,.15), rgba(255,200,90,0) 30%),
    radial-gradient(circle at 50% 46%, rgba(255,200,90,.09), rgba(255,200,90,0) 34%),
    radial-gradient(circle at 92% 52%, rgba(255,200,90,.15), rgba(255,200,90,0) 30%),
    radial-gradient(circle at 32% 88%, rgba(255,195,80,.13), rgba(255,195,80,0) 30%),
    radial-gradient(circle at 70% 86%, rgba(255,195,80,.13), rgba(255,195,80,0) 30%); }

/* soft yellow diya-light along both edges (shaded, gently breathing) */
#festive-layer .fd-edge { position: absolute; width: 230px; height: 230px; border-radius: 50%; opacity: .3;
  background: radial-gradient(circle, rgba(255,196,80,.38) 0%, rgba(255,176,50,.16) 42%, rgba(255,170,40,0) 70%);
  animation: fd-breathe 3.6s ease-in-out infinite; }
#festive-layer .fd-edge.l { left: -115px; } #festive-layer .fd-edge.r { right: -115px; }
/* jagmag: twinkling stars scattered over the whole page */
#festive-layer .fd-star { position: absolute; width: var(--z, 9px); height: var(--z, 9px); opacity: 0;
  background: radial-gradient(circle, #fffbe0 0%, #ffd870 35%, rgba(255,190,60,0) 70%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: fd-twinkle var(--t, 2.6s) ease-in-out var(--dl, 0s) infinite; }
@keyframes fd-twinkle { 0%,100% { opacity: 0; transform: scale(.3) rotate(0deg); } 50% { opacity: .95; transform: scale(1.15) rotate(45deg); } }

/* ---- diya (used for the big one) ---- */
#festive-layer .fd-diya { display: block; overflow: visible; }
#festive-layer .fd-diya .bowl  { fill: #b4541f; }
#festive-layer .fd-diya .bowl2 { fill: #d9742c; }
#festive-layer .fd-diya .rim   { fill: #f0a24a; }
#festive-layer .fd-diya .oil   { fill: #5a2410; }
#festive-layer .fd-diya .flame { fill: #ff9a1f; transform-origin: 50% 100%; transform-box: fill-box;
  animation: fd-flicker 1.3s ease-in-out infinite; }
#festive-layer .fd-diya .core  { fill: #fff3b0; transform-origin: 50% 100%; transform-box: fill-box; animation: fd-flicker 1.3s ease-in-out infinite reverse; }
@keyframes fd-flicker {
  0%,100% { transform: scale(1, 1) rotate(0deg); }
  20% { transform: scale(.92, 1.08) rotate(-2.5deg); }
  45% { transform: scale(1.06, .94) rotate(2deg); }
  70% { transform: scale(.95, 1.06) rotate(-1.5deg); }
}

/* big diya, bottom-left corner (desktop + phone) */
#festive-layer .fd-big { position: absolute; left: 14px; bottom: 6px; width: 112px; height: 112px; }
#festive-layer .fd-big .fd-halo { position: absolute; left: 50%; top: 8%; width: 260px; height: 260px; margin: -130px 0 0 -130px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,175,60,.42) 0%, rgba(255,150,30,.16) 40%, rgba(255,150,30,0) 70%);
  animation: fd-breathe 3.2s ease-in-out infinite; }
#festive-layer .fd-big .fd-diya { position: relative; width: 112px; height: 112px; }


/* floating sparkles (embers) */
#festive-layer .fd-spark { position: absolute; bottom: -12px; width: var(--s, 4px); height: var(--s, 4px);
  border-radius: 50%; background: radial-gradient(circle, #fff7c2 0%, #ffc94d 55%, rgba(255,160,30,0) 75%);
  opacity: 0; animation: fd-rise var(--d, 9s) linear var(--w, 0s) infinite; }
@keyframes fd-rise {
  0%   { transform: translate(0, 0) scale(.6); opacity: 0; }
  12%  { opacity: .95; }
  60%  { opacity: .7; }
  100% { transform: translate(var(--x, 20px), -105vh) scale(1.1); opacity: 0; }
}

.theme-diwali header.fixed { box-shadow: 0 2px 16px rgba(255,160,40,.35); }

/* ===== three children on the bottom-right: two with sparklers, one lighting a rocket ===== */
#festive-layer .fd-pyro { position: absolute; right: 2px; bottom: 0; display: flex; align-items: flex-end; }   /* flush in the bottom-right corner */
#festive-layer .fd-flip { transform: none; }   /* the boy faces LEFT, towards his rocket */
#festive-layer .fd-kid { display: block; overflow: visible; width: 100px; height: 130px; }
#festive-layer .pyro-c { display: flex; flex-direction: row-reverse; align-items: flex-end; margin-left: 0; }   /* rocket on the boy's left */
#festive-layer .pyro-c .fd-kid { width: 88px; height: 114px; }

/* the sparkler pair walks right -> left along the bottom, girl in front, boy behind */
#festive-layer .fd-lane { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; overflow: hidden; }
#festive-layer .fd-group { position: absolute; left: 0; bottom: 2px; display: flex; align-items: flex-end; gap: 2px;
  animation: fd-cross 34s linear -3s infinite; will-change: transform; }
@keyframes fd-cross { 0% { transform: translateX(100vw); } 100% { transform: translateX(-100%); } }
#festive-layer .fd-group .fd-kid { animation: fd-bob .7s ease-in-out infinite; }
#festive-layer .fd-group .fd-kid.girl { width: 94px; height: 122px; animation-delay: -.35s; }
@keyframes fd-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
#festive-layer .fd-group .leg-f { transform-origin: 58px 80px; animation: fd-leg .7s ease-in-out infinite; }
#festive-layer .fd-group .leg-b { transform-origin: 58px 80px; animation: fd-leg .7s ease-in-out -.35s infinite; }
#festive-layer .fd-group .girl .leg-f, #festive-layer .fd-group .girl .leg-b { transform-origin: 58px 96px; }
@keyframes fd-leg { 0%,100% { transform: rotate(24deg); } 50% { transform: rotate(-24deg); } }
#festive-layer .fd-group .arm-b { transform-origin: 60px 48px; animation: fd-arm .7s ease-in-out infinite; }
@keyframes fd-arm { 0%,100% { transform: rotate(-18deg); } 50% { transform: rotate(18deg); } }
#festive-layer .skirt { transform-origin: 58px 60px; animation: fd-skirt .7s ease-in-out infinite; }
@keyframes fd-skirt { 0%,100% { transform: scaleX(1); } 50% { transform: scaleX(.95); } }
#festive-layer .pyro-c .leg-f { transform-origin: 58px 80px; transform: rotate(7deg); }
#festive-layer .pyro-c .leg-b { transform-origin: 58px 80px; transform: rotate(-7deg); }

/* the hand holding the sparkler keeps drawing circles */
#festive-layer .circ { animation: fd-circ 1.1s linear infinite; }
@keyframes fd-circ {
  0%,100% { transform: translate(7px, 0); } 12.5% { transform: translate(5px, 5px); } 25% { transform: translate(0, 7px); }
  37.5% { transform: translate(-5px, 5px); } 50% { transform: translate(-7px, 0); } 62.5% { transform: translate(-5px, -5px); }
  75% { transform: translate(0, -7px); } 87.5% { transform: translate(5px, -5px); }
}
#festive-layer .trail { transform-box: fill-box; transform-origin: center; animation: fd-spin .7s linear infinite; }
@keyframes fd-spin { to { transform: rotate(360deg); } }
#festive-layer .burst { animation: fd-burst .45s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes fd-burst { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(22deg) scale(1.18); } 100% { transform: rotate(45deg) scale(1); } }
#festive-layer .halo-s { animation: fd-breathe .5s ease-in-out infinite; }
#festive-layer .sp { fill: #ffd778; opacity: 0; transform-box: fill-box; animation: fd-fall .9s ease-out infinite; }
@keyframes fd-fall { 0% { transform: translate(0,0); opacity: 1; } 100% { transform: translate(var(--dx,-6px), var(--dy,26px)); opacity: 0; } }
#festive-layer .flutter { transform-origin: 52px 44px; animation: fd-flutter 1.1s ease-in-out infinite; }
@keyframes fd-flutter { 0%,100% { transform: skewY(0deg) rotate(0deg); } 50% { transform: skewY(5deg) rotate(4deg); } }

/* rocket boy: stands, then bends to light the fuse */
#festive-layer .lean { transform-origin: 58px 80px; transition: transform .6s ease-in-out; }
#festive-layer .pyro-c.light .lean { transform: rotate(-58deg); }
#festive-layer .ember { fill: #ff5722; filter: drop-shadow(0 0 3px #ff9800); animation: fd-breathe .6s ease-in-out infinite; }

/* rocket + bottle */
#festive-layer .rk-spot { position: relative; width: 22px; height: 114px; margin-right: -6px; }
#festive-layer .rk-bottle { position: absolute; left: 5px; bottom: 0; width: 11px; height: 21px; }
#festive-layer .rk-rocket { position: absolute; left: 3.5px; bottom: 7px; width: 14px; height: 50px; opacity: 1; transition: opacity .5s ease; }
#festive-layer .rk-rocket.hide { opacity: 0; transition: none; }
#festive-layer .rk-flame { opacity: 0; transform-box: fill-box; transform-origin: 50% 0; }
#festive-layer .rk-rocket.fly .rk-flame { opacity: 1; animation: fd-flick2 .12s linear infinite; }
@keyframes fd-flick2 { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(1.35); } }
#festive-layer .rk-fuse { position: absolute; left: 8px; bottom: 25px; width: 5px; height: 5px; border-radius: 50%;
  background: #fff3b0; box-shadow: 0 0 8px 3px #ffb02e; opacity: 0; }
#festive-layer .pyro-c.light .rk-fuse { opacity: 1; animation: fd-breathe .15s linear infinite; }

/* ===== header: burning diya (always) + logo <-> greeting ===== */
.fd-hdr { position: fixed; z-index: 52; left: 0; top: 0; display: flex; align-items: center; justify-content: center; overflow: visible;
  opacity: 0; transition: opacity .6s ease; pointer-events: none; white-space: nowrap; }
.fd-hdr.on { opacity: 1; }
.fd-hdr .fd-hdr-txt { font-family: "Yatra One", "Noto Sans Devanagari", "Mangal", serif; color: #f6d98a; line-height: 1.25; font-weight: 400;
  text-shadow: 0 0 10px rgba(255,190,70,.55); }
.fd-hdr-diya { position: fixed; z-index: 52; left: 0; top: 0; pointer-events: none; }
.fd-hdr-diya::before { content: ""; position: absolute; left: 50%; top: 40%; width: 150%; height: 150%; margin: -75% 0 0 -75%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,175,60,.38), rgba(255,150,30,0) 65%); animation: fd-breathe 2.4s ease-in-out infinite; }
.fd-hdr-diya svg { position: relative; display: block; overflow: visible; }
.fd-hdr-diya .bowl { fill: #c4601f; } .fd-hdr-diya .bowl2 { fill: #e07f30; } .fd-hdr-diya .rim { fill: #f4ac55; } .fd-hdr-diya .oil { fill: #5a2410; }
.fd-hdr-diya .flame { fill: #ffa326; transform-origin: 50% 100%; transform-box: fill-box; animation: fd-flicker 1.1s ease-in-out infinite; }
.fd-hdr-diya .core { fill: #fff6c2; transform-origin: 50% 100%; transform-box: fill-box; animation: fd-flicker 1.1s ease-in-out infinite reverse; }

/* phones: very small, bottom corner, same activity */
@media (max-width: 767px) {
  #festive-layer .fd-big { left: 8px; bottom: 6px; width: 70px; height: 70px; }
  #festive-layer .fd-big .fd-diya { width: 70px; height: 70px; }
  #festive-layer .fd-big .fd-halo { width: 170px; height: 170px; margin: -85px 0 0 -85px; }
  #festive-layer .fd-glow { width: 55vw; height: 34vh; }
  #festive-layer .fd-edge { width: 150px; height: 150px; opacity: .3; }
  #festive-layer .fd-edge.l { left: -75px; } #festive-layer .fd-edge.r { right: -75px; }
  #festive-layer .fd-edge:nth-of-type(n+9) { display: none; }
  #festive-layer .fd-pyro { right: 2px; }
  #festive-layer .pyro-c .fd-kid { width: 44px; height: 57px; }
  #festive-layer .fd-lane { height: 100px; }
  #festive-layer .fd-group .fd-kid { width: 58px; height: 75px; }
  #festive-layer .fd-group .fd-kid.girl { width: 54px; height: 70px; }
  #festive-layer .fd-group { animation-duration: 24s; }
  @keyframes fd-cross { 0% { transform: translateX(100vw); } 100% { transform: translateX(-100%); } }
  #festive-layer .rk-spot { width: 11px; height: 57px; margin-right: -3px; }
  #festive-layer .rk-bottle { left: 2.5px; width: 6px; height: 11px; }
  #festive-layer .rk-rocket { left: 1.5px; bottom: 3.5px; width: 8px; height: 28px; }
  #festive-layer .rk-fuse { left: 4px; bottom: 12.5px; width: 3px; height: 3px; box-shadow: 0 0 4px 2px #ffb02e; }
}
/* gold-coin pot (header corner) + falling coins */
.fd-pot { position: fixed; z-index: 52; left: 0; top: 0; pointer-events: none; }
.fd-coins { position: fixed; z-index: 53; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.fd-coin { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity;
  animation: fd-coin-fall 5s cubic-bezier(.45,0,.9,.6) infinite; }
.fd-coin i { display: block; width: 100%; height: 100%; border-radius: 50%; border: 1px solid #a8700a;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #f3b52d 55%, #c88a12); box-sizing: border-box;
  animation: fd-coin-spin .7s linear infinite; }
@keyframes fd-coin-fall { 0% { transform: translate3d(0,0,0); opacity: 0; } 5% { opacity: 1; } 92% { opacity: 1; }
  100% { transform: translate3d(var(--sx,0px), 100vh, 0); opacity: 0; } }
@keyframes fd-coin-spin { 0%,100% { transform: scaleX(1); } 50% { transform: scaleX(.18); } }

@media (prefers-reduced-motion: reduce) {
  .fd-coin, .fd-coin i { animation: none; }
  #festive-layer .fd-diya .flame, #festive-layer .fd-diya .core, #festive-layer .fd-glow, #festive-layer .fd-halo,
  #festive-layer .fd-star, #festive-layer .fd-edge, #festive-layer .fd-ambient,
  #festive-layer .circ, #festive-layer .trail, .fd-hdr-diya .flame, .fd-hdr-diya .core, .fd-hdr-diya::before, #festive-layer .burst, #festive-layer .halo-s, #festive-layer .flutter { animation: none; }
  #festive-layer .fd-spark { display: none; }
}
@media print { #festive-layer, .fd-pot, .fd-coins { display: none !important; } }

/* performance: stop every decoration animation while the tab is in the background */
html.fd-paused #festive-layer *, html.fd-paused .fd-hdr, html.fd-paused .fd-hdr *, html.fd-paused .fd-hdr-diya, html.fd-paused .fd-hdr-diya *, html.fd-paused .fd-coin, html.fd-paused .fd-coin i { animation-play-state: paused !important; }
#festive-layer { contain: layout style; }
