/* General Responsiveness and Sizing */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Ensures padding/border don't add to element's total width */
}

/* Services Section */
#services {
    border-bottom: 5px solid #013153;
}

.services-title {
    text-align: left;
    margin-bottom: 3rem; /* Slightly reduced for better flow */
    padding: 0 1.5rem;
}

.services-title h2 {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Fluid font size for main title */
    margin-bottom: 1rem;
}

.services-sub-title {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem); /* Fluid font size for sub-title */
    line-height: 1.5;
    color: #fff;
    width: 50%; /* Remains 50% for larger screens */
    max-width: 800px; /* Prevents it from getting too wide on very large screens */
}

.services-body-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem; /* Slightly reduced gap for better packing on smaller screens */
    padding: 0 1.5rem; /* Add horizontal padding to the wrapper */
}

/* Service Card Wrapper */
.services-body-wrap-wrapper {
    width: 48%; /* Each card takes almost half the width on larger screens */
    background-color: rgba(1, 49, 83, 0.7);
    border-radius: 6px;
    padding: 1rem;
    height: auto;
    color: #fff;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;

    /* Initial state for JS animation */
    opacity: 0;
    transform: translateY(20px);
}

/* Hover Effect for Service Cards */
.services-body-wrap-wrapper:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Image Adjustment */
.image-adjust {
    width: 100%;
    height: auto; /* Ensure image scales proportionally */
    display: block;
}

/* Service Card Content */
.services-body-category {
    padding: 30px 0 10px 0;
    font-size: clamp(0.9rem, 1.5vw, 1rem); /* Fluid font size */
    text-align: left;
}

#services-body-title {
    font-size: clamp(1.5rem, 3.5vw, 2rem); /* Fluid font size for card title */
    padding-bottom: 10px;
    font-weight: 500;
    text-align: left;
}

.serives-sub-description {
    font-size: clamp(1rem, 2vw, 1.2rem); /* Fluid font size for description */
    padding-bottom: 10px;
    text-align: left;
    line-height: 1.5;
}

/* Animations (as before, but triggered by JS) */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.services-body-wrap-wrapper.is-in-view {
    animation: fadeIn 0.8s ease-out forwards;
}

.services-body-wrap-wrapper:nth-child(1).is-in-view {
    animation-delay: 0s;
}
.services-body-wrap-wrapper:nth-child(2).is-in-view {
    animation-delay: 0.15s;
}
.services-body-wrap-wrapper:nth-child(3).is-in-view {
    animation-delay: 0.3s;
}
.services-body-wrap-wrapper:nth-child(4).is-in-view {
    animation-delay: 0.45s;
}

/* --- Media Queries for Responsiveness --- */

/* Tablet and Smaller Desktops (approx. 992px and below) */
@media (max-width: 992px) {
    .services-sub-title {
        width: 70%; /* Subtitle takes more width */
    }

    .services-body-wrap-wrapper {
        width: 48%; /* Still two columns, but maybe a bit tighter */
    }
}

/* Smaller Tablets and Larger Phones (approx. 768px and below) */
@media (max-width: 768px) {
    .services-title {
        text-align: center; /* Center align title on smaller screens */
    }

    .services-sub-title {
        width: 90%; /* Subtitle takes almost full width */
        text-align: center; /* Center align subtitle */
        margin-left: auto; /* Center block element */
        margin-right: auto;
    }

    .services-body-wrap-wrapper {
        width: 85%; /* Cards stack into a single column, taking more width */
        max-width: 400px; /* Prevent cards from getting too wide on very large phones */
    }
}

/* Mobile Phones (approx. 576px and below) */
@media (max-width: 576px) {
    .services-body-wrap {
        gap: 1rem; /* Slightly smaller gap */
        padding: 0 1rem; /* Adjust padding for very small screens */
    }

    .services-body-wrap-wrapper {
        width: 95%; /* Cards take almost full width */
    }

    .services-title h2 {
        font-size: 1.8rem; /* Fixed smaller font size for very small screens */
    }

    .services-sub-title {
        font-size: 1rem; /* Fixed smaller font size */
    }

    .services-body-category {
        padding: 20px 0 5px 0; /* Adjust padding */
    }

    #services-body-title {
        font-size: 1.6rem; /* Adjust font size */
    }

    .serives-sub-description {
        font-size: 1rem; /* Adjust font size */
    }
}