/**
 * Christmas Campaign Banner 2025
 * Responsive, animated, bilingual banner with countdown and voucher flip
 */

/* Main Content adjustment when banner is active */
body.christmas-banner-active .main-content {
    margin-top: 0;
}

/* Banner Container */
.christmas-banner {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #0f3d2c 0%, #1a5c3f 50%, #0f3d2c 100%);
    padding: 2rem 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin-top: var(--header-height, 100px);
    margin-bottom: 0;
    z-index: 99;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.christmas-banner.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .christmas-banner {
        background: linear-gradient(135deg, #0a2919 0%, #143d2a 50%, #0a2919 100%);
    }
}

/* Snowfall Animation Background */
.christmas-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent);
    background-size: 200px 200px, 150px 150px, 100px 100px, 180px 180px, 120px 120px, 140px 140px;
    background-position: 0 0, 40px 60px, 80px 20px, 120px 100px, 160px 40px, 200px 80px;
    animation: snowfall 20s linear infinite;
    opacity: 0.6;
    pointer-events: none;
}

@keyframes snowfall {
    0% {
        background-position: 0 0, 40px 60px, 80px 20px, 120px 100px, 160px 40px, 200px 80px;
    }
    100% {
        background-position: 0 200px, 40px 260px, 80px 220px, 120px 300px, 160px 240px, 200px 280px;
    }
}

/* Close Button */
.christmas-banner-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: white;
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    padding: 0;
}

.christmas-banner-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg) scale(1.1);
}

.christmas-banner-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Banner Content */
.christmas-banner-content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    z-index: 1;
}

/* Text Section */
.christmas-banner-text {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.christmas-banner-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    }
    50% {
        text-shadow: 0 2px 20px rgba(255, 215, 0, 0.6);
    }
}

.christmas-banner-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.5;
}

/* Action Section */
.christmas-banner-action {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-end;
}

/* Countdown Timer */
.christmas-countdown {
    display: flex;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.countdown-number {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
}

.countdown-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Voucher Button */
.christmas-voucher-container {
    perspective: 1000px;
    width: 220px;
    height: 60px;
}

.christmas-voucher-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.christmas-voucher-card.flipped {
    transform: rotateY(180deg);
}

.voucher-front,
.voucher-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.voucher-front {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #0f3d2c;
    border: 2px solid #ffed4e;
    font-size: 1.1rem;
    gap: 0.5rem;
    animation: voucherPulse 2s ease-in-out infinite;
}

@keyframes voucherPulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 6px 24px rgba(255, 215, 0, 0.6);
    }
}

.voucher-front::before {
    content: '🎁';
    font-size: 1.5rem;
}

.voucher-back {
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    color: #0f3d2c;
    border: 2px solid #ffd700;
    transform: rotateY(180deg);
    flex-direction: column;
    gap: 0.25rem;
}

.voucher-code-label {
    font-size: 0.75rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.voucher-code {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #d32f2f;
    letter-spacing: 2px;
}

/* Responsive Design */
@media (max-width: 900px) {
    .christmas-banner-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .christmas-banner-action {
        align-items: center;
    }

    .christmas-banner-title {
        font-size: 1.5rem;
        text-align: center;
    }

    .christmas-banner-subtitle {
        text-align: center;
        font-size: 1rem;
    }

    .christmas-countdown {
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .countdown-item {
        min-width: 50px;
    }

    .countdown-number {
        font-size: 1.75rem;
    }

    .countdown-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 600px) {
    .christmas-banner {
        padding: 1.5rem 1rem;
    }

    .christmas-banner-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .christmas-banner-title {
        font-size: 1.25rem;
    }

    .christmas-banner-subtitle {
        font-size: 0.9rem;
    }

    .christmas-countdown {
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
    }

    .countdown-item {
        min-width: 40px;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .countdown-label {
        font-size: 0.65rem;
    }

    .christmas-voucher-container {
        width: 200px;
        height: 55px;
    }

    .voucher-front {
        font-size: 1rem;
    }

    .voucher-code {
        font-size: 1.25rem;
    }
}

/* Performance Optimization */
@media (prefers-reduced-motion: reduce) {
    .christmas-banner::before {
        animation: none;
    }

    .christmas-voucher-card {
        transition: transform 0.3s ease;
    }

    @keyframes textGlow {
        0%, 100% {
            text-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
        }
    }

    @keyframes voucherPulse {
        0%, 100% {
            box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
        }
    }
}
