/* --- SERVICES PAGE STYLES --- */
.services {
    width: 100%;
    padding: 4rem 0;
    background-color: var(--bg-color, #f9f9f9); /* A light background for contrast */
}

.service-container {
    display: flex;
    align-items: center;
    width: 85vw;
    max-width: 1200px;
    min-height: 50vh;
    margin: 0 auto 5rem auto; /* Consistent bottom margin */
    background-color: var(--white-color);
    border-radius: 24px; /* Softer radius */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); /* Softer, more modern shadow */
    overflow: hidden; /* Ensures content respects the border-radius */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.service-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Alternating layout for visual interest */
.service-container:nth-of-type(even) {
    flex-direction: row-reverse;
}

.service-container img {
    width: 50%; /* Give image and text equal space */
    height: auto; /* Let height be determined by aspect ratio */
    object-fit: cover;
    align-self: stretch; /* Continue to fill the container height */
    /* This prevents the image from being squished or stretched */
    flex-shrink: 0;
}

.service-text {
    flex: 1; /* Allows text to fill remaining space */
    padding: 3rem 4rem; /* Increase horizontal padding for better spacing */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center the text content */
}

.service-text h1 {
    /* Responsive font size: min 1.8rem, preferred 2.5vw, max 2.5rem */
    font-size: clamp(1.8rem, 2.5vw, 2.5rem);
    text-transform: capitalize;
    margin: 0 0 1rem 0;
    color: var(--black-color);
}

.service-text hr {
    height: 3px;
    width: 80px;
    background-color: var(--primary-color);
    border: none;
    margin: 0 0 1.5rem 0; /* Consistent spacing */
}

.service-text p {
    /* Responsive font size: min 1rem, preferred 1.1vw, max 1.1rem */
    font-size: clamp(1rem, 1.1vw, 1.1rem);
    line-height: 1.7; /* Improved readability */
    color: var(--fourth-color);
    margin: 0;
}

/* --- MOBILE RESPONSIVE STYLES --- */
@media (max-width: 960px) {
    .services {
        padding: 2rem 0;
    }

    .service-container,
    .service-container:nth-of-type(even) {
        flex-direction: column; /* Stack image and text vertically */
        width: 90vw;
        min-height: auto;
        margin-bottom: 3rem;
    }

    .service-container img {
        width: 100%;
        height: 250px; /* Fixed height for mobile images */
        border-radius: 0; /* Reset radius for stacking */
    }

    .service-text {
        width: 100%;
        padding: 2rem 1.5rem; /* Adjust padding for smaller screens */
        text-align: center; /* Center text on mobile */
    }

    .service-text hr {
        margin-left: auto;
        margin-right: auto; /* Center the hr element */
    }
}