/* Styling of gallery grid*/

@media screen and (width > 992px) {
  .gallery {
    box-sizing:border-box;
    width: 100vw;
    display: grid;
    grid-auto-rows: 550px;
    grid-auto-flow: dense;
    gap: 10px;
    background:#f8f8f6;
    padding: 3.5em 10px 10px 10px;
    grid-template-columns: repeat(auto-fit, minmax(400px,1fr));
  }

  .gallery-item.wide {
    grid-column: auto / span 2;
  }

  .gallery-item.high {
    grid-column: auto / span 1;
  }
}

@media screen and (576px < width <= 992px) {
  .gallery {
    box-sizing:border-box;
    width: 100vw;
    display: grid;
    grid-auto-rows: 300px;
    grid-auto-flow: dense;
    gap: 10px;
    background:#f8f8f6;
    padding: 10.5em 10px 10px 10px;
    grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  }

  .gallery-item.wide {
    grid-column: auto / span 2;
  }

  .gallery-item.high {
    grid-column: auto / span 1;
  }
}

@media screen and (width <= 576px) {
  .gallery {
    box-sizing:border-box;
    width: 100vw;
    display: grid;
    gap: 10px;
    background:#f8f8f6;
    padding: 10.5em 10px 10px 10px;
    grid-template-columns: 1fr;
  }
}

.gallery-item {
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  cursor: pointer;
}

/* Styling of gallery links*/

.gallery-link-container {
  width: calc(100vw - 100px);
  display:flex;
  justify-content: center;
  background:#f8f8f6;
  font-size: 2em;
  padding: 50px 50px;
}

/* Styling of single picture view*/

#picture-large {
  position: fixed;
  display: none;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  width: 100vw;
  left:0vw;
  top: 0vh;
  justify-content: center;
  backdrop-filter: blur(8px);
  z-index: 30;
}

#picture-large img {
  position: relative;
  top: 1em;
  border: 10px solid #f8f8f6;
  max-height: calc(100vh - 3.5em - 30px);
  max-width: calc(100vw - 30px);
}

#button-arrow-right {
  cursor: pointer;
  position:absolute;
  top: 50%;
  right: 3%;
  background-color: #666;
  border: 2px solid rgb(78, 78, 78);
  height: 60px;
  transform: translateY(-50%);
  transition: transform 0.1s;
  width: 40px;
  padding: 0;
  appearance: none;
}

.arrow-top-right, .arrow-bottom-right {
  background-color: white;
  height: 4px;
  left: -5px;
  position: absolute;
  top: 47%;
  width: 90%;
  border-radius: 2px;
}

.arrow-top-right:after, .arrow-bottom-right:after {
  background-color: #41daf1;
  content: "";
  height: 100%;
  position: absolute;
  top: 0;
  transition: all 0.15s;
}

.arrow-top-right {
  transform: rotate(45deg);
  transform-origin: bottom right;
}

.arrow-top-right:after {
  left: 100%;
  right: 0;
  transition-delay: 0s;
}

.arrow-bottom-right {
  transform: rotate(-45deg);
  transform-origin: top right;
}

.arrow-bottom-right:after {
  left: 0;
  right: 100%;
  transition-delay: 0.15s;
}

#button-arrow-right:hover .arrow-top-right:after {
  left: 0;
  transition-delay: 0.15s;
}

#button-arrow-right:hover .arrow-bottom-right:after {
  right: 0;
  transition-delay: 0s;
}

#button-arrow-left {
  cursor: pointer;
  position:absolute;
  top: 50%;
  left: 3%;
  background-color: #666;
  border: 2px solid rgb(78, 78, 78);
  height: 60px;
  transform: translateY(-50%);
  transition: transform 0.1s;
  width: 40px;
  padding: 0;
  appearance: none;
}

.arrow-top-left, .arrow-bottom-left {
  background-color: white;
  height: 4px;
  right: -5px;
  position: absolute;
  top: 47%;
  width: 90%;
  border-radius: 2px;
}

.arrow-top-left:after, .arrow-bottom-left:after {
  background-color: #41daf1;
  content: "";
  height: 100%;
  position: absolute;
  top: 0;
  transition: all 0.15s;
}

.arrow-top-left {
  transform: rotate(-45deg);
  transform-origin: bottom left;
}

.arrow-top-left:after {
  right: 100%;
  left: 0;
  transition-delay: 0s;
}

.arrow-bottom-left {
  transform: rotate(45deg);
  transform-origin: top left;
}

.arrow-bottom-left:after {
  right: 0;
  left: 100%;
  transition-delay: 0.15s;
}

#button-arrow-left:hover .arrow-top-left:after {
  right: 0;
  transition-delay: 0.15s;
}

#button-arrow-left:hover .arrow-bottom-left:after {
  left: 0;
  transition-delay: 0s;
}

#button-arrow-left:focus-visible,
#button-arrow-right:focus-visible {
  outline: 2px solid #f8f8f6;
  outline-offset: 3px;
}
