.video-gallery-block {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.video-gallery-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.video-gallery-block .container {
  position: relative;
  z-index: 1;
}

.video-gallery-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.video-gallery-subtitle {
  font-size: 1.125rem;
  max-width: 800px;
  margin: 0 auto 3rem;
}

/* Grid Layout */
.video-gallery-content.layout-grid {
  display: grid;
  gap: 1.5rem;
}

.video-gallery-content.layout-grid[data-columns="1"] {
  grid-template-columns: 1fr;
}

.video-gallery-content.layout-grid[data-columns="2"] {
  grid-template-columns: repeat(2, 1fr);
}

.video-gallery-content.layout-grid[data-columns="3"] {
  grid-template-columns: repeat(3, 1fr);
}

.video-gallery-content.layout-grid[data-columns="4"] {
  grid-template-columns: repeat(4, 1fr);
}

/* List Layout */
.video-gallery-content.layout-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.video-gallery-content.layout-list .video-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
}

.video-gallery-content.layout-list .video-thumbnail {
  flex: 0 0 400px;
  height: 225px;
}

.video-gallery-content.layout-list .video-info {
  flex: 1;
  text-align: left;
}

/* Carousel Layout */
.video-gallery-content.layout-carousel {
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.video-gallery-content.layout-carousel::-webkit-scrollbar {
  height: 8px;
}

.video-gallery-content.layout-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.video-gallery-content.layout-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.video-gallery-content.layout-carousel .video-item {
  flex: 0 0 400px;
  scroll-snap-align: start;
}

/* Video Card */
.video-card {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumbnail .thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail .thumbnail-placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  opacity: 0.9;
  transition: all 0.3s ease;
  pointer-events: none;
}

.video-card:hover .play-button {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
  padding: 1.25rem;
}

.video-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.video-description {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Modal Styles */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.video-modal.active {
  display: flex;
}

.video-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  z-index: 10000;
}

.video-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  transition: transform 0.2s ease;
}

.video-modal-close:hover {
  transform: scale(1.1);
}

.video-player-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-player-container iframe,
.video-player-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Responsive */
@media (max-width: 992px) {
  .video-gallery-content.layout-grid[data-columns="4"] {
    grid-template-columns: repeat(2, 1fr);
  }

  .video-gallery-content.layout-grid[data-columns="3"] {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .video-gallery-title {
    font-size: 2rem;
  }

  .video-gallery-content.layout-grid {
    grid-template-columns: 1fr !important;
  }

  .video-gallery-content.layout-list .video-card {
    flex-direction: column;
  }

  .video-gallery-content.layout-list .video-thumbnail {
    flex: 0 0 auto;
    width: 100%;
  }

  .video-gallery-content.layout-carousel .video-item {
    flex: 0 0 300px;
  }

  .video-modal-content {
    width: 95%;
  }

  .video-modal-close {
    top: -40px;
  }
}
