/* --- ESTILOS GENERALES Y VARIABLES --- */
:root {
    --primary-color: #B80000; /* Un rojo intenso y elegante */
    --text-color-light: #ffffff;
    --font-main: 'Montserrat', sans-serif;
    --font-fancy: 'Great Vibes', cursive;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-main);
    background-color: #f4f4f4; /* Color de fondo para el resto de la página */
    overflow: hidden;
}

/* --- SECCIÓN 0: INTRO CORTINA --- */

#intro-curtain {
    position: fixed; /* Se queda fijo y cubre toda la pantalla */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex; /* Para poner las dos columnas una al lado de la otra */
    z-index: 9999; /* Z-index MUY alto para estar encima de todo */
}

.curtain-panel {
    flex-basis: 50%; /* Cada panel ocupa el 50% */
    height: 100%;
    background-size: cover;
    background-position: center;
    
    /* La animación de deslizamiento */
    transition: transform 1.2s cubic-bezier(0.86, 0, 0.07, 1);
}

/* --- CAMBIA ESTAS IMÁGENES --- */
.curtain-left {
    background-image: url('../img/fondo_izquierda.png');
}
.curtain-right {
    background-image: url('../img/fondo_derecha.png');
}
/* ----------------------------- */

/* Estilo para la nueva tarjeta de bienvenida */
#intro-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000; /* Encima de las cortinas */
    
    width: 90%; /* Ancho de la tarjeta en móvil */
    max-width: 450px; /* Ancho máximo en desktop */
    
    background-color: rgba(255, 255, 255, 0.95); /* Fondo blanco sólido */
    padding: 30px 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    
    /* Animación de desvanecimiento */
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#intro-card h3 {
    font-family: var(--font-main); /* Usamos la fuente Montserrat */
    font-size: 1.6rem;
    color: #333;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 30px;
    line-height: 1.4;
}

/* El nuevo botón pulsante */
.pulsating-button {
    display: inline-block;
    background-color: var(--primary-color); /* Color rojo de la invitación */
    color: var(--text-color-light); /* Texto blanco */
    padding: 14px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-family: var(--font-main);
    font-size: 1rem;
    
    /* Sombra inicial para la animación */
    box-shadow: 0 0 0 0 rgba(184, 0, 0, 0.7); 
    
    /* Asignamos la animación de pulso */
    animation: pulse 1.5s infinite;
    transition: background-color 0.3s ease;
}

.pulsating-button:hover {
    background-color: #9a0000; /* Rojo más oscuro */
    animation-play-state: paused; /* Pausa la animación al pasar el mouse */
}

/* Definición de la animación pulsante */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(184, 0, 0, 0.7);
    }
    70% {
        /* El 'aura' se expande a 20px */
        box-shadow: 0 0 0 20px rgba(184, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(184, 0, 0, 0);
    }
}

/* --- CLASES DE ANIMACIÓN (Que usará jQuery) --- */

/* La cortina se desliza (esto se queda igual) */
.curtain-left.open {
    transform: translateX(-100%);
}
.curtain-right.open {
    transform: translateX(100%);
}

/* El contenedor principal se oculta (esto se queda igual) */
#intro-curtain.hidden {
    display: none;
}

/* La TARJETA se desvanece (reemplaza a #enter-button.hidden) */
#intro-card.hidden {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5); /* Se desvanece y encoge */
    pointer-events: none; /* Desactiva clics futuros */
}

/* Las cortinas se deslizan */
.curtain-left.open {
    transform: translateX(-100%);
}
.curtain-right.open {
    transform: translateX(100%);
}

/* El contenedor principal se oculta al final */
#intro-curtain.hidden {
    display: none;
}

/* --- SECCIÓN DE PORTADA (HERO) --- */
.hero-section {
    position: relative;
    height: 100vh; /* Ocupa el 100% de la altura de la pantalla */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-color-light);
    
    /* --- IMPORTANTE: CAMBIA ESTA URL POR LA DE TU FOTO --- */
    background-image: url('../img/jr/36.jpg?v=2kjbjyfjy');
    
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Cambiamos el color negro (0,0,0) por un rojo temático (184,0,0) */
    background-color: rgba(184, 0, 0, 0.4); 
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.hero-content h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.hero-content h2 {
    margin: 15px 0;
    font-family: var(--font-fancy);
    font-size: 5rem;
    font-weight: normal;
}

.hero-content .welcome-text {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 25px auto;
}

