body {
  overflow-x: scroll;
  overflow-y: hidden;
  padding: 0px 50px;
  margin: 0px;
}

main,
#container {
  padding: 0px
}

#gallery {
  display: flex;
  flex-flow: row;
  align-items: center;
  max-height: 90vh;
  gap: 10px;
}

.cursive {
  font-family: var(--cursive)
}

.links {
  display:block;
  min-width:300px;
  max-height:100vh;
  text-align: center;
  padding-top: 30px;
}
  .links .caption {
    padding: 5px;
    outline: none;
    font-weight: bold;
    display:table;
    margin:20px

  }

  .links a {
    display:inline-block;
    height:40vh;
    max-width:400px;
    height:fit-content;
    padding:20px;
    font-size: 25px;
    font-weight: normal;
    color: var(--black);

  }

  .links a:hover > img {
    transform: rotate(3deg);
    filter: drop-shadow(5px 5px 5px var(--dark))
  }

  .links a:hover {
    color: var(--dark)
  }

  .links a > span {
    display: block;
 
    max-height: 30px;
  }

  .links a > img {
    object-fit:contain;
    margin: 0px;
    max-height: 100%;
   max-width: 100%
  }


.image {
  display: inline-block;
  position: relative;
  text-align: right;
  min-width: 500px;
  /* max-width: 800px; */
  flex: 1 1 500px;
  /* display: flex; */
  flex-flow: column wrap;
  max-height: 100%;
  align-content: center;
  align-items: flex-end;
  justify-content: flex-end;
}

  .image img {
    border: 12vh solid transparent;
    border-image-slice: 33%;
    border-image-repeat: round;
    filter: drop-shadow(1px 5px 5px var(--black));
    margin: 0px;
    /* min-width: 300px; */
    max-height: min(1000px, 80vh);
    flex: 1 1 200px;
    object-fit: cover;
    overflow-y: hidden;

  }
  .image.multi {
    margin: 10px -35px;

    ~.image.multi {
      margin-right: 0px
    }

    &.big {
      margin: 20px -40px
    }

  }

  .image.big {
    max-width: 900px;

    img {
      border-width: 40px;
    }
  }

  .image.png img {
    padding: 20px;
    margin: 20px
  }

  .image .caption {
    padding: 20px 10px;
    max-width: 380px;
    margin: -20px 20px;
    overflow-y: scroll;
    font-size: 17px;
    line-height: 1.4em;
    display: inline-block;
    max-height: fit-content;
    flex: 0 1 200px;
    max-height:250px;
  }

  .image:has(.images) {
    flex: 1 0 500px;
    max-width: 500px;
  }

  .images {
    display: flex;
    flex-flow: row wrap;
    align-content: center;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex: 3 1 100%;
    margin: -5px;
  }
.images.col {
  flex-flow:column;
  max-height:80vh;
  align-content: stretch;
  align-items:flex-end
}
    .images img {
      flex: 1 2 20%;
      min-width: 200px;
      max-height: 60vh;
      object-fit: cover;
      margin: -10px;
      display: inline;
      border-width: 30px;
    }
      .small {
        flex: 1 4 20%;
        max-height: 30%;
      }

      .big {
        flex: 2 1 45%;
        max-height: 50%;
      }


    .images .caption {
      max-width: 200px;
      margin: 20px
    }



.image:nth-of-type(odd) img,
.image .images img:nth-of-type(odd) {
  border-image-source: url(https://file.garden/aXHsl-1cKApJSa-W/museum/frame5.png);
}

.image:nth-of-type(even) img,
.image .images img:nth-of-type(even) {
  border-image-source: url(https://file.garden/aXHsl-1cKApJSa-W/museum/frame2.png);
}

.image:nth-of-type(3n) img,
.image .images img:nth-of-type(3n) {
  border-image-source: url(https://file.garden/aXHsl-1cKApJSa-W/museum/frame4.png);
}

.image:nth-of-type(5n) img,
.image .images img:nth-of-type(5n) {
  border-image-source: url(https://file.garden/aXHsl-1cKApJSa-W/museum/frame3.png);
}

.image:nth-of-type(6n) img,
.image .images img:nth-of-type(6n) {
  border-image-source: url(https://file.garden/aXHsl-1cKApJSa-W/museum/frame1.png);
}

.gap {
  flex: 1 0 100px;
}



.caption.return {
  display: block;
  background: var(--black);
  padding: 10px;
  min-width: 200px;
  position: absolute;
  left: 10px;
  top: 40px;
  text-align: center;
}

.return a {
  display: block;
  height: 100%;
  color: var(--white);
}

.caption,
.intro {
  background: var(--white);
  border: 3px var(--dark) double;
  outline: 4px var(--black) double;
  outline-offset: -2px;
  border: 3px var(--dark) double;
  outline: 4px var(--black) double;
  outline-offset: -2px;
  color: var(--dark);

}

.intro {
  padding: 20px;
  height: fit-content;
  position: relative;
  margin-top: 20vh;
  overflow-y: scroll;
  overflow-x: hidden;
  min-width: 250px;
  /* max-width: 300px; */
  font-size: 18px;
  display: inline-block;
}

.intro:nth-of-type(2) {
  margin-top: 30vh
}

.intro:nth-of-type(3) {
  margin-top: 40vh
}

/* @media screen and (max-height: 600px) {
  .image {
    max-height: 90vh;

    &:has(.images) {
      min-width: fit-content;
      max-width:fit-content;
    }

    .images {
      max-height: 50vh;
      flex-flow: row wrap
    }
  }
} */

@media screen and (max-width: 600px) {
  body {
    overflow-x: hidden;
    overflow-y: scroll
  }

  #gallery {
    /* flex-flow:row wrap; */
    display: block;
    max-width: 100vw;
    padding-top: 150px;
  }

  .image,
  .image img,
  .image.big img,
  .image.big,
  .image.multi,
  .image.big.multi,
  .images.col,
  .image .images.col,
  .links {
    min-width: 100px;
    height: 100%;
    max-width: 100%;
    max-height: fit-content;
    display: block;
    margin: 0 auto;
  }

  .caption {
    margin: 0 auto;
    margin-bottom: 40px;
  }

  .image img {
    width: 100%;
    min-width: 100%;
    border-width: 50px
  }

  .intro {
    margin-top: 20px !important
  }

  .image {
    margin-bottom: 50px;

  }
}

/* lightbox */

body.no-scroll {
  overflow: hidden
}

#lightbox {
  position: fixed;
  /* keeps the lightbox window in the current viewport */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, .7);
  text-align: center;

  p {
    text-align: right;
    color: #fff;
    margin-right: 50px;
    font-size: 30px;
  }

  img {
    /* box-shadow:0 0 25px #111; */
    max-width: 80vw;
    max-height: 80vh;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

/*#gallery .image img:hover {
  cursor: crosshair !important
}