/**
 * Video Section Component Styles
 * 
 * Video-Sektion mit Headline, Text und Video-Overlay
 * Verwendet das gleiche Overlay-System wie Impact Stats
 */

/* Section Container */
.video-section {
  padding: 0;
  background: #ffffff;
}

.video-section .container {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.video-section__content-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

/* Desktop 2-column layout - 50/50 */
@media (min-width: 992px) {
  .video-section__content-wrapper {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
  
  /* Video on right (default) */
  .video-section--video-right .video-section__content {
    order: 1;
  }
  
  .video-section--video-right .video-section__media {
    order: 2;
  }
  
  /* Video on left */
  .video-section--video-left .video-section__content {
    order: 2;
  }
  
  .video-section--video-left .video-section__media {
    order: 1;
  }
}

/* Content Side */
.video-section__content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Headline */
.video-section__headline {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #212529;
  margin: 0;
  line-height: 1.2;
}

/* Text */
.video-section__text {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin: 0;
}

.video-section__text p {
  margin: 0 0 1rem 0;
}

.video-section__text p:last-child {
  margin-bottom: 0;
}

/* Media Side - Image with video overlay */
.video-section__media {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border-radius: 2px;
  overflow: hidden;
  background: #f5f5f5;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-section__media:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.video-section__media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.video-section__media:hover img {
  transform: scale(1.05);
}

/* Video Overlay - Play button */
.video-section__media .video-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-section__media .video-overlay:hover {
  background: #ffffff;
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

/* Play Icon SVG */
.video-section__media .video-overlay .play-icon {
  width: 36px;
  height: 36px;
  color: var(--color-primary);
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.video-section__media .video-overlay:hover .play-icon {
  transform: scale(1.1);
}

/* Fade in animation */
@keyframes fadeInVideo {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-section__content,
.video-section__media {
  animation: fadeInVideo 0.6s ease-out;
}

.video-section__media {
  animation-delay: 0.2s;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .video-section__content {
    gap: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .video-section__content-wrapper {
    gap: 5rem;
  }
}

/* Mobile optimizations */
@media (max-width: 991px) {
  
  .video-section__headline {
    font-size: 1.75rem;
  }
  
  .video-section__text {
    font-size: 0.9375rem;
  }
  
  .video-section__media .video-overlay {
    width: 70px;
    height: 70px;
  }
  
  .video-section__media .video-overlay .play-icon {
    width: 28px;
    height: 28px;
  }
}

/* Accessibility */
.video-section__media .video-overlay:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 4px;
}

.video-section__media .video-overlay:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .video-section__content,
  .video-section__media,
  .video-section__media .video-overlay,
  .video-section__media img {
    animation: none;
    opacity: 1;
    transition: none;
  }
  
  .video-section__media:hover {
    transform: none;
  }
  
  .video-section__media:hover img {
    transform: none;
  }
  
  .video-section__media .video-overlay:hover {
    transform: translate(-50%, -50%);
  }
}

/* Print styles */
@media print {
  .video-section {
    page-break-inside: avoid;
  }
  
  .video-section__content-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .video-section__media {
    padding-bottom: 40%;
    max-height: 300px;
  }
  
  .video-section__media .video-overlay {
    display: none;
  }
}

/* Video Modal Overlay Styles (shared with impact-stats) */
.video-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-modal-overlay.active {
  opacity: 1;
}

.video-modal-container {
  position: relative;
  width: 90%;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
}

.video-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

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

.video-modal-close:focus {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

.video-modal-close svg {
  width: 30px;
  height: 30px;
}

.video-modal-content {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 2px;
  overflow: hidden;
}

.video-modal-content iframe,
.video-modal-content video {
  width: 100%;
  height: 100%;
  display: block;
}

.video-modal-content video {
  object-fit: contain;
}

@media (max-width: 767px) {
  .video-modal-container {
    width: 95%;
  }
  
  .video-modal-close {
    top: -40px;
    width: 35px;
    height: 35px;
  }
  
  .video-modal-close svg {
    width: 25px;
    height: 25px;
  }
}