/* Tema musiman: Natal & Tahun Baru, Ramadhan, Idul Fitri.
   Hanya dimuat bila admin memilih salah satu tema ini.
   Dekorasi dibuat tipis agar website tetap berkesan sekolah. */

html[data-theme="natal"] { --banner-art: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 420 200%22%3E%3Cg fill=%22%23fff%22 fill-opacity=%22.11%22%3E%3Cpolygon points=%22300,200 340,95 380,200%22/%3E%3Cpolygon points=%22305,150 340,60 375,150%22/%3E%3Cpolygon points=%22312,105 340,30 368,105%22/%3E%3Cpolygon points=%22370,200 395,120 420,200%22/%3E%3Cpolygon points=%22215,200 245,125 275,200%22/%3E%3Cpolygon points=%22222,150 245,90 268,150%22/%3E%3C/g%3E%3Cpolygon fill=%22%23f6e3a1%22 fill-opacity=%22.5%22 points=%22340,12 344,24 357,24 347,32 351,45 340,37 329,45 333,32 323,24 336,24%22/%3E%3Cg fill=%22%23fff%22 fill-opacity=%22.3%22%3E%3Ccircle cx=%22260%22 cy=%2240%22 r=%223%22/%3E%3Ccircle cx=%22395%22 cy=%2260%22 r=%222.5%22/%3E%3Ccircle cx=%22190%22 cy=%2290%22 r=%222%22/%3E%3Ccircle cx=%22280%22 cy=%2295%22 r=%222%22/%3E%3Ccircle cx=%22410%22 cy=%22150%22 r=%222.5%22/%3E%3Ccircle cx=%22170%22 cy=%2230%22 r=%222.5%22/%3E%3C/g%3E%3C/svg%3E"); }
html[data-theme="ramadhan"] { --banner-art: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 420 200%22%3E%3Cpath d=%22M330 30a62 62 0 1 0 38 112a50 50 0 1 1-38-112z%22 fill=%22%23f7e3a0%22 fill-opacity=%22.34%22/%3E%3Cg fill=%22%23f7e3a0%22 fill-opacity=%22.5%22%3E%3Cpath d=%22M250 38l3 8 8 3-8 3-3 8-3-8-8-3 8-3z%22/%3E%3Cpath d=%22M395 40l2.5 6 6 2.5-6 2.5-2.5 6-2.5-6-6-2.5 6-2.5z%22/%3E%3Cpath d=%22M215 110l2.5 6 6 2.5-6 2.5-2.5 6-2.5-6-6-2.5 6-2.5z%22/%3E%3Cpath d=%22M375 150l2 5 5 2-5 2-2 5-2-5-5-2 5-2z%22/%3E%3C/g%3E%3Cg stroke=%22%23fff%22 stroke-opacity=%22.2%22 stroke-width=%221.2%22%3E%3Cline x1=%22190%22 y1=%220%22 x2=%22190%22 y2=%2245%22/%3E%3Cline x1=%22285%22 y1=%220%22 x2=%22285%22 y2=%2225%22/%3E%3C/g%3E%3Cg fill=%22%23f7e3a0%22 fill-opacity=%22.28%22%3E%3Crect x=%22182%22 y=%2245%22 width=%2216%22 height=%2226%22 rx=%223%22/%3E%3Crect x=%22277%22 y=%2225%22 width=%2216%22 height=%2226%22 rx=%223%22/%3E%3C/g%3E%3C/svg%3E"); }
html[data-theme="idulfitri"] { --banner-art: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 420 200%22%3E%3Cg fill=%22none%22 stroke=%22%23fff%22 stroke-opacity=%22.16%22 stroke-width=%221.4%22%3E%3Cpath d=%22M300 20l50 50-50 50-50-50z%22/%3E%3Cpath d=%22M300 40l30 30-30 30-30-30z%22/%3E%3Cpath d=%22M370 100l40 40-40 40-40-40z%22/%3E%3Cpath d=%22M370 118l22 22-22 22-22-22z%22/%3E%3Cpath d=%22M230 120l30 30-30 30-30-30z%22/%3E%3C/g%3E%3Cpath d=%22M388 22a24 24 0 1 0 14 43a19 19 0 1 1-14-43z%22 fill=%22%23f4e2a1%22 fill-opacity=%22.42%22/%3E%3Cg fill=%22%23f4e2a1%22 fill-opacity=%22.45%22%3E%3Ccircle cx=%22205%22 cy=%2240%22 r=%222.5%22/%3E%3Ccircle cx=%22330%22 cy=%22150%22 r=%222.5%22/%3E%3Ccircle cx=%22260%22 cy=%22190%22 r=%222%22/%3E%3Ccircle cx=%22410%22 cy=%22100%22 r=%222%22/%3E%3C/g%3E%3C/svg%3E"); }

/* Lapisan efek (tidak bisa diklik, hanya transform/opacity agar ringan) */
html[data-theme] body .season-fx {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

html[data-theme="natal"] body .season-fx::before,
html[data-theme="natal"] body .season-fx::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

html[data-theme="natal"] body .season-fx::before {
    top: -240px;
    background-image: radial-gradient(circle at 24px 30px,#fff 0 2.4px,rgba(105,135,180,.62) 3.4px,transparent 4.4px),radial-gradient(circle at 150px 120px,#fff 0 1.8px,rgba(105,135,180,.55) 2.8px,transparent 3.8px);
    background-size: 240px 240px;
    opacity: 0.7;
    animation: seasonFallA 20s linear infinite;
}

html[data-theme="natal"] body .season-fx::after {
    top: -360px;
    background-image: radial-gradient(circle at 60px 70px,#fff 0 3px,rgba(105,135,180,.5) 4px,transparent 5px),radial-gradient(circle at 230px 210px,#fff 0 2.2px,rgba(105,135,180,.55) 3.2px,transparent 4.2px);
    background-size: 330px 360px;
    opacity: 0.55;
    animation: seasonFallB 32s linear infinite;
}

html[data-theme="ramadhan"] body .season-fx::before,
html[data-theme="ramadhan"] body .season-fx::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

html[data-theme="ramadhan"] body .season-fx::before {
    top: -240px;
    background-image: radial-gradient(circle at 30px 40px,rgba(224,184,76,.9) 0 1.8px,transparent 2.8px),radial-gradient(circle at 160px 130px,rgba(224,184,76,.75) 0 1.4px,transparent 2.4px);
    background-size: 240px 240px;
    opacity: 0.55;
    animation: seasonTwinkle 4.5s ease-in-out infinite;
}

html[data-theme="ramadhan"] body .season-fx::after {
    top: -360px;
    background-image: radial-gradient(circle at 70px 90px,rgba(224,184,76,.8) 0 2.2px,transparent 3.2px),radial-gradient(circle at 250px 220px,rgba(224,184,76,.7) 0 1.6px,transparent 2.6px);
    background-size: 330px 360px;
    opacity: 0.45;
    animation: seasonTwinkle 6.5s ease-in-out 1.2s infinite;
}

html[data-theme="idulfitri"] body .season-fx::before,
html[data-theme="idulfitri"] body .season-fx::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

html[data-theme="idulfitri"] body .season-fx::before {
    top: -240px;
    background-image: radial-gradient(circle at 30px 40px,rgba(217,180,74,.85) 0 2px,transparent 3px),radial-gradient(circle at 170px 140px,rgba(15,107,74,.55) 0 1.8px,transparent 2.8px);
    background-size: 240px 240px;
    opacity: 0.5;
    animation: seasonFallA 34s linear infinite;
}

html[data-theme="idulfitri"] body .season-fx::after {
    top: -360px;
    background-image: radial-gradient(circle at 80px 100px,rgba(217,180,74,.8) 0 2.4px,transparent 3.4px),radial-gradient(circle at 260px 230px,rgba(15,107,74,.5) 0 2px,transparent 3px);
    background-size: 330px 360px;
    opacity: 0.4;
    animation: seasonFallB 48s linear infinite;
}


@keyframes seasonFallA { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 240px, 0); } }
@keyframes seasonFallB { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 360px, 0); } }
@keyframes seasonTwinkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.7; } }

