.tabs-wrapper {
    display: flex;
    align-items: flex-start;
    column-gap: 72px;
    position: relative;
    padding: 100px 0;
    background-color: #EBEBEB;
}
.tabs-wrapper::before,
.tabs-wrapper::after {
    content: "";
    display: block;
    position: absolute;
    top:0;bottom:0;
    width: 80px;
    background-color: inherit;
}
.tabs-wrapper::before {
    left:0;
    transform: translateX(-100%);
}
.tabs-wrapper::after {
    right:0;
    transform: translateX(100%);
}
.tabs-images, .tabs-content {
    flex: 1 1 50%;
}
.tabs-section-title {
    margin-bottom: 64px;
    font-size: 40px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}
.acf-tabs-dropdown.js-dropdown-container {
    flex-direction: column;
    gap: 48px 0;
}
.acf-tabs-dropdown.js-dropdown-container .dropdown-item {
    position: relative;
    margin: 0;
    padding: 0 0 0 34px;
}

.acf-tabs-dropdown.js-dropdown-container .dropdown-item::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 8px;
    height: 100%;
    border-radius: 24px;
    background-color: #ccc;
    opacity: 0;
}

.acf-tabs-dropdown.js-dropdown-container .dropdown-item.open::before {
    opacity: 1;
}

/* Create a stacking context for images using Grid */
.tabs-images {
    display: grid;
    grid-template-areas: "stack";
    align-items: start; /* Align images to the top */
}

.tab-image {
    grid-area: stack; /* Stack all images in the same grid cell */
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
    width: 100%;
    pointer-events: none; /* Prevent interaction with invisible images */
    z-index: 0;
}

.tab-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 24px;
}

.tab-image.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1; /* Ensure active image is on top */
}

@media (max-width: 1279px) {
    .tabs-wrapper {
        padding: 40px 10px;
    }
    .tabs-wrapper::before,
    .tabs-wrapper::after {
        content: none;
    }
    .tabs-section-title {
        font-size: 28px;
    }
}

@media (max-width: 1023px) {
    .tabs-wrapper {
        flex-direction: column;
        row-gap: 24px;
    }
    .tabs-section-title {
        margin-bottom: 24px;
        font-size: 20px;
    }
    .tabs-images, .tabs-content {
        width: 100%;
    }
    .tab-image {
        aspect-ratio: 16 / 9;
        overflow: hidden;
    }
    .tab-image img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}
