.video-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgb(26, 24, 27);
  flex-direction: column;
  gap: 2rem;
  padding: 1rem;
  box-sizing: border-box;
  /* Container animation */
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.video-container h2 {
  margin-top: 2vh;
  text-align: center;
  font-size: 1.5rem;
  /* Title animation */
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.video-slider {
  margin: 2vh 0;
  width: 100%;
  max-width: 600px;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  aspect-ratio: 16/9;
  /* Slider animation */
  opacity: 0;
  transform: scale(0.95);
  animation: scaleIn 0.6s ease-out 0.4s forwards;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.video-wrapper {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-wrapper.active {
  z-index: 3;
  opacity: 1;
}

video {
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s ease;
}

.video-slider video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.video-slider:hover video {
  transform: scale(1.02);
}

.video-name {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 5px;
  z-index: 2;
  text-align: center;
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Name animation */
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.6s forwards;
}

.video-buttons {
  width: 100%;
  max-width: 300px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 2vh;
  /* Buttons animation */
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.8s forwards;
}

.slider-arrow {
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  cursor: pointer;
  border: 0;
  border-radius: 50px;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.slider-arrow:hover:not(:disabled) {
  background-color: rgb(23, 93, 131);
  transform: scale(1.1);
}

.slider-arrow:active:not(:disabled) {
  transform: scale(0.95);
}

video::-webkit-media-controls {
  z-index: 3;
  position: relative;
}

@media (max-width: 800px) {
  .slider-arrow:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0);
  }
}

.ajax-form2 label {
  display: none;
}

/* Responsive transitions */
@media (max-width: 600px) {
  .video-container h2 {
    font-size: 1.2rem;
    margin-top: 1vh;
    transition: all 0.3s ease;
  }

  .video-name {
    font-size: 1.2rem;
    bottom: 85%;
    transition: all 0.3s ease;
  }
}

@media (max-width: 400px) {
  .video-name {
    font-size: 1rem;
    bottom: 80%;
    white-space: normal;
    max-width: 80%;
    transition: all 0.3s ease;
  }

  .slider-arrow {
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
  }
}
