body {
  margin: 0;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 5px;
  transition: 0.3s;
}

@media (min-width: 768px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1440px) { .gallery { grid-template-columns: repeat(6, 1fr); } }

/* start modal */ 

/* The Modal (background) */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.9);
}

/* Modal Content (image) */
.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

/* Caption of Modal Image */
#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
}

/* Add Animation */
.modal-content, #caption {  
  -webkit-animation-name: zoom;
  -webkit-animation-duration: 0.6s;
  animation-name: zoom;
  animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
  from {-webkit-transform:scale(0)} 
  to {-webkit-transform:scale(1)}
}

@keyframes zoom {
  from {transform:scale(0)} 
  to {transform:scale(1)}
}

/* The Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

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

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px){
  .modal-content {
    width: 100%;
  }
}
/* end modal */ 

/* start navbar */ 

nav {
  width: 100%;
  background-color: #acacac;
  padding-left: 30px;
  padding-right: 10px;
  display: flex;
  position: fixed;
  top: 0;
  align-items: center;
  z-index: 998;
  height: 40px;
}

.logo {
  display: inline-block;
  text-decoration: none;
  font-size: 1.4rem; 
  color: white;
}

.nav-links {
  list-style: none;
  display: flex;
  font-size: 1.2rem; 
  margin-left: 40px;
}

.nav-item a {
  display: inline-block;
  padding: 10px 15px;
  text-decoration: none;
  color: white;
}

.nav-item:hover {
  background-color: white;
}

.nav-item:hover a {
  color: #494949;
}

.logo img {
  width: 175px;
  vertical-align: middle;
}

/* end navbar */ 

.gallery {
  margin-top: 40px;
}

.gallery:hover .gallery__image {
  filter: grayscale(1);
}
.gallery__link {
  overflow: hidden;
  height: 400px;
  max-height: 400px;
}
.gallery__link:hover .gallery__image {
  filter: grayscale(0);
}
.gallery__link:hover .gallery__caption {
  opacity: 1;
}
.gallery__thumb {
  position: relative;
  height: 100%;
}
.gallery__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s;
}
.gallery__image:hover {
  transform: scale(1.1);
}
.gallery__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 25px 15px 15px;
  width: 100%;
  font-family: 'Helvetica', sans-serif;
  font-size: 16px;
  color: white;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
}

