.video-gallery-container {
  width: 100%;
  overflow: hidden;
}

.video-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 20px;
  margin: 0 auto;
}

.video-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  aspect-ratio: 16/9;
}

.video-item:hover {
  transform: translateY(-5px);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  transition: background-color 0.3s ease;
}

.video-item:hover .video-overlay {
  background-color: rgba(0, 0, 0, 0.7);
}

.video-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  padding: 0 15px;
  margin: 0;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.video-item:hover .video-title {
  opacity: 0;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

.video-item:hover .play-button {
  opacity: 1;
  pointer-events: auto;
}

.play-button svg {
  display: block;
  width: 36px;
  height: 36px;
}

.play-button:hover {
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-item iframe,
.video-item video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Special state for when video is playing */
.video-item.video-playing .video-title,
.video-item.video-playing .play-button {
  opacity: 0 !important;
  pointer-events: none !important;
}

.video-item.video-playing:hover {
  transform: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .video-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .video-gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .video-title {
    font-size: 16px;
  }
  
  .play-button {
    width: 60px;
    height: 60px;
  }
  
  .play-button svg {
    width: 30px;
    height: 30px;
  }
} 