* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
}
.search {
  margin-top: 3%;
  margin-left: 30%;
}
.search .search-box {
  width: 60%;
  height: 50px;
  position: relative;
}
.search-box i {
  background-color: transparent !important;
  position: absolute;
  left: 90%;
  top: 50%;
  cursor: pointer;
  color: teal;
  font-size: 1.6rem;
  transform: translateY(-50%);
}
.search-box input {
  width: 100%;
  height: 100%;
  outline: none;
  border: none;
  font-size: 1.2rem;
  padding-left: 50px;
  background-color: rgb(188, 224, 253);
  border-radius: 15px;
}
.search-box input::placeholder {
  color: #929292;
}
.search-box input:focus::placeholder {
  color: #bfbfbf;
}
.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gallery .images {
  gap: 15px;
  max-width: 95%;
  margin-top: 50px;
  columns: 5 340px;
  list-style: none;
}
.gallery .images .card {
  display: flex;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
  border-radius: 4px;
}
.gallery .images img {
  width: 100%;
  z-index: 2;
  position: relative;
}
.images .details {
  position: absolute;
  z-index: 4;
  width: 100%;
  bottom: -100px;
  display: flex;
  align-items: center;
  padding: 15px 20px;
  justify-content: space-between;
  transition: bottom 0.1s ease;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}
.images li:hover .details {
  bottom: 0;
}
button,
i {
  outline: none;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  transition: 0.2s ease;
}
.details button {
  background: #fff;
  font-size: 1.1rem;
  padding: 3px 8px;
}
.details .download-btn:hover {
  background: #f2f2f2;
}
.gallery .load-more {
  color: #fff;
  background: teal;
  margin: 50px 0;
  font-size: 1.2rem;
  padding: 12px 27px;
}
.gallery .load-more.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.lightbox {
  z-index: 5;
  position: fixed;
  visibility: hidden;
  background: rgba(0, 0, 0, 0.65);
}
.lightbox.show {
  visibility: visible;
}
.lightbox .wrapper {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 100%;
  padding: 20px;
  max-width: 850px;
  background: #fff;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
  transition: transform 0.1s ease;
}
.lightbox.show .wrapper {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.wrapper header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header .photographer {
  color: #333;
}
header .photographer i {
  font-size: 1.7rem;
  cursor: auto;
}
header .photographer span {
  font-size: 1.2rem;
}
header .buttons i {
  height: 40px;
  width: 40px;
  display: inline-block;
  color: #fff;
  font-size: 1.2rem;
  line-height: 40px;
  text-align: center;
  background: teal;
  border-radius: 4px;
  transition: 0.2s ease;
}
header .buttons i:first-child:hover {
  background: #333;
}
header .buttons i:last-child {
  margin-left: 10px;
  font-size: 1.25rem;
  background: #6c757d;
}
header .buttons i:last-child:hover {
  background: #5f666d;
}
.wrapper .preview-img {
  display: flex;
  justify-content: center;
  margin-top: 25px;
}
.preview-img .img {
  max-height: 65vh;
}
.preview-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media screen and (max-width: 688px) {
  .lightbox .wrapper {
    padding: 12px;
    max-width: calc(100% - 26px);
  }
  .wrapper .preview-img {
    margin-top: 15px;
  }
  header .buttons i:last-child {
    margin-left: 7px;
  }
  header .photographer span,
  .search p {
    font-size: 1.1rem;
  }
  .search h1 {
    font-size: 1.8rem;
  }
  .search .search-box {
    width: 240px;
    max-width: 300px;
    height: 40px;
    margin: 30px 0;
  }
  .search .search-box i {
    position: absolute;
    left: 80%;
    top: 50%;
    cursor: pointer;
    color: teal;
    font-size: 1.6rem;
    transform: translateY(-50%);
  }
  .gallery .images {
    max-width: 100%;
    padding: 0 13px;
    margin-top: 20px;
  }
  .images .details {
    bottom: 0px;
  }
  .gallery .load-more {
    padding: 10px 25px;
    font-size: 1.05rem;
  }
}
@media screen and (max-width: 768px) {
  .search {
    margin-left: 5%;
  }

  .search .search-box {
    width: 90%;
    height: 40px;
  }

  .search .search-box input {
    padding-left: 35px;
  }

  .gallery {
    flex-direction: column;
    align-items: center;
  }

  .gallery .images {
    columns: 2 200px;
    margin-top: 30px;
  }

  .gallery .images .card {
    margin-bottom: 10px;
  }

  .gallery .load-more {
    font-size: 1rem;
    padding: 10px 20px;
  }
}

@media screen and (max-width: 480px) {
  .search {
    margin-top: 5%;
  }

  .search .search-box {
    width: 95%;
    height: 35px;
  }

  .search .search-box input {
    font-size: 0.9rem;
    padding-left: 30px;
  }

  .gallery .images {
    columns: 1;
    margin-top: 20px;
  }

  .gallery .load-more {
    font-size: 0.9rem;
    padding: 8px 15px;
  }

  header .photographer span {
    font-size: 1rem;
  }

  header .buttons i {
    height: 35px;
    width: 35px;
    font-size: 1rem;
  }

  header .buttons i:last-child {
    margin-left: 5px;
  }

  .lightbox .wrapper {
    padding: 10px;
    max-width: calc(100% - 20px);
  }
}
