/* Seasonal effects — under-nav lights + CSS particles (no emoji) */
/* ═══════════════════════════════════════════════════════════════════════════
   SEASONAL EFFECTS — lights/particles hang from under nav into hero
   No emoji. Message uses text-shadow + soft wash (not a white box).
   ═══════════════════════════════════════════════════════════════════════════ */

.sv-seasonal-effects {
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;
}

/* Kill old footer rule that hid most particles on mobile */
.sv-seasonal-effects > * {
    display: block !important;
}

.sv-seasonal-strand,
.sv-xmas-lights,
.sv-balloon-strand,
.sv-seasonal-snow,
.sv-seasonal-layer,
.sv-seasonal-corners {
    display: block !important;
}

/* Shared top strand — Christmas lights & New Year balloons hang under nav */
.sv-seasonal-strand,
.sv-xmas-lights,
.sv-balloon-strand {
    position: absolute;
    top: var(--sv-seasonal-hang, 140px);
    left: 0;
    right: 0;
    height: 56px;
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    padding: 4px 2% 0;
    z-index: 4;
}

.sv-seasonal-snow,
.sv-seasonal-layer {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--sv-seasonal-hang, 140px);
    bottom: 0;
    overflow: hidden;
    z-index: 3;
}

/* Corner spider webs — hero + sections */
.sv-seasonal-corners {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    overflow: visible;
}

.sv-seasonal-effects--under-nav .sv-seasonal-corners .sv-cobweb {
    top: var(--sv-seasonal-hang, 140px);
}

.sv-seasonal-effects--section .sv-seasonal-corners .sv-cobweb {
    top: 0;
}

/* Mid-page section strands sit at the section top (no nav offset) */
.sv-seasonal-effects--section .sv-seasonal-strand,
.sv-seasonal-effects--section .sv-xmas-lights,
.sv-seasonal-effects--section .sv-balloon-strand,
.sv-seasonal-effects--section .sv-seasonal-snow,
.sv-seasonal-effects--section .sv-seasonal-layer {
    top: 0;
}

.sv-seasonal-effects--section .sv-seasonal-strand,
.sv-seasonal-effects--section .sv-xmas-lights,
.sv-seasonal-effects--section .sv-balloon-strand {
    height: 48px;
    opacity: 0.92;
}

/* Page heroes that host under-nav effects */
.sv-contact-hero,
.sv-page-hero,
.sv-flex-hero,
.sv-svc-hero,
.sv-gallery-hero,
.sv-reviews-hero,
.sv-referral-hero,
.sv-news-hero,
.sv-portal-hero {
    position: relative;
    overflow: hidden;
}

.sv-strand-wire,
.sv-xmas-wire {
    position: absolute;
    top: 14px;
    left: 2%;
    right: 2%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(20, 20, 20, 0.55) 8%, rgba(20, 20, 20, 0.55) 92%, transparent);
    border-radius: 2px;
}

.sv-xmas-lights .sv-xmas-bulb {
    position: relative;
    width: 10px;
    height: 14px;
    margin-top: 10px;
    border-radius: 50% 50% 45% 45%;
    flex: 0 0 auto;
    transform-origin: top center;
    animation: svBulbSway 3.2s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.12s);
    box-shadow:
        0 0 8px currentColor,
        0 0 18px currentColor;
}

.sv-xmas-lights .sv-xmas-bulb::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    width: 2px;
    height: 8px;
    background: rgba(30, 30, 30, 0.65);
    transform: translateX(-50%);
}

