/* ==========================================================================
   Páginas individuales de boda (bodas/bodaN.html)
   ========================================================================== */

body {
    background-color: var(--c-bg-primary);
    color: var(--c-text-primary);
    overflow: hidden;
}

/* Bloqueo de selección/arrastre en imágenes — hace pareja con la lógica de protección JS */
img {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

.wedding-title-font { font-family: 'Playfair Display', serif; }
.wedding-subtitle-font {
    font-family: var(--font-secondary);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.logo-img {
    width: 200px;
    height: auto;
    margin-bottom: 30px;
}

#back-link {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: var(--z-controls);
    display: inline-block;
    font-family: var(--font-display);
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--c-text-primary);
    text-decoration: none;
    transition: letter-spacing 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    animation: fadeIn 1.5s ease-out;
}
#back-link:hover {
    letter-spacing: 2.8px;
    transform: translateX(6px);
}

.gallery-wrap {
    display: flex;
    align-items: center;
    height: 100vh;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0 5vw;
    box-sizing: border-box;
    gap: 5vw;
    scrollbar-width: none;
}
.gallery-wrap::-webkit-scrollbar { display: none; }

.first-slide {
    flex: 0 0 100vw;
    height: 100vh;
    margin-left: -5vw;
}
.first-slide-content { display: flex; width: 100%; height: 100%; }
.first-slide-text {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5vw;
    box-sizing: border-box;
    background-color: var(--c-bg-primary);
}
.first-slide-text h1 {
    font-size: 6vw;
    margin: 0 0 20px 0;
    line-height: 1.1;
    text-align: center;
}
.first-slide-text h3 {
    font-size: 1.2vw;
    margin: 0;
    text-align: center;
    color: #555555;
}
.first-slide-image { flex: 0 0 50%; height: 100%; overflow: hidden; }
.first-slide-image img { width: 100%; height: 100%; object-fit: cover; }

.gallery-photo {
    height: 80vh;
    width: auto;
    display: block;
}

.gallery-editorial {
    flex: 0 0 min(42vw, 560px);
    align-self: center;
    padding: 0 2vw 0 1vw;
}

.gallery-editorial-title {
    margin: 0 0 22px 0;
    font-size: clamp(30px, 3vw, 46px);
    line-height: 1.08;
    color: var(--c-text-primary);
}

.gallery-editorial-text {
    max-width: 42ch;
    margin: 0;
    color: #57514a;
    font-family: var(--font-secondary);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.85;
    letter-spacing: 0.3px;
}

.gallery-photo-slot {
    flex: 0 0 54vh;
    height: 80vh;
    display: block;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0)),
        #ece8e2;
    background-size: 220% 100%;
    animation: gallery-slot-pulse 1.4s ease-in-out infinite;
}

.gallery-load-status {
    position: fixed;
    right: 28px;
    bottom: 24px;
    z-index: var(--z-controls);
    width: min(260px, calc(100vw - 56px));
    color: var(--c-text-primary);
    font-family: var(--font-secondary);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    pointer-events: none;
}

.gallery-load-label {
    display: block;
    margin-bottom: 8px;
    text-align: right;
}

.gallery-load-bar {
    display: block;
    width: 100%;
    height: 2px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.12);
}

.gallery-load-bar-fill {
    display: block;
    width: 0;
    height: 100%;
    background-color: currentColor;
    transition: width 0.2s ease;
}

@keyframes gallery-slot-pulse {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    #back-link { font-size: 18px; top: 20px; left: 20px; }
    .gallery-wrap {
        flex-direction: column;
        height: auto;
        overflow-y: visible;
        padding: 0;
        gap: 5vh;
    }
    .first-slide {
        width: 100vw;
        height: 100vh;
        margin-left: 0;
        margin-bottom: 5vh;
    }
    .first-slide-content {
        flex-direction: column;
        position: relative;
    }
    .logo-img {
        filter: invert(1);
        width: 180px;
        margin-bottom: 15px;
    }
    .first-slide-text {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.4);
        color: var(--c-text-inverse);
        justify-content: center;
        align-items: center;
        z-index: 10;
    }
    .first-slide-text h1 { font-size: 10vw; color: var(--c-text-inverse); }
    .first-slide-text h3 { font-size: 3vw; color: var(--c-text-inverse); }
    .first-slide-image { flex: 0 0 100%; width: 100%; height: 100%; }
    .gallery-photo { width: 90%; height: auto; margin: 0 auto; }
    .gallery-photo-slot { width: 90%; height: 62vh; flex: none; margin: 0 auto; }
    .gallery-editorial {
        width: min(90%, 680px);
        flex: none;
        padding: 2vh 0 10vh 0;
        margin: 0 auto;
    }
    .gallery-editorial-title {
        margin-bottom: 16px;
        font-size: clamp(28px, 8vw, 42px);
    }
    .gallery-editorial-text {
        max-width: none;
        font-size: 15px;
        line-height: 1.8;
    }
    .gallery-load-status {
        right: 18px;
        bottom: 18px;
        width: min(220px, calc(100vw - 36px));
        color: var(--c-text-inverse);
        text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
    }
    .gallery-load-bar { background-color: rgba(255, 255, 255, 0.28); }
}
