.gallery-one {
    position: relative;
    display: block;
    background: var(--cleanin-white);
    z-index: 1;
}

.gallery-one__inner {
    position: relative;
    display: block;
}

.gallery-one__single {
    position: relative;
    display: block;
    margin-bottom: 30px;
}

.gallery-one__single-img {
    position: relative;
    display: block;
    overflow: hidden;
}

.gallery-one__single-img img {
    width: 100%;
}

.gallery-one__single-icon {
    position: absolute;
    inset: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--cleanin-white-rgb), 0.9);
    transform: scale(0.95);
    transition: 0.8s;
    opacity: 0;
    z-index: 1;
}

.gallery-one__single:hover .gallery-one__single-icon {
    transform: scale(1);
    opacity: 1;
}

.gallery-one__single-icon a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 75px;
    height: 75px;
    background: var(--cleanin-base);
    border-radius: 50%;
    transform: scale(1.2);
    opacity: 0;
    transition: 0.8s;
    color: var(--wdtPrimaryColor);
}

.gallery-one__single:hover .gallery-one__single-icon a {
    transform: scale(1);
    opacity: 1;
}

.gallery-one__single-icon a:hover {
    background: var(--cleanin-black);
}

.gallery-one__single-icon a span::before {
    position: relative;
    display: inline-block;
    color: var(--cleanin-white);
    font-size: 20px;
    line-height: 20px;
    font-weight: 700;
}

.gallery-one--gallery {
    position: relative;
    display: block;
}

.surgical-gallery {
    background: transparent;
}

.surgical-gallery .surgical-gallery__grid {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
    padding-top: 35px;
}

.surgical-gallery .surgical-gallery__column {
    display: flex;
    flex-direction: column;
}

.surgical-gallery .surgical-gallery__item {
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 30px;
    height: 100%;
}

.surgical-gallery .surgical-gallery__column>.surgical-gallery__item {
    flex: 1 1 0%;
}

.surgical-gallery .surgical-gallery__item--tall {
    height: 100%;
}

.surgical-gallery .surgical-gallery__item--wide {
    height: auto;
}

