/* ========================================================
   FESTIVAL EFFECTS
   Header Toran Garland & Falling Festive Icons
   ======================================================== */

/* ── Header Festive Garland (Toran / Thoranam) ── */
.festival-header-toran {
    position: absolute;
    bottom: -32px;
    left: 0;
    width: 100%;
    height: 34px;
    background-repeat: repeat-x;
    background-size: 110px 34px;
    background-position: center top;
    z-index: 10001;
    pointer-events: none;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.16));
}

.festival-header-toran.toran-marigold {
    background-image: url('../images/toran_marigold.svg');
}

.festival-header-toran.toran-christmas {
    background-image: url('../images/toran_christmas.svg');
}

@media (max-width: 768px) {
    .festival-header-toran {
        height: 26px;
        bottom: -24px;
        background-size: 85px 26px;
    }
}

/* ── Falling Festive Particles Overlay ── */
#festivalFallingContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1045;
    overflow: hidden;
}

@keyframes festivalFall {
    0% {
        transform: translateY(-50px) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: var(--particle-opacity, 0.88);
    }
    85% {
        opacity: var(--particle-opacity, 0.88);
    }
    100% {
        transform: translateY(106vh) translateX(var(--drift-x, 35px)) rotate(var(--rot-deg, 360deg));
        opacity: 0;
    }
}

@keyframes festivalSway {
    0% {
        margin-left: 0px;
    }
    50% {
        margin-left: var(--sway-x, 24px);
    }
    100% {
        margin-left: calc(-1 * var(--sway-x, 24px));
    }
}

.festival-falling-particle {
    position: fixed;
    top: -50px;
    user-select: none;
    pointer-events: none;
    will-change: transform, opacity;
    animation-name: festivalFall, festivalSway;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.15));
    line-height: 1;
    display: inline-block;
}

/* Pause when user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .festival-falling-particle {
        animation: none !important;
        display: none !important;
    }
}
