/* Reset y Variables */
@font-face {
    font-family: 'Parisienne';
    src: url('./fonts/Parisienne-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Darker Grotesque';
    src: url('./fonts/DarkerGrotesque-VariableFont_wght.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --watercolor-primary: #A62447;
    --watercolor-secondary: #D9A404;
    --watercolor-tertiary: #8C8369;
    --watercolor-light: #D9CCC5;
    --text-dark: #0D0C0B;
    --text-light: #8C8369;
    --cream: #D9CCC5;
}

body {
    font-family: 'Darker Grotesque', sans-serif;
    background-color: var(--cream);
    color: var(--text-dark);
    overflow-x: hidden;
    transition: opacity 0.8s ease-in-out;
}

body.page-loading {
    opacity: 0;
}

body.page-loaded {
    opacity: 1;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: url('./media/fondo_papel_acuarela.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.watercolor-overlay {
    display: none;
}

.hero-background-image {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    max-height: 60vh;
    object-fit: contain;
    z-index: 0;
    opacity: 0;
    animation: fadeInUp 1.5s ease-out 0.3s forwards;
}

/* Versión móvil - imagen descentrada a la izquierda */
@media (max-width: 768px) {
    .hero-background-image {
        left: 25%;
        transform: translateX(-25%);
    }
    
    /* Ajustar posición del contenido en móvil */
    .hero-content {
        margin-top: -4rem !important;
        padding-top: 0.5rem !important;
    }
    
    /* Mover nombres y fecha 100px hacia la derecha en móvil */
    .names-container {
        margin-left: 50px;
    }
    
    .wedding-date {
        margin-left: 50px;
    }
    
    /* Reducir más el flipclock en móvil */
    .countdown-container {
        margin: 1.5rem 0 !important;
        transform: scale(0.7) !important;
        gap: 0.2rem !important;
    }
    
    #countdown .flipclock {
        gap: 0.2rem !important;
    }
    
    #countdown .flipclock__piece {
        margin: 0 0.1rem !important;
    }
    
    #countdown .flipclock__card {
        width: clamp(24px, 7vw, 30px) !important;
        height: clamp(32px, 10vw, 40px) !important;
    }
    
    #countdown .flipclock__card-top,
    #countdown .flipclock__card-bottom {
        font-size: clamp(0.8rem, 4vw, 1.2rem) !important;
    }
    
    #countdown .flipclock__slot {
        font-size: clamp(0.3rem, 1.5vw, 0.5rem) !important;
    }
    
    #countdown .flipclock__divider {
        font-size: clamp(1rem, 4vw, 1.4rem) !important;
        margin: 0 0.1rem !important;
    }
}

@keyframes watercolorFlow {
    0%, 100% {
        opacity: 0.15;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.25;
        transform: scale(1.1) rotate(5deg);
    }
}

.hero-content {
    text-align: left;
    z-index: 2;
    padding: 2rem;
    animation: fadeInUp 1.5s ease-out;
    margin-left: 2rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Names */
.names-container {
    margin-bottom: 2rem;
}

.bride-name,
.groom-name,
.ampersand {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.33, 1, 0.68, 1);
}

.bride-name,
.groom-name {
    font-family: 'Parisienne', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--watercolor-primary);
    font-weight: 400;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.ampersand {
    display: block;
    font-family: 'Darker Grotesque', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--text-light);
    margin: 1rem 0;
    font-style: italic;
}

.wedding-date {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-light);
    margin-bottom: 3rem;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.33, 1, 0.68, 1);
}

/* Countdown Timer con FlipClock.js */
.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
    flex-wrap: wrap;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.33, 1, 0.68, 1);
}

/* Personalizar FlipClock.js con tema acuarela */
#countdown .flipclock__piece {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

#countdown .flipclock__card {
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 8px;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(166, 36, 71, 0.15);
}

#countdown .flipclock__card-top,
#countdown .flipclock__card-bottom {
     line-height: 1;
     font-family: 'Darker Grotesque', sans-serif;
     font-weight: 700;
     color: var(--text-dark);
}

