/* (A) WHOLE PAGE */
* {
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}
body { background: #0c5a72; }

.box {  
  background: #e2dcc1;
  color: #12282f;
  border: 5px solid #187b9b;
  margin: 10px 0px 15px 0px;
  text-align: center;
  }

  .sidebar-left {
  width: 200px;
  height: 100%; 
  position: absolute;
  top: 0;
  margin-left: 10px;
  padding-top: 150px;
  }

.sidebar-left a {
  padding: 8px 8px 8px 16px;
  text-decoration: none;
  font-size: 25px;
  color: #818181;
  display: block;
}

.sidebar-left a:hover {
  color: #f1f1f1;
}

.sidebar-left, .gallery {
  display: inline-block;
}

/* (B) GALLERY WRAPPER */
.gallery {
  /* (B1) GRID LAYOUT - 4 IMAGES PER ROW */
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 20px;

  /* (B2) OPTIONAL WIDTH RESTRICT */
  max-width: 1000px;
  margin-left: 250px;
  overflow: hidden;
  position: ;
}

/* (C) GALLERY IMAGES */
.gallery img {
  /* (C1) DIMENSION */
  width: 100%;
  height: 200px; /* optional */
  padding: 10px;

  /* (C2) COLORS */
  border: 1px solid #ddd;
  background: #fff;

  /* (C3) IMAGE RESIZE */
  /* cover | contain | fill | scale-down */
  object-fit: cover;
}

/* (D) ON SMALL SCREENS - 2 IMAGES PER ROW */
@media only screen and (max-width: 600px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* On smaller screens, where height is less than 450px, change the style of the sidebar (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
  .sidenav {padding-top: 15px;}
  .sidenav a {font-size: 18px;}
}

/* (E) OPTIONAL ZOOM ON HOVER */
.gallery img:hover {
  z-index: 9;
  transform: scale(1.3);
  /* linear | ease | ease-in | ease-out | ease-in-out */
  transition: transform ease 0.5s;
}

/* (F) FULLSCREEN MODE */
.gallery img.full {
  position: fixed;
  top: 0; left: 0; z-index: 999;
  width: 100vw; height: 100vh;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.7);
}
.gallery img.full:hover {
  z-index: 999;
  transform: none;
}
/* (G) THE LIGHTBOX - gallery.js builds it, one per page */
.box .hint { font-size: 13px; margin: 4px 0 8px; color: #3a5a66; }
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(3, 30, 40, 0.92);
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
body.lb-open { overflow: hidden; }
.lightbox figure {
  margin: 0; max-width: 90vw; max-height: 92vh;
  display: flex; flex-direction: column; align-items: center;
}
.lightbox figure img {
  max-width: 90vw; max-height: 72vh; width: auto; height: auto;
  object-fit: contain; border: 5px solid #187b9b; background: #e2dcc1; padding: 6px;
}
.lightbox figcaption {
  background: #e2dcc1; color: #12282f; border: 5px solid #187b9b; border-top: 0;
  max-width: 90vw; padding: 8px 14px; font-size: 14px; line-height: 1.4;
}
.lightbox .lb-title { display: block; font-size: 18px; margin-bottom: 2px; }
.lightbox .lb-count { display: block; color: #187b9b; font-size: 12px; margin-top: 4px; }
.lightbox button {
  position: absolute; background: #e2dcc1; color: #12282f; border: 3px solid #187b9b;
  font-size: 28px; line-height: 1; width: 44px; height: 44px; cursor: pointer;
}
.lightbox .lb-close { top: 14px; right: 14px; }
.lightbox .lb-prev { left: 14px; top: 50%; margin-top: -22px; }
.lightbox .lb-next { right: 14px; top: 50%; margin-top: -22px; }
.lightbox button:hover { background: #187b9b; color: #e2dcc1; }
