.row {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 40.0625em) {
  .row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 48.0625em) {
  .row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.row > .column {
  outline: 1px solid red;
}

.text-box {
  background-color: #d8dde0;
  padding: 3px 4px;
  text-align: center;
}

.column-img {
  width: 100%;
}

img.hover-shadow {
  transition: 0.3s;
}

.hover-shadow:hover {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

/* The Modal (background) */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
  background-color: black;
}

/* Modal Content */
.gallery-modal-content {
  position: relative;
  margin: auto;
  line-height: 1;
}

.slideshow-mode {
  width: 90vmin;
  max-width: 1200px;
}

.wide-mode {
  width: 100vmin;
  max-width: 100%;
}

/* The Close Button */
.gallery-close {
  color: white;
  margin-top: -28px;
  font-weight: bold;
  float: right;
}

.gallery-close:hover,
.gallery-close:focus {
  color: #999;
  text-decoration: none;
  cursor: pointer;
}

.mySlides {
  display: none;
}

.img-wide-mode img {
  aspect-ratio: auto;
  object-fit: contain;
}

.img-slideshow-mode img {
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.slidePicker {
  outline: 1px solid #212b32;
}

/* Next & previous buttons */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  transform: translate(0, -50%);
  width: auto;
  padding-right: 16px;
  padding-left: 16px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  border-radius: 0 3px 3px 0;
  user-select: none;
  -webkit-user-select: none;
}

.nav-slideshow-mode {
  top: 40%;
}

.nav-fullscreen-mode {
  top: 50%;
}

/* Position the "next button" to the right */
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel {
  overflow: visible;
  white-space: nowrap;
  outline: 1px solid #212b32;
}

#carousel .slide {
  display: inline-block;
}

.imageTitle {
  color: white;
  margin-top: -28px;
  float: left;
}

.underneath {
  position: relative;
}

.gallery-img {
  cursor: pointer;
  opacity: 0.4;
  display: inline-block;
}

.gallery-img:hover,
.active {
  opacity: 1;
}

/* Fullscreen button */
#fullscreen-button {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.4);
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-sizing: border-box;
  transition: transform 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#fullscreen-button:hover {
  transform: scale(1.125);
}
#fullscreen-button svg:nth-child(2) {
  display: none;
}
[fullscreen] #fullscreen-button svg:nth-child(1) {
  display: none;
}
[fullscreen] #fullscreen-button svg:nth-child(2) {
  display: inline-block;
}
