/* --- CONFIGURACIÓN GLOBAL Y FIX DE BOX-SIZING --- */
*,
*::before,
*::after {
    box-sizing: border-box; /* FIX: Aplicado globalmente para un layout predecible */
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 20px 0;
    background-color: #f4f0ed;
    font-family: 'Playfair Display', serif;
    color: #5d4037;
}

.card-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.rsvp-section {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    margin-top: 30px;
}

.invitation-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
}

/* --- DECORACIONES --- */
.deco-rose-top {
    position: absolute;
    top: -20px;
    right: -30px;
    width: 220px;
    z-index: 2;
}

.deco-rose-bottom {
    position: absolute;
    bottom: -25px;
    left: -40px;
    width: 250px;
    z-index: 2;
}

.deco-girl {
    position: absolute;
    bottom: 0;
    right: 0px;
    width: 200px;
    z-index: 1;
}

.decorative-border-top-left {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100px;
    height: 60px;
    border-top: 2px solid #c8a465;
    border-left: 2px solid #c8a465;
}

.decorative-border-top-left::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 100px;
    width: 10px;
    height: 10px;
    background-color: #c8a465;
    border-radius: 50%;
}

/* --- ESTILOS PARA LAS MARIPOSAS --- */
.butterflies {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.animated-butterflies-gif {
    position: absolute;
    top: 28%; /* CAMBIO: Bajamos del 10% al 28% para que vuelen sobre la corona */
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 300px;
    z-index: 3; 
    opacity: 0.9;
}

/* --- CONTENIDO DE LA INVITACIÓN --- */
.invitation-content {
    position: relative;
    z-index: 5;
}

.join-us {
    font-size: 1em;
    color: #82220c;
    letter-spacing: 2px;
    margin: 0;
}

.tiara {
    width: 200px;
    margin: 10px auto;
}


h1.quince-title,
h2.quince-title {
    font-size: 48px;
    margin: 0;
    font-weight: 400;
}


.quince-title {
    font-family: 'Pinyon Script', cursive;
    font-size: 5.5em;
    color: #8c1c33;
    margin: -15px 0 0 0;
    font-weight: 400;
}

.honoring-text {
    font-style: italic;
    font-size: 1.2em;
    margin: 20px 0 5px 0;
}

.honoree-name {
    font-family: 'Pinyon Script', cursive;
    font-size: 3.5em;
    color: #8c1c33;
    margin: 0;
    font-weight: 400;
}

.divider {
    width: 80%;
    margin: 25px auto;
    border-bottom: 1px solid #e0c9a6;
}

.event-details {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 0.9em;
    letter-spacing: 1px;
}

.detail-item {
    padding: 5px;
}

.date-circle {
    border: 2px solid #c8a465;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #8c1c33;
}

.hosted-by {
    font-style: italic;
    font-size: 1.2em; /* Un poco más grande para legibilidad */
    text-align: left;
    
    /* CAMBIOS PARA QUE RESALTE: */
    position: relative;
    z-index: 10; /* Asegura que quede encima de las rosas */
    background-color: rgba(255, 255, 255, 0.85); /* Fondo blanco semitransparente */
    padding: 10px 15px; /* Espacio interno */
    border-radius: 10px; /* Bordes redondeados */
    margin-top: 30px; /* Separación de la sección anterior */
    display: inline-block; /* Para que el fondo se ajuste al texto */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Sombra sutil para levantar el texto */
}

.rsvp-info {
    margin-top: 25px;
    line-height: 1.5;
    font-size: 0.9em;
}

.rsvp-info p {
    margin: 0;
}

/* --- HORARIOS (MISA Y RECEPCIÓN) --- */
.schedule-details {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin: 25px 0;
    gap: 20px;
}



/* --- FIX DE LEGIBILIDAD (VERSIÓN RECOMENDADA CON RESPLANDOR) --- */

/* Seleccionamos el segundo 'schedule-item' (el de la Recepción) */
.schedule-item {
    /* Creamos un fondo de gradiente radial que es blanco en el centro y se desvanece */
    background: radial-gradient(ellipse at center, 
        rgba(255, 255, 255, 0.85) 0%,  /* Blanco casi opaco en el centro */
        rgba(255, 255, 255, 0) 70%    /* Totalmente transparente hacia los bordes */
    );
    border-radius: 15px; /* Suaviza los bordes del área del resplandor */
    padding: 10px 5px; /* Añade un poco de espacio para que el resplandor respire */
    width: 45%;
}

.schedule-item h4 {
    font-family: 'Pinyon Script', cursive;
    font-size: 2em;
    color: #8c1c33;
    margin: 0 0 5px 0;
    font-weight: 400;
}

.schedule-item p {
    margin: 4px 0;
    line-height: 1.4;
    font-size: 0.9em;
}

.schedule-item .address {
    font-size: 0.85em;
    color: #777;
}

/* --- CONTADOR --- */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}
.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #8c1c33;
}
.countdown-item span:first-child {
    font-size: 2.5em;
    font-weight: bold;
    line-height: 1;
}
.countdown-item span:last-child {
    font-size: 0.8em;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #a17c4a;
}
.event-today {
    font-family: 'Pinyon Script', cursive;
    font-size: 2.5em;
    color: #8c1c33;
    padding: 15px 0;
}

