/* Gallery Carousel Styles */
.gallery-carousel-section {
    padding: 0 0 10px;
    background: #fff;
    overflow: hidden;
}

.gallery-container {
    max-width: 1200px; /* Exactly fit 3 slides: 350px * 3 + 20px * 2 gaps + 40px padding */
    margin: 0 auto;
    padding: 0 20px; /* Container padding for clean edges */
}

/* Carousel Container */
.gallery-carousel {
    position: relative;
    overflow: hidden; /* Prevent images from showing outside container */
    margin: 0; /* Remove any auto margins */
}

/* Slick Track - Fix height issues */
.gallery-carousel .slick-track {
    display: flex;
    align-items: center;
    margin: 0; /* Remove auto centering */
}

/* Individual Slide */
.gallery-slide {
    outline: none; /* Remove slick focus outline */
    padding: 0; /* Remove padding */
    margin-right: 20px; /* Gap between slides */
    text-align: left; /* Align to left */
    box-sizing: border-box;
}

/* Remove margin from last slide to prevent overflow */
.gallery-slide:last-child {
    margin-right: 0;
}

/* Image Container */
.gallery-image {
    width: 96%;
    height: 100%;
    margin: 0; /* Remove auto margins for left alignment */
    overflow: hidden;
}


.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Slick Dots/Pager Styles - Same as expertise carousel */
.gallery-carousel .slick-dots {
    position: relative;
    bottom: auto;
    text-align: center;
    margin-top: 40px;
    padding: 0;
    list-style: none;
}

.gallery-carousel .slick-dots li {
    display: inline-block;
    margin: 0 5px;
}

.gallery-carousel .slick-dots li button {
    border: none;
    background: #bcbec0;
    color: transparent;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    font-size: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-indent: -9999px;
    overflow: hidden;
}

.gallery-carousel .slick-dots li.slick-active button {
    background: #27aae1;
}

.gallery-carousel .slick-dots li button:hover {
    background: #27aae1;
}

.gallery-carousel .slick-dots li.slick-active button:hover {
    background: #27aae1;
}

/* Left alignment styles */
.gallery-carousel.slick-initialized {
    text-align: left;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .gallery-container {
        max-width: 760px; /* Fit 2 slides: 300px * 2 + 20px gap + 40px padding */
        padding: 0 20px;
    }
    
    .gallery-slide {
        margin-right: 20px;
    }
    
    .gallery-slide:last-child {
        margin-right: 0;
    }
    
    .gallery-image {
        margin: 0; /* Keep left aligned */
    }
}

@media (max-width: 768px) {
    
    .gallery-container {
        max-width: 540px; /* Fit 2 slides: 250px * 2 + 20px gap + 40px padding */
        padding: 0 20px;
    }
    
    .gallery-slide {
        margin-right: 20px;
    }
    
    .gallery-slide:last-child {
        margin-right: 0;
    }
    
    .gallery-image {
        margin: 0; /* Keep left aligned */
    }
    
    .gallery-carousel .slick-dots {
        margin-top: 30px;
    }
    
}

@media (max-width: 480px) {
    .gallery-container {
        max-width: 360px; /* Fit 2 smaller slides: 150px * 2 + 20px gap + 40px padding */
        padding: 0;
    }
    
    .gallery-slide {
        margin-right: 20px;
    }
    
    .gallery-slide:last-child {
        margin-right: 0;
    }
    
    .gallery-image {
        width: 150px;
        height: 150px;
        margin: 0; /* Keep left aligned */
    }
    
    .gallery-carousel .slick-dots li {
        margin: 0 3px;
    }
    
}

/* Ensure proper left alignment and spacing */
.gallery-carousel .slick-slide {
    margin: 0 !important;
    float: left; /* Force left alignment */
}

/* Loading state */
.gallery-image img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image img.loaded,
.gallery-image img[loading="lazy"].loaded {
    opacity: 1;
}