
*,
*::before,
*::after {
    box-sizing: border-box;
}

#commercial-card {
    background: url('../images/huddyphotos/13.webp');
    background-size: cover;
}

#domestic-card {
    background: url('../images/huddyphotos/2.webp');
    background-size: cover;
}

#garden-house-card {
    background: url('../images/huddyphotos/6.webp');
    background-size: cover;
}


 .services {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1500px;
    margin: 0 auto;
}

.card {
    min-height: 400px;
    /* background-image: url('../images/cards/a\ man\ writing\ code.png'); */
    padding: 10rem 0 0;
    max-width: 40ch;
    min-width: 40ch;
    text-align: left;
    border-radius: 1rem;
    overflow: hidden;

    transition: transform 0.3s ease-in-out;
    margin-bottom: 10px;

}

@media screen and (max-width: 465px) {
    .card {
        min-width: 90%;
        max-width: 90%;
        margin-bottom: 20px;
    }
    
}

.card:hover,
.card:focus-within {
    transform: scale(1.05);
}

.card-content {
    --padding: 1.3rem;
    padding: var(--padding);
    background: linear-gradient(
    hsl(0 0% 0% / 0),
    hsl(0 0% 0% / 0.3) 20%,
    hsl(0 0% 0% / 1));
}

.card-title {
    color: white;
    width: max-content;
    position: relative;
    
}

.card-title::after {
    content: '';
    display: block;
    width: calc(100% + var(--padding));
    height: 4px;
    background-color: #f37021;
    position: absolute;
    bottom: -2px;
    left: calc(var(--padding) * -1);
    transform-origin: left;
}

.card:hover .card-title::after,
.card:focus-within .card-title::after {
    transform: scaleX(1);
    transition: transform 500ms ease;
}

.card-body {
    color: rgb(255 255 255 / 0.85);
    text-align: left;
    margin-left: 0px;
}

.card-button {
    cursor: pointer;
    display: inline-block;
    background-color: #f37021;
    text-decoration: none;
    color: black;
    padding: 0.3em 1em;
    border-radius: .25em;
    transition: all 0.3s ease-in-out;
}

.card-button:hover,
.card-button:focus {
    background-color: #f37021;
    box-shadow: 0 0 15px #f37021;
    color: white;
}

#coming-soon-card {
    background-color: black;
}

.content-section {
    overflow-x: hidden;
}


@media (hover) {
    .card-content {
        transform: translateY(65%);
        transition: transform 0.5s ease;
    }
    .card:hover .card-content,
.card:focus-within .card-content {
    transform: translateY(0);
    transition-delay: 500ms;
}

.card:focus-within .card-content {
    transition-duration: 0ms;
}

.card-content > *:not(.card-title) {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.card:hover .card-content > *:not(.card-title) {
    opacity: 1;
    transition-delay: 800ms;
}

.card:focus-within .card-content > *:not(.card-title) {
    opacity: 1;
    transition-delay: 300ms;
}

.card-title::after {
    transform: scaleX(0);
}
    
}

@media screen and (max-width: 992px) {
    .card {
        margin: 0 2px;
    }
    
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;;
        scroll-behavior: auto !important;
        animation-delay: 0.01ms !important;
    }

    .card:hover {
        transform: scale(1) !important;
        transition: none !important;
    }

    .card-button:hover {
        box-shadow: none !important;
    }

    .service-card-end, .service-card-end-2 {
        transform:translateX(0);
        opacity: 1;
        transition: all 0.001ms ease;
        transition-delay: 0.01ms;
    }

}