/* ===================================================
   MODELO INVITACIÓN: MARIPOSAS MÁGICAS (ENRIQUECIDO)
   =================================================== */

/* 1. VARIABLES Y RESET */
:root {
    /* PALETA DE COLORES MARIPOSAS */
    --color-primary: #8e44ad;       /* Púrpura Real */
    --color-secondary: #d2b4de;     /* Lila Suave */
    --color-accent: #f4d03f;        /* Dorado Mágico */
    --color-bg-light: #fdf2f9;      /* Fondo Rosado Muy Pálido */
    --color-white: #ffffff;
    --color-text: #5b2c6f;          /* Texto Morado Oscuro */
    
    /* FUENTES */
    --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 con degradado suave */
    background-image: linear-gradient(135deg, #fdf2f9 0%, #e8daef 100%);
    min-height: 100vh;
    overflow-x: hidden; /* Evitar scroll horizontal */
    position: relative;
    padding-bottom: 80px; /* Espacio para decoración inferior */
}

/* 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 */
.container {
    max-width: 650px; 
    margin: 0 auto;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.9); /* Fondo blanco semitransparente */
    min-height: 100vh;
    box-shadow: 0 0 25px rgba(142, 68, 173, 0.15);
    border-left: 1px solid white;
    border-right: 1px solid white;
    position: relative;
    z-index: 10;
    margin-bottom: -40px; /* Integración con el footer */
}

.section {
    padding: 50px 0;
    position: relative;
}

/* Decoración sutil entre secciones */
.section::after {
    content: '🦋';
    display: block;
    text-align: center;
    font-size: 1.5em;
    color: var(--color-secondary);
    opacity: 0.5;
    margin-top: 30px;
}

.section-title {
    font-size: 2.5em;
    color: var(--color-primary);
    margin-bottom: 15px;
    font-family: var(--font-title);
    text-shadow: 2px 2px 0px rgba(244, 208, 63, 0.2);
}

/* 4. DECORACIONES FLOTANTES Y FIJAS */

/* Mariposa Esquina Superior Izquierda */
.butterfly-corner-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px; /* Ajusta tamaño según necesidad */
    z-index: 20;
    pointer-events: none;
}

.butterfly-corner-decoration img {
    width: 100%;
    display: block;
}

/* Animación de Mariposas Flotantes (GIFs) */
.floating-butterflies-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50; /* Sobre todo */
    overflow: hidden;
}

/* Mariposa Flotante (Ajustada más pequeña y movimiento por toda la pantalla) */
.floating-butterfly {
    position: absolute;
    width: 25px; /* Tamaño más pequeño y delicado */
    opacity: 0.8;
    animation: floatAllOver 25s linear infinite; /* Animación más lenta y amplia */
}

@keyframes floatAllOver {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    20% { transform: translate(100px, 150px) rotate(45deg) scale(1.1); }
    40% { transform: translate(-50px, 300px) rotate(90deg) scale(1); }
    60% { transform: translate(150px, 500px) rotate(135deg) scale(1.2); }
    80% { transform: translate(-100px, 700px) rotate(180deg) scale(1); }
    100% { transform: translate(50px, 900px) rotate(225deg) scale(0.9); opacity: 0; }
}

/* Mariposas en Flor (Decoración Estratégica) */
.flower-butterflies-decoration {
    display: block;
    margin: 20px auto;
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 5px 10px rgba(142, 68, 173, 0.2));
    transition: transform 0.3s ease;
}

.flower-butterflies-decoration:hover {
    transform: scale(1.05) rotate(2deg);
}

/* Pie de Página Animado */
.footer-butterflies-decoration {
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 5;
    margin-top: -40px; /* Superposición ligera */
    pointer-events: none;
    text-align: center; /* Centrar imagen si no ocupa 100% */
}

.footer-butterflies-decoration img {
    width: 100%;
    max-width: 800px; /* Limitar ancho en pantallas grandes */
    display: block;
    margin: 0 auto;
}


/* 5. HERO / ENCABEZADO */
.hero {
    position: relative;
    height: 60vh; 
    display: flex;
    justify-content: center;
    align-items: flex-end; 
    text-align: center;
    color: var(--color-white);
    margin: 0 -20px;
    overflow: hidden;
    background-color: var(--color-secondary); 
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(91, 44, 111, 0.2) 60%, rgba(91, 44, 111, 0.8) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 40px 20px;
    width: 100%;
}

.hero-content h1 {
    font-size: 4em;
    line-height: 0.9;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    color: white;
}

.hero-content h2 {
    font-size: 1.2em;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 5px;
    font-weight: 600;
}

/* 6. CUENTA REGRESIVA ESTILO ROMÁNTICO */
.countdown-box {
    margin-top: -30px;
    background: white;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(142, 68, 173, 0.2);
    position: relative;
    z-index: 4;
    border: 2px solid var(--color-accent);
    margin-bottom: 40px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

#timer {
    display: flex;
    justify-content: space-around;
    font-size: 1.4em;
    color: var(--color-primary);
    font-weight: 700;
}

#timer div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#timer span {
    font-size: 0.45em;
    text-transform: uppercase;
    color: #999;
    font-weight: 400;
    margin-top: -5px;
}

/* 7. CONTENIDO GENERAL */
.mensaje-bienvenida {
    font-style: italic;
    color: #666;
    margin: 20px 0;
    font-size: 1.05em;
    padding: 0 15px;
    border-left: 3px solid var(--color-secondary);
}

.invitado-badge {
    background: linear-gradient(to right, var(--color-secondary), #ebdef0);
    color: var(--color-text);
    padding: 8px 30px;
    border-radius: 50px 0 50px 0; /* Forma de hoja/ala */
    font-weight: 700;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.info-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin: 20px 10px;
    text-align: center;
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(142, 68, 173, 0.05);
    transition: transform 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-secondary);
}

.info-card i {
    font-size: 2em;
    color: var(--color-primary);
    margin-bottom: 10px;
    display: block;
}

/* 8. BOTONES ESTILO HADA */
.btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 15px 0;
    border: none;
    border-radius: 15px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #9b59b6);
    color: white;
    box-shadow: 0 5px 15px rgba(142, 68, 173, 0.3);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(142, 68, 173, 0.4);
}

/* Efecto brillo */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
}
.btn-primary:hover::after { left: 100%; }

.btn-secondary {
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-secondary);
}
.btn-secondary:hover {
    background: var(--color-bg-light);
}

/* 9. GALERÍA */
.collage-container {
    padding: 10px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: rotate(-2deg); 
    margin-bottom: 30px;
}
.collage-img {
    width: 100%;
    border-radius: 10px;
}

/* 10. MODALES */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(91, 44, 111, 0.9);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: zoomIn 0.3s ease;
    border: 4px solid var(--color-secondary);
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: var(--color-primary);
}