#countdown .flipclock__card-bottom {
    background: linear-gradient(145deg, #f0f0f0, #e8e8e8);
}

#countdown .flipclock__slot {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: clamp(0.6rem, 2vw, 0.9rem) !important;
    letter-spacing: 2px;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 0.3rem;
}

#countdown .flipclock__divider {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: clamp(2rem, 6vw, 3rem) !important;
    color: var(--text-light);
    font-weight: 400;
}

.countdown-separator {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: clamp(2rem, 6vw, 3rem);
    color: var(--text-light);
    margin: 0 0.3rem;
    align-self: flex-start;
    margin-top: clamp(15px, 4vw, 25px);
}


/* Scroll Indicator */
.scroll-indicator {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.33, 1, 0.68, 1);
    transition-delay: 1s;
}

body.page-loaded .scroll-indicator {
    opacity: 1;
    transform: translateY(0);
}

.scroll-indicator span {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: 1rem;
    color: var(--text-light);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 300;
}

.scroll-arrow {
    width: 30px;
    height: 50px;
    border: 2px solid var(--watercolor-primary);
    border-radius: 25px;
    position: relative;
    transition: border-color 0.3s ease;
}

.scroll-arrow:hover {
    border-color: var(--watercolor-secondary);
}

.scroll-arrow::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--watercolor-primary);
    border-radius: 50%;
    animation: scrollBounce 2s ease-in-out infinite;
    transition: background-color 0.3s ease;
}

.scroll-arrow:hover::before {
    background: var(--watercolor-secondary);
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) translateY(20px);
        opacity: 0.3;
    }
}

/* Gallery Section */
.gallery-section {
    padding: 8rem 2rem;
    background: var(--cream);
    position: relative;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--cream));
}

.gallery-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title {
    font-family: 'Parisienne', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--text-dark);
    font-weight: 400;
    margin-bottom: 2rem;
    perspective: 1000px;
    perspective-origin: -150% 50%;
}

.section-title .char {
    display: inline-block;
    opacity: 0;
    transform: rotateX(-90deg) translateY(150%);
    transform-origin: 0 100%;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1),
                opacity 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.section-title .char.animate {
    opacity: 1;
    transform: rotateX(0) translateY(0);
}

.watercolor-divider {
    width: 150px;
    height: 3px;
    margin: 0 auto;
    background: linear-gradient(90deg, transparent, var(--watercolor-primary), var(--watercolor-secondary), var(--watercolor-tertiary), transparent);
    opacity: 0;
    transform: scaleX(0);
    transition: all 1s ease-out 0.3s;
}

.watercolor-divider.animate {
    opacity: 1;
    transform: scaleX(1);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.gallery-item {
    position: relative;
    opacity: 1;
    transform: translateY(0) rotate(0deg);
    transition: transform 0.65s cubic-bezier(0.57, 0.56, 0, 0.97),
                opacity 0.65s cubic-bezier(0.57, 0.56, 0, 0.97);
    border-radius: 16px;
    overflow: hidden;
}

/* Estado inicial - no observado */
.gallery-item.unobserved {
    opacity: 0;
    transform: translateY(25vh) rotate(10deg);
}

/* Animación cuando entra en vista */
.gallery-item.animate {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

/* Variaciones de rotación para diferentes items */
.gallery-item:nth-child(2n).unobserved {
    transform: translateY(25vh) rotate(-10deg);
}

.gallery-item:nth-child(3n).unobserved {
    transform: translateY(30vh) rotate(15deg);
}

.gallery-item.full-width {
    grid-column: 1 / -1;
}

.gallery-item.full-width.unobserved {
    transform: translateY(20vh) scale(0.9);
}

.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
    border-radius: 16px;
}

.gallery-item.full-width .image-wrapper {
    aspect-ratio: 16/9;
}

.image-wrapper:hover {
    transform: translateY(-10px) rotate(2deg);
}

/* Animación de entrada para las imágenes */
.gallery-item.unobserved .image-wrapper {
    transform: scale(0.85);
}

.gallery-item.animate .image-wrapper {
    transform: scale(1);
}

.watercolor-frame {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: 
        radial-gradient(circle at 10% 10%, var(--watercolor-primary) 0%, transparent 50%),
        radial-gradient(circle at 90% 90%, var(--watercolor-secondary) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, var(--watercolor-tertiary) 0%, transparent 70%);
    opacity: 0.3;
    filter: blur(20px);
    z-index: -1;
    transition: opacity 0.5s ease;
}

.image-wrapper:hover .watercolor-frame {
    opacity: 0.5;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: #D9CCC5;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.placeholder-image[src] {
    background: none;
    object-fit: cover;
}

.placeholder-image::before {
    display: none;
}

.placeholder-text {
    font-family: 'Parisienne', sans-serif;
    font-size: 1.3rem;
    color: var(--text-light);
    font-style: italic;
    z-index: 1;
    text-align: center;
    padding: 1rem;
}

/* Posicionar el nombre en la parte superior izquierda */
.gallery-item.expandable .placeholder-text {
    position: absolute;
    top: 0px;
    left: 20px;
    transform: none;
    width: auto;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    color: var(--text-dark);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4), 
                 0 0 20px rgba(166, 36, 71, 0.3);
    font-weight: 400;
}