.hero-content .wedding-date {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
}

#countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.countdown-unit {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    border-radius: 5px;
}

.countdown-unit span {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

.countdown-unit .unit-label {
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Flecha para invitar a hacer scroll */
.scroll-down-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 2.5rem;
    color: var(--text-color-light);
    animation: bounce 2s infinite;
    text-decoration: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-20px);
    }
    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* --- ESTILOS RESPONSIVE PARA MÓVILES --- */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 4rem;
    }

    .hero-content .welcome-text {
        font-size: 1rem;
    }

    .hero-content .wedding-date {
        font-size: 1.2rem;
    }

    #countdown {
        gap: 10px;
    }

    .countdown-unit span {
        font-size: 1.8rem;
    }

    .countdown-unit .unit-label {
        font-size: 0.7rem;
    }
}

/* --- EFECTO DE PÉTALOS DE ROSA CAYENDO --- */

.petals-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Asegura que los pétalos no salgan del contenedor */
    z-index: 2; /* Para que estén sobre el overlay pero debajo del contenido principal */
    pointer-events: none; /* Permite hacer clic a través de los pétalos */
}

/* Estilo base para cada pétalo */
.petal {
    position: absolute;
    /* Usamos un gradiente radial para darle más profundidad y realismo */
    background: radial-gradient(circle at center, #d42a2a, #B80000);
    
    /* Esta es la clave: clip-path define una forma de pétalo personalizada */
    clip-path: polygon(50% 100%, 0 70%, 20% 0, 80% 0, 100% 70%);
    
    opacity: 0.8;
    transform: rotate(var(--rotation)) scale(var(--scale)); /* Para variar rotación y tamaño */
    animation: fall var(--duration) linear infinite; /* Animación de caída */
    left: var(--start-left); /* Posición inicial izquierda */
    top: var(--start-top); /* Posición inicial superior (fuera de pantalla) */
}
/* Variaciones de tamaño para los pétalos */
.petal:nth-child(3n) {
    width: 15px;
    height: 10px;
}
.petal:nth-child(3n+1) {
    width: 20px;
    height: 13px;
}
.petal:nth-child(3n+2) {
    width: 18px;
    height: 11px;
}

/* Animación de caída y giro */
@keyframes fall {
    0% {
        transform: translateY(-100px) rotateZ(0deg) rotateX(0deg); /* Empieza arriba */
        opacity: 0.8;
    }
    100% {
        transform: translateY(calc(100vh + 100px)) rotateZ(360deg) rotateX(180deg); /* Cae fuera de pantalla, gira */
        opacity: 0; /* Desaparece al final */
    }
}

/* --- SECCIÓN 1.5: FRASE INTERMEDIA --- */

.parallax-bg {
    position: absolute;
    left: 0;
    width: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0; 
}

#frase-biblica {
    position: relative; 
    color: var(--text-color-light); 
    text-align: center;
    overflow: hidden; /* Mantiene la corrección del desbordamiento */
    
    /* --- INICIO DE LA CORRECCIÓN DE LAYOUT --- */
    /* Reemplazamos el padding fijo por un centrado flexible */
    padding: 20px; /* Un padding de seguridad para pantallas pequeñas */
    min-height: 60vh; /* Damos una altura mínima para que el parallax luzca */
    display: flex;
    align-items: center;
    justify-content: center;
    /* --- FIN DE LA CORRECCIÓN DE LAYOUT --- */
}

/* Ajustamos la altura del fondo parallax */
#frase-biblica .parallax-bg {
    height: 100%; /* Que el fondo cubra la sección */
}

/* Tu capa roja (se mantiene intacta) */
.frase-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(184, 0, 0, 0.4); /* Mismo overlay de la portada */
    z-index: 1;
}

/* Tu contenido (se mantiene intacto) */
.frase-content {
    position: relative;
    z-index: 2; /* El contenido va sobre el overlay */
    max-width: 800px;
    margin: 0 auto;
}

/* Tu fuente (se mantiene intacta) */
.frase-content .frase-texto {
    font-family: var(--font-fancy); 
    font-size: 3.5rem; 
    font-weight: normal;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

/* Tu cita (se mantiene intacta) */
.frase-content .frase-cita {
    font-family: var(--font-main); 
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    #frase-biblica {
        min-height: 50vh; /* Altura mínima ajustada para móvil */
    }
    .frase-content .frase-texto {
        font-size: 2.8rem;
    }
    .frase-content .frase-cita {
        font-size: 1rem;
    }
}

