/*--------------------------------------------------------------
# Gallery Page
--------------------------------------------------------------*/
.gallery-page {
    position: relative;
    display: block;
    padding: 120px 0 143px;
}

.gallery-page .row {
    --bs-gutter-x: 10px;
}

.gallery-page .container {
    max-width: 1572px;
}

.gallery-page__single {
    position: relative;
    display: block;
    margin-bottom: 10px;
}

.gallery-page__img {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    z-index: 1;
}

.gallery-page__img:before {
    content: "";
    position: absolute;
    top: 0;
    bottom: -2px;
    left: 0;
    right: 0;
    background-color: var(--fistudy-black);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    -webkit-transform-origin: top center;
    transform-origin: top center;
    -webkit-transform: scaleY(0) translateZ(100px);
    transform: scaleY(0) translateZ(100px);
    -webkit-transition: opacity 500ms ease, visibility 500ms ease, -webkit-transform 700ms ease;
    transition: opacity 500ms ease, visibility 500ms ease, -webkit-transform 700ms ease;
    transition: opacity 500ms ease, visibility 500ms ease, transform 700ms ease;
    transition: opacity 500ms ease, visibility 500ms ease, transform 700ms ease, -webkit-transform 700ms ease;
    z-index: 2;
}

.gallery-page__single:hover .gallery-page__img:before {
    opacity: .90;
    visibility: visible;
    -webkit-transform: scaleY(1) translateZ(0px);
    transform: scaleY(1) translateZ(0px);
}

.gallery-page__img-box {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    z-index: 1;
}

.gallery-page__img img {
    width: 100%;
    border-radius: 8px;
}

.gallery-page__icon {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    z-index: 2;
}

.gallery-page__icon a {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    color: var(--fistudy-white);
    -webkit-transform: scale(0);
    transform: scale(0);
    opacity: 0;
    -webkit-transition: all 500ms ease;
    transition: all 500ms ease;
    z-index: 2;
}


.gallery-page__single:hover .gallery-page__icon a {
    -webkit-transform: scale(1);
    transform: scale(1);
    transition-delay: 500ms;
    opacity: 1;
}

.gallery-page__icon a:hover {
    color: var(--fistudy-base);
}

.ices-gallery-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 42px;
    align-items: start;
}

.ices-gallery-sidebar {
    position: sticky;
    top: 110px;
    background: #fff;
    border: 1px solid var(--fistudy-bdr-color);
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 14px 34px rgba(5, 33, 67, 0.08);
}

.ices-gallery-sidebar a {
    display: block;
    padding: 13px 16px;
    border-radius: 6px;
    color: var(--fistudy-black);
    font-size: 17px;
    font-weight: 700;
}

.ices-gallery-sidebar a:hover,
.ices-gallery-sidebar a.active {
    background: var(--fistudy-base);
    color: #fff;
}

.ices-gallery-section {
    margin-bottom: 44px;
    scroll-margin-top: 120px;
}

.ices-gallery-section:last-child {
    margin-bottom: 0;
}

.ices-gallery-section h3 {
    margin: 0 0 18px;
    color: var(--fistudy-black);
    font-size: 28px;
    font-weight: 800;
}

.ices-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.ices-gallery-item {
    display: block;
    height: 230px;
    border-radius: 8px;
    overflow: hidden;
    background: #eef2f7;
    box-shadow: 0 12px 28px rgba(5, 33, 67, 0.08);
}

.ices-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.ices-gallery-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 1199px) {
    .ices-gallery-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 28px;
    }

    .ices-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ices-gallery-layout {
        grid-template-columns: 1fr;
    }

    .ices-gallery-sidebar {
        position: relative;
        top: auto;
        display: flex;
        gap: 8px;
        overflow-x: auto;
    }

    .ices-gallery-sidebar a {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 15px;
    }

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

    .ices-gallery-item {
        height: 260px;
    }
}