/* Estilos específicos para la tarjeta del mapa */
.mapa-background {
    position: relative;
    overflow: hidden;
    background: url('./media/fondo_papel_acuarela.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mapa-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.placeholder-text-mapa {
    position: absolute;
    top: 20px;
    right: 20px;
    left: auto !important;
    width: auto !important;
    text-align: right !important;
    z-index: 2;
    font-family: 'Parisienne', sans-serif;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    color: var(--text-dark);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6), 
                 0 0 20px rgba(166, 36, 71, 0.4);
    font-weight: 400;
    padding: 0 !important;
}

/* Estilos para la información del mapa expandida */
.card-info-mapa {
    background: rgba(255, 255, 255, 0.95);
}

.mapa-locations {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

.location-item {
    padding: 1.5rem;
    background: rgba(166, 36, 71, 0.1);
    border-left: 4px solid var(--watercolor-primary);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(166, 36, 71, 0.2);
}

.location-item h3 {
    font-family: 'Parisienne', sans-serif;
    font-size: 1.4rem;
    color: var(--watercolor-primary);
    margin-bottom: 0.5rem;
}

.location-item p {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.map-link {
    display: inline-block;
    background: var(--watercolor-primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-family: 'Darker Grotesque', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.map-link:hover {
    background: var(--watercolor-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(217, 164, 4, 0.3);
}

/* Estilos específicos para la descripción del BUS */
.bus-description {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Estilos para la tarjeta de Confirmación de Asistencia */
.card-info-confirmacion {
    background: rgba(255, 255, 255, 0.95);
}

.gallery-item.expandable.expanded[data-person="confirmacion"] {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
}

.gallery-item.expandable.expanded[data-person="confirmacion"] .card-info {
    max-height: 100%;
    height: 100%;
    padding: 3rem 2rem 2rem 2rem;
    border-radius: 0;
    overflow: hidden;
}

.gallery-item.expandable.expanded[data-person="confirmacion"] .placeholder-text-confirmacion {
    display: none;
}

.gallery-item.expandable.expanded[data-person="confirmacion"] .image-wrapper {
    display: none;
}

/* Estilos para la tarjeta de Contactos */
.card-info-contactos {
    background: rgba(255, 255, 255, 0.95);
}

.gallery-item.expandable.expanded[data-person="contactos"] .placeholder-text-contactos {
    display: none;
}

.contactos-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
}

.contacto-item {
    padding: 1.5rem;
    background: rgba(166, 36, 71, 0.1);
    border-left: 4px solid var(--watercolor-primary);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contacto-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(166, 36, 71, 0.2);
}

.contacto-item h3 {
    font-family: 'Parisienne', sans-serif;
    font-size: 1.5rem;
    color: var(--watercolor-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.contacto-detalle {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
}

.contacto-detalle:last-child {
    margin-bottom: 0;
}

.contacto-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contacto-link {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-word;
}

.contacto-link:hover {
    color: var(--watercolor-primary);
    text-decoration: underline;
}

.form-container {
    width: 100%;
    height: 100%;
    min-height: 500px;
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-container iframe {
    width: 100%;
    height: 100%;
    min-height: 1200px;
    border: none;
    display: block;
}

/* Ajustes específicos para el formulario en pantalla completa */
.gallery-item.expandable.expanded[data-person="confirmacion"] .form-container {
    height: calc(100vh - 6rem);
    margin-top: 0.5rem;
    border-radius: 0;
}

.gallery-item.expandable.expanded[data-person="confirmacion"] .form-container iframe {
    height: 100%;
    min-height: auto;
}

/* Different color variations for images */
.image-1 {
    background: #f5d6e0;
}

.image-2 {
    background: #f9edc8;
}

.image-3 {
    background: #e5ddd7;
}

.image-4 {
    background: #f2ebe6;
}

/* Sobrescribir el fondo para la tarjeta del mapa */
.mapa-background.image-4 {
    background: url('./media/fondo_papel_acuarela.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.image-5 {
    background: #f5d6e0;
}

.image-6 {
    background: #ffffff;
}

/* Eliminar el marco de acuarela para la tarjeta de Contactos */
.gallery-item[data-person="contactos"] .watercolor-frame {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }

    .gallery-section {
        padding: 4rem 1rem;
    }

    /* Animaciones más suaves en móvil */
    .gallery-item.unobserved {
        transform: translateY(15vh) rotate(5deg);
    }

    .gallery-item:nth-child(2n).unobserved {
        transform: translateY(15vh) rotate(-5deg);
    }

    .gallery-item:nth-child(3n).unobserved {
        transform: translateY(18vh) rotate(8deg);
    }

    .gallery-item.full-width.unobserved {
        transform: translateY(12vh) scale(0.95);
    }

    /* Burbujas decorativas más pequeñas en móvil */
    .gallery-item:nth-child(3)::after {
        width: 120px;
        height: 120px;
        bottom: -30px;
        right: -30px;
    }

    .gallery-item:nth-child(5)::before {
        width: 150px;
        height: 150px;
        top: -50px;
        left: -50px;
    }

    /* Ajustar tamaño de la frase "Acompañanos en este viaje" en móvil */
    .train-text {
        font-size: clamp(1.8rem, 4vw, 2.5rem) !important;
    }
}

/* Posicionamiento de burbujas decorativas */
.gallery-item:nth-child(3) {
    position: relative;
}

.gallery-item:nth-child(3)::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--watercolor-secondary) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.6s cubic-bezier(0.33, 1, 0.68, 1) 0.5s;
    z-index: -1;
}

.gallery-item:nth-child(3).animate::after {
    opacity: 0.3;
    transform: scale(1);
}

.gallery-item:nth-child(5)::before {
    content: '';
    position: absolute;
    top: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--watercolor-tertiary) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.6s cubic-bezier(0.33, 1, 0.68, 1) 0.6s;
    z-index: -1;
}

.gallery-item:nth-child(5).animate::before {
    opacity: 0.25;
    transform: scale(1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animación de pulsación sutil para burbujas */
@keyframes subtlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.gallery-item.animate::after,
.gallery-item.animate::before {
    animation: subtlePulse 8s ease-in-out infinite;
}

/* Tarjetas Expandibles */
.gallery-item.expandable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item.expandable:hover {
    transform: scale(1.05);
}

.gallery-item.expandable .image-wrapper {
    transition: all 0.3s ease;
}

.gallery-item.expandable:hover .image-wrapper {
    box-shadow: 0 20px 40px rgba(166, 36, 71, 0.3);
}

/* Estado expandido de la tarjeta */
.gallery-item.expandable.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 800px;
    height: 90vh;
    max-height: 600px;
    z-index: 999;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
}

.gallery-item.expandable.expanded .image-wrapper {
    height: 100%;
}

.gallery-item.expandable.expanded .placeholder-text-sofia {
    display: none;
}

.gallery-item.expandable.expanded .placeholder-text {
    display: none;
}

/* Ajustar posición de la imagen de Sofía cuando se expande */
.gallery-item.expandable.expanded[data-person="sofia"] .image-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.gallery-item.expandable.expanded[data-person="sofia"] .placeholder-image {
    object-position: center 20%;
    transform: translateY(-275px);
}

/* Ajustar la imagen del mapa cuando se expande */
.gallery-item.expandable.expanded[data-person="mapa"] .mapa-image {
    width: 100%;
    height: auto;
    max-height: 60%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
}

/* Información dentro de la tarjeta expandida */
.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.33, 1, 0.68, 1);
    border-radius: 0 0 16px 16px;
    backdrop-filter: blur(10px);
}

.gallery-item.expandable.expanded .card-info {
    max-height: 70%;
    opacity: 1;
    overflow-y: auto;
}

/* Eliminar scroll del contenedor para la tarjeta de confirmación */
.gallery-item.expandable.expanded[data-person="confirmacion"] .card-info {
    overflow: hidden !important;
}

.info-content {
    width: 100%;
}

.info-content h2 {
    font-family: 'Parisienne', sans-serif;
    font-size: 1.8rem;
    color: var(--watercolor-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.info-content > p {
    font-family: 'Darker Grotesque', sans-serif;
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* Overlay para tarjeta expandida */
.expanded-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    animation: fadeIn 0.3s ease;
}

.expanded-overlay.active {
    display: block;
}

/* Botón de cierre para tarjetas expandidas */
.close-card-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--watercolor-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.close-card-button:hover {
    background: var(--watercolor-secondary);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.close-card-button.active {
    display: flex;
}

.close-card-button::before,
.close-card-button::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    background: white;
    border-radius: 2px;
}

.close-card-button::before {
    transform: rotate(45deg);
}

.close-card-button::after {
    transform: rotate(-45deg);
}

/* Estilos específicos para el botón de cierre en modo pantalla completa */
.gallery-item.expandable.expanded[data-person="confirmacion"] ~ .close-card-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.info-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(166, 36, 71, 0.1);
    border-left: 4px solid var(--watercolor-primary);
    border-radius: 8px;
}

.info-section strong {
    font-family: 'Parisienne', sans-serif;
    font-size: 1.2rem;
    color: var(--watercolor-primary);
    display: block;
    margin-bottom: 0.8rem;
}

.info-section p {
    margin: 0;
    font-family: 'Darker Grotesque', sans-serif;
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Train Parallax Section */
.train-parallax-section {
    position: relative;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    background: transparent;
    border-radius: 0;
    padding: 0;
    gap: 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.train-parallax-section.full-width {
    grid-column: 1 / -1;
}

.train-parallax-section.unobserved {
    opacity: 0;
    transform: translateY(0);
}

.train-parallax-section.animate {
    opacity: 1;
    transform: translateY(0);
}

.train-parallax-container {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
}

.train-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    position: relative;
    z-index: 2;
}

.train-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

.train-text {
    font-family: 'Parisienne', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--text-dark);
    font-weight: 400;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1.2s cubic-bezier(0.33, 1, 0.68, 1);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.train-text.show {
    opacity: 1;
    transform: translateY(0);
}

/* Firma de la Web */
.web-signature {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 248, 248, 0.95) 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.signature-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.signature-content p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    font-weight: 300;
    letter-spacing: 0.3px;
}

.signature-name {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.signature-year {
    color: #888;
    font-size: 0.8rem;
    margin-left: 5px;
}

/* Responsive para la firma */
@media (max-width: 768px) {
    .web-signature {
        padding: 15px 0;
        margin-top: 30px;
    }
    
    .signature-content p {
        font-size: 0.8rem;
    }
    
    .signature-name {
        font-size: 0.85rem;
    }
    
    .signature-year {
        font-size: 0.75rem;
    }
}

.rails-container {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.rails-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    margin: 0;
    padding: 0;
}

