/* Divi Horizontal Gallery Slider */

.horizontal-gallery {
    position: relative;
}

.horizontal-gallery .et_pb_gallery_items {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 20px;
    overflow-x: hidden;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

.horizontal-gallery .et_pb_gallery_item {
    flex: 0 0 calc((100% - 60px) / 4) !important;
    width: calc((100% - 60px) / 4) !important;
    max-width: calc((100% - 60px) / 4) !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    scroll-snap-align: start;
}

.horizontal-gallery .et_pb_gallery_image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.horizontal-gallery .et_pb_gallery_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.horizontal-gallery .gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.horizontal-gallery .gallery-arrow:hover {
    opacity: 0.75;
}

.horizontal-gallery .gallery-prev {
    left: -22px;
}

.horizontal-gallery .gallery-next {
    right: -22px;
}

@media (max-width: 767px) {
    .horizontal-gallery .et_pb_gallery_items {
        gap: 15px;
    }

    .horizontal-gallery .et_pb_gallery_item {
        flex: 0 0 calc((100% - 15px) / 2) !important;
        width: calc((100% - 15px) / 2) !important;
        max-width: calc((100% - 15px) / 2) !important;
    }

    .horizontal-gallery .gallery-arrow {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }

    .horizontal-gallery .gallery-prev {
        left: 5px;
    }

    .horizontal-gallery .gallery-next {
        right: 5px;
    }
}
