.eamcn-container-auto > .uagb-container-inner-blocks-wrap > .eamcn-col-fit {
    flex: 0 1 auto !important; width: auto !important; min-width: 0 !important; max-width: 100% !important;
}
.eamcn-container-auto > .uagb-container-inner-blocks-wrap > .eamcn-col-fill {
    flex: 1 1 0 !important; width: 0 !important; min-width: 0 !important; max-width: 100% !important;
}
.eamcn-col-fit > .wp-block-uagb-image {width: fit-content !important; max-width: 100%;}
@media (max-width: 767px) {
    .eamcn-container-auto > .uagb-container-inner-blocks-wrap > .eamcn-col-fit,
    .eamcn-container-auto > .uagb-container-inner-blocks-wrap > .eamcn-col-fill {flex: 0 1 auto !important; width: 100% !important;}
}
/* Keep each button intact; wrap based on available container width. */
.wp-block-uagb-buttons .uagb-buttons__wrap {flex-wrap: wrap !important;}
.wp-block-uagb-buttons .uagb-buttons__wrap > .wp-block-uagb-buttons-child,
.wp-block-uagb-buttons .uagb-buttons__wrap > .wp-block-button,
.wp-block-uagb-buttons .uagb-buttons__wrap > .uagb-button__wrapper {flex-shrink: 0 !important; max-width: 100%; min-width: 0;}
.wp-block-uagb-buttons .uagb-buttons-repeater {white-space: nowrap; word-break: normal; overflow-wrap: normal;}

/* Image Gallery: opt-in class on newly inserted galleries. Never style the home banner. */
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__media--carousel {
    border-radius: 20px !important;
    overflow: hidden;
}
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__layout--carousel .slick-list {
    border-radius: 20px;
}
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__control-arrows--carousel {
    position: absolute !important;
    z-index: 2;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(100,100,100,.28) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .slick-prev {left: 12px !important;}
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .slick-next {right: 12px !important;}
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__control-arrows--carousel svg {width: 20px; height: 20px; fill: white !important; vertical-align: middle;}
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__control-arrows--carousel::before {content: none;}
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__control-arrows--carousel:hover {background: rgba(100,100,100,.42) !important;}
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__control-arrows--carousel:focus-visible {outline: 2px solid white; outline-offset: 2px;}

/* Compact pagination; retain Spectra's configurable top offset and visibility. */
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__layout--carousel ul.slick-dots {
    margin: 4px 0 0 !important;
    position: relative !important;
    transform: none !important;
    -webkit-transform: none !important;
    line-height: 20px !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    bottom: auto !important;
}
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__layout--carousel.slick-dotted,
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__layout--carousel .slick-dotted {
    margin-bottom: 0 !important;
}
/* Keep the dot row in normal flow, without theme list spacing. */
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__layout--carousel ul.slick-dots li {
    margin-block: 0 !important;
    padding-block: 0 !important;
    vertical-align: top;
}
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__layout--carousel .slick-list {
    margin-block: 0 !important;
    padding-block: 0 !important;
}

/* Default separator colour, including existing blocks without an explicit colour.
   Keep specificity below Spectra's per-block generated colour rules. */
:where(.wp-block-uagb-separator) .wp-block-uagb-separator__inner,
:where(.wp-block-uagb-separator--text, .wp-block-uagb-separator--icon) .wp-block-uagb-separator__inner::before,
:where(.wp-block-uagb-separator--text, .wp-block-uagb-separator--icon) .wp-block-uagb-separator__inner::after {
    border-top-color: var(--theme-palette-color-2, #9bb997);
}
/* Match Spectra's base pseudo-element colour specificity. */
.wp-block-uagb-separator--text .wp-block-uagb-separator__inner::before,
.wp-block-uagb-separator--text .wp-block-uagb-separator__inner::after,
.wp-block-uagb-separator--icon .wp-block-uagb-separator__inner::before,
.wp-block-uagb-separator--icon .wp-block-uagb-separator__inner::after {
    border-top-color: var(--theme-palette-color-2, #9bb997);
}

/* Match the Image block shadow on the carousel viewport, not the dots.
   Applying it outside the clipped slides avoids cutting off the shadow. */
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__layout--carousel .slick-list {
    box-shadow: 3px 8px 12px 0 rgba(0,0,0,.15);
}

/* Separator: consistent spacing in the editor and frontend. */
.wp-block-uagb-separator {
    margin-block: 70px !important;
}
.editor-styles-wrapper [data-type="uagb/separator"] .wp-block-uagb-separator__inner,
.editor-styles-wrapper [data-type="uagb/separator"] .wp-block-uagb-separator__inner::before,
.editor-styles-wrapper [data-type="uagb/separator"] .wp-block-uagb-separator__inner::after {
    border-top-color: var(--eamcn-separator-preview, var(--theme-palette-color-2, #9bb997)) !important;
}
/* Spectra adds half of gridImageGap as horizontal padding on each slide.
   Remove that inset so the shadow follows the image, not a blank frame. */
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__layout--carousel .spectra-image-gallery__media-wrapper {
    padding-inline: 0 !important;
}
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__layout--carousel .slick-list {
    margin-inline: 0 !important;
    padding-inline: 0 !important;
    background: transparent !important;
}

/* Remove the residual frame and the inline-image baseline gap. The viewport
   alone supplies rounding and shadow, avoiding double antialiased edges. */
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__layout--carousel :is(.spectra-image-gallery__media-wrapper, .spectra-image-gallery__media--carousel, .spectra-image-gallery__media-thumbnail--carousel) {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__layout--carousel .spectra-image-gallery__media-thumbnail--carousel {
    display: block !important;
    vertical-align: top !important;
}

/* Spectra renders the thumbnail inside a picture element. Remove its inline
   line box and any theme decoration; the image defines the media height. */
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__layout--carousel .spectra-image-gallery__media--carousel > picture {
    display: block !important;
    line-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
.wp-block-uagb-image-gallery.eamcn-gallery-glass:not(.uagb-block-f8149fc9) .spectra-image-gallery__layout--carousel .slick-list {
    border: 0 !important;
    outline: 0 !important;
    overflow: hidden !important;
}
/* Uniform slide geometry, based on the first original image. */
.wp-block-uagb-image-gallery.eamcn-gallery-ratio .spectra-image-gallery__media--carousel {
    aspect-ratio: var(--eamcn-gallery-ratio);
    width: 100%; height: auto !important;
    overflow: hidden; border: 0 !important; padding: 0 !important;
    border-radius: 0 !important; line-height: 0;
}
.wp-block-uagb-image-gallery.eamcn-gallery-ratio .spectra-image-gallery__media--carousel > picture {
    display: block !important; width: 100%; height: 100%; line-height: 0;
}
.wp-block-uagb-image-gallery.eamcn-gallery-ratio .spectra-image-gallery__media--carousel img.spectra-image-gallery__media-thumbnail {
    display: block !important; width: 100% !important; height: 100% !important;
    max-height: none !important; max-width: none !important;
    object-fit: cover !important; object-position: center;
    margin: 0 !important; padding: 0 !important; border: 0 !important;
    border-radius: 0 !important; box-shadow: none !important;
}
