.nav-links a[hidden] {
    display: none !important;
}

.slide-disabled {
    display: none !important;
}

.slide-gallery {
    padding: 30px 28px 70px 120px;
}

.slide-gallery .slide-content {
    justify-content: flex-start;
    max-width: 1560px;
    padding-top: 46px;
}

.slide-gallery .container {
    max-width: 1560px;
}

.slide-gallery .col-lg-10 {
    flex: 0 0 100%;
    max-width: 100%;
}

.gallery-masonry {
    columns: 3 230px;
    column-gap: 10px;
    padding-bottom: 30px;
}

.gallery-card {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    break-inside: avoid;
    cursor: pointer;
}

.gallery-card img {
    display: block;
    width: 100%;
    height: auto;
    filter: contrast(1.05) brightness(1.03);
    transition: transform 0.25s ease, filter 0.25s ease;
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
    transform: scale(1.015);
    filter: contrast(1.1) brightness(1.07);
}

.gallery-card:focus-visible,
.lightbox button:focus-visible {
    outline: 3px solid #ec6a33;
    outline-offset: 4px;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 82px 108px;
    background:
        linear-gradient(rgba(7, 10, 17, 0.88), rgba(7, 10, 17, 0.88)),
        url('../img/phon-bonch.webp') center / cover fixed no-repeat;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 1120px);
    margin: 0;
}

.lightbox-frame img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 200px);
    max-height: calc(100dvh - 200px);
    object-fit: contain;
    border-radius: 8px;
    background: #05070c;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.lightbox-frame figcaption {
    margin-top: 14px;
    text-align: center;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.78);
}

.lightbox button {
    /* Controls are positioned against the overlay, independently of the photo. */
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    background: linear-gradient(159deg, #f29946 0%, #e74c26 100%);
    backdrop-filter: blur(12px);
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
    transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.lightbox button:hover {
    transform: scale(1.06);
    border-color: rgba(236, 106, 51, 0.72);
    background: linear-gradient(159deg, #f29946 0%, #e74c26 100%);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 28px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 0;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    width: 56px;
    height: 72px;
    border-radius: 14px;
    font-size: 0;
    transform: translateY(-50%);
}

.lightbox button.lightbox-arrow:hover {
    transform: translateY(-50%) scale(1.06);
}

.lightbox-close::before,
.lightbox-close::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
}

.lightbox-close::before {
    transform: rotate(45deg);
}

.lightbox-close::after {
    transform: rotate(-45deg);
}

.lightbox-arrow::before {
    content: '';
    width: 18px;
    height: 18px;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.lightbox-prev::before {
    transform: rotate(45deg);
    margin-left: 6px;
}

.lightbox-next::before {
    transform: rotate(-135deg);
    margin-right: 6px;
}

.lightbox-prev {
    left: 34px;
}

.lightbox-next {
    right: 34px;
}

@media (max-width: 900px) {
    .slide-gallery {
        padding: 18px 20px 60px 90px;
    }

    .slide-gallery .slide-content {
        padding-top: 35px;
    }

    .gallery-masonry {
        columns: 2 180px;
    }

    .lightbox {
        padding: 72px 64px;
    }

    .lightbox-arrow {
        width: 44px;
        height: 56px;
        border-radius: 8px;
    }

    .lightbox-close {
        top: 16px;
        right: 16px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 420px) {
    .slide-gallery {
        padding: 12px 16px 48px 64px;
    }

    .gallery-masonry {
        columns: 1;
    }

}