/* --- SECCIÓN 2: NUESTRA HISTORIA --- */

#nuestra-historia {
    padding: 80px 20px; /* Espaciado interno (arriba/abajo, izquierda/derecha) */
    background-color: #ffffff; /* Un fondo blanco limpio para contrastar */
}

.container {
    max-width: 1100px; /* Ancho máximo del contenido */
    margin: 0 auto; /* Centra el contenedor */
    padding: 0 15px;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    font-family: var(--font-fancy); /* Usamos la fuente elegante para el título */
    color: var(--primary-color); /* Color rojo principal */
    margin-bottom: 50px;
    font-weight: normal;
}

.history-content {
    display: flex;
    align-items: center;
    gap: 50px; /* Espacio entre la foto y el texto */
}

.history-image {
    flex: 1; /* Ocupa la mitad del espacio disponible */
    max-width: 45%;
}

.history-image img {
    width: 100%;
    height: auto;
    border-radius: 10px; /* Bordes ligeramente redondeados */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); /* Sombra sutil para darle profundidad */
}

.history-text {
    flex: 1; /* Ocupa la otra mitad del espacio */
    color: #444; /* Un color de texto gris oscuro para buena legibilidad */
}

.history-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-top: 0;
}

.history-text p {
    font-size: 1rem;
    line-height: 1.7; /* Espaciado entre líneas para facilitar la lectura */
    margin-bottom: 20px;
}

.history-text .signature {
    font-family: var(--font-fancy);
    font-size: 2rem;
    color: #555;
    text-align: right;
}

/* --- ESTILOS RESPONSIVE PARA "NUESTRA HISTORIA" --- */
@media (max-width: 768px) {
    #nuestra-historia {
        padding: 60px 20px;
    }

    .history-content {
        flex-direction: column; /* Apila la imagen y el texto verticalmente */
        text-align: center;
    }

    .history-image {
        max-width: 80%; /* La imagen será un poco más pequeña en móvil */
        margin-bottom: 30px;
    }

    .history-text .signature {
        text-align: center;
    }
}

/* --- SECCIÓN 3: LA CELEBRACIÓN --- */

/* --- SECCIÓN 3: LA CELEBRACIÓN --- */

#celebracion {
    padding: 80px 20px;
    background-color: #f9f9f9;
}

.celebration-content {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.event-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    padding: 40px 30px;
    text-align: center;
    width: 100%;
    
    /* === INICIO DE CAMBIOS === */
    
    /* 1. La hacemos más ancha en web */
    max-width: 900px; 
    
    /* 2. La convertimos en un contenedor flex (para las columnas) */
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    /* === FIN DE CAMBIOS === */

    border-top: 5px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.event-icon {
    margin-bottom: 20px;
}

.event-icon img {
    width: 64px;
    height: 64px;
}

.event-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.event-card p {
    margin: 8px 0;
    color: #555;
    line-height: 1.6;
}

.event-location {
    font-size: 1.2rem;
    font-weight: bold;
}

.event-time {
    font-size: 1.2rem; /* Hice la hora un poco más grande */
    font-weight: 700;
    color: #333;
}

.map-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 25px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.map-button:hover {
    background-color: #9a0000;
    transform: scale(1.05);
}

/* === INICIO DE NUEVOS ESTILOS === */

/* Columna Izquierda (Ceremonia y Recepción) */
.event-details {
    flex: 1; /* Ocupa la mitad del espacio */
    padding-right: 30px;
    /* Creamos el divisor vertical */
    border-right: 1px solid #eee;
}

/* Columna Derecha (Lugar) */
.common-location {
    flex: 1; /* Ocupa la otra mitad */
    padding-left: 30px;
}

.event-card .event-divider {
    border: 0;
    height: 1px;
    background-color: #eee;
    margin: 30px auto;
    width: 80%;
}

.event-card .common-location h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    margin-top: 10px;
}

/* === INICIO DE ESTILOS PARA MAPA RESPONSIVO === */

.map-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* Aspect ratio 4:3 (height 450 / width 600 = 0.75) */
    padding-top: 75%; 
    margin-top: 20px;
    border-radius: 8px; /* Redondea las esquinas del mapa */
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Ajuste para que el botón de "Ver en Google Maps" tenga buen espacio */
.common-location .map-button {
    margin-top: 25px;
}