.surgical-gallery .gallery-one__single {
    display: flex;
    flex-direction: column;
    background: rgb(255, 255, 255);
    padding: 0px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 10px 30px;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.surgical-gallery .surgical-gallery__item--tall .gallery-one__single-img {
    padding-top: 133.33%;
}

.surgical-gallery .surgical-gallery__item--wide .gallery-one__single-img {
    padding-top: 75%;
}

.surgical-gallery .surgical-gallery__column .surgical-gallery__item--wide:not(:last-child) {
    margin-bottom: 30px;
}

.surgical-gallery .gallery-one__single:hover {
    transform: translateY(-10px);
    box-shadow: rgba(0, 0, 0, 0.12) 0px 20px 40px;
}

.surgical-gallery .gallery-one__single-img {
    position: relative;
    width: 100%;
    padding-top: 66.66%;
    overflow: hidden;
    flex-shrink: 0;
}

.surgical-gallery .gallery-one__single-img img {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s;
}

.surgical-gallery--mosaic .gallery-one__single-img img {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.surgical-gallery--mosaic .gallery-one__single:hover .gallery-one__single-img img {
    transform: translate(-50%, -50%) scale(1.05);
}

.surgical-gallery:not(.surgical-gallery--mosaic) .gallery-one__single:hover .gallery-one__single-img img {
    transform: scale(1.1);
}

.surgical-gallery .gallery-one__single-icon {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: rgba(23, 32, 68, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 2;
}

.surgical-gallery .gallery-one__single:hover .gallery-one__single-icon {
    opacity: 1;
}

.surgical-gallery .gallery-one__single-icon a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(23, 32, 68);
    font-size: 18px;
    transform: translateY(20px);
    transition: 0.4s;
}

.surgical-gallery .gallery-one__single:hover .gallery-one__single-icon a {
    transform: translateY(0px);
}

.surgical-gallery .gallery-one__single-icon a:hover {
    background: rgb(219, 154, 84);
    color: rgb(255, 255, 255);
}

.surgical-gallery .gallery-one__single-desc {
    padding: 20px;
    background: rgb(226, 221, 215);
    justify-content: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.surgical-gallery .gallery-one__single-desc p {
    margin: 0px;
    color: rgb(34, 34, 34);
    font-size: 18px;
    line-height: 1.5;
    font-weight: 400;
    text-align: center;
    font-family: inherit;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.surgical-gallery--mosaic {
    /* background-color: #f8f4f0; */
    background-image: url('../images/pattern/services-v2-pattern.png');
    background-repeat: no-repeat;
    background-size: cover;
    /* padding: 80px 0; */
    position: relative;
}

.surgical-gallery--mosaic::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.surgical-gallery--mosaic .gallery-one__single {
    border: 3px solid #fff;
    outline: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background: #fff;
    margin: 5px;
    transition: all 0.4s ease;
    overflow: hidden;
}

.surgical-gallery--mosaic .gallery-one__single:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(216, 172, 47, 0.15);
    border-color: var(--cleanin-base);
}

.surgical-gallery--mosaic .gallery-one__single-img {
    /* border-radius: 46px; */
    /* slightly less for inner curve */
}

.surgical-gallery--mosaic .gallery-one__single-img img {
    /* border-radius: 46px; */
    padding: 12px;
}

.surgical-gallery--mosaic .gallery-one__single-icon {
    background: rgba(var(--cleanin-black-rgb), 0.4);
    border-radius: 13px;
}

.surgical-gallery--mosaic .gallery-one__single-icon a {
    width: 60px;
    height: 60px;
    background: #d8ac2f;
    color: var(--cleanin-black);
    font-size: 24px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transform: scale(0.5) translateY(20px);
    opacity: 0;
}

.surgical-gallery--mosaic .gallery-one__single:hover .gallery-one__single-icon a {
    transform: scale(1) translateY(0px);
    opacity: 1;
}

.surgical-gallery--mosaic .gallery-one__single-icon a:hover {
    background: var(--cleanin-base);
    color: #fff;
    transform: scale(1.1);
}

.surgical-gallery--mosaic .gallery-one__single-desc {
    position: absolute;
    bottom: 0;
    left: 0;
    /* right: 0; */
    padding: 30px 20px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
    border: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    z-index: 3;
    pointer-events: none;
    text-align: left;
}

.surgical-gallery--mosaic .gallery-one__single:hover .gallery-one__single-desc {
    opacity: 1;
    transform: translateY(0);
}

.surgical-gallery--mosaic .gallery-one__single-desc h4 {
    color: var(--cleanin-base);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: var(--cleanin-font-two);
    text-transform: capitalize;
}

.surgical-gallery--mosaic .gallery-one__single-desc p {
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    margin: 0;
    opacity: 0.9;
}

@media only screen and (max-width: 1199px) {
    .surgical-gallery .surgical-gallery__item--tall .gallery-one__single-img {
        padding-top: 100%;
    }
}

@media only screen and (max-width: 991px) {
    .surgical-gallery .surgical-gallery__column {
        margin-bottom: 0px;
    }

    .surgical-gallery .surgical-gallery__item {
        margin-bottom: 30px;
        height: auto;
    }

    .surgical-gallery .surgical-gallery__item--tall .gallery-one__single-img {
        padding-top: 70%;
    }

    .surgical-gallery .surgical-gallery__item--wide .gallery-one__single-img {
        padding-top: 60%;
    }
}

@media only screen and (max-width: 767px) {
    .surgical-gallery .surgical-gallery__grid {
        margin-left: -10px;
        margin-right: -10px;
        margin-top: 30px;
        /* Added top space for mobile view */
    }

    .surgical-gallery .surgical-gallery__item {
        padding-left: 10px;
        padding-right: 10px;
        margin-bottom: 20px;
    }
}

@media only screen and (max-width: 575px) {

    .surgical-gallery .surgical-gallery__item--tall .gallery-one__single-img,
    .surgical-gallery .surgical-gallery__item--wide .gallery-one__single-img {
        padding-top: 65%;
    }

    .surgical-gallery .gallery-one__single-desc {
        padding: 15px 10px;
    }

    .surgical-gallery .gallery-one__single-desc p {
        font-size: 14px;
        -webkit-line-clamp: 4;
        line-clamp: 4;
        -webkit-box-orient: vertical;
    }

    .surgical-gallery--mosaic .gallery-one__single {
        border-radius: 15px;
    }

    .surgical-gallery--mosaic .gallery-one__single-img {
        border-radius: 15px 15px 0px 0px;
    }

    .surgical-gallery--mosaic .gallery-one__single-desc {
        border-radius: 0px 0px 15px 15px;
        padding: 20px 15px;
    }
}