/**
 * AP Seasonal Garland - Subtle Holiday Decorations
 * Purely decorative elements that don't affect page layout or navigation
 */

/* Base container for all decorations */
.apsg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    pointer-events: none;
    z-index: 9999;
    overflow: visible;
}

/* Adjust for WordPress admin bar */
.admin-bar .apsg-decoration {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .apsg-decoration {
        top: 46px;
    }
}

/* ============================================
   CHRISTMAS - Pure CSS light bulbs
   ============================================ */
.apsg-christmas {
    height: 50px;
}

/* Wire for lights */
.apsg-christmas-wire {
    position: absolute;
    top: 10px;
    left: -50px;
    width: calc(100% + 100px);
    height: 2px;
    background: #2d5016;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Christmas light bulbs */
.apsg-christmas-light {
    position: absolute;
    top: 12px;
    width: 12px;
    height: 16px;
    border-radius: 0 0 50% 50%;
    box-shadow:
        0 0 5px currentColor,
        0 0 10px currentColor,
        inset 0 -2px 4px rgba(0,0,0,0.3);
    animation: apsg-light-glow 2s ease-in-out infinite;
}

/* Light bulb cap */
.apsg-christmas-light::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 4px;
    background: #4a4a4a;
    border-radius: 2px 2px 0 0;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.3);
}

/* Different colored bulbs */
.apsg-christmas-light:nth-child(6n+2) {
    color: #ff0000;
    animation-delay: 0s;
}

.apsg-christmas-light:nth-child(6n+3) {
    color: #00ff00;
    animation-delay: 0.3s;
}

.apsg-christmas-light:nth-child(6n+4) {
    color: #0066ff;
    animation-delay: 0.6s;
}

.apsg-christmas-light:nth-child(6n+5) {
    color: #ffff00;
    animation-delay: 0.9s;
}

.apsg-christmas-light:nth-child(6n+6) {
    color: #ff00ff;
    animation-delay: 1.2s;
}

.apsg-christmas-light:nth-child(6n+7) {
    color: #ff8800;
    animation-delay: 1.5s;
}

/* Light glow animation */
@keyframes apsg-light-glow {
    0%, 100% {
        opacity: 1;
        filter: brightness(1.2);
    }
    50% {
        opacity: 0.6;
        filter: brightness(0.8);
    }
}

/* Logo decorations */
.apsg-logo-wrapper {
    position: relative;
    display: inline-block;
    z-index: 10;
}

/* Tinsel decoration */
.apsg-tinsel {
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

.apsg-tinsel-top {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 40px;
}

.apsg-tinsel-top::before,
.apsg-tinsel-top::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 20px;
    background: linear-gradient(90deg,
        #ff0000 0%, #00ff00 10%, #0000ff 20%,
        #ffff00 30%, #ff00ff 40%, #00ffff 50%,
        #ff0000 60%, #00ff00 70%, #0000ff 80%,
        #ffff00 90%, #ff00ff 100%);
    border-radius: 50%;
    opacity: 0.85;
}

.apsg-tinsel-top::before {
    top: 0;
    clip-path: polygon(
        0% 50%, 5% 30%, 10% 50%, 15% 20%, 20% 50%,
        25% 30%, 30% 50%, 35% 20%, 40% 50%, 45% 30%,
        50% 50%, 55% 20%, 60% 50%, 65% 30%, 70% 50%,
        75% 20%, 80% 50%, 85% 30%, 90% 50%, 95% 20%, 100% 50%
    );
    animation: apsg-shimmer 3s ease-in-out infinite;
}

.apsg-tinsel-top::after {
    bottom: 0;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.6) 0%,
        rgba(255,255,255,0) 50%,
        rgba(255,255,255,0.6) 100%);
    height: 12px;
    animation: apsg-sparkle 2s ease-in-out infinite;
}

.apsg-tinsel-side {
    position: absolute;
    top: 0;
    height: 100%;
    width: 28px;
}

.apsg-tinsel-left {
    left: -20px;
}

.apsg-tinsel-right {
    right: -20px;
}

.apsg-tinsel-side::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
        #ff0000 0%, #00ff00 20%, #0000ff 40%,
        #ffff00 60%, #ff00ff 80%, #00ffff 100%);
    border-radius: 14px;
    opacity: 0.75;
    clip-path: polygon(
        50% 0%, 25% 8%, 50% 16%, 20% 24%, 50% 32%,
        25% 40%, 50% 48%, 20% 56%, 50% 64%, 25% 72%,
        50% 80%, 20% 88%, 50% 96%, 30% 100%
    );
}

/* Mistletoe decoration */
.apsg-mistletoe {
    position: absolute;
    pointer-events: none;
    z-index: 6;
}

.apsg-mistletoe-top {
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
}