/* --- SECCIONES EXTERNAS (MAPA, REGALOS, RSVP) --- */
.map-and-link-section, .gifts-section {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    margin-top: 30px;
}

.map-container, .gifts-card, .rsvp-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    border-radius: 8px;
}

.map-and-link-section h3, .gifts-card h3, .rsvp-card h2 {
    font-family: 'Pinyon Script', cursive;
    font-size: 2.5em;
    color: #8c1c33;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 400;
}

/* --- DETALLES PARA SECCIÓN DE MAPA --- */
.map-container iframe {
    width: 100%;
    height: 300px;
    border: 0;
    border-radius: 8px;
    display: block; /* Elimina espacio extra debajo del iframe */
    margin-bottom: 15px;
}

.google-maps-link {
    font-size: 1em;
    margin-top: 0;
}

.google-maps-link a {
    color: #c8a465;
    text-decoration: none;
    font-weight: bold;
}

.google-maps-link a:hover {
    text-decoration: underline;
}

/* --- DETALLES PARA SECCIÓN MESA DE REGALOS --- */
.gifts-card p {
    font-size: 1em;
    color: #5d4037;
    margin-bottom: 20px;
}

.store-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.store-logos img {
    max-width: 150px;
    height: auto;
    opacity: 0.8;
}

.gift-alternative {
    font-style: italic;
    font-size: 0.9em;
    color: #666;
    margin-top: 25px;
}

/* --- DETALLES PARA SECCIÓN RSVP Y FORMULARIO --- */
.rsvp-card p {
    font-size: 1.1em;
    color: #5d4037;
    margin-bottom: 25px;
}

/* --- FORMULARIO RSVP --- */
.rsvp-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95em;
    font-weight: bold;
    color: #5d4037;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%; /* Simplificado gracias a box-sizing */
    padding: 10px;
    border: 1px solid #e0c9a6;
    border-radius: 5px;
    font-family: 'Playfair Display', serif;
    font-size: 1em;
    color: #5d4037;
    background-color: #fcf8f6;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #c8a465;
    outline: none;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #888;
}

.submit-button {
    background-color: #8c1c33;
    color: #ffffff;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.submit-button:hover {
    background-color: #a1304b;
}

/* --- GUESTBOOK --- */
.guestbook-container {
    display: none;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    margin-top: 30px;
}
.guestbook-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 30px;
    border-radius: 8px;
}
.messages-feed {
    height: 300px;
    overflow: hidden;
    position: relative;
    border-top: 1px solid #e0c9a6;
    padding-top: 15px;
}
.message-item {
    position: absolute;
    bottom: 0;
    left: 10px;
    right: 10px;
    background: rgba(252, 248, 246, 0.9);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e0c9a6;
    text-align: left;
    animation: scrollUp 10s linear forwards;
}
@keyframes scrollUp {
    from { transform: translateY(100%); opacity: 1; }
    90% { opacity: 1; }
    to { transform: translateY(-350px); opacity: 0; }
}

/* --- PANTALLA DE BIENVENIDA Y MÚSICA --- */
#enter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* FIX: Usar vw/vh para cubrir toda la pantalla de forma robusta */
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
    opacity: 1;
}

.welcome-popup {
    text-align: center;
    padding: 30px;
}

.welcome-popup .welcome-title {
    font-family: 'Pinyon Script', cursive;
    font-size: 5em;
    color: #8c1c33;
    margin: 0;
    font-weight: 400;
}

