#heroServices {
    min-height: calc(100svh - 80px);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
#background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -1;
}

#heroServices::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 0;
}
.heroServices {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    color: white;
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.heroServices h3 {
    font-size: clamp(1.25rem, 2vw + 0.5rem, 2.25rem);
    font-weight: 300;
    margin: 0;
}

.heroServices h1 {
    font-size: clamp(2.5rem, 5vw + 1rem, 6.75rem);
    font-weight: 500;
    margin: 10px 0;
}

.services-content {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.services-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    /* Ensures all sections have the same max width */
    margin: 0 auto;
}

/* About Us Container */
.services-us-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1000px;
}

/* Text Container Styles */
.services-container {
    flex: 1;
    width: 100%;
    text-align: center;
}

.text {
    text-align: center;
}

.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    align-items: stretch;
    text-align: left;
    gap: 40px;
    padding: 30px;
}

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: border-color var(--transition-base), transform var(--transition-base);
}

.card:hover {
    border-color: rgba(255, 76, 76, 0.45);
    transform: translateY(-4px);
}

.card img {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    height: auto;
    flex: none;
    object-fit: cover;
    transition: transform 0.5s;
    margin-bottom: 0;
}

.card:hover img {
    transform: scale(1.04);
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 24px 20px 28px;
    text-align: center;
}

/* the description grows, so every button lands on the same line */
.card-content .cardp {
    flex: 1;
}

.card-content .button-white {
    margin-top: auto;
}

.card-content h3 {
    margin: 0 0 10px 0;
    font-weight: 500;
}

.card p {
    margin: 0 0 10px 0;
    font-size: 15px;
}

@media screen and (max-width: 1200px) {
    .hero h3 {
        font-size: clamp(1.25rem, 2vw + 0.5rem, 2.25rem);
        font-weight: 300;
        margin: 0;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 5vw + 1rem, 6.75rem);
        font-weight: 500;
        margin: 10px 0;
    }
    .services {
        grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    }
    
}

@media screen and (max-width: 768px) {
    #heroServices {
        flex-direction: column;
        background-position: center;
    }

    .heroServices h3 {
        font-size: clamp(1.25rem, 2vw + 0.5rem, 2.25rem);
        font-weight: 300;
        margin: 0;
    }

    .heroServices h1 {
        font-size: clamp(2.5rem, 5vw + 1rem, 6.75rem);
        font-weight: 500;
        margin: 10px 0;
    }

    .services {
        grid-template-columns: 1fr;
        align-items: center;
        width: 100%;
        padding: 0;

    }

    

    .card-content {
        text-align: center;

    }
    

    .services-content {
        width: 100%;

    }

    .services-us-container {
        flex-direction: column;
        align-items: center;
        width: 100%;

    }

    .text {
        padding: 30px;
    }
}