.elementor-9842 .elementor-element.elementor-element-9ce19c6{--display:flex;--flex-direction:column;--container-widget-width:100%;--container-widget-height:initial;--container-widget-flex-grow:0;--container-widget-align-self:initial;--flex-wrap-mobile:wrap;}.elementor-widget-gallery .elementor-gallery-item__title{font-family:var( --e-global-typography-primary-font-family ), Sans-serif;font-weight:var( --e-global-typography-primary-font-weight );}.elementor-widget-gallery .elementor-gallery-item__description{font-family:var( --e-global-typography-text-font-family ), Sans-serif;font-weight:var( --e-global-typography-text-font-weight );}.elementor-widget-gallery{--galleries-title-color-normal:var( --e-global-color-primary );--galleries-title-color-hover:var( --e-global-color-secondary );--galleries-pointer-bg-color-hover:var( --e-global-color-accent );--gallery-title-color-active:var( --e-global-color-secondary );--galleries-pointer-bg-color-active:var( --e-global-color-accent );}.elementor-widget-gallery .elementor-gallery-title{font-family:var( --e-global-typography-primary-font-family ), Sans-serif;font-weight:var( --e-global-typography-primary-font-weight );}.elementor-9842 .elementor-element.elementor-element-955a381 .e-gallery-item:hover .elementor-gallery-item__overlay, .elementor-9842 .elementor-element.elementor-element-955a381 .e-gallery-item:focus .elementor-gallery-item__overlay{background-color:rgba(0,0,0,0.5);}.elementor-9842 .elementor-element.elementor-element-955a381{--image-transition-duration:800ms;--overlay-transition-duration:800ms;--content-text-align:center;--content-padding:20px;--content-transition-duration:800ms;--content-transition-delay:800ms;}.elementor-9842 .elementor-element.elementor-element-133f363{--display:flex;}/* Start custom CSS for gallery, class: .elementor-element-955a381 *//* --- UNIVERSAL IMAGE STYLING --- */
/* This ensures every image in the gallery behaves like a 'cover' on all devices */
#dynamic-mosaic-gallery .elementor-gallery-item img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important; /* Forces image to fill the box without stretching */
    object-position: center center !important;
}

/* --- DESKTOP LAYOUT --- */
#dynamic-mosaic-gallery .elementor-gallery__container {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-auto-rows: 150px !important; /* Row height for the small boxes */
    gap: 10px !important;
}

#dynamic-mosaic-gallery .elementor-gallery-item:nth-child(1),
#dynamic-mosaic-gallery .elementor-gallery-item:nth-child(2) {
    grid-row: span 2 !important; /* First two are double-height */
}

/* Hide images after the 6th on desktop */
#dynamic-mosaic-gallery .elementor-gallery-item:nth-child(n+7) {
    display: none !important;
}

/* Permanent overlay for the 6th image on desktop */
#dynamic-mosaic-gallery .elementor-gallery-item:nth-child(6) .elementor-gallery-item__overlay {
    background-color: rgba(0, 0, 0, 0.6) !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* --- MOBILE LAYOUT (Specific height & Cover) --- */
@media (max-width: 767px) {
    #dynamic-mosaic-gallery .elementor-gallery__container {
        grid-template-columns: 1fr !important; /* Single column */
        grid-auto-rows: 250px !important; /* SPECIFIC HEIGHT FOR MOBILE */
        gap: 0 !important;
    }

    /* Hide everything EXCEPT the 1st image on mobile */
    #dynamic-mosaic-gallery .elementor-gallery-item:nth-child(n+2) {
        display: none !important;
    }

    /* Overlay for the single mobile image */
    #dynamic-mosaic-gallery .elementor-gallery-item:nth-child(1) .elementor-gallery-item__overlay {
        background-color: rgba(0, 0, 0, 0.5) !important;
        opacity: 1 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* --- DYNAMIC TEXT STYLING --- */
#dynamic-mosaic-gallery .elementor-gallery-item__overlay::after {
    content: attr(data-more);
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}/* End custom CSS */