
.real-project-gallery .gallery-enlarge { display: block; width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 6px; background: var(--paper); cursor: zoom-in; }
.gallery-enlarge:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }
#project-lightbox { width: calc(100vw - 24px); max-width: 1440px; max-height: calc(100dvh - 24px); padding: 16px; border: 1px solid #426f9f; border-radius: 10px; color: white; background: #052842; }
#project-lightbox::backdrop { background: rgba(0,12,24,.92); }
#lightbox-toolbar, #lightbox-navigation { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
#lightbox-caption { flex: 1; min-width: 0; margin: 0; font-size: .9375rem; line-height: 1.4; }
#project-lightbox button { min-height: 44px; padding: 8px 14px; border: 1px solid #8cb9d7; border-radius: 5px; background: #074779; color: white; cursor: pointer; font: inherit; }
#project-lightbox button:focus-visible { outline: 3px solid white; outline-offset: 3px; }
#project-lightbox button[hidden] { display: none; }
#lightbox-close { min-width: 44px; }
#lightbox-viewport { overflow: auto; max-height: 65dvh; margin: 16px 0; background: #031d31; overscroll-behavior: contain; }
#lightbox-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 65dvh; object-fit: contain; margin: auto; }

@media (max-width: 560px) { #project-lightbox { padding: 12px; } #lightbox-toolbar { flex-wrap: wrap; } #lightbox-caption { flex-basis: calc(100% - 60px); order: -2; } #lightbox-close { order: -1; } #lightbox-navigation { gap: 6px; font-size: .8125rem; } #lightbox-viewport, #lightbox-image { max-height: 55dvh; } }

.real-project-gallery.mosaic-gallery { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-rows: 220px; gap: 16px; }
.mosaic-gallery .gallery-enlarge { overflow: hidden; height: 100%; }
.mosaic-gallery .gallery-enlarge:first-child { grid-column: span 2; grid-row: span 2; }
.mosaic-gallery .gallery-enlarge:only-child { grid-column: 1 / -1; }
.mosaic-gallery .gallery-enlarge img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.mosaic-gallery .gallery-enlarge:hover img { transform: scale(1.025); }
.lightbox-zoom-tools { display: flex; gap: 8px; }
.lightbox-zoom-tools button { display: grid; place-items: center; width: 44px; padding: 8px !important; }
#project-lightbox button:disabled { opacity: .4; cursor: default; }
#lightbox-image { max-width: none; max-height: none; }
#lightbox-viewport { height: 65dvh; }
@media(max-width:560px) { .real-project-gallery.mosaic-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: 150px; gap: 10px; } .mosaic-gallery .gallery-enlarge:first-child { grid-row: span 1; } #lightbox-viewport { height: 55dvh; } }
@media(prefers-reduced-motion:reduce) { .mosaic-gallery .gallery-enlarge img { transition: none; } }
