#hero {
    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-sizing: border-box;

    height: 650px;
    min-height: 500px;
    color: var(--grey-tint);

    padding: 6rem 2rem;
    width: 100%;
}

#hero::before {
    content: "";
    position: absolute;
    inset: -10px;

    background:
        linear-gradient(rgba(114, 114, 114, 0.3),
            rgba(114, 114, 114, 0.3)),
        url("../assets/images/tim-cooper-XfqGuWevmvs-unsplash.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    filter: blur(6px);
    z-index: -1;
}

.heading {
    max-width: 800px
}

/* .slogan {
} */

.hero-image {
    width: min(950px, 100%);
    height: 300px;
    object-fit: cover;
    border: 4px solid var(--cream-300);
    border-radius: 20px;
    margin: 0 4rem;
    transform: translateY(100px);
}

/* ---------- SERVICES ---------- */

#service {
    display: flex;
    flex-direction: column;

    padding-bottom: 4rem;
    border-bottom: 2px solid var(--cream-300);
    margin: 4rem 4rem 0 4rem;

    background-color: var(--cream-50);
    color: var(--cream-900);
}

#service p {
    color: var(--cream-700);
}

#service h2 {
    margin-bottom: 2rem;
}

#service h3 {
    margin: 2rem 0;
    border-bottom: 2px solid var(--cream-300);
    margin-right: 70%;
}

.service-card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;

    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;

    /* Grow, shrink, and aim for roughly 320px wide */
    flex: 1 1 320px;

    /* Prevent cards from becoming too wide */
    max-width: 420px;
    min-width: 280px;

    padding: 0.4rem;
    padding-bottom: 1.5rem;
    border-radius: 16px;
    overflow: hidden;
}

.card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 12px;

    border-bottom: 2px solid var(--grey-shade);
    border-radius: 0 0 16px 16px;
}

.card-image {
    width: 100%;
    height: 280px;
    border-radius: 16px 16px 0 0;
    object-fit: cover;
    display: block;
}

.card h4 {
    margin: 0.75rem 0.5rem 0;
}

.card p {
    margin: 0.5rem;
    text-align: justify;
}

/* Stack cards on narrow screens */
@media (max-width: 600px) {
    .service-card-container {
        gap: 1.5rem;
    }

    .card {
        flex-basis: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .card-image {
        height: 240px;
    }
}

.service-button {
    align-self: flex-start;
    margin:4rem 0 0 3rem;
    padding: 0.5rem 1rem;
    background-color: var(--cream-700);
    color: var(--cream-50);
    width: fit-content;
    border: 2px solid var(--dark-grey-shade);
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

/* --------- MORALITY ---------- */

#morality {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2rem;
    padding-bottom: 4rem;
    margin: 4rem 4rem 0 4rem;
    background-color: var(--cream-50);
    color: var(--cream-900);
}

.morality-text {
    display: flex;
    flex-direction: column;
    flex: 1 1 350px;
    gap: 1rem;
}

.morality-image {
    flex: 1 1 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
}

/* ---------- Testimonials ---------- */

#reviews {
    position:relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;

    padding: 4rem;

    background-color: var(--dark-grey-shade);
    color: var(--cream-50);
}

#reviews::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: calc(100% - 4rem);
    transform: translateX(-50%);
    border-bottom: 2px solid var(--cream-300);
}

.review-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;

    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 1rem;
}

.review {
    flex: 0 0 600px;

    display:flex;
    flex-direction:column;

    scroll-snap-align: start;
    background-color: var(--cream-50);
    color: var(--cream-900);
    
    padding: 1rem;
    border-radius: 16px;
}

.reviewer {
    margin-top: auto;
    text-align: right;
    align-self: flex-end;
}

.rating {
    width: 35px;
    height: auto;
    margin-bottom: 1rem;
}