/* YouTube Shorts Section Styles */
.shortsSwiper {
  padding: 0 1rem 3rem 1rem;
  position: relative;
}

/* ========== YOUTUBE CARD COMPONENTS ========== */
.youtube-container {
  padding: 0 1rem 3rem 1rem;
}

.youtube-card {
  transition: all var(--duration-normal, 0.3s) var(--ease-smooth, ease);
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.youtube-card:hover {
  transform: translateY(var(--lift-medium, -4px));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.youtube-thumbnail {
  position: relative;
  overflow: hidden;
}

.youtube-thumbnail img {
  transition: all var(--duration-slow, 0.6s) var(--ease-bounce, cubic-bezier(0.175, 0.885, 0.32, 1.275));
  width: 100%;
  height: auto;
}

.youtube-thumbnail:hover img {
  transform: scale(1.05);
}

.youtube-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: var(--color-accent-500) !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  transition: all var(--duration-normal, 0.3s) var(--ease-bounce, cubic-bezier(0.175, 0.885, 0.32, 1.275));
  cursor: pointer;
}

.youtube-play-button:hover {
  background: var(--color-accent-600) !important;
  transform: translate(-50%, -50%) scale(1.1);
}

.youtube-title {
  padding: 1rem;
  font-weight: 600;
  color: var(--color-neutral-800);
  line-height: 1.4;
}

/* ========== YOUTUBE SHORTS SWIPER ========== */

.shortsSwiper .swiper-slide {
  height: auto;
  /* Remove opacity/blur for all slides */
  opacity: 1 !important;
  filter: none !important;
  transition: transform 0.3s ease;
}

.shortsSwiper .swiper-slide:hover {
  transform: translateY(-4px);
}

/* Navigation Buttons - positioned in the middle of the carousel */
.shortsSwiper .shorts-navigation {
  position: absolute !important;
  top: 50% !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  z-index: 30 !important; /* Higher z-index to ensure visibility */
  pointer-events: none !important;
  padding: 0 2rem !important; /* Add horizontal padding to push buttons away from videos */
  transform: translateY(-50%) !important; /* Perfect vertical centering */
}

.shortsSwiper .shorts-nav-btn {
  width: 50px !important;
  height: 50px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  pointer-events: auto !important; /* Enable clicking */
  color: var(--color-neutral-800) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  position: relative !important;
  z-index: 31 !important; /* Even higher z-index for the buttons */
}

.shorts-nav-btn:hover {
  background: rgba(255, 255, 255, 1) !important;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  color: var(--color-neutral-800);
}

.shorts-nav-btn:focus {
  outline: 3px solid var(--color-primary-500);
  outline-offset: 2px;
}

.shorts-nav-btn:active {
  transform: scale(0.95);
}

.shorts-prev {
  margin-left: 0;
  left: 2rem;
}

.shorts-next {
  margin-right: 0;
  right: 2rem;
}

/* Auto-play Controls */
.shorts-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 30;
}

.shorts-play-pause {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
}

.shorts-play-pause:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.05);
}

.shorts-play-pause:focus {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* Video Container Enhancements */
.video-container {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  position: relative;
}

.video-container:hover {
  transform: translateY(-6px);
}

.video-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(92, 225, 230, 0.1) 0%,
    transparent 50%,
    rgba(124, 186, 209, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
  border-radius: 12px;
}

.swiper-slide-active .video-container::before {
  opacity: 1;
}

/* Pagination Enhancements - make bullets smaller */
.shortsSwiper .swiper-pagination {
  position: relative;
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.shortsSwiper .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background-color: var(--color-primary-200);
  opacity: 1;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
}

.shortsSwiper .swiper-pagination-bullet-active {
  background: linear-gradient(135deg, var(--color-primary-500) 0%, var(--color-secondary-500) 100%);
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(92, 225, 230, 0.4);
}

/* Responsive iframe container for 9:16 aspect ratio (Shorts) */
.shortsSwiper .swiper-slide iframe {
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid transparent;
}

.swiper-slide-active iframe {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Loading state styles */
.shortsSwiper .swiper-slide iframe[loading="lazy"] {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Slide transition animations */
.shortsSwiper .swiper-slide {
  transform: scale(0.9);
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.shortsSwiper .swiper-slide-active {
  transform: scale(1);
}

.shortsSwiper .swiper-slide-next,
.shortsSwiper .swiper-slide-prev {
  transform: scale(0.95);
}

/* Auto-play progress indicator */
.shorts-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 0 0 12px 12px;
  transform-origin: left;
  transition: transform 0.1s linear;
  z-index: 10;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .shorts-navigation {
    padding: 0 1rem;
  }
  
  .shorts-prev {
    left: 1rem;
  }
  
  .shorts-next {
    right: 1rem;
  }
}

@media (max-width: 768px) {
  .shorts-navigation {
    padding: 0 0.5rem;
  }
  
  .shorts-nav-btn {
    width: 40px;
    height: 40px;
  }
  
  .shorts-prev {
    left: 0.5rem;
  }
  
  .shorts-next {
    right: 0.5rem;
  }
}

@media (max-width: 480px) {
  .shorts-navigation {
    display: flex !important; /* Keep navigation visible on mobile */
    padding: 0 0.25rem;
  }
  
  .shorts-nav-btn {
    width: 36px;
    height: 36px;
  }
  
  .shorts-prev {
    left: 0.25rem;
  }
  
  .shorts-next {
    right: 0.25rem;
  }
  
  .shortsSwiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .shorts-nav-btn {
    background: rgba(31, 41, 55, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f9fafb;
  }
  
  .shorts-nav-btn:hover {
    background: rgba(31, 41, 55, 1) !important;
    color: white;
  }
}

/* Focus management for accessibility */
.shortsSwiper:focus-within .shorts-navigation {
  opacity: 1;
}

/* Screen reader only class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ensure navigation doesn't interfere with video clicks */
.shortsSwiper .swiper-wrapper {
  position: relative;
  z-index: 1;
}
