/**
 * Christmas Advent Calendar Theme
 * Enhanced festive design with brand colors
 * Brand Colors: #343344 (Dark Purple/Blue), #ffcc02 (Gold/Yellow)
 */

/* ============================================
   BRAND COLOR VARIABLES
   ============================================ */
:root {
    --brand-primary: #343344;
    --brand-secondary: #ffcc02;
    --brand-accent: #ff6b35;
    --christmas-red: #D42426;
    --christmas-green: #165B33;
    --christmas-gold: #ffcc02;
    --christmas-silver: #C0C0C0;
    --snow-white: #FFFFFF;
    --warm-beige: #F5E6D3;
    --deep-purple: #343344;
}

/* ============================================
   FESTIVE BACKGROUND
   ============================================ */
body {
    background: linear-gradient(135deg, #1a1a2e 0%, #343344 50%, #0f0f1e 100%);
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 204, 2, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 204, 2, 0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255, 204, 2, 0.3), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 33% 80%, rgba(255, 204, 2, 0.2), transparent);
    background-size: 200% 200%;
    animation: twinkle 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   CHRISTMAS LIGHTS DECORATION
   ============================================ */
.christmas-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1000;
    pointer-events: none;
}

.christmas-lights::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #343344;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.light {
    position: absolute;
    width: 12px;
    height: 18px;
    border-radius: 0 0 50% 50%;
    top: 3px;
    animation: blink 1.5s infinite;
    box-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
}