/* === FIN DE NUEVOS ESTILOS === */


/* --- ESTILOS RESPONSIVE PARA "LA CELEBRACIÓN" --- */
@media (max-width: 992px) {
    .celebration-content {
        flex-direction: column;
        align-items: center;
    }
    .event-card {
        /* 1. Volvemos al layout vertical */
        display: block; 
        width: 85%;
        max-width: 500px; /* Ancho que te gustaba en móvil */
    }

    /* 2. Ocultamos las divisiones de desktop */
    .event-details {
        padding-right: 0;
        border-right: none;
    }
    .common-location {
        padding-left: 0;
        /* Añadimos un divisor superior en móvil para separarlo */
        border-top: 1px solid #eee;
        padding-top: 30px;
        margin-top: 30px;
    }

    /* 3. Ocultamos el divisor <hr> en móvil, ya que el border-top lo reemplaza */
    .common-location .event-divider {
        display: none;
    }
}

/* --- SECCIÓN 4: ITINERARIO --- */

#itinerario {
    padding: 80px 20px;
    background-color: #ffffff; /* Fondo blanco */
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* La línea vertical de la línea de tiempo */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background-color: #e0e0e0;
    top: 20px;
    bottom: 20px;
    z-index: 0;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box; /* Mejora el cálculo del ancho y padding */
}

/* Posiciona los items a la izquierda */
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right; /* Alinea el texto a la derecha (hacia la línea) */
}

/* Posiciona los items a la derecha */
.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left; /* CORRECCIÓN: Alinea el texto a la izquierda (hacia afuera) */
}

/* Círculo en la línea de tiempo */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 4px solid var(--primary-color);
    top: 20px;
    z-index: 1;
}

/* Posiciona el círculo para los items de la izquierda */
.timeline-item:nth-child(odd)::after {
    right: -11px;
}

/* Posiciona el círculo para los items de la derecha */
.timeline-item:nth-child(even)::after {
    left: -11px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    position: relative;
}

.timeline-time {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
}

.timeline-title {
    font-size: 1.4rem;
    margin: 10px 0;
    color: #333;
}

.timeline-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    margin: 0;
}

/* --- ESTILOS RESPONSIVE PARA "ITINERARIO" --- */
@media (max-width: 768px) {
    /* La línea se mueve a la izquierda */
    .timeline-container::before {
        left: 10px;
    }

    /* Todos los items se mueven a un solo lado */
    .timeline-item,
    .timeline-item:nth-child(even),
    .timeline-item:nth-child(odd) {
        width: 100%;
        left: 0;
        text-align: left; /* Todo el texto se alinea a la izquierda */
        padding-left: 50px;
        padding-right: 15px;
    }

    /* Posiciona todos los círculos en la nueva línea */
    .timeline-item::after,
    .timeline-item:nth-child(even)::after,
    .timeline-item:nth-child(odd)::after {
        left: -2px; /* CORRECCIÓN: Posición más precisa del círculo */
    }
}

/* --- SECCIÓN 5: GALERÍA DE FOTOS --- */

/* --- SECCIÓN 5: GALERÍA DE FOTOS --- */

#galeria {
    /* Estilos para la sección completa */
    padding: 80px 0 0 0; /* Espacio superior, pero no inferior para que las fotos peguen al borde */
    background-color: #f9f9f9; /* Mismo fondo que otras secciones para coherencia */
    overflow-x: hidden; /* Evita cualquier desbordamiento horizontal */
}

/* Ajustamos el margen del título que ya existe */
#galeria .section-title {
    margin-bottom: 50px; /* Espacio entre el título y las fotos */
}

/* El nuevo contenedor de la galería */
.gallery-wrapper {
    display: flex;
    width: 100%;    /* <-- Clave: Ocupa todo el ancho */
    height: 550px;  /* <-- La hacemos más alta para que luzca */
}

/* Aplicamos los estilos de imagen al nuevo contenedor */
.gallery-wrapper img {
    width: 0px;
    flex-grow: 1;
    object-fit: cover;
    opacity: 0.8;
    transition: width 0.5s ease, opacity 0.5s ease;
    box-sizing: border-box;
}

.gallery-wrapper img.expanded {
    width: 450px; 
    opacity: 1;
    filter: contrast(120%);
}

