.bni-gallery { min-height: 100vh; color: #fff; background: #130708; font-family: var(--bni-sans, Arial, sans-serif); }
.bni-gallery, .bni-gallery * { box-sizing: border-box; }
.bni-gallery [hidden] { display: none !important; }
.bni-gallery__hero { padding: 132px 0 58px; background: radial-gradient(circle at 75% 0%, rgb(207 32 48 / 24%), transparent 48%), #160607; }
.bni-gallery__hero h1 { max-width: 900px; margin: 18px 0 0 !important; color: #fff; font-size: clamp(44px, 6.5vw, 86px); line-height: 1.03; letter-spacing: -.045em; }
.bni-gallery__hero p:last-child { max-width: 680px; margin: 22px 0 0 !important; color: rgb(255 255 255 / 72%); font-size: clamp(16px, 1.7vw, 19px); line-height: 1.55; }
.bni-gallery__section { padding: 28px 0 104px; }
.bni-gallery__content > :not(.wp-block-gallery) { max-width: 850px; margin-block: 0 28px; }
.bni-gallery__content .wp-block-gallery,
.bni-gallery__content .wp-block-gallery .blocks-gallery-grid { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px !important; width: 100%; margin: 0 0 12px !important; padding: 0 !important; list-style: none; }
.bni-gallery__content .wp-block-gallery .blocks-gallery-grid { grid-column: 1 / -1; margin-bottom: 0 !important; }
.bni-gallery__content .wp-block-gallery > .wp-block-image,
.bni-gallery__content .wp-block-gallery .blocks-gallery-grid > .blocks-gallery-item { position: relative; display: block; width: 100% !important; height: auto; min-width: 0; margin: 0 !important; overflow: hidden; border-radius: 10px; background: #2d1c1e; aspect-ratio: 1; }
.bni-gallery__content .wp-block-gallery .blocks-gallery-item figure { width: 100%; height: 100%; margin: 0; }
.bni-gallery__content .wp-block-gallery .wp-block-image > a,
.bni-gallery__content .wp-block-gallery .blocks-gallery-item a { display: block; width: 100%; height: 100%; }
.bni-gallery__content .wp-block-gallery img { display: block; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; transition: transform 420ms cubic-bezier(.22, 1, .36, 1); }
.bni-gallery__content .wp-block-gallery .wp-block-image:hover img,
.bni-gallery__content .wp-block-gallery .blocks-gallery-item:hover img { transform: scale(1.045); }
.bni-gallery__content .wp-block-gallery figcaption { position: absolute; z-index: 2; inset: auto 0 0; width: 100%; margin: 0 !important; padding: 30px 12px 10px; color: #fff; background: linear-gradient(transparent, rgb(0 0 0 / 72%)); font-size: 12px; line-height: 1.4; pointer-events: none; }
.bni-gallery__open { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; border: 0; border-radius: inherit; background: transparent; cursor: zoom-in; }
.bni-gallery__open:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.bni-gallery__more { display: grid; justify-items: center; gap: 18px; margin-top: 42px; }
.bni-gallery__more p { margin: 0 !important; color: rgb(255 255 255 / 64%); font-size: 13px; }
.bni-gallery__more-button { min-width: 220px; justify-content: center; border: 0; color: #fff; background: var(--bni-red, #cf2030); cursor: pointer; }
.bni-gallery__lightbox { width: min(1180px, calc(100vw - 32px)); max-width: none; height: min(900px, calc(100dvh - 32px)); max-height: none; padding: 0; overflow: hidden; border: 1px solid rgb(255 255 255 / 18%); border-radius: 18px; color: #fff; background: #160a0c; box-shadow: 0 30px 90px rgb(0 0 0 / 45%); }
.bni-gallery__lightbox[open] { display: flex; flex-direction: column; }
.bni-gallery__lightbox::backdrop { background: rgb(0 0 0 / 87%); backdrop-filter: blur(6px); }
.bni-gallery__close { position: absolute; z-index: 4; top: 14px; right: 14px; width: 42px; height: 42px; border: 1px solid rgb(255 255 255 / 27%); border-radius: 50%; color: #fff; background: rgb(20 9 10 / 82%); font-size: 28px; line-height: 1; cursor: pointer; }
.bni-gallery__viewer { display: grid; grid-template-columns: 58px minmax(0, 1fr) 58px; flex: 1; min-height: 0; align-items: center; justify-items: center; gap: 12px; padding: 26px 20px 4px; }
.bni-gallery__viewer img { display: block; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
.bni-gallery__arrow { width: 48px; height: 48px; border: 1px solid rgb(255 255 255 / 28%); border-radius: 50%; color: #fff; background: rgb(255 255 255 / 8%); font-size: 24px; cursor: pointer; }
.bni-gallery__arrow:hover:not(:disabled), .bni-gallery__close:hover { background: var(--bni-red, #cf2030); }
.bni-gallery__arrow:disabled { opacity: .25; cursor: default; }
.bni-gallery__lightbox button:focus-visible,
.bni-gallery__download:focus-visible,
.bni-gallery__more-button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.bni-gallery__lightbox-footer { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 28px 22px; }
.bni-gallery__position, .bni-gallery__caption { margin: 0 !important; }
.bni-gallery__position { font-size: 13px; font-weight: 700; }
.bni-gallery__caption { margin-top: 5px !important; color: rgb(255 255 255 / 68%); font-size: 12px; }
.bni-gallery__download { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px; border: 1px solid rgb(255 255 255 / 34%); border-radius: 999px; color: #fff !important; font-size: 13px; font-weight: 700; text-decoration: none; }
.bni-gallery__download:hover { border-color: var(--bni-red, #cf2030); background: var(--bni-red, #cf2030); }
@media (max-width: 1050px) { .bni-gallery__content .wp-block-gallery, .bni-gallery__content .wp-block-gallery .blocks-gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .bni-gallery__hero { padding: 112px 0 48px; } .bni-gallery__content .wp-block-gallery, .bni-gallery__content .wp-block-gallery .blocks-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px !important; } .bni-gallery__viewer { grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 5px; padding-inline: 8px; } .bni-gallery__arrow { width: 38px; height: 38px; } }
@media (max-width: 520px) { .bni-gallery__content .wp-block-gallery, .bni-gallery__content .wp-block-gallery .blocks-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px !important; } .bni-gallery__hero { padding: 102px 0 40px; } .bni-gallery__section { padding-bottom: 70px; } .bni-gallery__lightbox { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 12px; } .bni-gallery__viewer { grid-template-columns: 36px minmax(0, 1fr) 36px; padding-top: 64px; } .bni-gallery__arrow { width: 34px; height: 34px; } .bni-gallery__lightbox-footer { align-items: flex-start; flex-direction: column; gap: 12px; padding: 14px 18px 20px; } }
@media (prefers-reduced-motion: reduce) { .bni-gallery__content .wp-block-gallery img { transition: none; } }
