.brochure-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    perspective: 1400px;
}

.brochure-grid-item {
    min-width: 0;
    perspective: 900px;
    transform-style: preserve-3d;
}

.brochure-grid-item:hover,
.brochure-grid-item:focus-within {
    z-index: 4;
}

.brochure-grid--animate .brochure-grid-item {
    opacity: 0;
    transform: translateY(40px) rotateX(-28deg) scale(.94);
    transform-origin: 50% 100%;
    transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
    transition-delay: calc(var(--i, 0) * 90ms);
}

.brochure-grid--animate .brochure-grid-item.is-visible {
    opacity: 1;
    transform: none;
}

.brochure-thumb {
    --rx: 0deg;
    --ry: 0deg;
    --lift: 0px;
    --gx: 50%;
    --gy: 50%;
    --sx: 0px;
    --sy: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dce8ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--sx) var(--sy) 28px rgb(8 32 58 / 7%);
    color: #08203a;
    font: inherit;
    text-align: start;
    cursor: zoom-in;
    transform: translateY(var(--lift)) rotateX(var(--rx)) rotateY(var(--ry));
    transform-style: preserve-3d;
    transition: border-color .3s, box-shadow .5s cubic-bezier(.2, .8, .2, 1), transform .6s cubic-bezier(.2, .8, .2, 1);
    will-change: transform;
}

.brochure-thumb.is-tilting {
    transition: border-color .3s, box-shadow .12s linear, transform .12s linear;
}

.brochure-thumb:hover,
.brochure-thumb:focus-visible {
    --lift: -8px;
    border-color: #087e94;
    box-shadow: 0 0 0 3px rgb(8 126 148 / 28%), var(--sx) calc(var(--sy) + 18px) 48px rgb(8 32 58 / 22%);
}

.brochure-thumb::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--gx) var(--gy), rgb(255 255 255 / 38%) 0%, rgb(255 255 255 / 0%) 55%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}

.brochure-thumb.is-tilting::after {
    opacity: 1;
}

.brochure-thumb:focus-visible {
    outline: 3px solid #099ab4;
    outline-offset: 3px;
}

.brochure-thumb:disabled {
    cursor: default;
    transform: none;
}

.brochure-thumb:disabled::after {
    display: none;
}

.brochure-thumb-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1920 / 1357;
    background: #e7f3f6;
}

.brochure-thumb-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transition: transform .35s ease;
}

.brochure-thumb:hover .brochure-thumb-image img {
    transform: scale(1.05);
}

.brochure-thumb-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #79a5b5;
    font-size: 36px;
}

.brochure-thumb-zoom {
    position: absolute;
    inset-block-end: 12px;
    inset-inline-end: 12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgb(8 32 58 / 82%);
    color: #fff;
    font-size: 16px;
    opacity: 0;
    transition: opacity .2s;
}

.brochure-thumb:hover .brochure-thumb-zoom,
.brochure-thumb:focus-visible .brochure-thumb-zoom {
    opacity: 1;
}

.brochure-gallery--plain .brochure-thumb,
.brochure-gallery--plain .brochure-thumb:hover,
.brochure-gallery--plain .brochure-thumb:focus-visible {
    transform: none;
    will-change: auto;
}

.brochure-gallery--plain .brochure-thumb:hover .brochure-thumb-name,
.brochure-gallery--plain .brochure-thumb:focus-visible .brochure-thumb-name {
    padding: 14px 16px 16px;
    font-size: .9375rem;
}

.brochure-gallery--plain .brochure-thumb-zoom,
.brochure-gallery--plain .brochure-thumb-image,
.brochure-gallery--plain .brochure-thumb-name {
    pointer-events: none;
}

.brochure-gallery--plain .brochure-thumb-zoom {
    opacity: 1;
}

.brochure-thumb-name {
    display: block;
    min-height: 52px;
    padding: 14px 16px 16px;
    background: #fff;
    color: #08203a;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
    transition: background-color .25s, color .25s, padding .25s, font-size .25s;
}

.brochure-thumb:hover .brochure-thumb-name,
.brochure-thumb:focus-visible .brochure-thumb-name {
    padding: 18px 18px 20px;
    background: #08203a;
    color: #fff;
    font-size: 1.125rem;
    line-height: 1.55;
}

.brochure-lightbox {
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgb(3 15 28 / 96%);
    color: #fff;
}

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

.brochure-lightbox::backdrop {
    background: rgb(3 15 28 / 80%);
}

.brochure-lightbox-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px clamp(14px, 3vw, 28px);
    border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.brochure-lightbox-counter {
    flex-shrink: 0;
    min-width: 64px;
    padding: 7px 14px;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 100px;
    color: #c9dbe5;
    font-size: .875rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.brochure-lightbox-counter b {
    color: #fff;
}

.brochure-lightbox-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brochure-lightbox-close,
.brochure-lightbox-nav {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 22%);
    background: rgb(255 255 255 / 6%);
    color: #fff;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, opacity .2s;
}

.brochure-lightbox-close i,
.brochure-lightbox-nav i {
    pointer-events: none;
}

.brochure-lightbox-close {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 20px;
}

.brochure-lightbox-close:hover,
.brochure-lightbox-nav:hover {
    border-color: #a9eaf3;
    background: #087e94;
}

.brochure-lightbox-close:focus-visible,
.brochure-lightbox-nav:focus-visible {
    outline: 3px solid #b1edf5;
    outline-offset: 3px;
}

.brochure-lightbox-body {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 0;
}

.brochure-lightbox-swiper {
    width: 100%;
    height: 100%;
}

.brochure-lightbox-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 32px) clamp(12px, 8vw, 100px);
}

.brochure-lightbox-swiper .swiper-zoom-container img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgb(0 0 0 / 45%);
    object-fit: contain;
    cursor: pointer;
}

.brochure-lightbox-nav {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 54px;
    height: 54px;
    margin-top: -27px;
    border-radius: 50%;
    font-size: 24px;
}

.brochure-lightbox-prev {
    inset-inline-start: clamp(10px, 2vw, 28px);
}

.brochure-lightbox-next {
    inset-inline-end: clamp(10px, 2vw, 28px);
}

.brochure-lightbox-nav.swiper-button-disabled {
    opacity: .35;
    cursor: default;
}

html[dir="rtl"] .brochure-arrow {
    transform: scaleX(-1);
}

@media (max-width: 991px) {
    .brochure-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .brochure-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .brochure-thumb-name {
        padding: 12px;
        font-size: .875rem;
    }

    .brochure-lightbox-swiper .swiper-slide {
        padding: 12px;
    }

    .brochure-lightbox-nav {
        top: auto;
        bottom: 16px;
        width: 46px;
        height: 46px;
        margin-top: 0;
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brochure-thumb,
    .brochure-thumb-image img,
    .brochure-thumb-zoom,
    .brochure-grid--animate .brochure-grid-item {
        transition: none;
    }

    .brochure-grid--animate .brochure-grid-item {
        opacity: 1;
        transform: none;
    }

    .brochure-thumb:hover {
        --lift: 0px;
    }
}
