body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background: #f9f9f9;
  text-align: center;
}

h1 {
  color: #333;
}
.filters {
  text-align: center;
  margin: 20px 0;
}

.pdf-preview-wrapper {
  width: 100%;
  overflow: hidden;
}

.pdf-preview-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.pdf-preview-wrapper canvas {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 300px; /* or any height that suits your design */
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.filters button {
  background-color: #2b2b2b; /* black or use #8B0000 for dark red */
  color: white;
  border: none;
  padding: 10px 18px;
  margin: 6px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.filters button:hover,
.filters button.active {
  background-color: #8B0000; /* Dark Red on active */
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.gallery-item,
.media-item {
  max-width: 320px;
  max-height: 340px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.media-item {
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  padding: 4px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  max-width: 100%;
}

.media-item img,
.media-item video {
  height: auto;
  width: auto;
  max-width: 300px;
  max-height: 300px;
  cursor: pointer;
  display: block;
}

.loader {
  font-size: 18px;
  margin-top: 20px;
  color: #777;
}

.gallery-item {
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  padding: 4px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  max-width: 100%;
}

.gallery-item img, .gallery-item video {
  height: auto;
  width: auto;
  max-width: 300px;
  max-height: 300px;
  cursor: pointer;
  display: block;
}
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow: auto;
  padding: 20px;
}

.lightbox-content {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox img,
.lightbox video {
  max-width: 100vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 36px;
  color: white;
  cursor: pointer;
  z-index: 10001;
}

.caption {
  font-size: 14px;
  color: #555;
  padding: 8px;
}

.folder-caption {
  font-size: 12px;
  color: #666;
  text-align: center;
  margin-top: 4px;
  font-style: italic;
  user-select: none;
}

.media-item:hover {
  transform: scale(1.02);
  transition: transform 0.2s ease-in-out;
}