/* YouTube Video Embed Styles */
.hero-video {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.youtube-video-container {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(10px);
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

/* Animated Border */
.youtube-video-container::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #3b82f6, #60a5fa, #93c5fd, #dbeafe, #3b82f6);
  background-size: 300% 300%;
  border-radius: 22px;
  z-index: -1;
  animation: gradientBorder 3s ease infinite;
}

@keyframes gradientBorder {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.youtube-video-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.youtube-video-container:hover::before {
  animation-duration: 1.5s;
}

/* Video Wrapper */
.video-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border-radius: 15px;
  overflow: hidden;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 15px;
}

/* Video Info Badge */
.video-info-badge {
  position: absolute;
  bottom: -15px;
  left: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-content h4 {
  color: #1e293b;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.3;
}

.badge-content p {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.video-stats {
  display: flex;
  gap: 20px;
  align-items: center;
}

.video-stats span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3b82f6;
  font-size: 0.85rem;
  font-weight: 600;
}

.video-stats i {
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-video {
    max-width: 100%;
    margin: 2rem 0 0 0;
    padding: 0;
  }

  .youtube-video-container {
    padding: 12px;
    margin: 0;
    border-radius: 15px;
  }

  .youtube-video-container::before {
    border-radius: 17px;
  }

  .video-wrapper {
    border-radius: 10px;
  }

  .video-info-badge {
    position: static;
    margin-top: 15px;
    padding: 15px;
    border-radius: 12px;
  }

  .badge-content h4 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .badge-content p {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }

  .video-stats {
    flex-direction: row;
    gap: 15px;
    justify-content: center;
  }

  .video-stats span {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .youtube-video-container {
    padding: 10px;
    border-radius: 12px;
  }

  .youtube-video-container::before {
    border-radius: 14px;
  }

  .video-wrapper {
    border-radius: 8px;
  }

  .video-info-badge {
    padding: 12px;
    border-radius: 10px;
    margin-top: 12px;
  }

  .badge-content h4 {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }

  .badge-content p {
    font-size: 0.8rem;
    margin-bottom: 10px;
  }

  .video-stats {
    gap: 12px;
  }

  .video-stats span {
    font-size: 0.75rem;
  }

  .video-stats i {
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  .youtube-video-container {
    padding: 8px;
  }

  .video-info-badge {
    padding: 10px;
  }

  .badge-content h4 {
    font-size: 0.85rem;
  }

  .badge-content p {
    font-size: 0.75rem;
  }

  .video-stats {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .video-stats span {
    font-size: 0.7rem;
  }
}

/* Loading Animation for iframe */
.video-wrapper::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 1;
}

.video-wrapper iframe:not([src=""]) + ::before {
  display: none;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Accessibility */
.video-wrapper:focus-within {
  outline: 2px solid #3b82f6;
  outline-offset: 4px;
}

/* Print styles */
@media print {
  .youtube-video-container {
    display: none;
  }
}