/* --- ESTILOS RESPONSIVE PARA GALERÍA --- */
@media (max-width: 768px) {
    #galeria {
        /* Ajustamos el padding superior para móvil, pero mantenemos el inferior en 0 */
        padding: 60px 0 0 0; 
    }

    /* Hacemos la galería un poco más baja en móviles */
    .gallery-wrapper {
        height: 350px; 
    }

    /* Al no tener más reglas aquí, las imágenes conservarán
      el 'display: flex' y el efecto 'flex-grow' de la versión de escritorio.
    */
}

/* --- SECCIÓN 6: CÓDIGO DE VESTIMENTA --- */
#dress-code {
    position: relative; 
    padding: 80px 20px;
    overflow: hidden; /* <-- AÑADE ESTA LÍNEA */
}

#dress-code .parallax-bg {
    min-height: 200%; /* <-- Mucho más alta para la sección larga */
}

#dress-code .container {
    position: relative;
    z-index: 2; /* <-- ¡ESTO LEVANTA TODO el contenido por ENCIMA del velo rojo! */
}

/* 2. Hace el TÍTULO visible */
#dress-code .section-title {
    color: var(--text-color-light); /* Pone el título "Código de Vestimenta" en blanco */
}

/* 3. Estiliza la NUEVA TARJETA */
.dress-code-card {
    background-color: #ffffff; /* Fondo blanco sólido */
    border-radius: 10px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto; /* Centra la tarjeta */
}

.dress-code-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px auto;
}

.dress-code-intro h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dress-code-intro p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

.dress-code-panels {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.dress-panel {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 40px 30px;
    text-align: center;
    flex-basis: 320px; /* Ancho base para cada panel */
    border-top: 4px solid var(--primary-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dress-panel:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.panel-icon img {
    width: 60px;
    height: auto;
    margin-bottom: 20px;
}

.dress-panel h4 {
    font-family: var(--font-fancy);
    font-size: 2rem;
    font-weight: normal;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
}

.dress-panel p {
    font-size: 1rem;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

.dress-code-final-note {
    text-align: center;
    margin-top: 50px;
    font-style: italic;
    color: #777;
    font-size: 1.1rem;
}

/* Responsive para la Opción 1 */
@media (max-width: 768px) {

    .dress-code-panels {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .dress-panel {
        width: 50%;
        max-width: 400px;
        flex-basis: 30px; /* Ancho base para cada panel */
    }
}

/* --- SECCIÓN 7: MESA DE REGALOS --- */
#mesa-de-regalos {
    padding: 80px 20px;
    background-color: #f9f9f9;
}

.gift-card {
    max-width: 750px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 15px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-top: 5px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gift-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.gift-card-icon {
    margin-bottom: 25px;
}

.gift-card-icon img {
    width: 64px;  /* Tamaño deseado para el icono */
    height: 64px; /* Puedes ajustar esto o poner "auto" */
}

.gift-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
}

.gift-card .gift-intro-text {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 20px auto;
}

.gift-card .gift-purpose-text {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    margin: 0 auto 25px auto;
}

.gift-card .gift-thanks {
    font-family: var(--font-fancy);
    font-size: 2.2rem;
    color: #444;
    margin: 0;
}

@media (max-width: 768px) {
    .gift-card {
        padding: 40px 25px;
    }
    .gift-card h3 {
        font-size: 1.8rem;
    }
}

/* --- SECCIÓN 8: CONFIRMAR ASISTENCIA (RSVP) --- */

#rsvp {
    padding: 80px 20px;
    background-color: #ffffff;
}

.rsvp-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.rsvp-intro {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 40px;
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    color: #444;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-main);
    font-size: 1rem;
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(184, 0, 0, 0.3);
}

.submit-button {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 15px 20px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-button:hover {
    background-color: #9a0000;
    transform: scale(1.03);
}

/* --- SECCIÓN 9: DEDICATORIA --- */

#dedicatoria {
    padding: 80px 20px;
    background-color: #f9f9f9;
}

.dedication-grid {
    /* CAMBIAMOS A FLEXBOX */
    display: flex;
    flex-wrap: wrap;         /* Permite que los elementos pasen a la siguiente línea */
    justify-content: center; /* ¡LA CLAVE! Centra las filas horizontalmente */
    
    gap: 30px;
    margin-bottom: 60px;
}

.dedication-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
    text-align: center;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;

    /* AÑADIMOS UN ANCHO BASE PARA CONTROLAR LA FILA */
    /* 0 no crecer, 1 no encoger, 280px de ancho base */
    /* Esto forzará 3 tarjetas por fila en la mayoría de escritorios */
    flex: 0 1 280px; 
}

.dedication-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.card-thumb {
    width: 100%;
    height: 220px; /* Altura fija para las miniaturas */
    object-fit: cover; /* Asegura que la imagen cubra el espacio sin deformarse */
    border-radius: 8px;
    margin-bottom: 15px;
}

.dedication-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* Dedicatoria General */
.general-dedication {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
    text-align: center;
}

.general-dedication h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-top: 0;
}

.general-dedication p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
}

