/* Services Feature Block Styles */
.services-feature {
    background-color: #f8f9fa; /* Light grey for subtle contrast */
    padding: 60px 20px;
}

.services-feature .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-flow: column;
    align-items: center;
    text-align: center;
}

.services-heading {
    /* font-size: 32px; */
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 20px;
    line-height: 1.3;
}

.services-intro {
    /* font-size: 16px; */
    color: #555;
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.services-list {
    width: 100%;
    margin-bottom: 40px;
}

/* Default Grid Layout (Desktop, <3 items, No-JS) */

.service-item {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.service-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 3px solid #28a745; /* Green accent */
    transition: transform 0.3s ease;
}

.service-item:hover .service-thumbnail {
    transform: scale(1.05); /* Subtle zoom on hover */
}

.service-details {
    padding: 20px;
}

.service-title {
    /* font-size: 22px; */
    font-weight: 600;
    color: #2d2d2d;
    margin-bottom: 10px;
}

.service-description {
    /* font-size: 14px; */
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

a.read-more, a.read-more:visited {
    display: inline-block;
    background-color: #28a745;
    color: #fff;
    padding: 8px 20px;
    /* font-size: 14px; */
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.read-more:hover {
    background-color: #218838; /* Darker green */
    transform: scale(1.05);
}

.services-footer {
    margin-top: 2em;
    /* font-size: 16px; */
    color: #555;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.btn-wrap {
    margin-top: 20px;
}

.contact-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.contact-button:hover {
    background-color: var(--accent-color);
    transform: scale(1.05);
    color: #fff;
}

.contact-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.contact-button:hover::after {
    width: 200px;
    height: 200px;
}

/* Slider Styles (Mobile or when activated) */
/* .swiper-initialized {
    overflow: hidden;
    padding: 0 40px;
} */
/* 
.swiper-initialized .swiper-wrapper {
    display: flex;
} */

/* Swiper Navigation Arrows */
.swiper-button-prev,
.swiper-button-next {
    color: #28a745; /* Green arrows */
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
    display: none; /* Hidden by default (shown on mobile) */
}

.swiper-initialized .swiper-button-prev,
.swiper-initialized .swiper-button-next {
    display: flex; /* Show when slider is active */
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background-color: #f0f0f0;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 20px;
}

.swiper-button-prev {
    left: 0;
}

.swiper-button-next {
    right: 0;
}

/* Responsive Styles */
@media (max-width: 767px) {
    .services-feature {
        padding: 40px 15px;
    }

    .services-heading {
        /* font-size: 28px; */
    }

    .services-intro,
    .services-footer {
        /* font-size: 14px; */
    }

    /* Always use slider on mobile */
    .services-list {
        overflow: hidden;
        padding: 0 20px;
    }

    .service-item {
        width: 280px; /* Smaller for mobile */
    }

    .service-thumbnail {
        height: 180px;
    }

    /* .service-title {
        font-size: 20px;
    } */

    /* .service-description {
        font-size: 13px;
    } */

    .read-more {
        padding: 8px 18px;
        font-size: 13px;
    }

    .contact-button {
        padding: 10px 25px;
        font-size: 14px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 30px;
        height: 30px;
    }

    .swiper-button-prev::after,
    .swiper-button-next::after {
        font-size: 16px;
    }
}

/* Desktop: Grid for <3 items */
@media (min-width: 768px) {
    .services-list[data-item-count="1"],
    .services-list[data-item-count="2"] {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
        padding: 0;
    }

    .services-list[data-item-count="1"] .swiper-wrapper,
    .services-list[data-item-count="2"] .swiper-wrapper {
        display: contents;
    }

    .services-list[data-item-count="1"] .service-item,
    .services-list[data-item-count="2"] .service-item {
        width: auto;
    }
}

/* No-JS Fallback */
.no-js .services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0;
}

.no-js .swiper-wrapper {
    display: contents;
}

.no-js .service-item {
    width: auto;
}