/* =========================================================
   NVK ENGINEERING — ABOUT PAGE / OFFICE GALLERY
   Swiper carousel, isolated styles, shared theme tokens.
   ========================================================= */

.nvk-about__office-gallery {
    min-width: 0;
    margin: clamp(26px, 3.2vw, 44px) var(--nvk-page-gutter) 0;
}

.nvk-about-gallery {
    --nvk-gallery-radius: var(--nvk-radius-lg);
    --nvk-gallery-gap: clamp(10px, 1.05vw, 16px);
    min-width: 0;
    padding: clamp(14px, 2.15vw, 28px);
    overflow: hidden;
    border: 1px solid var(--nvk-color-border);
    border-radius: var(--nvk-gallery-radius);
    background: var(--nvk-color-surface);
    box-shadow: var(--nvk-shadow-sm);
}

.nvk-about-gallery__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(16px, 1.8vw, 24px);
}

.nvk-about-gallery__intro {
    min-width: 0;
}

.nvk-about-gallery__intro .nvk-about__eyebrow {
    margin: 0;
    font-size: 9px;
    letter-spacing: .14em;
}

.nvk-about-gallery__subline {
    margin: 7px 0 0 31px;
    color: var(--nvk-color-text-muted);
    font-size: 12px;
    line-height: 1.55;
}

.nvk-about-gallery__controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(14px, 2vw, 26px);
    flex: 0 0 auto;
}

.nvk-about-gallery__counter {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    color: var(--nvk-color-text);
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
    white-space: nowrap;
}

.nvk-about-gallery__counter-divider {
    color: var(--nvk-color-text-soft);
    font-weight: 500;
}

.nvk-about-gallery__counter [data-gallery-total] {
    color: var(--nvk-color-text-soft);
    font-weight: 700;
}

.nvk-about-gallery__navigation {
    display: flex;
    align-items: center;
    gap: 7px;
}

.nvk-about-gallery__nav-button {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 43px;
    height: 43px;
    padding: 0;
    border: 1px solid var(--nvk-color-border-strong);
    border-radius: 50%;
    color: var(--nvk-color-text);
    background: var(--nvk-color-surface);
    cursor: pointer;
    transition:
        color var(--nvk-transition-fast),
        background-color var(--nvk-transition-fast),
        border-color var(--nvk-transition-fast),
        box-shadow var(--nvk-transition-fast),
        transform var(--nvk-transition-fast),
        opacity var(--nvk-transition-fast);
}

.nvk-about-gallery__nav-button svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.8;
}

.nvk-about-gallery__nav-button:hover:not(:disabled) {
    border-color: var(--nvk-color-primary);
    color: #fff;
    background: var(--nvk-color-primary);
    box-shadow: 0 7px 18px rgba(0, 141, 213, .2);
    transform: translateY(-1px);
}

.nvk-about-gallery__nav-button:active:not(:disabled) {
    transform: scale(.96);
}

.nvk-about-gallery__nav-button:disabled,
.nvk-about-gallery__nav-button.swiper-button-disabled {
    color: var(--nvk-color-text-soft);
    background: var(--nvk-color-surface-muted);
    border-color: var(--nvk-color-border);
    cursor: not-allowed;
    opacity: .55;
    box-shadow: none;
}

.nvk-about-gallery__nav-button:focus-visible {
    outline: 2px solid var(--nvk-color-focus);
    outline-offset: 4px;
}

.nvk-about-gallery__swiper {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.nvk-about-gallery__swiper .swiper-wrapper {
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.nvk-about-gallery__slide {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    width: clamp(350px, 40vw, 560px);
    min-width: 0;
    height: auto;
    margin: 0;
}


.nvk-about-gallery__media {
    position: relative;
    isolation: isolate;
    width: 100%;
    aspect-ratio: 1.58;
    overflow: hidden;
    border: 1px solid var(--nvk-color-border);
    border-radius: clamp(13px, 1.25vw, 19px);
    background: var(--nvk-color-surface-muted);
    box-shadow: 0 5px 16px rgba(18, 29, 42, .055);
}


/* The shared placeholder fills this media frame. Replace it with the real image later. */
.nvk-about-gallery__media > .nvk-about__photo-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: inherit;
}

.nvk-about-gallery__media > .nvk-about__photo-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    border: 0;
    border-radius: inherit;
    object-fit: cover;
    transition: transform var(--nvk-transition-slow);
}

.nvk-about-gallery__slide:hover .nvk-about-gallery__media > .nvk-about__photo-image {
    transform: scale(1.025);
}

