/* =========================================
   Services Carousel - Standard Uniform Design
   ========================================= */

.services-carousel-wrapper {
    position: relative;
    overflow: visible;
    width: 100%;
    padding: 10px 0;
}

/* Base Card Styling (Common) */
.service-card-carousel {
    display: block;
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    background: white;
    /* Clean white card */
    height: 100%;
    /* Ensure uniform height in flex */
}

.dark .service-card-carousel {
    background: #1f2937;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.service-card-carousel:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.service-card-img {
    width: 100%;
    height: 200px;
    /* Fixed height for uniformity */
    object-fit: cover;
    display: block;
}

.service-bubble {
    position: relative;
    padding: 1.5rem;
    background: transparent;
    text-align: left;
    /* Standard readable alignment */
    color: var(--text-primary);
}

.service-bubble h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.dark .service-bubble h3 {
    color: #f3f4f6;
}

.service-bubble p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.dark .service-bubble p {
    color: #d1d5db;
}

/* Floating Icon - Clean styling or remove if desired. Keeping minimal */
.service-icon-float {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-light, #9ACD32);
    color: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}


/* Desktop: Uniform Horizontal Carousel */
@media (min-width: 768px) {
    .services-carousel.masonry-mode {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        /* Uniform height */
        gap: 24px;
        overflow-x: auto;
        overflow-y: hidden;
        /* Padding for shadow and spacing */
        padding: 20px 10px 40px;
        scroll-behavior: smooth;
        scrollbar-width: auto;
    }

    /* Remove old masonry specific overrides */
    .services-carousel.masonry-mode .service-card-carousel {
        flex: 0 0 300px;
        /* Fixed width */
        width: 300px;
        margin: 0 !important;
        /* Reset any margin-top */
        min-height: 380px;
    }

    /* Custom Scrollbar */
    .services-carousel.masonry-mode::-webkit-scrollbar {
        height: 8px;
        display: block;
    }

    .services-carousel.masonry-mode::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 4px;
        margin: 0 20px;
    }

    .services-carousel.masonry-mode::-webkit-scrollbar-thumb {
        background: rgba(107, 142, 35, 0.3);
        border-radius: 4px;
    }

    .services-carousel.masonry-mode::-webkit-scrollbar-thumb:hover {
        background: rgba(107, 142, 35, 0.6);
    }
}


/* Mobile: Swipe Carousel */
@media (max-width: 767px) {
    .services-carousel {
        display: flex;
        flex-wrap: nowrap;
        gap: 16px;
        overflow-x: auto;
        padding: 10px 20px 30px;
        /* Padding for shadow */
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        align-items: stretch;
        scrollbar-width: none;
    }

    .services-carousel::-webkit-scrollbar {
        display: none;
    }

    .service-card-carousel {
        flex: 0 0 85vw;
        /* Peeking effect */
        max-width: 320px;
        scroll-snap-align: center;
        margin: 0;
    }

    /* Adjust sizing for mobile */
    .service-card-img {
        height: 180px;
    }

    .service-bubble {
        padding: 1.25rem;
    }
}


/* Navigation Buttons */
.sc-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
}

/* Show buttons on hover of wrapper (Desktop only ideally) */
@media (min-width: 768px) {

    .services-carousel-wrapper:hover .sc-nav-btn,
    .sc-nav-btn:focus {
        opacity: 1;
        visibility: visible;
    }
}

.sc-nav-btn:hover {
    background: var(--primary, #6B8E23);
    color: white;
    box-shadow: 0 6px 16px rgba(107, 142, 35, 0.3);
}

.sc-nav-btn.prev {
    left: -20px;
}

.sc-nav-btn.next {
    right: -20px;
}

/* Animations */
/* Focus highlight for autoplay - subtle scale */
.services-carousel.masonry-mode .service-card-carousel.focus {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(107, 142, 35, 0.2);
    border: 1px solid rgba(107, 142, 35, 0.3);
}