/* Services Section Title */
.services {
    width: 95%;
    max-width: 1700px;
    margin: 0 auto 25px;
    padding: 40px 40px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 
        0 10px 25px rgba(0,0,0,0.08),
        0 4px 12px rgba(0,0,0,0.05);
    transition: box-shadow 0.25s ease;
}

.services h1 {
    margin-top: 5px;
    text-align: center;
    margin-bottom: 20px;
}

/* Wrapper for slider + arrows */
.services-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 500px; /* Fixed height for desktop slider */
}

/* SLIDER CONTAINER */
.services-slider {
    display: flex;
    width: 100%;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 10px 30px 10px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

/* Scrollbar Styles */
.services-slider::-webkit-scrollbar {
    height: 8px;
}

.services-slider::-webkit-scrollbar-thumb {
    background: #098317;
    border-radius: 10px;
}

.services-slider::-webkit-scrollbar-track {
    background: #e5e5e5;
}


/* INDIVIDUAL CARD */
.service-card {
    min-width: 350px;
    height: 450px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    scroll-snap-align: center;
}

.services-slider:hover .service-card:hover  {
    background: #098317
}

.services-slider:hover .service-card:hover h3  {
    color: #ffffff;
}

.services-slider:hover .service-card:hover .service-text {
    color: #ffffff;
}

/* TOP IMAGE = 2/3 HEIGHT */
.service-img {
    height: 66%;
    background-size: cover;
    background-position: center;
}

/* BOTTOM TEXT = 1/3 */
.service-text {
    height: 34%;
    padding: 15px 20px;
    text-align: center;
    /* Use flexbox to stack title and text neatly */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px; /* Space between title and paragraph */
}


.service-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.service-text p {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.85; /* Slightly greyed out for hierarchy */
    margin: 0;
    line-height: 1.4;
}


/* ARROWS */
.services-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    padding: 0;
    line-height: 0;
    background: #098317;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.services-arrow.left {
    left: -50px;
}

.services-arrow.right {
    right: -50px;
}

.services-arrow .arrow-icon {
    width: 22px;
    height: 22px;
    stroke: #fff;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.services-arrow:hover {
    background: #0ba41d;
    transform: translateY(-50%) scale(1.05);
}


/* ========================================= */
/* MOBILE STACK LAYOUT (Fixes applied below) */
/* ========================================= */
@media (max-width: 900px) {

    /* 1. Reset wrapper height so it can grow with the stack */
    .services-wrapper {
        height: auto !important; 
        display: block; /* Remove flex alignment issues */
    }

    /* 2. Turn slider into a vertical stack */
    .services-slider {
        flex-direction: column;
        overflow-x: hidden; /* No side scroll */
        padding: 0;
    }

    /* 3. Card adjustments for mobile stack */
    .service-card {
        min-width: 100%;
        width: 100%;
        height: 280px; /* Shorter height for mobile */
        margin-bottom: 25px; /* Space between stacked cards */
        scroll-snap-align: none;
    }

    /* 4. Hide Arrows completely */
    .services-arrow {
        display: none !important;
    }
    
    /* 5. Adjust image/text ratio for shorter cards */
    .service-img {
        height: 70%;
    }
    .service-text {
      height: 30%;
        display: flex;
        flex-direction: column; /* Ensure they stack vertically */
        align-items: center;
        justify-content: center;
        padding: 10px 15px;
    }

    /* Slightly smaller text for mobile */
    .service-text h3 {
        font-size: 1.1rem;
    }
    
    .service-text p {
        font-size: 0.85rem;
        display: block; /* Ensure it shows */
    }
}