/* Video Highlight Slider - Elementor Integration with Responsive Support */
.elementor-widget-video-highlight-slider .highlight-slider,
.highlight-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 4rem 0;
  background: transparent;
  isolation: isolate;
  z-index: 1;
  box-sizing: border-box;
}

/* Aspect Ratio Classes */
.elementor-widget-video-highlight-slider.aspect-ratio-16-9 .highlight-content,
.aspect-ratio-16-9 .highlight-content {
  aspect-ratio: 16/9;
}

.elementor-widget-video-highlight-slider.aspect-ratio-4-3 .highlight-content,
.aspect-ratio-4-3 .highlight-content {
  aspect-ratio: 4/3;
}

.elementor-widget-video-highlight-slider.aspect-ratio-21-9 .highlight-content,
.aspect-ratio-21-9 .highlight-content {
  aspect-ratio: 21/9;
}

.elementor-widget-video-highlight-slider.aspect-ratio-1-1 .highlight-content,
.aspect-ratio-1-1 .highlight-content {
  aspect-ratio: 1/1;
}

/* Fallback für Browser ohne aspect-ratio Support */
@supports not (aspect-ratio: 16/9) {
  .elementor-widget-video-highlight-slider.aspect-ratio-16-9 .highlight-content::before,
  .aspect-ratio-16-9 .highlight-content::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 16:9 */
  }
  
  .elementor-widget-video-highlight-slider.aspect-ratio-4-3 .highlight-content::before,
  .aspect-ratio-4-3 .highlight-content::before {
    content: '';
    display: block;
    padding-top: 75%; /* 4:3 */
  }
  
  .elementor-widget-video-highlight-slider.aspect-ratio-21-9 .highlight-content::before,
  .aspect-ratio-21-9 .highlight-content::before {
    content: '';
    display: block;
    padding-top: 42.86%; /* 21:9 */
  }
  
  .elementor-widget-video-highlight-slider.aspect-ratio-1-1 .highlight-content::before,
  .aspect-ratio-1-1 .highlight-content::before {
    content: '';
    display: block;
    padding-top: 100%; /* 1:1 */
  }
}

.elementor-widget-video-highlight-slider .highlight-track,
.highlight-track {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
  will-change: transform;
  gap: 2rem;
  padding: 0 2rem;
  justify-content: flex-start;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  cursor: grab;
  box-sizing: border-box;
}

.elementor-widget-video-highlight-slider .highlight-track:active,
.highlight-track:active {
  cursor: grabbing;
}

.elementor-widget-video-highlight-slider .highlight-track::-webkit-scrollbar,
.highlight-track::-webkit-scrollbar {
  display: none;
}

.highlight-slide {
  flex: 0 0 60%;
  max-width: 60%;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.4;
  transform: scale(0.9);
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  scroll-snap-align: center;
  user-select: none;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .highlight-slide {
    flex: 0 0 70%;
    max-width: 70%;
  }
  
  .elementor-widget-video-highlight-slider .highlight-track,
  .highlight-track {
    gap: 1.5rem;
    padding: 0 1.5rem;
  }
  
  .elementor-widget-video-highlight-slider .highlight-slider,
  .highlight-slider {
    padding: 3rem 0;
  }
}

