/* Video Lightbox Styles */
.video-lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease-in-out;
  /* Add flexbox for perfect vertical centering */
  align-items: center;
  justify-content: center;
}

.video-lightbox.show {
  display: flex;
}

.video-lightbox-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  animation: slideIn 0.3s ease-in-out;
}

.video-lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  color: white;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: color 0.3s ease;
  background: none;
  border: none;
}

.video-lightbox-close:hover {
  color: #ccc;
}

.video-lightbox-title {
  position: absolute;
  top: -50px;
  left: 0;
  color: white;
  font-size: 18px;
  font-weight: 600;
  z-index: 1001;
  max-width: 60%;
}

.video-lightbox-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: black;
  border-radius: 8px;
  overflow: hidden;
}

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

.video-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-nav-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.video-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.video-nav-btn:disabled:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1);
}

.video-nav-prev {
  left: -70px;
}

.video-nav-next {
  right: -70px;
}

.video-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px;
  text-align: center;
  font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .video-lightbox-content {
    width: 95%;
    max-width: none;
  }

  .video-lightbox-close {
    top: -35px;
    right: 5px;
    font-size: 28px;
  }

  .video-lightbox-title {
    top: -35px;
    font-size: 16px;
    max-width: 70%;
  }

  .video-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .video-nav-prev {
    left: -50px;
  }

  .video-nav-next {
    right: -50px;
  }

  .video-counter {
    bottom: -30px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .video-nav-prev {
    left: -30px;
  }

  .video-nav-next {
    right: -30px;
  }

  .video-nav-btn {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
}

/* Hide scrollbar when lightbox is open */
body.video-lightbox-open {
  overflow: hidden;
}