.welcome-popup p {
    font-size: 1.2em;
    color: #a17c4a;
    letter-spacing: 2px;
    margin: -10px 0 30px 0;
}

.enter-choices {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

#enter-button {
    background-color: #8c1c33;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-family: 'Playfair Display', serif;
    font-size: 1em;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 200px;
}

#enter-with-music:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

#enter-without-music {
    background: none;
    border: none;
    color: #a17c4a;
    font-family: 'Playfair Display', serif;
    font-size: 0.9em;
    cursor: pointer;
    padding: 5px;
}

#enter-without-music:hover {
    text-decoration: underline;
}

#music-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #8c1c33;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#music-toggle:hover {
    transform: scale(1.1);
}

#music-toggle.hidden {
    opacity: 0;
    pointer-events: none;
}

#music-toggle .icon-sound-on { display: block; }
#music-toggle .icon-sound-off { display: none; }
#music-toggle.muted .icon-sound-on { display: none; }
#music-toggle.muted .icon-sound-off { display: block; }
#music-toggle svg { width: 24px; height: 24px; }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 480px) {
    .invitation-card {
        padding: 30px 15px;
    }
    .quince-title {
        font-size: 4em;
    }
    .honoree-name {
        font-size: 2.8em;
    }
    .deco-rose-top {
        width: 150px;
        right: -20px;
    }
    .deco-rose-bottom {
        width: 180px;
        left: -30px;
    }
    .deco-girl {
        width: 150px;
        opacity: 0.8;
    }
    .schedule-details {
        flex-direction: column; /* Apila Misa y Recepción en móvil */
    }
    .schedule-item {
        width: 100%; /* Ocupan todo el ancho en móvil */
    }
}

/* --- ESTILOS ACTUALIZADOS PARA EL ENCABEZADO --- */

.parents-names {
    /* CAMBIO CLAVE: Usamos la fuente Pinyon Script */
    font-family: 'Pinyon Script', cursive; 
    
    /* TAMAÑO: Danna tiene 5.5em, aquí usamos 3.2em para que sea menor pero legible */
    font-size: 2.0em; 
    
    /* ESTILO: Quitamos negrita (700) porque esta fuente ya es gruesa por defecto */
    font-weight: 350; 
    
    color: #8c1c33;
    line-height: 1.2; /* Altura de línea ajustada para que los nombres no se separen tanto */
    
    /* Alineación */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.and-symbol {
    /* Ajustamos la 'y' para que fluya bien con los nombres */
    font-size: 0.7em; 
    color: #c8a465; /* Dorado */
    margin: 2px 0;
}

.invite-text {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 1.2em;
    letter-spacing: 1px;
}

/* --- CÓDIGO DE VESTIMENTA --- */
.dress-code-section {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    margin-top: 30px; /* Para separarlo de la sección anterior */
}

.dress-code-card {
    /* Mismos estilos que .gifts-card y .map-container */
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    border-radius: 8px;
}

.dress-code-card h3 {
    /* Mismos estilos que los títulos de sección (Pinyon Script, color vino) */
    font-family: 'Pinyon Script', cursive;
    font-size: 2.5em;
    color: #8c1c33;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 400;
}

.dress-code-instruction {
    font-size: 1.1em;
    color: #5d4037;
    margin-bottom: 15px;
}

.dress-code-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    border: 1px dashed #e0c9a6;
    border-radius: 5px;
}

.dress-code-icon {
    /* Estilo para la imagen de etiqueta */
    width: 60px; 
    height: auto;
    opacity: 0.9;
}

.dress-code-details p {
    font-size: 1em;
    text-align: left;
    margin: 0;
    line-height: 1.6;
    color: #5d4037;
}

.dress-code-details span {
    font-weight: normal; /* Asegura que el detalle de hombre/mujer no se vea negrita si p ya lo tiene */
}

.dress-code-note {
    font-style: italic;
    font-size: 0.95em;
    color: #a17c4a; /* Color dorado/café para la nota */
    margin-top: 15px;
}

/* --- ESTILO BOTÓN MESA DE REGALOS --- */
.registry-action {
    margin-top: 20px;
}

.registry-button {
    display: inline-block;
    background-color: #8c1c33; /* Mismo color vino que el resto */
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 50px; /* Bordes redondeados elegantes */
    text-decoration: none; /* Quita el subrayado */
    font-family: 'Playfair Display', serif;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.registry-button:hover {
    background-color: #a1304b;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
}