/* VARIABLES Y PALETA DE COLORES */
:root {
    --naranja: #5FB49C;
    --crema: #FFFFFF;
    --texto: #2C3E50;
    --blanco: #FFFFFF;
    --borde: #98DFAF;
}

/* RESET BÁSICO */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* =========================
   LIMPIEZA DE FUENTES Y BODY
========================= */
body {
    background-color: #FFFFFF;
    font-family: 'Sen', sans-serif;
    color: var(--texto);
    line-height: 1.6;
    text-align: center;
    -webkit-font-smoothing: antialiased;
    padding-left: 20px;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

input, textarea, select, button, p, .timeline__desc, .card__text, .iban-box {
    font-family: 'Sen', sans-serif;
}

h1, h2, .date, .titulos-card, #location-title, #travel-title, #gift-title, .card__title, .timeline__title {
    font-family: "Reenie Beanie", cursive;
    font-weight: 400;
    letter-spacing: 1px;
}

h2, .titulos-card {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--texto);
    margin-right: 30px;
    margin-left: 30px;
}

.puestos {
    margin-top: 20%;
    margin-bottom: 10%;
}

.bienvenida {
    line-height: 30px;
    padding: 20px;
    color: var(--blanco);
}

/* SECCIONES CONTENEDORAS */
/* Modificado para unificar márgenes laterales al 90% en móvil */
.section-container {
    padding: 30px 20px; 
    width: 90%; 
    max-width: 500px;
    margin: 0 auto 30px auto; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: 15px; 
    box-sizing: border-box; 
}

/* HERO SECTION */
.hero {
    padding-top: 20px;
}

.hero-content {
    padding: 30px;
    margin-bottom: 10px;
    max-width: 250px;
    margin: auto;
    width: 100%; 
    margin-top: 40px;
}

.fotomaton {
    width: 80%;
    max-width: 300px;
    margin-bottom: 20px;
}

h1 {
    font-size: 3.4rem;
    color: var(--naranja);
    margin-bottom: 0px;
    line-height: 40px;
    text-transform: uppercase;
    width: 100%;
    text-align: justify;
    text-align-last: justify;
}

.date {
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* =========================
   SELECTOR DE IDIOMA Y BOTONES
========================= */
.language-picker {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 10;
}

.language-picker button {
    background: none;
    border: none;
    font-family: 'Sen', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--naranja);
    opacity: 0.4;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

#countdown {
    font-family: 'Sen', sans-serif;
    color: var(--texto);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30%;
}

#logged-hero-info {
    padding: 0 20px;
    margin-bottom: 40px;
}

/* Estilo cuando el idioma está seleccionado */
.language-picker button.active {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
    transform: scale(1.1);
}

.text-justified {
    font-size: 1rem;
    text-align: justify;
    line-height: 1.8;
}

.search-box {
    margin-top: 40px;
    padding-left: 10%;
    padding-right: 10%;
}

input[type="text"], textarea, select {
    width: 100%;
    padding: 15px;
    border: 1.5px solid var(--borde);
    border-radius: 10px;
    margin-bottom: 15px;
}

button#btn-search, button#btn-submit {
    width: 100%;
    background-color:#5FB49C;
    color: var(--blanco);
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Botón secundario actualizado (Botón Mapa y Confirmar asistencia) */
.btn-secundario {
    display: inline-block;
    margin-top: 80px;
    margin-bottom: 25px; 
    padding: 12px 30px;
    border: 1.5px solid var(--naranja);
    color: var(--blanco);
    background-color: #5FB49C;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.btn-secundario:hover {
    background-color: var(--naranja);
    color: var(--blanco);
}

.iban-box {
    background-color: var(--blanco);
    padding: 20px;
    border-radius: 15px;
    border: 1px dashed var(--naranja);
    margin: 20px 0;
}

.form-group {
    text-align: left;
}

.checkbox-wrapper {
    margin-bottom: 10px;
}

/* CARRUSEL POLAROID */
.polaroid-carousel {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 5px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.polaroid-carousel::-webkit-scrollbar { display: none; }

.polaroid-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
}

.polaroid-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