.nvk-about-gallery__caption {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 13px 3px 2px;
}

.nvk-about-gallery__caption > span {
    color: var(--nvk-color-primary);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .09em;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}

.nvk-about-gallery__caption > strong {
    color: var(--nvk-color-text);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
}

.nvk-about-gallery__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 240px);
    align-items: center;
    gap: 20px;
    margin-top: clamp(18px, 2vw, 26px);
    padding-top: 15px;
    border-top: 1px solid var(--nvk-color-border);
}

.nvk-about-gallery__hint {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    margin: 0;
    color: var(--nvk-color-text-soft);
    font-size: 10px;
    line-height: 1.6;
}

.nvk-about-gallery__hint svg {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    color: var(--nvk-color-primary);
}

.nvk-about-gallery__progress {
    position: relative;
    width: 100%;
    height: 4px;
    overflow: hidden;
    border-radius: var(--nvk-radius-pill);
    background: var(--nvk-color-surface-muted);
}

.nvk-about-gallery__progress-fill {
    display: block;
    width: 14.2857%;
    height: 100%;
    border-radius: inherit;
    background: var(--nvk-color-primary);
    transition: width 300ms ease;
}

/* If the external library is unavailable, show every image in a safe, wrapped layout. */
.nvk-about-gallery.is-fallback .nvk-about-gallery__swiper {
    overflow: visible;
}

.nvk-about-gallery.is-fallback .nvk-about-gallery__swiper .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--nvk-gallery-gap);
    transform: none !important;
}

.nvk-about-gallery.is-fallback .nvk-about-gallery__slide {
    width: auto !important;
}

.nvk-about-gallery.is-fallback .nvk-about-gallery__media {
    aspect-ratio: 1.58;
}

.nvk-about-gallery.is-fallback .nvk-about-gallery__navigation,
.nvk-about-gallery.is-fallback .nvk-about-gallery__counter,
.nvk-about-gallery.is-fallback .nvk-about-gallery__progress {
    display: none;
}

@media (max-width: 1199px) {
    .nvk-about-gallery__slide {
        width: clamp(330px, 43vw, 500px);
    }

    .nvk-about-gallery__nav-button {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 760px) {
    .nvk-about__office-gallery {
        margin-top: 24px;
    }

    .nvk-about-gallery {
        padding: 14px 12px 13px;
        border-radius: 20px;
    }

    .nvk-about-gallery__toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 15px;
    }

    .nvk-about-gallery__intro .nvk-about__eyebrow {
        font-size: 8px;
        letter-spacing: .12em;
    }

    .nvk-about-gallery__subline {
        margin: 6px 0 0 30px;
        font-size: 11px;
    }

    .nvk-about-gallery__controls {
        justify-content: space-between;
        gap: 12px;
    }

    .nvk-about-gallery__counter {
        font-size: 11px;
    }

    .nvk-about-gallery__nav-button {
        width: 38px;
        height: 38px;
    }

    .nvk-about-gallery__slide {
        width: min(88%, 520px);
    }

    .nvk-about-gallery__media {
        aspect-ratio: 1.18;
        border-radius: 14px;
    }

    .nvk-about-gallery__caption {
        gap: 4px;
        padding-top: 11px;
    }

    .nvk-about-gallery__caption > strong {
        font-size: 11px;
    }

    .nvk-about-gallery__footer {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        margin-top: 17px;
        padding-top: 13px;
    }

    .nvk-about-gallery__hint {
        font-size: 10px;
    }

    .nvk-about-gallery__progress {
        height: 3px;
    }

    .nvk-about-gallery.is-fallback .nvk-about-gallery__swiper .swiper-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nvk-about-gallery.is-fallback .nvk-about-gallery__media {
        aspect-ratio: 1.18;
    }
}

@media (max-width: 420px) {
    .nvk-about__office-gallery {
        margin-top: 20px;
    }

    .nvk-about-gallery {
        padding: 12px 10px 11px;
        border-radius: 17px;
    }

    .nvk-about-gallery__slide {
        width: min(90%, 400px);
    }

    .nvk-about-gallery__media {
        aspect-ratio: 1.06;
    }

    .nvk-about-gallery__caption > strong {
        font-size: 10px;
    }

    .nvk-about-gallery.is-fallback .nvk-about-gallery__swiper .swiper-wrapper {
        grid-template-columns: minmax(0, 1fr);
    }

    .nvk-about-gallery.is-fallback .nvk-about-gallery__media {
        aspect-ratio: 1.06;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nvk-about-gallery *,
    .nvk-about-gallery *::before,
    .nvk-about-gallery *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