.sv-xmas-lights .sv-xmas-bulb--0 { color: #f87171; background: #ef4444 !important; }
.sv-xmas-lights .sv-xmas-bulb--1 { color: #4ade80; background: #22c55e !important; }
.sv-xmas-lights .sv-xmas-bulb--2 { color: #60a5fa; background: #3b82f6 !important; }
.sv-xmas-lights .sv-xmas-bulb--3 { color: #fbbf24; background: #f59e0b !important; }

/* Never show the old fixed top-of-page light strand */
.sv-header-decoration,
.sv-christmas-lights {
    display: none !important;
}

@keyframes svBulbSway {
    0%, 100% { transform: rotate(-6deg) translateY(0); filter: brightness(1); }
    50% { transform: rotate(6deg) translateY(2px); filter: brightness(1.25); }
}

/* Shared particles */
.sv-particle {
    position: absolute;
    top: -12px;
    left: var(--left, 10%);
    pointer-events: none;
    will-change: transform, opacity;
}

.sv-particle--snow {
    display: block !important;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow:
        0 0 6px rgba(255, 255, 255, 0.95),
        0 0 14px rgba(186, 230, 253, 0.7);
    animation: svSnowFall linear infinite;
    /* Fall distance must use vh/% of viewport — % in translate is relative to the flake itself */
    animation-duration: calc(9s + (var(--i) * 0.28s));
    animation-delay: calc(var(--i) * -0.45s);
    opacity: 0.95;
}

.sv-particle--snow.sv-particle--far {
    width: 5px;
    height: 5px;
    opacity: 0.7;
    filter: blur(0.35px);
}

.sv-particle--snow.sv-particle--near {
    width: 11px;
    height: 11px;
    opacity: 1;
}

@keyframes svSnowFall {
    0% {
        transform: translate3d(0, -12px, 0);
        opacity: 0;
    }
    8% { opacity: 1; }
    92% { opacity: 0.9; }
    100% {
        transform: translate3d(28px, 100vh, 0);
        opacity: 0;
    }
}

/* Halloween — corner spider webs + soft ember orbs (no flying bats) */
.sv-cobweb {
    position: absolute;
    width: min(160px, 28vw);
    height: min(160px, 28vw);
    color: rgba(255, 255, 255, 0.22);
    pointer-events: none;
    opacity: 0.9;
}

.sv-cobweb svg {
    display: block;
    width: 100%;
    height: 100%;
}

.sv-cobweb--left { left: 0; }
.sv-cobweb--right { right: 0; }

body.sv-light .sv-cobweb {
    color: rgba(30, 20, 10, 0.16);
}

.sv-particle--orb {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 146, 60, 0.9), rgba(124, 58, 237, 0.15));
    box-shadow: 0 0 14px rgba(251, 146, 60, 0.45);
    top: calc(18% + (var(--i) % 5) * 8%);
    left: var(--left, 10%);
    animation: svOrbDrift 11s ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.8s);
}

@keyframes svOrbDrift {
    0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.35; }
    50% { transform: translate3d(24px, -18px, 0); opacity: 0.85; }
}

/* Kill any leftover bat particles from older markup */
.sv-particle--bat {
    display: none !important;
}

/* Easter petals */
.sv-particle--petal {
    width: 10px;
    height: 14px;
    border-radius: 60% 40% 60% 40%;
    background: hsl(calc(320 + var(--i) * 18), 70%, 78%);
    opacity: 0.75;
    animation: svPetalFall 12s linear infinite;
    animation-delay: calc(var(--i) * -0.7s);
}

@keyframes svPetalFall {
    0% { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.8; }
    100% { transform: translate3d(-30px, 105vh, 0) rotate(280deg); opacity: 0; }
}

/* New Year — balloon strand (like Christmas lights) + confetti */
.sv-balloon-strand .sv-balloon {
    position: relative;
    width: 16px;
    height: 20px;
    margin-top: 12px;
    flex: 0 0 auto;
    border-radius: 50% 50% 45% 45%;
    transform-origin: top center;
    animation: svBalloonSway 3.4s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.14s);
    box-shadow:
        inset -3px -2px 6px rgba(0, 0, 0, 0.12),
        0 3px 10px rgba(0, 0, 0, 0.1);
}

.sv-balloon-strand .sv-balloon::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    width: 1px;
    height: 10px;
    background: rgba(50, 50, 50, 0.45);
    transform: translateX(-50%);
}

.sv-balloon-strand .sv-balloon::after {
    content: "";
    position: absolute;
    top: -2px;
    left: 50%;
    width: 4px;
    height: 3px;
    background: currentColor;
    border-radius: 1px;
    transform: translateX(-50%);
    opacity: 0.75;
}

