/* style.css */
:root {
    --bg-dark: #070e1f;
    --bg-darker: #070e1f;
    --text-light: #f8fafc;
    --text-silver: #cbd5e1;
    --accent-silver: #e2e8f0;
    --font-script: 'Great Vibes', cursive;
    --font-title: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* =======================================================
   RESET Y OCULTAMIENTO DE BARRA DE DESPLAZAMIENTO
   ======================================================= */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

/* Ocultar barra de desplazamiento visualmente */
::-webkit-scrollbar {
    display: none;
}

html, body {
    width: 100%;
    max-width: 100% !important;
    overflow-x: hidden !important; 
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    position: relative;
}

/* Envolvemos estrictamente todas las secciones */
section, .hero, .section-dark, .section-light {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    position: relative;
}

.container {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
    position: relative;
    z-index: 2;
}

/* Utilidades de texto y margen */
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Tipografía Principal */
.section-title {
    font-family: var(--font-title);
    font-size: 1.8rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    color: var(--accent-silver);
}

.script-title {
    font-family: var(--font-script);
    font-size: 3.5rem;
    text-transform: none;
    letter-spacing: normal;
}

/* --- MÚSICA DE FONDO --- */
.music-btn {
    position: fixed;
    bottom: 110px;  /* Cambiamos 'top' por 'bottom' */
    right: 20px;   /* Cambiamos 'left' por 'right' */
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 10px 18px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    animation: pulse 2s infinite;
}
.music-btn:hover { background: rgba(255,255,255,0.3); transform: scale(1.05); }
.music-btn.playing { animation: none; background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.1); }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* --- DECORACIÓN FLORAL --- */
.floral-decor {
    position: absolute;
    width: 200px;
    height: 200px;
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.8;
    z-index: 1;
    filter: drop-shadow(0px 5px 5px rgba(0,0,0,0.5));
}
.floral-top-left {
    top: -20px;
    left: -30px;
    background-image: url('assets/img/follaje-blanco.png');
    transform: rotate(-15deg);
}
.floral-bottom-right {
    bottom: -20px;
    right: -30px;
    background-image: url('assets/img/follaje-blanco.png');
    transform: rotate(165deg);
}

/* --- HERO SECTION (PORTADA) --- */
.hero {
    min-height: 100vh;
    min-height: 100svh; /* <--- Truco Senior: Altura dinámica perfecta para celulares */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Le agregamos un pequeño scale(1.05) al fondo para que sea 5% más grande */
    background: url('assets/img/hero.jpg') center center / cover no-repeat;
    transform-style: preserve-3d;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(11,15,25,0.1) 0%, rgba(11,15,25,0.6) 60%, var(--bg-darker) 100%);
    z-index: 1;
}

