@charset "UTF-8";

.case-gallery-block {
    min-width: 0;
}

.case-gallery,
.case-gallery *,
.case-gallery-lightbox,
.case-gallery-lightbox * {
    box-sizing: border-box;
}

.case-gallery {
    --cg-accent: #1a1a1a;
    --cg-border: #b8b8b8;
    --cg-muted: #6a6a6a;
    position: relative;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--cg-border);
    border-radius: 0.75rem;
    background-color: #ffffff;
    box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.45);
}

.case-gallery button {
    font-family: inherit;
}

.case-gallery-viewport {
    position: relative;
    overflow: hidden;
    aspect-ratio: var(--case-gallery-aspect, 16 / 9);
    background-color: #ffffff;
}

.case-gallery-track {
    display: flex;
    height: 100%;
    transition: transform 0.35s ease;
    will-change: transform;
}

.case-gallery-slide {
    flex: 0 0 100%;
    min-width: 0;
    height: 100%;
}

.case-gallery-open {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.case-gallery-open:focus-visible {
    outline: 3px solid var(--cg-accent);
    outline-offset: -3px;
}

.case-gallery-img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center;
    background-color: #ffffff;
}

.case-gallery-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    border-top: 1px solid #d6d6d6;
    background-color: #ffffff;
}

.case-gallery-bar-group {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

.case-gallery-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #b8b8b8;
    border-radius: 0.375rem;
    background-color: #ffffff;
    color: #3c3c3c;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.case-gallery-nav:hover {
    background-color: #f0f0f0;
    color: #1a1a1a;
}

.case-gallery-nav:focus-visible,
.case-gallery-expand:focus-visible,
.case-gallery-toggle:focus-visible,
.case-gallery-thumb:focus-visible,
.case-gallery-lightbox-nav:focus-visible {
    outline: 2px solid var(--cg-accent);
    outline-offset: 2px;
}

.case-gallery-lightbox-close:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.case-gallery-counter {
    color: #6a6a6a;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.case-gallery-expand,
.case-gallery-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.25rem 0.55rem;
    border: 1px solid #b8b8b8;
    border-radius: 9999px;
    background-color: #ffffff;
    color: #3c3c3c;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.case-gallery-expand:hover,
.case-gallery-toggle:hover {
    background-color: #f0f0f0;
    color: #1a1a1a;
}

.case-gallery-thumbs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(2.5rem, 1fr);
    gap: 0.375rem;
    padding: 0.5rem;
    overflow-x: auto;
    border-top: 1px solid #d6d6d6;
    background-color: #ffffff;
    scrollbar-width: thin;
}

.case-gallery-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 0.25rem;
    background-color: #ffffff;
    cursor: pointer;
}

.case-gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.case-gallery-thumb:hover img,
.case-gallery-thumb.is-active img {
    opacity: 1;
}

.case-gallery-thumb.is-active {
    border-color: var(--cg-accent);
}

.case-gallery-thumb:focus-visible {
    outline-color: var(--cg-accent);
    outline-offset: 1px;
}

.case-gallery-thumb-no {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.2rem;
    border-bottom-right-radius: 0.25rem;
    background-color: rgba(17, 24, 39, 0.72);
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
}

.case-gallery-caption {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.625rem 0.875rem;
    border-top: 1px solid #d6d6d6;
    background-color: #ffffff;
    color: var(--cg-muted);
    font-size: 0.75rem;
    line-height: 1.6;
}

.case-gallery-caption strong {
    color: #3c3c3c;
    font-size: 0.8rem;
}

.case-gallery-caption span:empty {
    display: none;
}

.case-gallery-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.case-gallery-lightbox {
    position: fixed;
    inset: 0;
    width: min(96vw, 1600px);
    height: min(92vh, 1000px);
    height: min(92dvh, 1000px);
    max-width: 96vw;
    max-height: 92vh;
    max-height: 92dvh;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #3c3c3c;
    border-radius: 0.75rem;
    background-color: #111111;
    color: #ffffff;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
}

.case-gallery-lightbox:not([open]) {
    display: none;
}

.case-gallery-lightbox[open] {
    display: flex;
    flex-direction: column;
}

.case-gallery-lightbox::backdrop {
    background-color: rgba(3, 7, 18, 0.88);
    backdrop-filter: blur(2px);
}

.case-gallery-lightbox-head {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.875rem;
    border-bottom: 1px solid #3c3c3c;
    background-color: #1a1a1a;
}

.case-gallery-lightbox-head > span:first-child {
    min-width: 0;
    margin-right: auto;
    overflow: hidden;
    font-size: 0.85rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.case-gallery-lightbox-counter {
    flex-shrink: 0;
    color: #9e9e9e;
    font-size: 0.72rem;
}

.case-gallery-lightbox-close {
    flex-shrink: 0;
    padding: 0.25rem 0.4rem;
    border: 0;
    background: none;
    color: #e6e6e6;
    font-size: 0.8rem;
    cursor: pointer;
}

.case-gallery-lightbox-close:hover {
    color: #ffffff;
}

.case-gallery-lightbox-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid #555555;
    border-radius: 9999px;
    background-color: #262626;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.case-gallery-lightbox-nav:hover {
    background-color: #3c3c3c;
}

.case-gallery-lightbox-nav:focus-visible {
    outline-color: #ffffff;
}

.case-gallery-lightbox-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.case-gallery-lightbox-meta {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.case-gallery-lightbox-stage {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 1rem;
    background-color: #111111;
}

.case-gallery-lightbox-img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.case-gallery-lightbox-foot {
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.6rem 0.875rem;
    border-top: 1px solid #3c3c3c;
    background-color: #1a1a1a;
    color: #d6d6d6;
    font-size: 0.78rem;
    line-height: 1.5;
}

.case-gallery-lightbox-foot strong {
    color: #ffffff;
    font-size: 0.85rem;
}

.case-gallery-lightbox-foot span:empty {
    display: none;
}

body.case-gallery-lightbox-open {
    overflow: hidden;
}

@media (max-width: 520px) {
    .case-gallery-bar {
        gap: 0.375rem;
        padding: 0.375rem;
    }

    .case-gallery-bar-group {
        gap: 0.25rem;
    }

    .case-gallery-nav {
        width: 1.9rem;
        height: 1.9rem;
        font-size: 1.15rem;
    }

    .case-gallery-expand,
    .case-gallery-toggle {
        min-height: 1.9rem;
        padding: 0.2rem 0.45rem;
    }

    .case-gallery-thumbs {
        gap: 0.25rem;
        padding: 0.375rem;
    }

    .case-gallery-caption,
    .case-gallery-lightbox-head,
    .case-gallery-lightbox-foot {
        padding-right: 0.625rem;
        padding-left: 0.625rem;
    }

    .case-gallery-lightbox-nav {
        min-height: 1.9rem;
        padding: 0.2rem 0.5rem;
        font-size: 0.72rem;
    }

    .case-gallery-lightbox-nav-row {
        gap: 0.5rem;
    }

    .case-gallery-lightbox-stage {
        padding: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .case-gallery-track,
    .case-gallery-thumb img,
    .case-gallery-nav,
    .case-gallery-lightbox-nav {
        transition: none;
    }
}

@media print {
    .case-gallery-bar,
    .case-gallery-thumbs {
        display: none;
    }

    .case-gallery {
        border-color: #b8b8b8;
        box-shadow: none;
    }

    .case-gallery-lightbox[open] {
        display: none;
    }
}
