.paragraph-carousel-video {
  background: var(--blueMedium);
}
.paragraph-carousel-video .carousel {
  margin: 0 calc(var(--bs-gutter-x) * -.5);
}
.paragraph-carousel-video .iframe-wrapper {
  margin: 2rem 0 0 0;
}
.paragraph-carousel-video .carousel-item .caption {
  color: var(--white);
  display: block;
  margin: 0;
  padding: 2rem;
  opacity: 0;
  text-decoration: none;
  transform: translateX(50px);
  transition: 0.25s ease-in-out 0.25s;
}
.paragraph-carousel-video .carousel-item.active .caption {
  opacity: 1;
  transform: translateX(0);
}
/* Large Desktop */
@media screen and (min-width: 768px) {
  .paragraph-carousel-video .carousel {
    margin: 0;
  }
  .paragraph-carousel-video .carousel-item .caption {
    padding: 2rem 0;
  }
}
/* Small desktop */
@media only screen and (min-width: 960px) {
  .paragraph-carousel-video .iframe-wrapper {
    margin: 0;
  }
  .paragraph-carousel-video .carousel-item .caption {
    padding: 0;
  }
}
/* Large Desktop */
@media screen and (min-width: 1200px) {
  .paragraph-carousel-video .carousel-item .caption {
    padding: 0 4rem 0 0;
  }
}

/* ============================================
   Video Accessibility Enhancements
   WCAG 2.1 AA Compliance
   ============================================ */

/**
 * Focus indicator for iframes (keyboard navigation)
 * WCAG 2.4.7 requirement for visible focus
 */
.paragraph-carousel-video .iframe-wrapper iframe:focus {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/**
 * Transcript toggle button styling
 * Ensures visible, accessible control for transcript display
 */
.video-transcript-toggle {
  margin-top: 1rem;
  text-align: center;
}

.video-transcript-toggle .btn {
  font-size: 1rem;
  font-weight: 700;
  color: var(--qridaOrange, #ff6600);
  text-decoration: underline;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease-in-out;
}

.video-transcript-toggle .btn:hover,
.video-transcript-toggle .btn:focus {
  color: var(--qridaDarkOrange, #cc5200);
  background-color: var(--greyLightest, #f9f9f9);
  text-decoration: none;
}

/**
 * Focus indicator for keyboard accessibility (WCAG 2.4.7)
 * Minimum 3px outline with high contrast
 */
.video-transcript-toggle .btn:focus {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 4px;
}

/**
 * Main transcript container
 * Provides clear visual separation and readability
 */
.video-transcript {
  margin-top: 1rem;
  padding: 1.5rem;
  background-color: var(--greyLightest, #f9f9f9);
  border: 2px solid var(--greyLight, #d0d0d0);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
}

.video-transcript .transcript-header {
  border-bottom: 2px solid var(--qridaOrange, #ff6600);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

.video-transcript .transcript-header h4 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--qridaDarkGrey, #333333);
}

/**
 * Transcript content area
 * Ensures readability with proper sizing and scrolling
 */
.transcript-content {
  max-height: 400px;
  overflow-y: auto;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--textDark, #222222);
  padding-right: 0.5rem;
}

/**
 * Custom scrollbar for transcript content
 */
.transcript-content::-webkit-scrollbar {
  width: 8px;
}

.transcript-content::-webkit-scrollbar-track {
  background: var(--greyLight, #e0e0e0);
  border-radius: 4px;
}

.transcript-content::-webkit-scrollbar-thumb {
  background: var(--qridaOrange, #ff6600);
  border-radius: 4px;
}

.transcript-content::-webkit-scrollbar-thumb:hover {
  background: var(--qridaDarkOrange, #cc5200);
}

.transcript-content p {
  margin-bottom: 0.75rem;
}

.transcript-content p:last-child {
  margin-bottom: 0;
}

/* Mobile optimization for transcript */
@media screen and (max-width: 767px) {
  .video-transcript {
    padding: 1rem;
    margin-top: 0.75rem;
  }

  .transcript-content {
    max-height: 300px;
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .video-transcript .transcript-header h4 {
    font-size: 1rem;
  }

  .video-transcript-toggle .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .video-transcript {
    border-width: 3px;
  }

  .video-transcript-toggle .btn:focus,
  .paragraph-carousel-video .iframe-wrapper iframe:focus {
    outline-width: 4px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .video-transcript-toggle .btn,
  .video-transcript {
    transition: none;
  }
}

/* Print styles */
@media print {
  .video-transcript {
    display: block !important;
    page-break-inside: avoid;
    border: 1px solid #000;
    background: #fff;
  }

  .video-transcript-toggle {
    display: none;
  }

  .transcript-content {
    max-height: none;
    overflow: visible;
  }
}