footer {
    padding: 10px;
    opacity: 0.7;
    text-transform: uppercase;
    margin-top: auto;
}
footer p{
    font-family: 'Reenie Beanie', sans-serif;
    font-size: 1.1rem;
}
/* Estilos para el Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--crema);
    margin: 5% auto;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--naranja);
}

#open-rsvp-modal {
    margin-top: 20px;
    background: var(--blanco);
    cursor: pointer;
}

/* =========================
   CRONOGRAMA – EL PLAN
========================= */
.timeline {
    margin-top: 40px;
    text-align: left;
}

.timeline__list {
    position: relative;
    margin-left: 30px;
    padding-left: 30px;
    border-left: 2px solid var(--naranja);
}

.timeline__item {
    position: relative;
    margin-bottom: 35px;
    padding-bottom: 10px;
}

.timeline__item::before {
    content: '';
    position: absolute;
    left: -41px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--crema);
    border: 2px solid var(--naranja);
}

.timeline__time {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--naranja);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline__title {
    font-size: 1.8rem;
    margin-bottom: 4px;
    color: var(--texto);
}

.timeline__desc {
    font-size: 0.95rem;
    opacity: 0.8;
}

.timeline__item:last-child {
    margin-bottom: 10%;
}

/* =========================
   NUEVAS TARJETAS (INFO-CARD) 
========================= */
/* Contenedores de logística y regalos (Sin caja de fondo doble) */
.logistics.container, .gift.container {
    width: 90%;
    max-width: 500px;
    margin: 0 auto 30px auto;
    padding: 0; 
}

.logistics-grid {
    display: grid;
    gap: 30px;
    margin-top: 30px;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px; 
    padding: 30px 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* Ilustraciones de las tarjetas hechas más grandes */
.ilustracion-icono {
    width: 150px; 
    height: auto;
    margin: 0 auto 15px auto;
    display: block;
}

.info-card__content {
    padding-top: 10px;
}

.card__title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--texto);
}

.card__title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--naranja);
    margin: 10px auto;
}

.card__text {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.85;
}

.map-container {
    text-align: center;
    padding: 1.5rem;
    background: #fff;
}

.paper-card {
    background-color: var(--crema);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
}

.titulos-card {
    margin-top: 10%;
    font-size: 2.5rem;
}

/* =========================
   NUEVAS IMÁGENES Y DECORACIÓN
========================= */
/* Foto de la ubicación */
.venue-photo {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Ilustraciones decorativas (estrellas, sol, pajaritos, flores) */
.decoracion-img {
    text-align: center;
    margin: 30px 0;
}

.decoracion-img img {
    width: 120px; 
    opacity: 0.8; 
}

#deadline-text {
    font-size: 0.9rem;
    margin-bottom: 80px;
}
/* =========================
   ANIMACIONES Y TRANSICIONES
========================= */

/* Comportamiento de scroll suave para toda la página */
html {
    scroll-behavior: smooth;
}

/* Animación de Fade-Up para el scroll */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Transición fluida para el cambio de pantalla inicial */
#access-section, #hero-photo {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#main-content, #rsvp-greeting {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

#main-content.show-content, #rsvp-greeting.show-content {
    opacity: 1;
}

/* Animación suave para el Modal (Sobreescribimos la clase actual) */
.modal {
    display: flex; /* Cambiamos a flex para centrar mejor el contenido */
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 0 auto; /* Ajuste para flexbox */
}

.modal.show .modal-content {
    transform: scale(1);
}
/* =========================
   DISEÑO RESPONSIVO (MOBILE -> DESKTOP)
========================= */

