/* =====================================================
   ОЗЕРО ДРУЗЕЙ — lightbox.css (компонент-просмотрщик)
   Полноэкранный, как в Picasa: фото подгоняется под
   экран, зум к курсору, панорама мышью.
   ===================================================== */

.lightbox {
    position: fixed;
    inset: 0;
    background: #101a18;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 0;
}
.lightbox.open { display: flex; }

/* Сцена — весь экран (vw/vh не зависят от родителей) */
.lb-stage {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Размер задаёт JS: большое фото впишется, маленькое —
   пропорционально дотянется. Без искажений. */
.lb-stage img {
    max-width: none;
    max-height: none;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform .08s linear;
}

.lb-caption {
    position: absolute;
    bottom: 1.2rem; left: 0; right: 0;
    text-align: center;
    color: #eaf6f4;
    font-size: .95rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
    z-index: 4;
}

.lb-zoom-hint {
    position: absolute;
    top: 1rem; left: 1rem;
    color: #cfe8e4;
    font-size: .85rem;
    opacity: .8;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
    z-index: 4;
}

.lb-close, .lb-prev, .lb-next {
    position: absolute;
    background: rgba(15, 30, 28, .55);
    color: #fff;
    border: 0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
}
.lb-close { top: 1rem; right: 1rem; }
.lb-prev  { left: 1rem;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: var(--terracotta); }

/* Плавное появление фото без дёрганья */
.lb-stage img.lb-loading {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.lb-stage img:not(.lb-loading) {
    opacity: 1;
    transition: opacity 0.15s ease;
}