@media (max-width: 768px) {
  .highlight-slide {
    flex: 0 0 85%;
    max-width: 85%;
  }
  
  .elementor-widget-video-highlight-slider .highlight-track,
  .highlight-track {
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .elementor-widget-video-highlight-slider .highlight-slider,
  .highlight-slider {
    padding: 2rem 0;
  }
}

@media (max-width: 480px) {
  .highlight-slide {
    flex: 0 0 95%;
    max-width: 95%;
  }
  
  .elementor-widget-video-highlight-slider .highlight-track,
  .highlight-track {
    gap: 0.5rem;
    padding: 0 0.5rem;
  }
  
  .elementor-widget-video-highlight-slider .highlight-slider,
  .highlight-slider {
    padding: 1.5rem 0;
  }
}

.highlight-slide.active {
  flex: 0 0 70%;
  max-width: 70%;
  opacity: 1;
  transform: scale(1);
}

.highlight-content {
  position: relative;
  overflow: hidden;
  width: 100%;
  color: white;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: transparent;
  aspect-ratio: 16 / 9;
  isolation: isolate;
  /* Feste Werte entfernt - werden von Elementor gesteuert */
}

.elementor-widget-video-highlight-slider .highlight-content video,
.elementor-widget-video-highlight-slider .highlight-content iframe,
.highlight-content video,
.highlight-content iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.elementor-widget-video-highlight-slider .highlight-content iframe,
.highlight-content iframe {
  border: none;
  pointer-events: none;
  /* Fix für Vimeo-Iframe */
  object-fit: cover;
  object-position: center;
}

/* Responsive Aspect Ratio Anpassungen */
@media (max-width: 1024px) {
  .elementor-widget-video-highlight-slider.aspect-ratio-21-9 .highlight-content,
  .aspect-ratio-21-9 .highlight-content {
    aspect-ratio: 16/9; /* Auf kleineren Bildschirmen zu 16:9 wechseln */
  }
}

@media (max-width: 768px) {
  .elementor-widget-video-highlight-slider.aspect-ratio-16-9 .highlight-content,
  .elementor-widget-video-highlight-slider.aspect-ratio-21-9 .highlight-content,
  .aspect-ratio-16-9 .highlight-content,
  .aspect-ratio-21-9 .highlight-content {
    aspect-ratio: 4/3; /* Auf mobilen Geräten zu 4:3 */
  }
  
  .elementor-widget-video-highlight-slider.aspect-ratio-4-3 .highlight-content,
  .aspect-ratio-4-3 .highlight-content {
    aspect-ratio: 1/1; /* 4:3 wird zu quadratisch auf mobile */
  }
}

@media (max-width: 480px) {
  .elementor-widget-video-highlight-slider .highlight-content:not(.aspect-ratio-custom),
  .highlight-content:not(.aspect-ratio-custom) {
    aspect-ratio: 1/1 !important; /* Alle werden quadratisch auf sehr kleinen Bildschirmen */
  }
}

.highlight-content h2,
.highlight-content p {
  position: relative;
  z-index: 1;
  margin: 0;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.highlight-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.highlight-content p {
  font-size: 1.2rem;
  line-height: 1.6;
  font-weight: 400;
}

/* Audio Toggle - DIV statt Button zur Vermeidung von Theme-Konflikten */
.highlight-slider .highlight-content .audio-toggle {
  position: absolute;
  z-index: 999;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  user-select: none;
  outline: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  /* Reset all possible button/theme styles */
  margin: 0 !important;
  padding: 0 !important;
  text-decoration: none !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  line-height: 1 !important;
  /* Elementor-steuerbare Eigenschaften ohne !important */
  /* top, right, width, height, background, border-color werden von Elementor gesteuert */
  color: inherit !important;
  text-align: center !important;
  vertical-align: baseline !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

.highlight-slider .highlight-content .audio-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  /* Hover-background und border-color werden von Elementor gesteuert */
}

.highlight-slider .highlight-content .audio-toggle:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.highlight-slider .highlight-content .audio-toggle:focus {
  outline: 2px solid rgba(255, 255, 255, 0.7) !important;
  outline-offset: 2px !important;
}

.highlight-slider .highlight-content .audio-toggle .audio-icon {
  line-height: 1;
  transition: all 0.3s ease;
  display: block;
  text-align: center;
  font-weight: 900;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  /* FontAwesome specific styles */
  font-family: "Font Awesome 6 Free" !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-transform: none !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  /* color und font-size werden von Elementor gesteuert */
}

/* Responsive Audio Toggle - Elementor übernimmt alle responsive Werte */
/* Media Queries nur für Fallback-Support */

.highlight-slider .highlight-content .audio-toggle .audio-off {
  display: block !important;
}

.highlight-slider .highlight-content .audio-toggle .audio-on {
  display: none !important;
}

.highlight-slider .highlight-content .audio-toggle.unmuted .audio-off {
  display: none !important;
}

.highlight-slider .highlight-content .audio-toggle.unmuted .audio-on {
  display: block !important;
}

.highlight-slider .highlight-content .audio-toggle.unmuted {
  background: rgba(46, 125, 50, 0.85) !important;
  border-color: rgba(76, 175, 80, 0.6) !important;
}

.highlight-slider .highlight-content .audio-toggle.unmuted:hover {
  background: rgba(46, 125, 50, 0.95) !important;
  border-color: rgba(76, 175, 80, 0.8) !important;
}

/* Navigation Dots - Nur Basis-Styles, Elementor übernimmt die Kontrolle */
.highlight-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.highlight-dots button {
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  outline: none;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-size: 0;
  line-height: 0;
  text-decoration: none;
  display: inline-block;
  position: relative;
  
  /* Basis-Werte - werden von Elementor überschrieben */
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.4);
}

.highlight-dots button.active {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
  /* Aktive Größe und Farbe werden von Elementor gesteuert */
}

.highlight-dots button:hover {
  transform: scale(1.1);
  /* Hover-Farbe wird von Elementor gesteuert */
}

/* Tablet Responsive */
@media (max-width: 1024px) {
  .highlight-slider {
    padding: 3rem 0;
  }
  
  .highlight-slide {
    flex: 0 0 75%;
    max-width: 75%;
  }

  .highlight-slide.active {
    flex: 0 0 85%;
    max-width: 85%;
  }

  .highlight-content {
    padding: 1.8rem;
  }

  .highlight-content h2 {
    font-size: 1.8rem;
  }

  .highlight-content p {
    font-size: 1.1rem;
  }
}

/* Mobile Responsive - Audio Toggle */
@media (max-width: 768px) {
  .highlight-slider {
    padding: 2rem 0;
  }
  
  .highlight-track {
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .highlight-slide {
    flex: 0 0 85%;
    max-width: 85%;
  }

  .highlight-slide.active {
    flex: 0 0 95%;
    max-width: 95%;
  }

  .highlight-content {
    padding: 1.5rem;
    border-radius: 16px;
    aspect-ratio: 16 / 10;
  }

  .highlight-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
  }

  .highlight-content p {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .highlight-slider .highlight-content .audio-toggle {
    width: 42px !important;
    height: 42px !important;
    top: 0.75rem !important;
    right: 0.75rem !important;
  }
  
  .highlight-slider .highlight-content .audio-toggle .audio-icon {
    font-size: 18px !important;
  }
  
  .highlight-dots {
    margin-top: 1.5rem;
  }
  
  .highlight-slider .highlight-dots button {
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    min-height: 8px !important;
    max-width: 8px !important;
    max-height: 8px !important;
  }
  
  .highlight-slider .highlight-dots button.active {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    min-height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
  }
}

/* Small Mobile - Audio Toggle */
@media (max-width: 480px) {
  .highlight-slider {
    padding: 1.5rem 0;
  }
  
  .highlight-track {
    padding: 0 0.5rem;
  }
  
  .highlight-slide {
    flex: 0 0 90%;
    max-width: 90%;
  }

  .highlight-slide.active {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .highlight-content {
    padding: 1rem;
    border-radius: 12px;
    aspect-ratio: 16 / 11;
  }

  .highlight-content h2 {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
  }

  .highlight-content p {
    font-size: 0.9rem;
  }
  
  .highlight-slider .highlight-content .audio-toggle {
    width: 38px !important;
    height: 38px !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
  }
  
  .highlight-slider .highlight-content .audio-toggle .audio-icon {
    font-size: 16px !important;
  }
}

/* Navigation Dots - Responsive Verbesserungen */
@media (max-width: 1024px) {
  .highlight-dots {
    margin-top: 1.5rem !important;
    gap: 6px !important;
  }
  
  .highlight-dots button {
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    min-height: 8px !important;
  }
  
  .highlight-dots button.active {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    min-height: 12px !important;
  }
}

@media (max-width: 768px) {
  .highlight-dots {
    margin-top: 1.2rem !important;
    gap: 5px !important;
  }
  
  .highlight-dots button {
    width: 7px !important;
    height: 7px !important;
    min-width: 7px !important;
    min-height: 7px !important;
  }
  
  .highlight-dots button.active {
    width: 10px !important;
    height: 10px !important;
    min-width: 10px !important;
    min-height: 10px !important;
  }
}

@media (max-width: 480px) {
  .highlight-dots {
    margin-top: 1rem !important;
    gap: 4px !important;
  }
  
  .highlight-dots button {
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    min-height: 6px !important;
  }
  
  .highlight-dots button.active {
    width: 9px !important;
    height: 9px !important;
    min-width: 9px !important;
    min-height: 9px !important;
  }
}

/* Verhindert Überschneidungen mit anderen Elementen */
.highlight-slider,
.highlight-slider * {
  position: relative;
}

.highlight-slider video,
.highlight-slider iframe {
  position: absolute !important;
}

/* Verbesserung der Touch-Gesten - Audio Toggle */
@media (hover: none) and (pointer: coarse) {
  .highlight-track {
    scroll-behavior: smooth;
  }
  
  .highlight-slide {
    touch-action: pan-x;
  }
  
  .highlight-slider .highlight-content .audio-toggle:hover {
    background: rgba(0, 0, 0, 0.7) !important;
    transform: scale(1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
  }
  
  .highlight-slider .highlight-content .audio-toggle:active {
    background: rgba(0, 0, 0, 0.85) !important;
    transform: scale(0.95) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
  }
  
  .highlight-slider .highlight-content .audio-toggle.unmuted:hover {
    background: rgba(46, 125, 50, 0.8) !important;
    border-color: rgba(76, 175, 80, 0.6) !important;
  }
  
  .highlight-slider .highlight-content .audio-toggle.unmuted:active {
    background: rgba(46, 125, 50, 0.9) !important;
    border-color: rgba(76, 175, 80, 0.8) !important;
  }
}