/* Mistletoe leaves */
.apsg-mistletoe-leaf {
    position: absolute;
    width: 25px;
    height: 35px;
    background: linear-gradient(135deg, #2d5016 0%, #4a7c2c 50%, #2d5016 100%);
    border-radius: 50% 50% 50% 0;
    box-shadow: inset -2px -2px 4px rgba(0,0,0,0.3);
}

.apsg-mistletoe-leaf:nth-child(1) {
    top: 20px;
    left: 15px;
    transform: rotate(-30deg);
}

.apsg-mistletoe-leaf:nth-child(2) {
    top: 20px;
    right: 15px;
    transform: rotate(30deg) scaleX(-1);
}

.apsg-mistletoe-leaf:nth-child(3) {
    top: 15px;
    left: 25px;
    transform: rotate(-10deg);
    opacity: 0.9;
}

.apsg-mistletoe-leaf:nth-child(4) {
    top: 15px;
    right: 25px;
    transform: rotate(10deg) scaleX(-1);
    opacity: 0.9;
}

/* Mistletoe berries */
.apsg-mistletoe-berry {
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #ff4444 30%, #cc0000 100%);
    border-radius: 50%;
    box-shadow:
        inset -2px -2px 4px rgba(0,0,0,0.4),
        0 2px 4px rgba(0,0,0,0.3);
}

.apsg-mistletoe-berry:nth-child(5) {
    top: 35px;
    left: 34px;
}

.apsg-mistletoe-berry:nth-child(6) {
    top: 32px;
    left: 45px;
}

.apsg-mistletoe-berry:nth-child(7) {
    top: 38px;
    left: 41px;
}

/* Mistletoe stem */
.apsg-mistletoe::after {
    content: '';
    position: absolute;
    top: 45px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 30px;
    background: linear-gradient(180deg, #4a7c2c 0%, #2d5016 100%);
    border-radius: 2px;
}

/* Red bow on mistletoe */
.apsg-mistletoe-bow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 25px;
}

.apsg-mistletoe-bow::before,
.apsg-mistletoe-bow::after {
    content: '';
    position: absolute;
    top: 5px;
    width: 18px;
    height: 18px;
    background: radial-gradient(circle at 30% 30%, #ff6666 0%, #cc0000 50%, #990000 100%);
    border-radius: 50% 50% 0 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.apsg-mistletoe-bow::before {
    left: 0;
    transform: rotate(-45deg);
}

.apsg-mistletoe-bow::after {
    right: 0;
    transform: rotate(45deg) scaleX(-1);
}

/* Bow center knot */
.apsg-mistletoe-bow-center {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 30% 30%, #ff4444 0%, #cc0000 50%, #880000 100%);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    z-index: 1;
}

/* Logo wrapper ensures decorations don't interfere with logo clicks */
.apsg-logo-wrapper img {
    position: relative;
    z-index: 10;
}

/* Animations */
@keyframes apsg-shimmer {
    0%, 100% {
        opacity: 0.8;
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        filter: brightness(1.3);
    }
}

@keyframes apsg-sparkle {
    0%, 100% {
        opacity: 0.3;
        transform: scaleX(1);
    }
    50% {
        opacity: 0.8;
        transform: scaleX(1.1);
    }
}

@keyframes apsg-sway {
    0%, 100% {
        transform: translateX(-50%) rotate(0deg);
    }
    50% {
        transform: translateX(-50%) rotate(5deg);
    }
}

@keyframes apsg-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Mistletoe sway animation */
.apsg-mistletoe-top {
    animation: apsg-sway 3s ease-in-out infinite;
}

/* Subtle glow effect for berries */
.apsg-mistletoe-berry {
    animation: apsg-pulse 2s ease-in-out infinite;
}

.apsg-mistletoe-berry:nth-child(6) {
    animation-delay: 0.3s;
}

.apsg-mistletoe-berry:nth-child(7) {
    animation-delay: 0.6s;
}

/* ============================================
   NEW YEAR - Emoji fireworks and sparkles
   ============================================ */
.apsg-new-year {
    height: 120px;
}

.apsg-firework {
    position: absolute;
    font-size: 32px;
    line-height: 1;
    animation: apsg-explode 2s ease-out infinite;
}

@keyframes apsg-explode {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.9;
    }
    100% {
        transform: scale(0.8);
        opacity: 1;
    }
}

/* ============================================
   VALENTINE - Emoji hearts
   ============================================ */
.apsg-valentine {
    height: 100px;
}

.apsg-heart {
    position: absolute;
    top: 15px;
    font-size: 32px;
    line-height: 1;
    animation: apsg-heartbeat 1.5s ease-in-out infinite;
}

@keyframes apsg-heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ============================================
   ST PATRICK - Floating shamrock emoji
   ============================================ */
.apsg-st-patrick {
    height: 100px;
}

.apsg-shamrock {
    position: absolute;
    top: 15px;
    font-size: 28px;
    line-height: 1;
    animation: apsg-sway-small 3s ease-in-out infinite;
}

/* ============================================
   EASTER - Hanging Easter emoji
   ============================================ */
.apsg-easter {
    height: 100px;
}

/* String for decorations */
.apsg-easter-string {
    position: absolute;
    top: 5px;
    left: -50px;
    width: calc(100% + 100px);
    height: 2px;
    background: #ddd;
}

.apsg-easter-egg {
    position: absolute;
    top: 7px;
    font-size: 28px;
    line-height: 1;
    animation: apsg-egg-swing 3s ease-in-out infinite;
}

@keyframes apsg-egg-swing {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@keyframes apsg-sway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

@keyframes apsg-sway-small {
    0%, 100% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
}

/* ============================================
   HALLOWEEN - Hanging emoji pumpkins and bats
   ============================================ */
.apsg-halloween {
    height: 100px;
}

/* String for decorations */
.apsg-halloween-string {
    position: absolute;
    top: 5px;
    left: -50px;
    width: calc(100% + 100px);
    height: 2px;
    background: #333;
}

/* Emoji pumpkins */
.apsg-pumpkin {
    position: absolute;
    top: 7px;
    font-size: 32px;
    line-height: 1;
    animation: apsg-pumpkin-sway 3s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@keyframes apsg-pumpkin-sway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* Emoji bats */
.apsg-bat {
    position: absolute;
    top: 25px;
    font-size: 24px;
    line-height: 1;
    animation: apsg-bat-fly 3s ease-in-out infinite;
}

@keyframes apsg-bat-fly {
    0%, 100% {
        transform: translateY(0) rotate(-3deg);
    }
    50% {
        transform: translateY(20px) rotate(3deg);
    }
}

/* ============================================
   THANKSGIVING - Floating emoji autumn leaves
   ============================================ */
.apsg-thanksgiving {
    height: 100px;
}

.apsg-leaf {
    position: absolute;
    top: 15px;
    font-size: 28px;
    line-height: 1;
    animation: apsg-leaf-fall 4s ease-in-out infinite;
}

@keyframes apsg-leaf-fall {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(30px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

/* ============================================
   ANIMATION SPEED MODIFIERS
   ============================================ */

/* Slow */
.apsg-animation-slow .apsg-christmas-light {
    animation-duration: 3s;
}

.apsg-animation-slow .apsg-firework {
    animation-duration: 3s;
}

.apsg-animation-slow .apsg-heart {
    animation-duration: 2s;
}

.apsg-animation-slow .apsg-easter-egg {
    animation-duration: 4s;
}

.apsg-animation-slow .apsg-pumpkin {
    animation-duration: 4s;
}

.apsg-animation-slow .apsg-bat {
    animation-duration: 4s;
}

.apsg-animation-slow .apsg-leaf {
    animation-duration: 5s;
}

/* Medium (default) */
.apsg-animation-medium .apsg-christmas-light {
    animation-duration: 2s;
}

.apsg-animation-medium .apsg-firework {
    animation-duration: 2s;
}

.apsg-animation-medium .apsg-heart {
    animation-duration: 1.5s;
}

.apsg-animation-medium .apsg-easter-egg {
    animation-duration: 3s;
}

.apsg-animation-medium .apsg-pumpkin {
    animation-duration: 3s;
}

.apsg-animation-medium .apsg-bat {
    animation-duration: 3s;
}

.apsg-animation-medium .apsg-leaf {
    animation-duration: 4s;
}

/* Fast */
.apsg-animation-fast .apsg-christmas-light {
    animation-duration: 1.2s;
}

.apsg-animation-fast .apsg-firework {
    animation-duration: 1.2s;
}

.apsg-animation-fast .apsg-heart {
    animation-duration: 1s;
}

.apsg-animation-fast .apsg-easter-egg {
    animation-duration: 2s;
}

.apsg-animation-fast .apsg-pumpkin {
    animation-duration: 2s;
}

.apsg-animation-fast .apsg-bat {
    animation-duration: 2s;
}

.apsg-animation-fast .apsg-leaf {
    animation-duration: 2.5s;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .apsg-decoration {
        height: 100px;
    }

    .apsg-christmas {
        height: 40px;
    }

    .apsg-christmas-light {
        width: 10px;
        height: 14px;
    }

    .apsg-new-year {
        height: 100px;
    }

    .apsg-firework {
        font-size: 24px;
    }

    .apsg-valentine {
        height: 100px;
    }

    .apsg-heart {
        font-size: 24px;
    }

    .apsg-st-patrick {
        height: 80px;
    }

    .apsg-shamrock {
        font-size: 22px;
    }

    .apsg-easter {
        height: 80px;
    }

    .apsg-easter-egg {
        font-size: 22px;
    }

    .apsg-halloween {
        height: 80px;
    }

    .apsg-pumpkin {
        font-size: 24px;
    }

    .apsg-bat {
        font-size: 18px;
    }

    .apsg-thanksgiving {
        height: 80px;
    }

    .apsg-leaf {
        font-size: 22px;
    }

    /* Christmas logo decorations responsive */
    .apsg-mistletoe-top {
        width: 60px;
        height: 60px;
        top: -30px;
    }

    .apsg-mistletoe-leaf {
        width: 20px;
        height: 28px;
    }

    .apsg-tinsel-top {
        height: 35px;
        top: -18px;
    }

    .apsg-tinsel-side {
        width: 22px;
    }

    .apsg-tinsel-left {
        left: -16px;
    }

    .apsg-tinsel-right {
        right: -16px;
    }
}

/* Performance optimization */
.apsg-decoration * {
    will-change: transform, opacity;
}
