/* Photo gallery (modules/gallery.php) - replaces the cubeportfolio + bootstrap files from assets/ */

.g-title { margin-top: 26px; }	/* same spacing as when the page loaded bootstrap */
.g-wrap { max-width: 1170px; margin: 14px auto 0; box-sizing: border-box; }
@media (max-width: 1199px) { .g-wrap { padding: 0 15px; } }

/* grid: without JavaScript the images simply flow; gallery.js arranges them like bricks (masonry) */
.g-grid { list-style: none; margin: 0; padding: 0; position: relative; }
.g-grid .g-item { display: inline-block; vertical-align: top; width: 277px; margin: 0 0 30px 30px; }
.g-grid.g-js .g-item { position: absolute; top: 0; margin: 0; opacity: 0; transition: opacity .4s; }
.g-grid.g-js .g-item.g-loaded { opacity: 1; }
.g-grid .g-item a { display: block; }
.g-grid .g-item img { display: block; width: 100%; height: auto; border: 0; }

/* lightbox */
.g-lb { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100000; background: rgba(0,0,0,.8); display: none; }
.g-lb.g-open { display: block; }
.g-lb-fig { position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: 0; display: flex; align-items: center; justify-content: center; padding: 30px 10px; box-sizing: border-box; }
.g-lb-box { position: relative; max-width: 100%; }
.g-lb-img { display: block; max-width: 100%; max-height: calc(100vh - 80px); width: auto; height: auto; margin: 0 auto; box-shadow: 0 0 8px rgba(0,0,0,.6); cursor: pointer; }
.g-lb-counter { position: absolute; top: 100%; right: 0; margin-top: 3px; font: 400 12px/18px Arial, sans-serif; color: #eee; direction: rtl; }
.g-lb button { position: absolute; z-index: 2; width: 44px; height: 44px; padding: 0; margin: 0; border: 0; background: transparent; color: #ccc; cursor: pointer; }
.g-lb button:hover, .g-lb button:focus-visible { color: #d2ad48; }
.g-lb button:focus { outline: none; }
.g-lb button svg { display: block; width: 100%; height: 100%; }
.g-lb-close { top: 20px; right: 20px; }
.g-lb-prev { top: 50%; left: 20px; margin-top: -22px !important; }
.g-lb-next { top: 50%; right: 20px; margin-top: -22px !important; }
html.g-lb-lock, html.g-lb-lock body { overflow: hidden; }
