/* Shared image lightbox */
.tf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 8, 8, 0.88);
    backdrop-filter: blur(10px);
}

.tf-lightbox.active {
    display: flex;
}

.tf-lightbox__stage {
    position: relative;
    width: min(1120px, 100%);
    height: min(82vh, 760px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tf-lightbox__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    background: #111;
}

.tf-lightbox__caption {
    position: absolute;
    left: 50%;
    bottom: -42px;
    transform: translateX(-50%);
    max-width: min(760px, calc(100vw - 48px));
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
}

.tf-lightbox__counter {
    position: absolute;
    left: 24px;
    top: 20px;
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 0;
    opacity: 0.8;
}

.tf-lightbox__button {
    position: absolute;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.tf-lightbox__button:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.tf-lightbox__button:disabled {
    opacity: 0.35;
    cursor: default;
    transform: none;
}

.tf-lightbox__close {
    top: 18px;
    right: 18px;
}

.tf-lightbox__fullscreen {
    top: 18px;
    right: 72px;
}

.tf-lightbox__prev {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.tf-lightbox__next {
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.tf-lightbox__prev:hover,
.tf-lightbox__next:hover {
    transform: translateY(calc(-50% - 1px));
}

body.tf-lightbox-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .tf-lightbox {
        padding: 16px;
    }

    .tf-lightbox__stage {
        height: 76vh;
    }

    .tf-lightbox__button {
        width: 42px;
        height: 42px;
    }

    .tf-lightbox__close {
        top: 12px;
        right: 12px;
    }

    .tf-lightbox__fullscreen {
        top: 12px;
        right: 62px;
    }

    .tf-lightbox__prev {
        left: 10px;
    }

    .tf-lightbox__next {
        right: 10px;
    }

    .tf-lightbox__counter {
        left: 16px;
        top: 14px;
    }

    .tf-lightbox__caption {
        bottom: -52px;
        font-size: 0.88rem;
    }
}
