.photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1040px;
  margin: 0 auto;
}

.item {
  /* background-color: yellow; */
  width: 200px;
}

.item img {
  display: inline-block;
  height: 200px;
  width: 100%;
  object-fit: cover;
  /* only want height applied to img and not width of element */
}

/* breakpoints for different screen sizes */
@media screen and (max-width:1100px){
  .photos {
    max-width: 620px;
  }
}

@media screen and (max-width:640px){
  .photos {
    max-width: 410px;
  }
}

@media screen and (max-width:375px){
  .photos {
    max-width: 210px;
  }
}

/* lightbox rules, imported from aidan quinlan */

.photos .item.hide {
  opacity:0;
  pointer-events:none;
}

.photos .item.active {
  width:100%;
  height:100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position:fixed;
  top:0;
  left:0;
  z-index: 2;
  pointer-events: none;
  padding: 4.2rem .5rem 4rem .5rem;
}

.photos .item.active img {
  max-width: 100%;
  max-height: 90%;
  height: auto;
  width: auto;
}

.metadata {
  z-index: 3;
  pointer-events: auto;
  text-decoration: none;
  width: 100%;
  max-width: 600px;
  padding: 0 2rem;
}

.photos .item .tags {
  text-align: center;
}

.photos .item .caption {
  display:none;
}

.photos .item .caption a {
  text-decoration: none;
  border-bottom:1px solid;
}

.photos .item .caption a:hover {
  background: rgba(0, 0, 0, 0.5);
}

.photos .item.active .caption {
  display:block;
}

.photos .item.active .metadata {
  margin-top: 1rem;
}

.photos img {
  /* max-height:100%; */
  cursor: zoom-in;
  pointer-events: auto;
}

.photos .item.active img {
  cursor: zoom-out;
}

.lightbox-bg {
  position: fixed;
  top:0;
  left:0;
  height:100vh;
  width:100vw;
  z-index: 1;
  display:none;
}

.lightbox-bg.active {
  display:block;
}

.img-nav {
  /* display: none;
  position: fixed;
  z-index: 2;
  top: 1.15rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 400px; 
  justify-content: space-between;
  padding:0 .5rem;
  pointer-events: none; */

  display: none;
  position: fixed;
  z-index: 10;
  top: 50%;               /* vertical center */
  left: 0;                /* left edge */
  width: 100%;            /* full width to place both buttons at edges */
  transform: translateY(-50%); /* center vertically */
  justify-content: space-between; /* one button on left, one on right */
  padding: 0 1rem;        /* small horizontal padding from edges */
  pointer-events: none;
}

.img-nav.active {
  display: flex;
}

.img-btn {
  pointer-events: auto;
  border:none;
  padding: .3rem .6rem;
  background: transparent;
}

.img-btn:hover {
  background: red;
}

/* hide title when lightbox is clicked */
body.lightbox-open h1,
body.lightbox-open .intro {
  /* display: none !important; */
  opacity: 0;
}