.folder-box {
  display: flex;

  flex-wrap: wrap;

  gap: 10px;

  width: 80%;
}

.folder-box .folder {
  width: 170px;
}

.folder-box .folder a {
  text-decoration: none;
  color: #000;
}

.folder-box .folder p {
  font-size: 14px;
  margin-top: 5px;
}

.folder-box .folder img {
  width: 100%;

  height: auto;
}

.galery-container {
  max-width: 1200px;

  margin: 0 auto;

  padding: 10px;
}

.galery-box {
  columns: 3 250px;

  gap: 10px;
}

.galery-box a {
  margin-bottom: 10px;

  width: 100%;
}

.galery-box img {
  width: 100%;

  height: auto;

  margin-bottom: 10px;
}

/* Popup styles */

.popup {
  display: none;

  position: fixed;

  z-index: 9999;

  left: 0;

  top: 0;

  width: 100%;

  height: 100%;

  background-color: rgba(0, 0, 0, 0.8);

  justify-content: center;

  align-items: center;
}

.popup img {
  max-width: 90vw;

  max-height: 80vh;

  border-radius: 8px;
}

.close-popup {
  position: absolute;

  top: 20px;

  right: 20px;

  font-size: 30px;

  color: white;

  text-decoration: none;

  background-color: #000;

  padding: 5px 5px;

  border-radius: 50%;
}

.close-popup:hover,
.close-popup:focus {
  color: #999;

  text-decoration: none;

  cursor: pointer;
}

@media screen and (max-width: 768px) {
  .galery-box {
    columns: 2;
  }
  
  .folder-box .folder {
    width: 100px;
  }
}

@media screen and (max-width: 580px) {
  .popup {
    overflow: hidden;
  }

  .popup img {
    transform: rotate(90deg) !important;

    width: 90vh !important;

    height: 90vw !important;
  }
}
