body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  justify-content: center;
}

.folder {
  position: relative;
  width: 200px;
  height: 200px;
  overflow: hidden;
  cursor: pointer;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.folder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.folder:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.folder .topic {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  padding: 5px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  text-align: center;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 5px;
}

.folder:hover .topic {
  opacity: 1;
}

@media (max-width: 768px) {
  .gallery {
    flex-direction: column;
    align-items: center;
  }

  .folder {
    width: 90%;
    height: auto;
  }

  .folder img {
    height: auto;
  }

  .folder .topic {
    position: static;
    opacity: 1;
    background-color: transparent;
    color: #000;
    font-size: 18px;
    margin-top: 10px;
  }
}
