.tcl-gallery-lock {
    overflow: hidden !important;
}

.tcl-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 26px;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(7px);
}

.tcl-gallery-modal.is-open {
    display: flex;
}

.tcl-gallery-dialog {
    position: relative;
    width: min(1280px, 96vw);
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    background: #11100e;
    color: #f4efe7;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
}

.tcl-gallery-dialog h2 {
    margin: 0 0 24px;
    padding-right: 50px;
    font-size: clamp(32px, 4vw, 58px);
    letter-spacing: 0.04em;
}

.tcl-gallery-close {
    position: absolute;
    top: 10px;
    right: 18px;
    z-index: 2;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 46px;
    line-height: 1;
    cursor: pointer;
}

.tcl-gallery-status {
    padding: 35px 0;
    color: #d8d0c5;
    font-size: 17px;
}

.tcl-gallery-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(250px, 1fr));
    gap: 18px;
}

.tcl-gallery-item {
    position: relative;
    min-height: 260px;
    margin: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #1b1916;
}

.tcl-gallery-item img {
    display: block;
    width: 100%;
    height: 270px;
    object-fit: cover;
    transition:
        transform 0.32s ease,
        filter 0.32s ease;
}

.tcl-gallery-item:hover img {
    transform: scale(1.14);
    filter: brightness(0.8);
}

.tcl-gallery-item figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 32px 14px 13px;
    color: #ffffff;
    background:
        linear-gradient(
            transparent,
            rgba(0, 0, 0, 0.86)
        );
    transform: translateY(100%);
    transition: transform 0.25s ease;
}

.tcl-gallery-item:hover figcaption {
    transform: translateY(0);
}

/*
 * Desktop Gallery spacing.
 */
@media (min-width: 901px) {
    [data-gallery-link="true"] {
        margin-right: 38px !important;
    }
}

/*
 * Mobile menu spacing.
 */
@media (max-width: 900px) {
    [data-gallery-link="true"] {
        margin-right: 0 !important;
    }

    .tcl-gallery-modal {
        padding: 9px;
    }

    .tcl-gallery-dialog {
        width: 100%;
        max-height: 94vh;
        padding: 22px 14px;
    }

    .tcl-gallery-grid {
        grid-template-columns: 1fr;
    }

    .tcl-gallery-item img {
        height: 240px;
    }
}