.light:nth-child(1) { left: 5%; background: #ffcc02; animation-delay: 0s; }
.light:nth-child(2) { left: 15%; background: #D42426; animation-delay: 0.3s; }
.light:nth-child(3) { left: 25%; background: #165B33; animation-delay: 0.6s; }
.light:nth-child(4) { left: 35%; background: #ffcc02; animation-delay: 0.9s; }
.light:nth-child(5) { left: 45%; background: #ff6b35; animation-delay: 0.2s; }
.light:nth-child(6) { left: 55%; background: #D42426; animation-delay: 0.5s; }
.light:nth-child(7) { left: 65%; background: #165B33; animation-delay: 0.8s; }
.light:nth-child(8) { left: 75%; background: #ffcc02; animation-delay: 0.1s; }
.light:nth-child(9) { left: 85%; background: #ff6b35; animation-delay: 0.4s; }
.light:nth-child(10) { left: 95%; background: #D42426; animation-delay: 0.7s; }

@keyframes blink {
    0%, 49%, 51%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   NAVBAR - CHRISTMAS STYLE
   ============================================ */
.navbar {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #1a1a2e 100%) !important;
    box-shadow: 0 4px 20px rgba(255, 204, 2, 0.3);
    border-bottom: 3px solid var(--brand-secondary);
    position: relative;
    z-index: 1001;
}

.navbar-brand {
    color: var(--brand-secondary) !important;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05) rotate(-2deg);
    text-shadow: 0 0 20px var(--brand-secondary);
}

.navbar-brand img {
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.navbar-brand:hover img {
    filter: drop-shadow(0 0 10px var(--brand-secondary));
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--brand-secondary) !important;
    text-shadow: 0 0 10px var(--brand-secondary);
}

.nav-link::after {
    content: '❄';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--brand-secondary);
}

.nav-link:hover::after {
    opacity: 1;
    right: -20px;
}

/* ============================================
   HERO SECTION - FESTIVE
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #1a1a2e 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid var(--brand-secondary);
}

.hero-section::before {
    content: '🎄';
    position: absolute;
    font-size: 200px;
    opacity: 0.05;
    top: 50%;
    left: 10%;
    transform: translateY(-50%) rotate(-15deg);
    animation: float 6s ease-in-out infinite;
}

.hero-section::after {
    content: '🎁';
    position: absolute;
    font-size: 150px;
    opacity: 0.05;
    top: 50%;
    right: 10%;
    transform: translateY(-50%) rotate(15deg);
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(-50%) rotate(-15deg); }
    50% { transform: translateY(-55%) rotate(-10deg); }
}

.hero-content h1 {
    color: var(--brand-secondary) !important;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 204, 2, 0.5);
    font-weight: 800;
}

.hero-content p {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* ============================================
   ADVENT CALENDAR CARDS - TRADITIONAL WINDOWS
   ============================================ */
.calendario-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid transparent;
    border-radius: 12px;
    position: relative;
    overflow: visible;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.calendario-card::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 8px;
    background: var(--brand-secondary);
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -2px 5px rgba(255, 204, 2, 0.5);
}

.calendario-card::after {
    content: '🎄';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 20px;
    opacity: 0;
    transform: rotate(15deg);
    transition: all 0.3s ease;
}

.calendario-card:hover::after {
    opacity: 1;
    top: -10px;
    right: -10px;
}

/* Window frame effect */
.card-desbloqueado {
    background: linear-gradient(135deg, #ffffff 0%, #fff9e6 100%);
    border: 4px solid var(--brand-secondary);
    box-shadow: 
        0 0 20px rgba(255, 204, 2, 0.3),
        inset 0 0 10px rgba(255, 204, 2, 0.1),
        0 8px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    position: relative;
}

.card-desbloqueado::before {
    background: var(--brand-secondary);
    box-shadow: 0 -2px 10px rgba(255, 204, 2, 0.7);
}

/* Cross pattern inside the window */
.card-desbloqueado .card-body::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(52, 51, 68, 0.1);
}

.card-desbloqueado .card-body::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(52, 51, 68, 0.1);
}

.card-desbloqueado:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: var(--brand-secondary);
    box-shadow: 
        0 0 30px rgba(255, 204, 2, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Ornaments on corners */
.card-desbloqueado::after {
    content: '⭐';
    font-size: 24px;
    opacity: 1;
}

/* Completed cards */
.card-completado {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 4px solid var(--christmas-green);
    box-shadow: 
        0 0 20px rgba(22, 91, 51, 0.4),
        0 8px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.card-completado::before {
    background: var(--christmas-green);
}

.card-completado::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    color: var(--christmas-green);
    opacity: 0.15;
    font-weight: bold;
}

.card-completado .card-body {
    position: relative;
    z-index: 1;
}

/* Locked cards */
.card-bloqueado {
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    border: 3px solid #9e9e9e;
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.card-bloqueado::before {
    background: #9e9e9e;
}

.card-bloqueado::after {
    content: '🔒';
    font-size: 20px;
    opacity: 0.5;
}

/* Day number styling */
.dia-numero {
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--brand-primary);
    text-shadow: 2px 2px 4px rgba(52, 51, 68, 0.2);
    font-family: 'Georgia', serif;
}

.card-desbloqueado .dia-numero {
    color: var(--brand-secondary);
    text-shadow: 2px 2px 4px rgba(255, 204, 2, 0.3);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 2px 2px 4px rgba(255, 204, 2, 0.3); }
    50% { text-shadow: 0 0 15px rgba(255, 204, 2, 0.8), 2px 2px 4px rgba(255, 204, 2, 0.3); }
}

/* ============================================
   CHRISTMAS ORNAMENTS & DECORATIONS
   ============================================ */
.christmas-ornament {
    position: relative;
}

.christmas-ornament::before {
    content: '🎅';
    position: absolute;
    top: -15px;
    left: -15px;
    font-size: 30px;
    opacity: 0;
    transition: all 0.3s ease;
    animation: swing 3s ease-in-out infinite;
}

.christmas-ornament:hover::before {
    opacity: 1;
}

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

/* ============================================
   BUTTONS - FESTIVE STYLE
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #1a1a2e 100%);
    border: 2px solid var(--brand-secondary);
    color: var(--brand-secondary);
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(255, 204, 2, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 204, 2, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    border-color: var(--brand-secondary);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 204, 2, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, var(--christmas-green) 0%, #0d3d1f 100%);
    border: 2px solid var(--brand-secondary);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(22, 91, 51, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #0d3d1f 0%, var(--christmas-green) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(22, 91, 51, 0.5);
}

.btn-warning {
    background: linear-gradient(135deg, var(--brand-secondary) 0%, #e6b800 100%);
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 204, 2, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e6b800 0%, var(--brand-secondary) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 204, 2, 0.5);
}

/* ============================================
   CARDS - CHRISTMAS STYLE
   ============================================ */
.card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 204, 2, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, 
        var(--christmas-red) 0%, 
        var(--brand-secondary) 25%, 
        var(--christmas-green) 50%, 
        var(--brand-secondary) 75%, 
        var(--christmas-red) 100%);
}

.card-header {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #1a1a2e 100%);
    color: var(--brand-secondary);
    font-weight: 700;
    border-bottom: 3px solid var(--brand-secondary);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--brand-secondary);
}

/* ============================================
   BADGES - FESTIVE
   ============================================ */
.badge {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.badge.bg-success {
    background: linear-gradient(135deg, var(--christmas-green) 0%, #0d3d1f 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, var(--brand-secondary) 0%, #e6b800 100%) !important;
    color: var(--brand-primary) !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #1a1a2e 100%) !important;
    color: var(--brand-secondary) !important;
}

/* ============================================
   FOOTER - CHRISTMAS STYLE
   ============================================ */
footer {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #0f0f1e 100%);
    border-top: 4px solid var(--brand-secondary);
    position: relative;
}

footer::before {
    content: '🎄 🎁 ⭐ 🔔 🎅 ❄️ 🎄 🎁 ⭐ 🔔 🎅 ❄️';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 24px;
    opacity: 0.6;
}

footer a {
    color: var(--brand-secondary);
    transition: all 0.3s ease;
}

footer a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px var(--brand-secondary);
    transform: translateX(5px);
}

/* ============================================
   PROGRESS BAR - CHRISTMAS
   ============================================ */
.progress {
    background: rgba(52, 51, 68, 0.2);
    border: 2px solid var(--brand-secondary);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: linear-gradient(90deg, 
        var(--christmas-green) 0%, 
        var(--brand-secondary) 50%, 
        var(--christmas-green) 100%);
    box-shadow: 0 0 10px rgba(255, 204, 2, 0.5);
    animation: progress-glow 2s ease-in-out infinite;
}

@keyframes progress-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 204, 2, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 204, 2, 0.8); }
}

/* ============================================
   ALERTS - FESTIVE
   ============================================ */
.alert {
    border-radius: 12px;
    border: 2px solid;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        currentColor 50%, 
        transparent 100%);
    opacity: 0.5;
}

.alert-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: var(--christmas-green);
    color: var(--christmas-green);
}

