body {
    background-color: #495e4d;
}

.services-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 400px;
    margin-bottom: 110px;
    padding: 0;
    text-align: center;
    color: #fff;
    background: linear-gradient(rgb(0, 0, 0, 0.5), rgb(0, 0, 0, 0.5)), url("../images/services-hero.jpg");
    background-position: center;
    background-size: cover;
}

#service-title {
    color: #fff;
    font-size: 80px;
}

@media (max-width: 500px) {
    #service-title {
        padding: 0 20px;
        font-size: 60px;
    }
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
}

.services-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.service {
    display: flex;
    width: 100%;
    max-width: 1170px;
    height: 430px;
    margin: 20px auto;
    border: solid 2px #495e4d;
    background-color: #fff;
    box-shadow:
        0 2px 6px rgb(0, 0, 0, 0.2),
        0 4px 8px rgb(0, 0, 0, 0.3);
}

.service-image {
    overflow: hidden;
    flex-basis: 50%;
    align-items: center;
    justify-content: center;
    max-height: 100%;
}

.service-content {
    display: flex;
    flex-direction: column;
    flex-basis: 50%;
    justify-content: center;
    padding: 60px;
}

.service img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service h2 {
    margin-bottom: 20px;
    text-align: left;
    color: #333;
    font-size: 35px;
    font-weight: 900;
}

.service p {
    margin-bottom: 25px;
    text-align: left;
    color: #333;
    font-size: 20px;
}

/* Style the "Read More" button */
.service .read-more-button {
    display: block;
    width: 150px;
    padding: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    color: #fff;
    border: solid 3px #000;
    background-color: #495e4d;
    font-size: 20px;
    font-weight: bold;
}

.service .read-more-button:hover {
    color: #495e4d;
    border: solid 3px #495e4d;
    background-color: #fff;
}

/* For screens 768px and below */
@media (max-width: 768px) {
    /* Ensure service elements stack vertically */
    .service {
        display: block;
        overflow: hidden;
        max-width: 100%;
        height: auto;
    }

    /* Set full width for both image and content */
    .service-image,
    .service-content {
        width: 100%;
    }

    /* Fix image height and maintain aspect ratio */
    .service img {
        display: block;
        width: 100%;
        height: 250px;
        margin: 0 auto;
        object-fit: cover;
    }

    .service-content {
        box-sizing: border-box;
        padding: 40px;
    }
}
