/* ===========================================================================
   Просмотр фотографий
   ---------------------------------------------------------------------------
   Заменил библиотеку lightbox2: она требует jQuery, которого на сайте нет —
   клик по фото не делал ничего, в консоли висело «lightbox is not defined».
   Вместе с библиотекой ушли 12 КБ кода и четыре картинки-стрелки.
   =========================================================================== */

.lb {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 15, 25, .92);
    opacity: 0;
    transition: opacity .2s ease;
}

.lb.is-open { display: flex; opacity: 1; }

.lb-figure {
    max-width: 92vw;
    max-height: 88vh;
    margin: 0;
    text-align: center;
}

.lb-img {
    max-width: 92vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    animation: lb-in .22s ease;
}

@keyframes lb-in {
    from { opacity: 0; transform: scale(.96); }
    to   { opacity: 1; transform: none; }
}

.lb-caption {
    margin-top: 12px;
    color: #e8eef7;
    font-size: .92rem;
}

.lb-counter {
    display: block;
    margin-top: 4px;
    color: #9fb0c7;
    font-size: .8rem;
}

.lb-btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background .15s ease;
}

.lb-btn:hover { background: rgba(255, 255, 255, .26); }

.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

.lb-btn[hidden] { display: none; }

@media (max-width: 575.98px) {
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
    .lb-btn { width: 40px; height: 40px; }
    .lb-img { max-height: 70vh; }
}

@media (prefers-reduced-motion: reduce) {
    .lb, .lb-img { transition: none; animation: none; }
}