.hero-content { 
    position: relative; 
    z-index: 2; 
    width: 100%; 
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.credits-top {
    font-family: var(--font-body);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    opacity: 0.4;
    margin-bottom: 30px;
    color: var(--text-light);
}

.fecha-top { 
    font-family: var(--font-title); 
    letter-spacing: 6px; 
    margin-bottom: 10px; 
    font-size: 0.9rem;
    text-transform: uppercase;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

.festejada-nombre { 
    font-family: var(--font-script); 
    font-size: 4rem;
    color: #ffffff;
    text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.8), 0px 2px 5px rgba(0,0,0,0.5); 
    margin-bottom: 50px; 
    line-height: 1.1;
}

/* Botón Circular Detalles */
.detalles-btn-container {
    position: relative;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.corona-icon { 
    font-size: 1.8rem; 
    margin-bottom: -18px; 
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: relative;
    z-index: 3;
}

.btn-detalles {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(11, 15, 25, 0.4);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.8);
    outline: 1px solid rgba(255,255,255,0.3);
    outline-offset: 4px;
    color: white;
    text-decoration: none;
    font-family: var(--font-script);
    font-size: 2.2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), inset 0 0 15px rgba(255,255,255,0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-detalles:hover { 
    transform: scale(1.08); 
    background: rgba(11, 15, 25, 0.6);
}

.btn-detalles small { 
    font-family: var(--font-body); 
    font-size: 0.65rem; 
    letter-spacing: 2px;
    margin-top: 5px;
    text-transform: uppercase;
    opacity: 0.8;
}

.subtitulo {
    margin-top: 1.5rem;
    text-align: center;
}

/* --- SECCIONES GENERALES --- */
.section-dark {
    background-color: var(--bg-darker);
    padding: 80px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.section-light { 
    background-color: #f1f5f9; 
    padding: 80px 0; 
    color: #333;
}
.text-dark { color: #1e293b !important; }

/* Textos Generales */
.frase-principal { 
    font-size: 1.1rem; 
    line-height: 1.8; 
    margin-bottom: 40px; 
    font-style: italic; 
    color: var(--text-silver); 
}
.nombres-padres { 
    font-family: var(--font-title); 
    font-size: 1.2rem; 
    margin-bottom: 5px; 
    letter-spacing: 1px; 
}
.mensaje-padres { 
    margin-top: 20px; 
    font-size: 0.9rem; 
    color: white !important;
    font-style: italic; 
}
.lumen { 
    margin-top: 20px; 
    font-size: 0.9rem; 
    color: var(--text-silver); 
    font-style: italic; 
}
.text-box { 
    background: rgba(255,255,255,0.03); 
    border-left: 2px solid var(--accent-silver); 
    border-right: 2px solid var(--accent-silver); 
    padding: 15px; 
    font-size: 0.9rem; 
    line-height: 1.6; 
    color: var(--text-silver); 
}

/* --- COMPONENTES (Glassmorphism y Botones) --- */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}
.shadow-lg { box-shadow: 0 10px 25px rgba(0,0,0,0.1); }

.btn-outline {
    display: inline-block; padding: 10px 25px; border: 1px solid var(--accent-silver);
    color: var(--text-light); text-decoration: none; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; transition: all 0.3s ease;
}
.btn-solid {
    display: inline-block; padding: 12px 35px; background-color: var(--text-light);
    color: var(--bg-dark); text-decoration: none; font-family: var(--font-title); font-weight: 600; border-radius: 5px; transition: transform 0.3s ease;
}
.btn-solid:hover, .btn-outline:hover { background-color: var(--accent-silver); color: var(--bg-darker); }

/* --- UBICACIONES GRID --- */
.locations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
}
.location-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.card-body { padding: 20px; text-align: center; }
.card-body h3 { font-family: var(--font-title); font-size: 1.2rem; margin-bottom: 15px; }


/* --- COUNTDOWN (Cuenta Regresiva) --- */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}
.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 5px;
    min-width: 70px;
}
.time-box span { font-family: var(--font-title); font-size: 2rem; margin-bottom: 5px; }
.time-box small { font-size: 0.6rem; letter-spacing: 1px; }

