/* ===============================================
   Slider Component Styles (v4 - Layout Fixes & Theme Integration)
   =============================================== */

/* --- Slider Container & Konfiguration --- */
.slider-container {
  /* Diese Variablen werden per Inline-Style aus PHP gesetzt */
  --slider-width: var(--slider-width-inline, 62vw); /* Fallback */
  --slider-height: var(--slider-height-inline, 50vh);/* Fallback */
  --info-bg-color: var(--info-bg-color-inline, #f0f0f0);/* Fallback */
  --info-width: calc(100% - var(--slider-width) - 10px);

  display: flex;
  gap: 10px;
  /* margin und width werden vom Theme-Container und globalen Abständen gesteuert */
  box-sizing: border-box;
  position: relative; /* Für Swipe-Listener und z-Index Kontext */
  /* Radius und Overflow werden von den Kindelementen gesteuert (wie Prototyp) */
}

/* --- Bild-Slider Spalte --- */
.slider-box {
  width: var(--slider-width);
  overflow: hidden;   /* WICHTIG: Versteckt nicht aktive Bild-Slides */
  border-radius: 30px;/* WICHTIG: Radius hier */
  background-color: #cccccc; /* Platzhalter */
  height: var(--slider-height);
  position: relative;
  flex-shrink: 0;
}
.slider-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.5s ease;
}
.slider-track .slider-image-slide {
  width: 100%;
  min-width: 100%;
  height: 100%;
  display: block;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}
.slider-track .slider-image-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  display: block;
}
.slider-track .slider-image-slide:hover img {
  transform: scale(1.1);
}
.slider-container .slide-title {
  position: absolute;
  top: 15px;
  left: 15px;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.6);
  font-size: 1.1em;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 5px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.9;
  line-height: 1.3;
  max-width: calc(100% - 30px);
}
.slider-container .slide-title h6 {
    font-size: 0.8em;
    font-weight: normal;
    margin-top: 4px;
    opacity: 0.85;
    display: block;
}

/* --- Info/Text-Slider Spalte --- */
.info-box {
  width: var(--info-width);
  background-color: var(--info-bg-color);
  height: var(--slider-height);
  display: flex;
  flex-direction: column;
  position: relative; /* Für Progress-Bar */
  border-radius: 30px;/* WICHTIG: Radius hier */
  overflow: hidden;   /* WICHTIG: Clipping für Radius */
  flex-grow: 1;
}
.text-slider {
  flex: 1;
  display: flex;
  transition: transform 0.5s ease;
  min-height: 0;
  height: 100%;
  /* Platz für absolute Progress-Bar unten */
  padding-bottom: 37px; /* Höhe Progress (7) + Padding unten (20) + Gap (5) + Sicherheit (5) */
  box-sizing: border-box;
  position: relative;
  z-index: 0; /* Unter Progress-Bar */
  /* KEIN overflow: hidden hier! */
}
.text-slide {
  width: 100%;
  min-width: 100%;
  height: 100%;
  font-size: 1em;
  color: #333;
  flex-shrink: 0;
  overflow-y: auto; /* Scrollen bei Bedarf */
  padding: 25px;
  box-sizing: border-box;
  touch-action: pan-y pinch-zoom;
}
/* Textformatierung (wie vorher) */
.text-slide h1, .text-slide h2, .text-slide h3,
.text-slide h4, .text-slide h5, .text-slide h6 {
    margin-top: 0; margin-bottom: 0.7em; line-height: 1.2; color: #111;
}
.text-slide p { margin-top: 0; margin-bottom: 1em; font-size: 0.95em; line-height: 1.6; }
.text-slide a { color: #1b45c0; text-decoration: underline; }
.text-slide a:hover { text-decoration: none; }
.text-slide ul, .text-slide ol { margin-bottom: 1em; padding-left: 1.5em; }
.text-slide li { margin-bottom: 0.5em; }

/* --- Progress Bar --- */
.progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 3; /* Über Text */
  display: flex;
  gap: 5px;
  padding: 0 20px 20px 20px;
}
.progress-bar {
  width: 27px; /* Feste Breite */
  height: 7px;
  background-color: rgba(50, 78, 153, 0.3);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.progress-bar:hover { background-color: rgba(50, 78, 153, 0.5); }
.progress-fill { width: 0%; height: 100%; background-color: #324e99; border-radius: 4px; }

/* --- Responsivität --- */
@media (max-width: 767px) {
  .slider-container {
    flex-direction: column;
    gap: 10px;
    height: auto;
  }
  .slider-box {
       width: 100%;
       height: var(--slider-height-inline, 40vh);
       border-radius: 30px;
       overflow: hidden;
  }
  .info-box {
     width: 100%;
     height: auto;
     position: static;
     border-radius: 30px;
     overflow: hidden;
     background-color: var(--info-bg-color);
  }
   .text-slider {
       flex-grow: 1;
       flex-shrink: 1;
       max-height: 35vh;
       height: auto;
       min-height: 100px;
       padding-bottom: 0; /* Kein Platz für absolute Progress-Bar nötig */
       z-index: auto;
       /* KEIN overflow: hidden hier! */
   }
   .text-slide {
       padding: 20px;
       height: 100%;
       overflow-y: auto;
   }
   .progress-container {
     position: static;
     width: auto;
     margin-top: 15px;
     padding: 0 20px 20px 20px;
     flex-shrink: 0;
     z-index: auto;
     /* Links ausgerichtet standardmäßig (kein justify-content) */
   }
   .slider-container .slide-title {
       font-size: 1em; padding: 6px 10px; top: 10px; left: 10px; max-width: calc(100% - 20px);
   }
    .slider-container .slide-title h6 { font-size: 0.75em; }
}