/* ==========================================================================
   Iguazu Noticias — Review gallery lightbox

   A native <dialog>: the browser gives the focus trap, Escape and the backdrop.
   Two columns on desktop — image with a thumbnail rail on the left, the review
   on the right — stacking on a phone.
   ========================================================================== */

.ig-lightbox {
    width: min(1040px, 94vw);
    max-width: 94vw;
    max-height: 92vh;
    padding: 0;
    border: none;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-pop);
    overflow: hidden;
}

.ig-lightbox::backdrop {
    background: var(--overlay);
}

.ig-lightbox__frame {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    max-height: 92vh;
}

.ig-lightbox__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    cursor: pointer;
    box-shadow: var(--shadow-press);
}

.ig-lightbox__close:hover {
    background: #fff;
}

/* --------------------------------------------------------------------------
   Stage
   -------------------------------------------------------------------------- */

.ig-lightbox__stage {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: var(--ink);
    min-width: 0;
}

.ig-lightbox__image-wrap {
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 0;
}

.ig-lightbox__img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.ig-lightbox__nav {
    position: absolute;
    top: calc(50% - 40px);
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    cursor: pointer;
    box-shadow: var(--shadow-press);
}

.ig-lightbox__nav:hover {
    background: #fff;
}

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

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

.ig-lightbox__thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.ig-lightbox__thumb {
    width: 56px;
    height: 56px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: none;
}

.ig-lightbox__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ig-lightbox__thumb[aria-current="true"] {
    border-color: var(--green-400);
}

/* --------------------------------------------------------------------------
   Review column
   -------------------------------------------------------------------------- */

.ig-lightbox__review {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px;
    overflow-y: auto;
}

.ig-lightbox__title {
    font-size: var(--text-xl);
}

.ig-lightbox__quote p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-body);
}

.ig-lightbox__author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}

.ig-lightbox__author-body {
    display: flex;
    flex-direction: column;
}

.ig-lightbox__pager {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--neutral-100);
}

/* --------------------------------------------------------------------------
   Breakpoints and motion
   -------------------------------------------------------------------------- */

@media (max-width: 820px) {
    .ig-lightbox__frame {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .ig-lightbox__img {
        max-height: 44vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ig-lightbox__photo img,
    .ig-review__photo img {
        transition: none;
    }
}