/* --- PIE DE PÁGINA (LUMEN STUDIO) --- */
.main-footer {
    background-color: var(--bg-darker);
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-silver);
}
.main-footer p {
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
}
.social-links { display: flex; justify-content: center; gap: 25px; }
.social-links a {
    color: var(--text-silver);
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.social-links a:hover {
    color: #ffffff;
    transform: translateY(-4px);
    text-shadow: 0 0 10px rgba(255,255,255,0.4);
}

/* =======================================================
   ANIMACIONES EXTRAS Y SWIPER JS
   ======================================================= */

/* Botón flotante continuo */
@keyframes floatAnimation {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}
.floating-btn {
    animation: floatAnimation 3.5s ease-in-out infinite;
}

/* Ajustes Premium para Swiper Carrusel */
/* Ajustes Premium para Swiper Carrusel */
.swiper {
    width: 100%;
    padding-top: 30px;
    padding-bottom: 50px;
    overflow: visible; /* Agregamos esta línea */
}

.swiper-slide {
    background-position: center;
    background-size: cover;
    width: 300px;
    height: 450px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-button-next, .swiper-button-prev {
    color: var(--accent-silver) !important;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}
.swiper-pagination-bullet {
    background: var(--text-silver) !important;
}
.swiper-pagination-bullet-active {
    background: #ffffff !important;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}


/* =======================================================
   ADAPTACIÓN PARA COMPUTADORAS (ESCRITORIO)
   ======================================================= */
@media (min-width: 1024px) {
    .festejada-nombre { font-size: 5rem; }
    .locations-grid { grid-template-columns: 1fr 1fr; }
    
    .container { max-width: 900px; }
    .frase-principal { font-size: 1.4rem; max-width: 85%; margin: 0 auto 40px auto; line-height: 2; }
    .floral-decor { width: 300px; height: 300px; }
    
    .swiper-slide {
        width: 400px;
        height: 600px;
    }
    
    .countdown-container { gap: 30px; }
    .time-box { min-width: 100px; padding: 20px; }
}


/* =======================================================
   OPTIMIZACIÓN ESTRICTA PARA MÓVILES (CELULARES)
   ======================================================= */
@media (max-width: 767px) {
    .festejada-nombre { font-size: 2.5rem; margin-bottom: 30px; }
    .floral-decor { width: 120px; height: 120px; }
    
    .frase-principal {
        font-size: 1rem;
        width: 100%;
        margin-bottom: 25px;
        line-height: 1.5;
    }
    .nombres-padres { font-size: 1.1rem; }
    .section-title { font-size: 1.4rem; }
    
    /* Carrusel móvil */
    .swiper-slide {
        width: 280px;
        height: 420px; 
    }
    
    .location-card img { height: 180px; }
    .time-box span { font-size: 1.5rem; }
    .countdown-container { gap: 10px; }



    /* =======================================================
   ANIMACIÓN DE MARIPOSAS (WEBP Animado)
   ======================================================= */
/* =======================================================
   ANIMACIÓN DE MARIPOSAS (Vuelo + Aleteo 3D)
   ======================================================= */
/* El contenedor que controla la dirección y la altura */
.mariposa-wrapper {
    position: fixed;
    pointer-events: none;
    z-index: 998;
    /* La animación base, las variables se inyectan desde JS */
    animation: volarRandom linear forwards;
}

/* La imagen de la mariposa que controla el aleteo */
.mariposa-animada {
    width: 100%;
    height: 100%;
    background-image: url('assets/img/mariposa.png'); /* Puedes usar el PNG o el WebP */
    background-size: contain;
    background-repeat: no-repeat;
    /* Animación de aleteo simulando 3D */
    animation: aleteo 0.2s infinite alternate ease-in-out;
}

/* Simula el aleteo aplastando la imagen horizontalmente (scaleX) y girándola un poco */
@keyframes aleteo {
    0% { transform: scaleX(1) rotate(-15deg); }
    100% { transform: scaleX(0.1) rotate(15deg); }
}

/* Vuelo con trayectorias curvas generadas por variables CSS */
@keyframes volarRandom {
    0% {
        transform: translate(0, 0) scale(0.4);
        opacity: 0;
    }
    15% { opacity: 0.8; }
    50% {
        /* Punto intermedio del vuelo (hace que curve) */
        transform: translate(var(--mid-x), var(--mid-y)) scale(1.2);
    }
    85% { opacity: 0.8; }
    100% {
        /* Destino final */
        transform: translate(var(--end-x), var(--end-y)) scale(0.6);
        opacity: 0;
    }
}

/* Forzamos a que las tarjetas e imágenes nunca generen scroll propio */
.glass-card, 
.location-card, 
.card-body,
.confirmacion-box,
.icons-container,
.text-box {
    overflow: hidden !important;
}

/* El contenedor del swiper a veces genera un mini scroll horizontal si las imágenes no cargan rápido */
.swiper-slide {
    overflow: hidden !important;
    touch-action: pan-y; /* Le dice al celular que priorice el scroll vertical de la página */
}

/* Corrección para la sección de las locaciones si se desborda en pantallas pequeñas */
.locations-grid {
    overflow: hidden !important;
}
}