.what-we-do {
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
    text-align: center;
    background: transparent;
    justify-content: center;
}

.services-wrapper {
    position: relative;
    margin-left: 18%;
    max-width: 1300px;
    height: 700px;
    display: flex;
    align-items: center;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.500);
    justify-content: center;
    width: 100%;
}


.dynamic-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    z-index: 0;
}

.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 2.0s ease-in-out;
    opacity: 0;
    filter: brightness(0.4);
    z-index: 0;
}

.bg-image.current {
    opacity: 1;
    z-index: 1;
}

.bg-image.next {
    z-index: 2;
}

.dynamic-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.0s ease;
    z-index: 1;
}

.dynamic-background.active::before {
    opacity: 1;
}

.dynamic-background.active {
    opacity: 1;
    transform: scale(1);
}

.fade-in {
    animation:
        fadeIn 0.7s ease-out forwards,
        subtleZoom 1.2s ease-out forwards;
}

.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes subtleZoom {
    0% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.dynamic-background {
    backface-visibility: hidden;
    perspective: 1000px;
}

.service-item:hover h3 {
    transform: translateY(-8px);
    transition: transform 0.3s ease;
}

.dynamic-background.active {
    opacity: 1;
    transform: scale(1);
}

.what-we-do .section-title {
    margin-left: 10%;
}

.what-we-do .section-subtitle {
    margin-left: 10%;
}

.services-list {
    display: flex;
    flex-direction: row;
    gap: 0px;
    width: 100%;
    height: 100%;
    padding: 0 50px;
    position: relative;
    z-index: 2;
}

.service-item {
    color: white;
    text-decoration: none;
    padding: 20px 25px;
    border-left: 3px solid transparent;
    transition: all 0.4s ease;
    text-align: left;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    position: relative;
    margin-bottom: 0;
    flex-grow: 1;
}

.service-item.wide-service {
    width: 50%;
    margin-right: 30px;
}

.service-item:not(.wide-service) {
    width: calc(25% - 20px);
}

.service-row {
    display: flex;
    align-items: center;
    flex-grow: 1;
    position: relative;
    cursor: pointer;
}

.vertical-divider {
    height: 100%;
    width: 2px;
    background-color: white;
    margin: 0 20px;
    align-self: stretch;
}

.service-row:last-child .vertical-divider {
    display: none;
}




.service-item h3 {
    font-size: 1.3em;
    margin: 0;
    position: relative;
    z-index: 2;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    backface-visibility: hidden;
    display: inline-block;
    user-select: none;
    -webkit-user-drag: none;
}

.service-item:hover {
    background: transparent;
    transform: translateX(10px);
}



/* Responsive Design */
@media (max-width: 768px) {
    .services-wrapper {
        margin: 0 auto;
        flex-direction: column;
        align-items: start;
        height: auto;
        width: 100%;
        padding: 20px;
    }

    .services-list {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
        padding: 0px;
        width: 100%;
        align-items: stretch;
    }

    .what-we-do {
        padding: 150px 20px;
    }

    .what-we-do .section {
        padding: 0px 0px;
        text-align: start;
        margin-right: 0%;
    }

    .what-we-do .section-subtitle {
        margin-left: 0%;
    }

    .what-we-do .section-title {
        margin-left: 0%;
    }

    .service-item {
        width: 100% !important;
        text-align: left;
        padding: 0;
        margin-bottom: 0px;
    }

    .service-item h3 {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 1.1em;
        padding: 20px 0px;
    }

    .service-item.wide-service {
        margin-right: 0 !important;
        padding-left: 0 !important;
    }

    .service-item.wide-service h3 {
        padding-left: 0 !important;
    }

    .vertical-divider {
        display: none;
    }

    .bg-image,
    .dynamic-background {
        filter: brightness(0.3);
    }


}