/* ===================================================
   MODELO INVITACIÓN: WINTER BLUE (ENRIQUECIDO)
   =================================================== */

/* 1. VARIABLES Y RESET */
:root {
    --color-primary: #002b59;       /* Azul Oscuro Noche */
    --color-secondary: #00ced1;     /* Aguamarina */
    --color-accent: #b0e0e6;        /* Azul Hielo */
    --color-bg-light: #f0f8ff;      /* Alice Blue */
    --color-white: #ffffff;
    --color-text: #2c3e50;
    
    --font-body: 'Poppins', sans-serif;
    --font-title: 'Great Vibes', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-bg-light);
    /* Fondo degradado invernal suave */
    background-image: linear-gradient(to bottom, #e6f7ff 0%, #ffffff 50%, #e6f7ff 100%);
    min-height: 100vh;
    overflow-x: hidden; /* Evitar scroll horizontal por animaciones */
    position: relative;
    padding-bottom: 100px; /* Espacio para los árboles del pie */
}

/* 2. TIPOGRAFÍA */
.font-cursive { font-family: var(--font-title); font-weight: 400; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }

/* 3. ESTRUCTURA PRINCIPAL */
.container {
    max-width: 650px;
    margin: 0 auto;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.85); /* Fondo semitransparente para ver el fondo global */
    box-shadow: 0 0 20px rgba(0, 43, 89, 0.1);
    position: relative;
    z-index: 10; /* Por encima del fondo, por debajo de modales */
    margin-bottom: -50px; /* Fusionar con el footer */
}

.section {
    padding: 40px 0;
    position: relative;
}

.section-title {
    font-size: 2.5em;
    color: var(--color-primary);
    margin-bottom: 15px;
    font-family: var(--font-title);
    text-shadow: 2px 2px 4px rgba(0, 206, 209, 0.2);
}

/* 4. DECORACIONES FIJAS (HIELO Y ÁRBOLES) */

/* Hielo en el tope (Fixed o Absolute al inicio) */
.ice-top-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    pointer-events: none; /* Permitir clicks a través de la imagen */
}

.ice-top-decoration img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    object-position: top;
    opacity: 0.9;
}

/* Árboles en el pie de página */
.footer-trees-decoration {
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 5;
    margin-top: -50px; /* Superponer ligeramente */
    pointer-events: none;
}

.footer-trees-decoration img {
    width: 100%;
    display: block;
}

/* 5. ANIMACIÓN DE ESCARCHA FLOTANTE */
.falling-snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50; /* Sobre todo el contenido */
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10%;
    width: 30px; /* Tamaño base, se puede variar en HTML */
    opacity: 0.6;
    animation-name: fall, sway;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
}

@keyframes fall {
    0% { top: -10%; }
    100% { top: 110%; }
}

@keyframes sway {
    0% { transform: translateX(0px) rotate(0deg); }
    50% { transform: translateX(50px) rotate(180deg); }
    100% { transform: translateX(0px) rotate(360deg); }
}

/* 6. HERO / ENCABEZADO */
.hero {
    position: relative;
    margin: 0 -20px;
    background-color: #002b59; /* Fondo de carga */
}

.hero-img {
    width: 100%;
    display: block;
    border-bottom: 5px solid var(--color-secondary);
}

/* 7. ELEMENTOS INTERNOS (OSOS, ETC) */
.polar-bear-decoration {
    display: block;
    margin: 20px auto;
    max-width: 150px; /* Ajusta según el tamaño deseado */
    height: auto;
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.1));
}

.collage-container {
    background: white;
    padding: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: rotate(2deg);
    margin: 20px 0;
}

.collage-container img {
    width: 100%;
    display: block;
}

/* 8. CONTADORES Y BADGES */
.countdown-box {
    background: white;
    padding: 15px;
    margin: -30px 20px 30px 20px; /* Flotando sobre el hero */
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    position: relative;
    z-index: 15;
    border: 1px solid var(--color-secondary);
}

#timer {
    display: flex;
    justify-content: space-around;
    font-size: 1.2em;
    color: var(--color-primary);
    font-weight: 700;
}

#timer span.label {
    display: block;
    font-size: 0.5em;
    font-weight: 400;
    color: #888;
}

/* 9. BOTONES */
.btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}
.btn-primary {
    background: var(--color-primary);
    color: white;
}
.btn-primary:hover { background: #004080; }
.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

/* 10. MODALES */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,43,89,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
}
.close-modal {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 24px;
    cursor: pointer;
}