/* ================================================================
   Homepage Celebrity Gallery — CSS-only layout for UAEL markup
   Replaces broken Slick carousel with clean flex grid.
   Images use data-lazy-src, swapped by inline JS below.
   ================================================================ */

/* Widget container — ensure visible */
.elementor-widget-uael-image-gallery .elementor-widget-container {
    overflow: visible !important;
}

/* Gallery parent */
.uael-gallery-parent.uael-caption-.uael-gallery-unjustified {
    display: block !important;
    overflow: hidden;
}

/* Carousel wrapper — flex row */
.uael-img-gallery-wrap.uael-img-carousel-wrap {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 20px;
    padding: 10px 0;
    justify-content: center;
    overflow: visible;
}

/* Hide broken Slick controls — target by aria and common patterns */
.uael-img-carousel-wrap button,
.uael-img-carousel-wrap [role="tablist"],
.uael-img-carousel-wrap .slick-dots,
.uael-img-carousel-wrap .slick-arrow {
    display: none !important;
}

/* Grid items */
.uael-img-carousel-wrap .uael-grid-item {
    flex: 0 0 180px;
    width: 180px;
    height: 180px;
    overflow: hidden;
    border-radius: 8px;
    display: block !important;
    opacity: 1 !important;
    position: relative !important;
    transform: none !important;
}

.uael-grid-item-content {
    width: 100%;
    height: 100%;
}

.uael-grid-item-content figure {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.uael-grid-img-thumbnail {
    width: 100%;
    height: 100%;
}

/* Images — force visible and fill container */
.uael-img-carousel-wrap .uael-grid-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block !important;
    opacity: 1 !important;
}

/* Hide the overlay divs */
.uael-grid-img-overlay {
    display: none;
}

/* Hover effect */
.uael-img-carousel-wrap .uael-grid-item:hover img {
    transform: scale(1.05);
    filter: brightness(1.08);
}

.uael-img-carousel-wrap .uael-grid-item img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Responsive */
@media (max-width: 1024px) {
    .uael-img-carousel-wrap .uael-grid-item {
        flex: 0 0 150px;
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 767px) {
    .uael-img-gallery-wrap.uael-img-carousel-wrap {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .uael-img-carousel-wrap .uael-grid-item {
        flex: 0 0 calc(33.33% - 10px);
        width: calc(33.33% - 10px);
        height: auto;
        aspect-ratio: 1;
    }
}
