/* ============================================================================
   VIDEO COMPONENT

   Embedded video player with hover effects, shimmer animation,
   and play button overlay.

   Purpose: Display promotional or demo videos in an engaging,
   interactive container with modern visual effects.

   Required HTML Structure:

   <div class="video-container">
     <div class="video-placeholder">
       <button class="play-button" aria-label="Play video">
         <i class="fas fa-play"></i>
       </button>
       <div class="video-text">Watch Demo</div>
     </div>
   </div>

   Or with embedded iframe:
   <div class="video-container">
     <iframe src="..." allow="autoplay; encrypted-media" allowfullscreen></iframe>
   </div>

   Dependencies:
   - Font Awesome (for play icon)
   - animations.css (shimmer animation defined here for video only)

   Accessibility:
   - Play button has aria-label
   - Keyboard accessible (focusable button)
   - Sufficient contrast for text overlay

   Features:
   - 16:9 aspect ratio maintained
   - Hover lift and scale effect on container
   - Shimmer effect on placeholder
   - Glowing border on hover
   - Responsive sizing

   Notes:
   - Shimmer animation is local to this component (not in animations.css)
   - Play button centers using absolute positioning + transform
   - On mobile, play button moves slightly up for better ergonomics
   ============================================================================ */

/* ===== Container ===== */

.video-container {
  max-width: 800px;
  margin: 2rem auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy-medium);
  position: relative;
  z-index: 1;
  border: 1px solid rgba(96, 165, 250, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(147, 197, 253, 0.2);
  transition: all var(--transition-normal);
}

.video-container:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(96, 165, 250, 0.2);
  border-color: var(--sky-blue);
}


/* ===== Video Placeholder (16:9 aspect ratio) ===== */

.video-placeholder {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: linear-gradient(
    135deg,
    var(--navy-medium),
    var(--navy-dark)
  );
  overflow: hidden;
}

.video-placeholder img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Shimmer effect animation */
.video-placeholder::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 3s infinite;
  z-index: 1;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }

  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}


/* ===== Play Button ===== */

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-md);
  border: none;
  z-index: 2;
}

.play-button:hover {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--white);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.play-button:focus {
  outline: 2px solid var(--sky-blue);
  outline-offset: 4px;
}

.play-button i {
  font-size: 30px;
  color: var(--navy-light);
  margin-left: 5px; /* Optical centering for play icon */
}


/* ===== Embedded iframe ===== */

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}


/* ===== Responsive ===== */

@media (max-width: 768px) {
  .play-button {
    width: 70px;
    height: 70px;
    top: 45%; /* Move up slightly for better thumb reach */
  }

  .play-button i {
    font-size: 24px;
  }
}
