.advantages__items {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.advantages__item {
    flex-basis: calc((100% - 30px) / 3);
    border-radius: 24px;
    background: #202029;
    border: 1px solid #202029;
}

.advantages__item-img,
.advantages__item-img a {
    width: 100%;
    display: flex;
}


.advantages__item-img img {
    width: 100%;
    height: auto;
    border-radius: 24px 24px 0 0;
}

.advantages__item-content {
    padding: 30px;
}

.advantages__item-heading {
    color: #FFF;
    margin-bottom: 10px;
}

.advantages__item-text {
    margin-bottom: 0;
    line-height: 1.3;
    color: #9a9a9a;
}

.advantages__top {
    display: flex;
    justify-content: space-between;
    gap: 100px;
    align-items: center;
    margin-bottom: 46px;
}

.advantages__heading {
    flex-basis: 400px;
}

.advantages__text-wrap {
    flex-basis: 572px;
}

.advantages__text {
    margin-bottom: 0;
}

/* Lightbox Overlay */
.custom-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Semi-transparent black background */
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

/* Lightbox Image */
.custom-lightbox__image {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 70svh;
    border-radius: 24px; /* Optional: slight rounding for aesthetics */
}

.custom-lightbox__content {
    position: relative;
    top: 20px;
    max-width: 90%;
    max-height: 70svh;
}

/* Close Button */
.custom-lightbox__close {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 30px;
    height: 30px;
    color: #fff;
    font-size: 24px;
    line-height: 30px;
    text-align: center;
    background: url('data:image/svg+xml,%3Csvg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M19.1305 0.956376L0.956758 19.1302C0.42849 19.6584 0.42849 20.5149 0.956759 21.0432C1.48503 21.5715 2.34152 21.5715 2.86979 21.0432L21.0436 2.86941C21.5718 2.34114 21.5718 1.48465 21.0436 0.956377C20.5153 0.428109 19.6588 0.428108 19.1305 0.956376Z" fill="%23FFFFFF" /%3E%3Cpath d="M0.956622 2.86946L19.1304 21.0432C19.6587 21.5715 20.5152 21.5715 21.0434 21.0432C21.5717 20.515 21.5717 19.6585 21.0434 19.1302L2.86965 0.956436C2.34138 0.428167 1.48489 0.428167 0.956623 0.956435C0.428354 1.4847 0.428354 2.3412 0.956622 2.86946Z" fill="%23FFFFFF" /%3E%3C/svg%3E') no-repeat center center;
    background-size: contain;
    border: none;
    cursor: pointer;
    text-indent: -9999px; /* Hide the text content ("×") for accessibility */
    overflow: hidden;
}

/* Show lightbox when active */
.custom-lightbox--active {
    display: flex;
}

/* Ensure images in advantages__item-img are styled properly */
.advantages__item-img img {
    max-width: 100%;
    height: auto;
    display: block;
}

.advantages__item-img a {
    display: inline-block;
}


@media screen and (max-width: 1024.98px) {
    .custom-lightbox__close {
        right: 0;
        top: -40px;
        width: 20px;
        height: 20px;
    }

    .custom-lightbox__image {
        border-radius: 12px;
    }
}

@media screen and (min-width: 1600px) {
    .advantages__heading,
    .advantages__text-wrap {
        flex-grow: 1;
    }
}

@media screen and (max-width: 1199.98px) {
    .advantages__item {
        flex-basis: calc((100% - 15px) / 2);
    }
}

@media screen and (max-width: 1024.98px) {
    .advantages__item-content {
        padding: 20px;
    }

    .advantages__item {
        border-radius: 12px;
    }

    .advantages__item-img img {
        border-radius: 12px 12px 0 0;
    }

    .advantages__top {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
    }

    .advantages__heading,
    .advantages__text-wrap {
        flex-basis: 100%;
    }
}

@media screen and (max-width: 767.98px) {

    .advantages__item-content {
        padding: 20px;
    }

    .advantages__item {
        flex-basis: 100%;
    }

    .advantages__top {
        margin-bottom: 20px;
    }
}

@media screen and (max-width: 599.98px) {
    .advantages__item-content {
        padding: 15px 15px 20px 15px;
    }

    .advantages__top {
        gap: 10px;
    }
}
