/* Scroll Gallery by Trace */

.tsg-scroll-area {
    position: relative;
    width: 100%;
    height: 400vh;
}

.tsg-gallery-wrap {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--tsg-gap, 18px);
    background: var(--tsg-bg, #000000);
}

.tsg-row {
    display: flex;
    gap: var(--tsg-gap, 18px);
    will-change: transform;
}

.tsg-row img {
    width: var(--tsg-img-w, 420px);
    height: var(--tsg-img-h, 260px);
    border-radius: var(--tsg-radius, 10px);
    object-fit: cover;
    flex-shrink: 0;
    display: block;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s;
}

.tsg-row img:hover {
    opacity: 0.85;
}

/* Lightbox */

.tsg-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
}

.tsg-lightbox.open {
    display: flex;
}

.tsg-lb-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 10px;
    object-fit: contain;
    display: block;
    user-select: none;
}

.tsg-lb-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.tsg-lb-btn:hover { background: rgba(255, 255, 255, 0.28); }
.tsg-lb-prev { left: 24px; }
.tsg-lb-next { right: 24px; }

.tsg-lb-btn svg {
    width: 22px;
    height: 22px;
}

.tsg-lb-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.tsg-lb-close:hover { background: rgba(255, 255, 255, 0.28); }

.tsg-lb-close svg {
    width: 18px;
    height: 18px;
}

.tsg-lb-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-family: sans-serif;
    font-size: 13px;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
