html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

.services {
    max-height: 800px;
    overflow: hidden;
}

.services .section-content {
    min-height: 60vh;
    align-items: center !important;
}

.services .overlay-background.alt {
    background: linear-gradient(transparent 10%, rgba(0, 0, 0, 0.5) 100%) !important;
}

.markets .overlay-background.alt {
    background: linear-gradient(rgba(0, 0, 0, 0.5) 10%, transparent 100%);
}

.markets .section-content {
    gap: 6rem;
}

.markets .section-content > .flex {
    gap: 3rem;
    width: 100%;
    align-items: flex-start;
    position: relative;
    transition: all 1s ease;
}

.markets .section-content > .flex.row {
    width: 100%;
    gap: 4rem;
    position: relative;
    align-items: center !important;
}

.markets .flex.row:has(.right) {
    justify-content: flex-end !important;
}

.img-container {
    max-height: 400px;
    width: 100%;
    gap: 1.5rem;
    overflow: hidden;
    overflow-x: scroll;
    align-items: flex-end;
    border-radius: 0.4rem;
    transition: all 1s ease;
}

.img-container .img {
    width: 100%;
    opacity: 0.7;
    background-attachment: fixed !important;
    filter: grayscale(0.5);
    box-sizing: content-box !important;
    transition: all 0.5s ease;
}

.img-container .img:first-of-type {
    opacity: 0.9;
    filter: grayscale(0.3);
}

.img-container .img:hover {
    opacity: 1 !important;
    filter: none !important;
    scale: 1.05 !important;
    padding: 0 2rem !important;
}

.img-container .img.alt {
    max-height: 400px;
}

.hero-title.h1 #change-text {
    background-color: var(--accent);
    font-style: italic;
    padding: 0.1rem;
    padding-right: 0.6rem;
}

#enterprise .hero-sub {
    max-width: 100% !important;
}

#enterprise .img-container {
    max-height: 300px;
}

#public .img-container {
    align-items: center;
}

#contractors .img-container {
    justify-content: flex-end !important;
}

#enterprise:hover .img-container, #public:hover, #contractors:hover, #property:hover {
    pointer-events: all !important;
    opacity: 1 !important;
}

@media (max-width: 1024px) {
    .markets .section-content > .flex.row {
        flex-direction: column !important;
        gap: 2.5rem !important;
    }
}

@media (max-width: 767px) {
    #enterprise, #contractors {
        flex-direction: column-reverse !important;
    }
    .img-container {
        flex-direction: column !important;
        justify-content: center;
        align-items: center;
        max-height: 800px !important;
        overflow-y: scroll;
        overflow-x: hidden;
    }

    .img-container:has(.img ~ .img) .img:last-of-type {
        display: none;
    }

    .img-container:has(.img ~ .img ~ .img) .img:nth-of-type(2) {
        display: none;
    }
}

@media (max-width: 400px) {
    .services {
        padding-top: 3rem;
    }
}