.sv-balloon--0 { background: #ef4444; color: #ef4444; }
.sv-balloon--1 { background: #28A8E0; color: #28A8E0; }
.sv-balloon--2 { background: #fbbf24; color: #fbbf24; }
.sv-balloon--3 { background: #a78bfa; color: #a78bfa; }

@keyframes svBalloonSway {
    0%, 100% { transform: rotate(-5deg) translateY(0); }
    50% { transform: rotate(5deg) translateY(2px); }
}

.sv-particle--confetti {
    width: 6px;
    height: 12px;
    border-radius: 1px;
    animation: svConfettiFall 8s linear infinite;
    animation-delay: calc(var(--i) * -0.28s);
}

.sv-particle--c0 { background: #28A8E0; }
.sv-particle--c1 { background: #fbbf24; }
.sv-particle--c2 { background: #ffffff; }
.sv-particle--c3 { background: #1F8FBF; }

@keyframes svConfettiFall {
    0% { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 0; }
    8% { opacity: 1; }
    100% { transform: translate3d(40px, 105vh, 0) rotate(540deg); opacity: 0; }
}

/* Valentine hearts (CSS shape, no emoji) */
.sv-particle--heart {
    width: 12px;
    height: 12px;
    background: #f472b6;
    transform: rotate(-45deg);
    opacity: 0.75;
    animation: svHeartFall 11s linear infinite;
    animation-delay: calc(var(--i) * -0.6s);
    box-shadow: 0 0 10px rgba(244, 114, 182, 0.35);
}

.sv-particle--heart::before,
.sv-particle--heart::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f472b6;
}

.sv-particle--heart::before { top: -6px; left: 0; }
.sv-particle--heart::after { top: 0; left: 6px; }

@keyframes svHeartFall {
    0% { transform: translate3d(0, -20px, 0) rotate(-45deg) scale(0.8); opacity: 0; }
    12% { opacity: 0.8; }
    100% { transform: translate3d(22px, 105vh, 0) rotate(-20deg) scale(1); opacity: 0; }
}

/* Seasonal message — fancy script, still readable; no white box */
.sv-seasonal-banner {
    display: block;
    margin: 0 0 18px;
    max-width: 36rem;
    position: relative;
    z-index: 5;
}

.sv-seasonal-banner-inner,
.sv-seasonal-banner {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    animation: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.sv-seasonal-message {
    position: relative;
    display: inline-block;
    margin: 0;
    padding: 10px 6px 12px;
    font-family: "Dancing Script", "Segoe Script", "Apple Chancery", cursive;
    font-size: clamp(1.55rem, 3.2vw, 2.15rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.3;
    color: #fff !important;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.75),
        0 2px 14px rgba(0, 0, 0, 0.6),
        0 0 28px rgba(0, 0, 0, 0.4);
}

/* Soft dark wash only behind the message text — not a boxed panel */
.sv-seasonal-message::before {
    content: "";
    position: absolute;
    inset: -6px -18px -8px;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(8, 16, 28, 0.45) 0%, rgba(8, 16, 28, 0.18) 55%, transparent 78%);
    pointer-events: none;
}

.sv-seasonal-character-custom {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin: 0 0 8px;
    display: block;
    animation: none !important;
}

.sv-seasonal-character-emoji {
    display: none !important;
}

/* Side-bg / photo heroes already dark — keep message white */
.sv-hero-mode-side.sv-hero-has-bg .sv-seasonal-message,
.sv-hero-mode-background .sv-seasonal-message {
    color: #fff !important;
}

@media (max-width: 768px) {
    .sv-seasonal-strand,
    .sv-xmas-lights,
    .sv-balloon-strand {
        height: 44px;
        padding: 2px 1% 0;
    }
    .sv-xmas-lights .sv-xmas-bulb {
        width: 8px;
        height: 11px;
    }
    .sv-xmas-lights .sv-xmas-bulb:nth-child(n+16),
    .sv-balloon-strand .sv-balloon:nth-child(n+16) {
        display: none !important;
    }
    .sv-balloon-strand .sv-balloon {
        width: 12px;
        height: 16px;
    }
    .sv-cobweb {
        width: min(110px, 32vw);
        height: min(110px, 32vw);
    }
    .sv-seasonal-snow .sv-particle--snow:nth-child(n+24),
    .sv-seasonal-layer .sv-particle--confetti:nth-child(n+16),
    .sv-seasonal-layer .sv-particle--petal:nth-child(n+10),
    .sv-seasonal-layer .sv-particle--heart:nth-child(n+9),
    .sv-seasonal-layer .sv-particle--orb:nth-child(n+8) {
        display: none !important;
    }
    .sv-seasonal-message {
        font-size: 1.45rem;
    }
}

/* Light heroes — keep flakes readable against pale skies */
body.sv-light .sv-particle--snow {
    background: #e0f2fe;
    box-shadow:
        0 0 5px rgba(255, 255, 255, 0.95),
        0 0 12px rgba(56, 189, 248, 0.55);
}

@media (prefers-reduced-motion: reduce) {
    .sv-particle,
    .sv-balloon-strand .sv-balloon,
    .sv-xmas-lights .sv-xmas-bulb {
        animation: none !important;
    }
    .sv-particle {
        display: none;
    }
    .sv-balloon-strand .sv-balloon,
    .sv-xmas-lights .sv-xmas-bulb {
        filter: none;
        transform: none;
    }
}