/* Ucapan di topbar */
html[data-theme] body .season-greeting {
    margin-right: auto;
    color: var(--gold-soft);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Navbar: tempat lampu hias / lampion / ketupat */
html[data-theme] body .navbar {
    position: relative;
}

html[data-theme] body .navbar::before,
html[data-theme] body .navbar::after {
    content: '';
    position: absolute;
    top: 100%;
    z-index: 6;
    pointer-events: none;
}

html[data-theme="natal"] body .navbar::before {
    display: none;
}

html[data-theme="natal"] body .navbar::after {
    left: 0;
    right: 0;
    height: 14px;
    background-image:
        radial-gradient(circle at 12px 8px, #e11d48 0 3.5px, transparent 4.6px),
        radial-gradient(circle at 36px 10px, #d9b44a 0 3.5px, transparent 4.6px),
        radial-gradient(circle at 60px 8px, #16a34a 0 3.5px, transparent 4.6px),
        radial-gradient(circle at 84px 10px, #38bdf8 0 3.5px, transparent 4.6px),
        linear-gradient(#35503c, #35503c);
    background-size: 96px 14px, 96px 14px, 96px 14px, 96px 14px, 100% 1px;
    background-repeat: repeat-x, repeat-x, repeat-x, repeat-x, no-repeat;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
    animation: seasonLights 1.8s steps(2, jump-none) infinite;
}

@keyframes seasonLights { 0% { opacity: 1; } 100% { opacity: 0.55; } }

html[data-theme="ramadhan"] body .navbar::before,
html[data-theme="ramadhan"] body .navbar::after,
html[data-theme="idulfitri"] body .navbar::before,
html[data-theme="idulfitri"] body .navbar::after {
    width: 34px;
    height: 72px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top center;
    transform-origin: top center;
    animation: seasonSwing 5s ease-in-out infinite;
}

html[data-theme="ramadhan"] body .navbar::before { left: 1.2%; background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 40 84%22%3E%3Cline x1=%2220%22 y1=%220%22 x2=%2220%22 y2=%2214%22 stroke=%22%23e0b84c%22 stroke-width=%221.6%22/%3E%3Cpath d=%22M13 14h14l3 6H10z%22 fill=%22%23e0b84c%22/%3E%3Cpath d=%22M10 20h20l2 30-12 6-12-6z%22 fill=%22%23e0b84c%22/%3E%3Cpath d=%22M14 24h12l1.2 22-7.2 3.5-7.2-3.5z%22 fill=%22%233b2a78%22 fill-opacity=%22.92%22/%3E%3Cpath d=%22M20 24v25%22 stroke=%22%23f7e3a0%22 stroke-width=%221%22/%3E%3Cpath d=%22M12 56h16l-3 8H15z%22 fill=%22%23e0b84c%22/%3E%3Cline x1=%2220%22 y1=%2264%22 x2=%2220%22 y2=%2276%22 stroke=%22%23e0b84c%22 stroke-width=%221.4%22/%3E%3Ccircle cx=%2220%22 cy=%2278%22 r=%223%22 fill=%22%23f7e3a0%22/%3E%3C/svg%3E"); }
html[data-theme="ramadhan"] body .navbar::after { right: 1.2%; background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 40 84%22%3E%3Cline x1=%2220%22 y1=%220%22 x2=%2220%22 y2=%2214%22 stroke=%22%23e0b84c%22 stroke-width=%221.6%22/%3E%3Cpath d=%22M13 14h14l3 6H10z%22 fill=%22%23e0b84c%22/%3E%3Cpath d=%22M10 20h20l2 30-12 6-12-6z%22 fill=%22%23e0b84c%22/%3E%3Cpath d=%22M14 24h12l1.2 22-7.2 3.5-7.2-3.5z%22 fill=%22%233b2a78%22 fill-opacity=%22.92%22/%3E%3Cpath d=%22M20 24v25%22 stroke=%22%23f7e3a0%22 stroke-width=%221%22/%3E%3Cpath d=%22M12 56h16l-3 8H15z%22 fill=%22%23e0b84c%22/%3E%3Cline x1=%2220%22 y1=%2264%22 x2=%2220%22 y2=%2276%22 stroke=%22%23e0b84c%22 stroke-width=%221.4%22/%3E%3Ccircle cx=%2220%22 cy=%2278%22 r=%223%22 fill=%22%23f7e3a0%22/%3E%3C/svg%3E"); animation-delay: -2.4s; }
html[data-theme="idulfitri"] body .navbar::before { left: 1.2%; background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 40 84%22%3E%3Cline x1=%2220%22 y1=%220%22 x2=%2220%22 y2=%2216%22 stroke=%22%23d9b44a%22 stroke-width=%221.6%22/%3E%3Cpath d=%22M20 16l16 16-16 16-16-16z%22 fill=%22%230f6b4a%22/%3E%3Cpath d=%22M20 21l11 11-11 11-11-11z%22 fill=%22none%22 stroke=%22%23f4e2a1%22 stroke-width=%221.2%22/%3E%3Cpath d=%22M12 24l16 16M28 24L12 40%22 stroke=%22%23f4e2a1%22 stroke-width=%22.9%22 stroke-opacity=%22.8%22/%3E%3Cline x1=%2220%22 y1=%2248%22 x2=%2220%22 y2=%2262%22 stroke=%22%23d9b44a%22 stroke-width=%221.4%22/%3E%3Cpath d=%22M14 62h12l-2 14h-8z%22 fill=%22%23d9b44a%22 fill-opacity=%22.9%22/%3E%3Cpath d=%22M16 76l-2 6M20 76v7M24 76l2 6%22 stroke=%22%23d9b44a%22 stroke-width=%221.2%22/%3E%3C/svg%3E"); }
html[data-theme="idulfitri"] body .navbar::after { right: 1.2%; background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 40 84%22%3E%3Cline x1=%2220%22 y1=%220%22 x2=%2220%22 y2=%2216%22 stroke=%22%23d9b44a%22 stroke-width=%221.6%22/%3E%3Cpath d=%22M20 16l16 16-16 16-16-16z%22 fill=%22%230f6b4a%22/%3E%3Cpath d=%22M20 21l11 11-11 11-11-11z%22 fill=%22none%22 stroke=%22%23f4e2a1%22 stroke-width=%221.2%22/%3E%3Cpath d=%22M12 24l16 16M28 24L12 40%22 stroke=%22%23f4e2a1%22 stroke-width=%22.9%22 stroke-opacity=%22.8%22/%3E%3Cline x1=%2220%22 y1=%2248%22 x2=%2220%22 y2=%2262%22 stroke=%22%23d9b44a%22 stroke-width=%221.4%22/%3E%3Cpath d=%22M14 62h12l-2 14h-8z%22 fill=%22%23d9b44a%22 fill-opacity=%22.9%22/%3E%3Cpath d=%22M16 76l-2 6M20 76v7M24 76l2 6%22 stroke=%22%23d9b44a%22 stroke-width=%221.2%22/%3E%3C/svg%3E"); animation-delay: -2.4s; }

@keyframes seasonSwing { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* Layar pembuka: latar grid diganti suasana musiman */
html[data-theme="natal"] body .sp-grid,
html[data-theme="ramadhan"] body .sp-grid,
html[data-theme="idulfitri"] body .sp-grid {
    background-size: 240px 240px;
    -webkit-mask-image: none;
    mask-image: none;
}

html[data-theme="natal"] body .sp-grid {
    background-image: radial-gradient(circle at 24px 30px, rgba(255,255,255,.9) 0 2.4px, transparent 3.4px), radial-gradient(circle at 150px 120px, rgba(255,255,255,.75) 0 1.8px, transparent 2.8px);
    animation: spGridFall 16s linear infinite;
}

html[data-theme="ramadhan"] body .sp-grid {
    background-image: radial-gradient(circle at 30px 40px, rgba(247,227,160,.95) 0 1.8px, transparent 2.8px), radial-gradient(circle at 160px 130px, rgba(247,227,160,.8) 0 1.4px, transparent 2.4px);
    animation: seasonTwinkle 4s ease-in-out infinite;
}

html[data-theme="idulfitri"] body .sp-grid {
    background-image: radial-gradient(circle at 30px 40px, rgba(244,226,161,.9) 0 2px, transparent 3px), radial-gradient(circle at 170px 140px, rgba(255,255,255,.7) 0 1.6px, transparent 2.6px);
    animation: spGridFall 26s linear infinite;
}

@keyframes spGridFall { from { background-position: 0 0; } to { background-position: 0 240px; } }

/* Responsif & aksesibilitas */
@media (max-width: 992px) {
    html[data-theme="ramadhan"] body .navbar::before,
    html[data-theme="ramadhan"] body .navbar::after,
    html[data-theme="idulfitri"] body .navbar::before,
    html[data-theme="idulfitri"] body .navbar::after {
        display: none;
    }
}

@media (max-width: 768px) {
    html[data-theme] body .season-fx {
        opacity: 0.7;
    }
}

@media (prefers-reduced-motion: reduce) {
    html[data-theme] body .season-fx::before,
    html[data-theme] body .season-fx::after,
    html[data-theme] body .navbar::before,
    html[data-theme] body .navbar::after,
    html[data-theme] body .sp-grid {
        animation: none;
    }
}

@media print {
    html[data-theme] body .season-fx {
        display: none;
    }
}