.general-dedication .signature {
    font-family: var(--font-fancy);
    font-size: 2.2rem;
    color: #444;
    text-align: center;
    margin-top: 30px;
}

/* Responsive para la cuadrícula */
@media (max-width: 480px) {
    /* En móviles muy pequeños, que se muestren 2 columnas */
    .dedication-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .card-thumb {
        height: 150px; /* Reducimos la altura de la foto en móvil */
    }
}

/* --- ESTRUCTURA MODAL --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none; /* Oculto por defecto */
    align-items: center;
    justify-content: center;
    z-index: 10000; /* Encima de todo */
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 10px;
    width: 100%;
    max-width: 700px; /* Ancho máximo de la modal */
    max-height: 90vh; /* Altura máxima */
    overflow-y: auto; /* Scroll si el contenido es muy largo */
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 10px;        /* Más cerca de la esquina */
    right: 10px;       /* Más cerca de la esquina */
    width: 35px;       /* Ancho fijo */
    height: 35px;      /* Alto fijo */
    line-height: 35px; /* Centra la 'X' verticalmente */
    text-align: center; /* Centra la 'X' horizontalmente */
    font-size: 1.8rem; /* Tamaño de la 'X' */
    font-weight: bold;
    color: #555;      /* Color de la 'X' */
    background-color: rgba(255, 255, 255, 0.8); /* Fondo blanco semitransparente */
    border-radius: 50%; /* La hace redonda */
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;       /* Asegura que esté sobre la imagen */
}

.modal-close:hover {
    color: #fff;
    background-color: var(--primary-color); /* Se vuelve roja al pasar el mouse */
    transform: rotate(90deg); /* Efecto de giro sutil */
}

/* Estilo para el nuevo botón 'Cerrar' */
#modal-close-btn {
    margin-top: 30px; /* Le da espacio sobre el texto */
    cursor: pointer;
    padding: 12px 30px; /* Hacemos el padding igual al de otros botones */
}

.modal-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
}

.modal-name {
    font-family: var(--font-fancy);
    font-size: 2.8rem;
    color: var(--primary-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
}

.modal-text p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
}

/* Responsive para la Modal en móviles */
@media (max-width: 768px) {
    .modal-content {
        padding: 25px;
    }
    .modal-image {
        height: 250px;
    }
    .modal-name {
        font-size: 2.2rem;
    }
}

/* --- SECCIÓN 10: GUARDAR LA FECHA --- */

#save-the-date {
    padding: 80px 20px;
    background-color: #ffffff; /* Fondo blanco para que resalte */
    text-align: center;
}

#save-the-date h2 {
    font-family: var(--font-fancy); /* Fuente elegante */
    font-size: 3.5rem;
    color: var(--primary-color);
    margin: 0 0 15px 0;
    font-weight: normal;
}

#save-the-date p {
    font-size: 1.2rem;
    color: #555;
    margin: 0 0 30px 0;
}

/* Ajustes para el botón reutilizado */
#save-the-date .submit-button {
    text-decoration: none; /* Asegura que no parezca un link */
    display: inline-block; /* Para que el centrado funcione bien */
    padding: 12px 30px; 
    font-size: 1.1rem;
}

/* --- RESPONSIVE PARA GUARDAR LA FECHA --- */
@media (max-width: 768px) {
    #save-the-date h2 {
        font-size: 2.8rem;
    }
    #save-the-date p {
        font-size: 1rem;
    }
}

/* --- SECCIÓN 10: PIE DE PÁGINA --- */

#pie-de-pagina {
    padding: 20px;
    background-color: #ffffff;
    text-align: center;
}

.footer-credit {
    margin: 0;
    color: #a0a0a0;
    font-size: 0.9rem;
}

.footer-credit a {
    color: #a0a0a0; /* Hacemos el link blanco para que destaque */
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-credit a:hover {
    color: var(--primary-color); /* Al pasar el mouse, se pone rojo */
}