.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 #17335E !important;
    background: #17335E !important;
    color: #fff !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: #1E5BAA !important;
    border-color: #1E5BAA !important;
    color: #fff !important;
}

.nddf-gallery__chevron {
    display: block !important;
    width: 8px !important;
    height: 8px !important;
    border-style: solid !important;
    border-color: #fff !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);
    cursor: zoom-in;
}

.nddf-gallery__frame .nddf-gallery__image {
    transition: transform 0.35s ease;
}

.nddf-gallery__item:hover .nddf-gallery__frame .nddf-gallery__image,
.nddf-gallery__item:focus-within .nddf-gallery__frame .nddf-gallery__image {
    transform: scale(1.04);
}

.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;
}

.nddf-gallery__more {
    display: flex !important;
    justify-content: flex-end !important;
    width: 100% !important;
    margin: 0.25rem 0 0 !important;
}

.nddf-gallery__view-all {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    background: var(--nddf-navy) !important;
    color: #fff !important;
    border-radius: 999px !important;
    padding: 0.65rem 1.15rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

.nddf-gallery__view-all:hover,
.nddf-gallery__view-all:focus {
    background: var(--nddf-blue) !important;
    color: #fff !important;
}

.nddf-gallery__filters {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.5rem !important;
}

.nddf-gallery__filters a {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    padding: 0.45rem 0.9rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: var(--nddf-navy) !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

.nddf-gallery__filters a.is-active,
.nddf-gallery__filters a:hover,
.nddf-gallery__filters a:focus {
    background: var(--nddf-navy) !important;
    border-color: var(--nddf-navy) !important;
    color: #fff !important;
}

.nddf-gallery--grid {
    overflow: visible !important;
}

.nddf-gallery__grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1.5rem;
    width: 100% !important;
}

.nddf-gallery--grid .nddf-gallery__item {
    flex: none !important;
    width: auto !important;
    max-width: none !important;
}

.nddf-gallery--grid .nddf-gallery__frame {
    width: 100% !important;
    height: 0 !important;
    padding-top: 125% !important;
}

.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;
}

/* -------------------------------------------------------------------------- */
/* Lightbox (click a photo to enlarge, page through with prev/next)           */
/* -------------------------------------------------------------------------- */

.nddf-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 3rem);
    background: rgba(15, 23, 42, 0.92);
    font-family: Inter, system-ui, sans-serif;
    box-sizing: border-box;
}

.nddf-lightbox.is-open {
    display: flex !important;
}

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

body.nddf-lightbox-open {
    overflow: hidden !important;
}

.nddf-lightbox__stage {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: min(1100px, 92vw);
    max-height: 88vh;
}

.nddf-lightbox__img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    border-radius: 0.75rem;
    object-fit: contain;
    background: #0b1220;
    box-shadow: 0 24px 60px rgb(0 0 0 / 0.55);
}

.nddf-lightbox__caption {
    text-align: center;
    color: #fff;
    max-width: 42rem;
}

.nddf-lightbox__location {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7fd3e4;
}

.nddf-lightbox__text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.95rem;
    color: #e5e7eb;
}

.nddf-lightbox__counter {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: rgb(255 255 255 / 0.65);
}

.nddf-lightbox__close,
.nddf-lightbox__nav {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgb(255 255 255 / 0.25);
    background: rgb(255 255 255 / 0.1);
    color: #fff;
    cursor: pointer;
    border-radius: 9999px;
    padding: 0;
    margin: 0;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.nddf-lightbox__close:hover,
.nddf-lightbox__close:focus-visible,
.nddf-lightbox__nav:hover,
.nddf-lightbox__nav:focus-visible {
    background: rgb(255 255 255 / 0.22);
    border-color: rgb(255 255 255 / 0.5);
    outline: none;
}

.nddf-lightbox__close {
    top: clamp(0.75rem, 2vw, 1.5rem);
    right: clamp(0.75rem, 2vw, 1.5rem);
    width: 2.75rem;
    height: 2.75rem;
}

.nddf-lightbox__x {
    position: relative;
    width: 16px;
    height: 16px;
}

.nddf-lightbox__x::before,
.nddf-lightbox__x::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.nddf-lightbox__x::before {
    transform: rotate(45deg);
}

.nddf-lightbox__x::after {
    transform: rotate(-45deg);
}

.nddf-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
}

.nddf-lightbox__nav--prev {
    left: clamp(0.5rem, 2vw, 1.5rem);
}

.nddf-lightbox__nav--next {
    right: clamp(0.5rem, 2vw, 1.5rem);
}

.nddf-lightbox__nav .nddf-gallery__chevron {
    width: 12px !important;
    height: 12px !important;
    border-color: #fff !important;
}

@media (max-width: 640px) {
    .nddf-lightbox__nav {
        width: 2.5rem;
        height: 2.5rem;
    }

    .nddf-lightbox__img {
        max-height: 70vh;
    }
}