/* AJUSTES TABLET Y ESCRITORIO PEQUEÑO */
@media (min-width: 768px) {
    /* Ensanchamos los contenedores principales para aprovechar la pantalla */
    .section-container { 
        max-width: 700px; 
        padding: 40px; 
    }
    
    .logistics.container, .gift.container { 
        max-width: 900px; 
    }

    .search-box {
        max-width: 400px; /* Tamaño máximo de la caja */
        margin-left: auto; /* Centra la caja horizontalmente */
        margin-right: auto; 
        padding-left: 0; /* Quitamos el espacio extra de los lados que tenía en móvil */
        padding-right: 0;
    }

    #countdown{
margin-bottom: 0;
    }

    /* MAGIA: Convertimos la pila de 1 columna en 3 columnas alineadas horizontalmente */
    .logistics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    /* Ajustes del título y la imagen principal (Hero) */
    h1 { 
        font-size: 5rem; 
        text-align: center;
        text-align-last: center; /* Centramos visualmente en PC */
    }

    .hero-content {
        max-width: 600px; /* Damos más aire al título principal */
    }

    .fotomaton {
        max-width: 250px; /* La foto principal un poco más grande pero controlada */
    }

    .puestos {
        margin-top: 5%;
        margin-bottom: 5%;
    }
    
}

/* AJUSTES ESCRITORIO GRANDE (Pantallas de PC completas) */
@media (min-width: 1024px) {
    body {
        padding-top: 40px; /* Añadimos más respiro superior en monitores grandes */
    }

    /* Controlamos que las fotos de los lugares no se vuelvan gigantes */
    .venue-photo {
        max-width: 80%; 
        margin: 0 auto 30px auto;
        display: block;
    }

    /* Centramos el texto de la historia para que se lea mejor como bloque */
    .story p {
        padding: 0 40px;
    }
}
/* =========================
   DISEÑO DE HISTORIA (ANCHO COMPLETO)
========================= */
.section-container.story {
    width: 100%;
    max-width: none; /* Rompemos el límite de 500px/600px */
    border-radius: 0; /* Opcional: quitar bordes redondeados para que sea 100% inmersivo */
    padding: 60px 10%;
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

/* En escritorio, la historia se divide en dos lados */
@media (min-width: 768px) {
    .section-container.story {
        flex-direction: row; /* Texto y mapa/foto lado a lado */
        justify-content: space-between;
        text-align: left;
    }

    .section-container.story .polaroid-item, 
    .section-container.story #story-text {
        flex: 1; /* Ambos ocupan el 50% */
        max-width: 45%;
    }
}

/* =========================
   FILA DE EVENTOS (CEREMONIA, CELEB, PLAN)
========================= */
.event-grid-row {
    display: flex;
    flex-direction: column; /* Por defecto en móvil, uno bajo otro */
    gap: 20px;
    width: 90%;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .event-grid-row {
        flex-direction: row; /* En PC se ponen en fila */
        justify-content: center;
        align-items: stretch; /* Para que todas las cajas tengan la misma altura */
        max-width: 1200px;
    }

    .event-grid-row .section-container {
        flex: 1; /* Se reparten el espacio equitativamente */
        margin: 0; /* Quitamos márgenes laterales para que el gap lo controle */
    }
}
/* =========================
   ESTILOS LÍNEA DEL TIEMPO HORIZONTAL
========================= */

/* Ajuste del contenedor general */
.timeline-horizontal-section {
    width: 90% !important;
    max-width: 1200px !important;
    margin: 40px auto !important;
}

@media (min-width: 1024px) {
    /* Quitamos el borde lateral y lo ponemos arriba */
    .timeline.horizontal .timeline__list {
        display: flex;
        flex-direction: row;
        border-left: none;
        border-top: 2px solid var(--naranja);
        margin-left: 0;
        padding-left: 0;
        padding-top: 30px;
        justify-content: space-between;
    }

    .timeline.horizontal .timeline__item {
        flex: 1;
        text-align: center;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    /* Movemos los puntos decorativos a la línea superior */
    .timeline.horizontal .timeline__item::before {
        left: 50%;
        top: -41px; /* Ajuste para que quede justo sobre la línea */
        transform: translateX(-50%);
    }

    /* Ajuste de textos en horizontal */
    .timeline.horizontal .timeline__title {
        font-size: 1.5rem;
    }
    
    .timeline.horizontal .timeline__desc {
        padding: 0 10px;
    }
}

/* Mantener vertical en móviles (por debajo de 1024px) */
@media (max-width: 1023px) {
    .timeline.horizontal .timeline__list {
        border-left: 2px solid var(--naranja);
        margin-left: 30px;
        padding-left: 30px;
    }
}

