
#gallery{
  width: 100%;
  margin: 1rem 0 0;
}
.gallery {
  display: grid;
  max-width: 1024px;
  margin: 0 auto 0;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 1rem;
}

.gallery-item {
  text-align: left;
  border: 1px solid rgb(163, 163, 163);
  border-radius: 5px;
 
}

.gallery-item img {
  width: 100%;
  cursor: pointer;
  border-radius: 5px;
  transition: 0.3s;
}

.gallery-item img:hover {
  opacity: 0.8;
}
#gallery h2{
  max-width: 900px;
  color: var(--black--h1);
  font-size: 1.1rem;
  padding: 1rem 2rem 1rem;
  margin: 0 auto 0;
  font-weight: 600;
  text-align: left;
  letter-spacing: .8px;
}
@media (max-width: 540px){
#gallery h1{
  padding: 0;
  margin: 3rem 1rem 1rem;
 
}
}
  

.caption {
  margin-top: 8px;
  margin: 1em;
  font-size: 1em;
  color: #333;
  line-height: 1.3em;
 
}
.caption p{
  color: var(--black-font-p);
  text-align: left;
  padding: 1rem;
 line-height: 1.3em;
 font-style: italic;
 border-radius: 5px;
 background-color: rgb(224, 223, 223);
}


.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.close-btn {
  color: white;
  font-size: 30px;
  font-weight: bold;
  position: absolute;
  top: 20px;
  right: 30px;
  cursor: pointer;
  user-select: none;
}

.close-btn:hover {
  color: #ccc;
}