.nddf-gallery {
    --nddf-navy: #17335E;
    --nddf-blue: #1E5BAA;
    --nddf-teal: #0796B0;
    --nddf-light: #E6F0FA;
    font-family: Inter, system-ui, sans-serif;
    margin: 0 auto;
    padding: 0;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    overflow: hidden !important;
    display: block !important;
}

.nddf-gallery *,
.nddf-gallery *::before,
.nddf-gallery *::after {
    box-sizing: border-box;
}

.nddf-gallery__header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
    .nddf-gallery__header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.nddf-gallery__header--arrows-only {
    justify-content: flex-end;
    margin-bottom: 1.25rem;
}

.nddf-gallery__eyebrow {
    margin: 0 0 0.75rem;
    color: var(--nddf-teal);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nddf-gallery__heading {
    margin: 0;
    color: var(--nddf-navy);
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
}

@media (min-width: 1024px) {
    .nddf-gallery__heading {
        font-size: 2.25rem;
    }
}

.nddf-gallery__description {
    margin: 0.75rem 0 0;
    max-width: 42rem;
    color: #6b7280;
    font-size: 1.125rem;
    line-height: 1.6;
}

.nddf-gallery__arrows {
    display: none;
    gap: 0.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

@media (min-width: 640px) {
    .nddf-gallery__arrows {
        display: flex !important;
    }
}

.nddf-gallery__arrow {
    width: 2.5rem !important;
    height: 2.5rem !important;
    min-width: 2.5rem !important;
    min-height: 2.5rem !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 9999px !important;
    border: 1px solid #e5e7eb !important;
    background: #fff !important;
    color: #17335E !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: none !important;
    line-height: 1 !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 6;
}

.nddf-gallery__arrow:hover,
.nddf-gallery__arrow:focus {
    background: var(--nddf-light) !important;
    color: #17335E !important;
}

.nddf-gallery__chevron {
    display: block !important;
    width: 8px !important;
    height: 8px !important;
    border-style: solid !important;
    border-color: #17335E !important;
    border-width: 0 2px 2px 0 !important;
    background: none !important;
    flex-shrink: 0;
}

.nddf-gallery__chevron--left {
    transform: rotate(135deg) translate(-1px, -1px);
}

.nddf-gallery__chevron--right {
    transform: rotate(-45deg) translate(-1px, -1px);
}

.nddf-gallery__track {
    display: flex !important;
    gap: 1.5rem;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding-bottom: 1rem;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.nddf-gallery__track::-webkit-scrollbar {
    display: none;
}

.nddf-gallery__item {
    margin: 0 !important;
    flex: 0 0 16rem !important;
    width: 16rem !important;
    max-width: 16rem !important;
    scroll-snap-align: start;
}

.nddf-gallery__frame {
    position: relative;
    width: 16rem !important;
    height: 20rem !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
    background: #e6f0fa;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.nddf-gallery__image,
.nddf-gallery img.nddf-gallery__image,
.elementor-widget-shortcode .nddf-gallery__image,
.elementor-widget-container .nddf-gallery__image {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 0 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nddf-gallery__caption {
    margin-top: 0.75rem;
}

.nddf-gallery__location {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--nddf-teal);
}

.nddf-gallery__text {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.nddf-gallery__empty {
    margin: 0;
    color: #6b7280;
    font-size: 0.9375rem;
}

.elementor-widget-container .nddf-gallery,
.elementor-widget-shortcode .nddf-gallery,
.elementor-shortcode .nddf-gallery {
    margin: 0;
    max-width: 100% !important;
}

/* Only the shortcode widget — do not target ancestor Div Blocks (those keep max-width: 1100px). */
.elementor-shortcode:has(.nddf-gallery),
.elementor-widget-shortcode:has(.nddf-gallery),
.elementor-widget-shortcode .elementor-widget-container:has(.nddf-gallery),
[data-widget_type="shortcode.default"]:has(.nddf-gallery) {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