.alert-warning {
    background: linear-gradient(135deg, #fff9e6 0%, #ffecb3 100%);
    border-color: var(--brand-secondary);
    color: var(--brand-primary);
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #1976d2;
    color: #0d47a1;
}

/* ============================================
   CHRISTMAS WREATHS
   ============================================ */
.christmas-wreath {
    position: fixed;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 15px solid var(--christmas-green);
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(22, 91, 51, 0.5);
    z-index: 999;
}

.christmas-wreath::before {
    content: '🎀';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
}

.wreath-top-left {
    top: 80px;
    left: 20px;
    animation: swing 4s ease-in-out infinite;
}

.wreath-top-right {
    top: 80px;
    right: 20px;
    animation: swing 4s ease-in-out infinite reverse;
}

/* ============================================
   GIFT BOX DECORATIONS
   ============================================ */
.gift-box {
    position: relative;
    display: inline-block;
}

.gift-box::before {
    content: '🎁';
    font-size: 60px;
    display: block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .christmas-lights {
        height: 40px;
    }
    
    .light {
        width: 8px;
        height: 12px;
    }
    
    .christmas-wreath {
        width: 80px;
        height: 80px;
        border-width: 10px;
    }
    
    .calendario-card .dia-numero {
        font-size: 2rem;
    }
    
    .hero-section::before,
    .hero-section::after {
        font-size: 100px;
    }
}

@media (max-width: 576px) {
    .christmas-lights {
        display: none;
    }
    
    .christmas-wreath {
        display: none;
    }
}

/* ============================================
   SPECIAL EFFECTS
   ============================================ */
.sparkle {
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(255, 204, 2, 0.5); 
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 204, 2, 0.9), 
                    0 0 60px rgba(255, 204, 2, 0.6); 
    }
}
