/* Visor de fotos ampliadas */
.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.photo-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.photo-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 16, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.photo-lightbox__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min(1100px, 96vw);
    max-height: 92vh;
    width: 100%;
    transform: scale(0.94);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-lightbox.is-open .photo-lightbox__dialog {
    transform: scale(1);
}

.photo-lightbox__img-wrap {
    position: relative;
    margin: 0;
    width: 100%;
    max-height: calc(92vh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-lightbox__img {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 48px);
    width: auto;
    height: auto;
    object-fit: contain;
    background: #0a0f1a;
}

.photo-lightbox__caption {
    margin: 14px 0 0;
    padding: 0 8px;
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(248, 250, 252, 0.92);
    text-align: center;
}

.photo-lightbox__caption:empty {
    display: none;
}

.photo-lightbox__close,
.photo-lightbox__nav {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 14, 28, 0.82);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.photo-lightbox__close:hover,
.photo-lightbox__nav:hover {
    background: rgba(20, 32, 56, 0.95);
    border-color: rgba(125, 211, 252, 0.4);
}

.photo-lightbox__close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 1;
}

.photo-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
}

.photo-lightbox__nav:hover {
    transform: translateY(-50%) scale(1.05);
}

.photo-lightbox__nav--prev {
    left: 16px;
}

.photo-lightbox__nav--next {
    right: 16px;
}

.photo-lightbox__nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Tarjetas clicables */
.hero-visual-card,
.showcase-item {
    cursor: zoom-in;
}

.hero-visual-card:focus-visible,
.showcase-item:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.7);
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .photo-lightbox {
        padding: 12px;
    }

    .photo-lightbox__nav {
        width: 40px;
        height: 40px;
    }

    .photo-lightbox__nav--prev {
        left: 8px;
    }

    .photo-lightbox__nav--next {
        right: 8px;
    }

    .photo-lightbox__close {
        top: 10px;
        right: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .photo-lightbox,
    .photo-lightbox__dialog {
        transition: none;
    }
}
