/* style.css */
/* Video gallery grid */
.video-gallery {
  display: grid;
  gap: 16px;
  padding: 12px;
  justify-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* Video thumbnail */
.video-thumb {
  position: relative;
  cursor: pointer;
  width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 8px;
  overflow: hidden;
  background-color: #000;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.video-thumb:hover,
.video-thumb:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  outline: none;
}

/* Thumbnail wrapper */
.thumb-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #eaeaea;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-thumb:hover img {
  transform: scale(1.03);
}

/* Play icon */
.play-icon {
  position: absolute;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  inset: 0;
  margin: auto;
}

.play-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

/* Hidden videos */
.hidden-video {
  display: none;
}

/* Load more videos button */
#load-more-videos {
  display: block;
  margin: 20px auto;
  padding: 8px 16px;
  background-color: #eeeeee;
  color: #333333;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#load-more-videos:hover,
#load-more-videos:focus {
  background-color: #FF7221;
  color: #e4e4e4;
  outline: none;
}

#load-more-videos:active {
  background-color: #eeeeee;
  color: #333333;
}

/* Modal overlay */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 880px;
  background: #000;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  padding: 10px;
}

/* Close button */
.close-button {
  position: absolute;
  top: -25px;
  right: -25px;
  width: 50px;
  height: 50px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 100020;
  transition: background-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.close-button:hover,
.close-button:focus {
  background: #000;
  transform: scale(1.1);
  outline: 2px solid #fff;
}

/* Video frame */
#video-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  min-height: 300px;
  border: none;
}

/* Responsive adjustments */
@media screen and (max-width: 900px) {
  .play-icon {
    width: 48px;
    height: 48px;
  }
  .play-icon svg {
    width: 24px;
    height: 24px;
  }
  .modal-content {
    width: 96%;
  }
}

@media screen and (max-width: 600px) {
  .close-button {
    width: 40px;
    height: 40px;
    font-size: 22px;
    right: 10px;
    top: 10px;
  }
  #video-frame {
    min-height: 200px;
  }
}

/* Column classes */
.columns-1 {
  grid-template-columns: 1fr;
}

.columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

.columns-5 {
  grid-template-columns: repeat(5, 1fr);
}

.columns-6 {
  grid-template-columns: repeat(6, 1fr);
}

/* Accessibility helper */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Shorts badge */
.shorts-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: #FF7221;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 3px;
  z-index: 3;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@media screen and (max-width: 900px) {
  .video-gallery.columns-2,
  .video-gallery.columns-3,
  .video-gallery.columns-4,
  .video-gallery.columns-5,
  .video-gallery.columns-6 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media screen and (max-width: 600px) {
  .video-gallery.columns-1,
  .video-gallery.columns-2,
  .video-gallery.columns-3,
  .video-gallery.columns-4,
  .video-gallery.columns-5,
  .video-gallery.columns-6 {
    grid-template-columns: 1fr !important;
  }
}
