/* ══ Diwali look (client, 5 Nov 2026) ═══════════════════════════════════════════
   Loaded by header.php ONLY while festival_theme_on() — the festival ribbon is live
   and "Festive look" is ticked in Admin → Settings. It ends by itself with the
   countdown. Presentation only; scoped to body.th-diwali / .dw-* so nothing else moves.
   Palette: the site's navy stays; marigold + saffron + deep maroon + gold are added. */

body.th-diwali{--dw-gold:#f5b21a;--dw-saff:#ff7a1a;--dw-maroon:#7a1230;--dw-night:#2a0a2e}

/* Header: a thin gold line under it */
body.th-diwali .header{border-bottom:0;box-shadow:0 2px 0 var(--dw-gold),0 8px 24px rgba(8,32,73,.08)}

/* Toran — a marigold garland hanging under the header */
.dw-toran{height:30px;margin-top:2px;pointer-events:none;position:relative;z-index:5;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='30' viewBox='0 0 64 30'%3E%3Cpath d='M-2 2Q32 12 66 2' stroke='%23b45309' stroke-width='1.8' fill='none'/%3E%3Cpath d='M26 8q-9 6-4 16 6-3 4-16z' fill='%2316a34a'/%3E%3Cpath d='M38 8q9 6 4 16-6-3-4-16z' fill='%2322c55e'/%3E%3Ccircle cx='32' cy='15' r='7' fill='%23f59e0b'/%3E%3Ccircle cx='32' cy='15' r='4.4' fill='%23fb923c'/%3E%3Ccircle cx='32' cy='15' r='2' fill='%23dc2626'/%3E%3C/svg%3E") repeat-x center top/64px 30px;
  filter:drop-shadow(0 3px 3px rgba(120,53,15,.18));animation:dwSway 5s ease-in-out infinite;transform-origin:50% 0}
@keyframes dwSway{0%,100%{transform:rotate(-.25deg)}50%{transform:rotate(.25deg)}}
.is-funnel-slim .dw-toran,body.th-diwali .dw-toran{margin-bottom:-6px}
@media(max-width:640px){.dw-toran{height:24px;background-size:52px 24px}}

/* Twinkling stars drifting down the sides (fixed, never block a tap) */
.dw-sky{position:fixed;inset:0;pointer-events:none;z-index:4;overflow:hidden}
.dw-sky i{position:absolute;top:-20px;width:10px;height:10px;opacity:0;
  background:radial-gradient(circle,#fff6c4 0 22%,#ffc93c 23% 48%,transparent 50%);border-radius:50%;
  box-shadow:0 0 10px 3px rgba(255,201,60,.55);animation:dwFall 11s linear infinite}
.dw-sky i:nth-child(1){left:6%;animation-delay:0s}.dw-sky i:nth-child(2){left:19%;animation-delay:3s;width:7px;height:7px}
.dw-sky i:nth-child(3){left:33%;animation-delay:6s}.dw-sky i:nth-child(4){left:47%;animation-delay:1.5s;width:6px;height:6px}
.dw-sky i:nth-child(5){left:61%;animation-delay:8s}.dw-sky i:nth-child(6){left:74%;animation-delay:4.5s;width:8px;height:8px}
.dw-sky i:nth-child(7){left:86%;animation-delay:2s}.dw-sky i:nth-child(8){left:94%;animation-delay:7s;width:6px;height:6px}
@keyframes dwFall{0%{transform:translateY(0) scale(.6);opacity:0}10%{opacity:.95}50%{transform:translateY(55vh) scale(1.1);opacity:.7}100%{transform:translateY(112vh) scale(.5);opacity:0}}
@media(max-width:640px){.dw-sky i:nth-child(n+6){display:none}}

/* Sparkle on every primary button — a small star that twinkles */
body.th-diwali .btn.primary{position:relative;box-shadow:0 8px 22px rgba(245,130,32,.34),0 0 0 0 rgba(245,178,26,.5)}
body.th-diwali .btn.primary:before{content:"✦";position:absolute;top:3px;right:9px;font-size:12px;line-height:1;color:#fff4bf;
  text-shadow:0 0 8px #ffc93c;animation:dwTwinkle 2.2s ease-in-out infinite;pointer-events:none}
body.th-diwali .btn.primary.large:before{font-size:15px;top:5px;right:13px}
@keyframes dwTwinkle{0%,100%{opacity:.25;transform:scale(.7) rotate(0)}50%{opacity:1;transform:scale(1.25) rotate(35deg)}}

/* "Diwali Offer" ribbon on every course card that really has a discount */
body.th-diwali .course-card:has(.price s) .course-cover:after,
body.th-diwali .shelf-card:has(.price s) .shelf-cover:after{
  content:"🪔 Diwali Offer";position:absolute;right:8px;top:8px;z-index:3;font-size:10.5px;font-weight:800;letter-spacing:.02em;
  color:#fff;background:linear-gradient(135deg,var(--dw-maroon),#c2410c);border-radius:999px;padding:4px 10px;
  box-shadow:0 6px 14px rgba(122,18,48,.35),inset 0 0 0 1px rgba(255,214,120,.55)}

/* Gold frame + diya on video cards */
body.th-diwali .vid-card,body.th-diwali .reel-card{box-shadow:0 0 0 2px var(--dw-gold),0 16px 40px rgba(122,18,48,.22)}
body.th-diwali .vid-card:after,body.th-diwali .reel-card:after{content:"🪔";position:absolute;right:9px;top:8px;z-index:4;font-size:17px;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.45));pointer-events:none}
body.th-diwali .r2-video,body.th-diwali .r3-vid,body.th-diwali .rl-video{box-shadow:0 0 0 3px var(--dw-gold),0 30px 60px rgba(122,18,48,.28)}

/* The offer banner (home + courses) */
.dw-banner{padding:26px 0 6px}
.dw-card{position:relative;overflow:hidden;border-radius:28px;padding:30px 28px;color:#fff;
  background:radial-gradient(520px 260px at 90% 0%,rgba(255,178,30,.35),transparent 60%),
             radial-gradient(420px 260px at 0% 100%,rgba(255,90,20,.28),transparent 60%),
             linear-gradient(135deg,#2a0a2e 0%,#7a1230 52%,#c2410c 100%);
  border:2px solid rgba(245,178,26,.7);box-shadow:0 24px 56px rgba(122,18,48,.32),inset 0 0 0 5px rgba(255,214,120,.14)}
.dw-card:before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.14;
  background:radial-gradient(circle at 50% 50%,#fff 0 2px,transparent 3px) 0 0/26px 26px}
.dw-head{position:relative;z-index:1;text-align:center;max-width:720px;margin:0 auto 20px}
.dw-kick{display:inline-block;font-size:12.5px;font-weight:800;letter-spacing:.08em;background:rgba(255,255,255,.14);
  border:1px solid rgba(255,214,120,.6);border-radius:999px;padding:6px 14px;color:#ffe9a8}
.dw-head h2{color:#fff;font-size:clamp(26px,3.6vw,42px);line-height:1.12;margin:12px 0 8px;letter-spacing:-.01em}
.dw-head h2 span{color:#ffd36b;text-shadow:0 0 22px rgba(255,201,60,.55)}
.dw-head p{margin:0 auto 12px;color:#ffe9d6;font-size:15.5px}
.dw-count{display:inline-block;background:#fff;color:#7a1230;font-weight:800;font-size:14px;border-radius:999px;padding:7px 16px;
  box-shadow:0 8px 20px rgba(0,0,0,.25)}
.dw-count b{font-variant-numeric:tabular-nums}
.dw-offers{position:relative;z-index:1;display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.dw-offer{position:relative;display:flex;flex-direction:column;gap:6px;padding:18px 16px 16px;border-radius:20px;text-decoration:none;color:#3b0d1d;
  background:linear-gradient(180deg,#fffaf0,#fff1d6);border:1px solid rgba(245,178,26,.8);box-shadow:0 14px 30px rgba(0,0,0,.22);
  transition:transform .25s,box-shadow .25s;animation:dwRise .7s cubic-bezier(.22,.61,.36,1) both;animation-delay:calc(var(--i) * .1s)}
.dw-offer:hover{transform:translateY(-5px);box-shadow:0 20px 38px rgba(0,0,0,.3)}
@keyframes dwRise{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
.dw-pct{align-self:flex-start;font-size:11.5px;font-weight:900;color:#fff;background:linear-gradient(135deg,#dc2626,#ea580c);border-radius:8px;padding:3px 9px}
.dw-offer b{font-size:14.5px;line-height:1.3;color:#2a0a2e;flex:1}
.dw-price s{color:#9a7b6b;font-size:13px}.dw-price strong{font-size:26px;color:#7a1230;margin-left:4px}
.dw-offer em{font-style:normal;font-size:12.5px;font-weight:800;color:#c2410c}
.dw-diya{position:absolute;width:64px;height:56px;z-index:1;filter:drop-shadow(0 6px 10px rgba(0,0,0,.35))}
.dw-diya-l{left:18px;top:16px}.dw-diya-r{right:18px;top:16px}
.dw-flame{transform-origin:32px 22px;animation:dwFlicker 1.4s ease-in-out infinite}
.dw-flame2{transform-origin:32px 22px;animation:dwFlicker 1.1s ease-in-out infinite reverse}
@keyframes dwFlicker{0%,100%{transform:scale(1,1) skewX(0)}30%{transform:scale(.92,1.08) skewX(-3deg)}60%{transform:scale(1.05,.94) skewX(3deg)}}
.dw-foot{display:flex;align-items:center;justify-content:center;gap:10px;margin:0 0 16px;font-size:14px;color:#ffe9a8;text-align:center}
.dw-diya-s{position:static;width:34px;height:30px;flex:0 0 auto;filter:none}

@media(max-width:960px){
  .dw-offers{grid-template-columns:1fr 1fr}
  .dw-diya{width:46px;height:40px}
}
@media(max-width:640px){
  .dw-banner{padding:18px 0 2px}
  .dw-card{padding:24px 14px 16px;border-radius:22px}
  .dw-diya-l{left:10px;top:10px}.dw-diya-r{right:10px;top:10px}
  .dw-head{margin-bottom:14px;padding-top:30px}
  .dw-head p{font-size:14px}
  .dw-offers{gap:10px}
  .dw-offer{padding:14px 12px 12px;border-radius:16px}
  .dw-offer b{font-size:13px}
  .dw-price strong{font-size:21px}
}
