/* ==========================================================================
   Rebels Rockstars – Layout & Animationen
   Basierend auf dem originalen 309.css, erweitert um responsive Breakpoints.
   ========================================================================== */

/* ---- Full-Width Override fuer Landing Pages ---- */

.wp-site-blocks {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.wp-site-blocks > main .is-layout-constrained > * {
  max-width: none;
}

.wp-site-blocks > main .is-layout-constrained > .alignfull {
  max-width: none;
}

/* ---- Hero Cover ---- */

.hero-cover {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 3;
  will-change: transform, opacity;
}

/* ---- Hero Stage (Video + Steps) ---- */

.hero-stage {
  position: relative;
  margin-top: -100vh !important;
  overflow: visible;
}

.hero-video {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-video video,
.hero-video iframe,
.hero-video .wp-block-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-steps {
  position: relative;
  margin-top: -100vh !important;
  z-index: 2;
}

.hero-step1 {
  position: relative;
  min-height: 100vh;
}

/* ---- Hero Texte ---- */

.hero-text1,
.hero-text2,
.hero-text3 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  will-change: transform, opacity;
}

.hero-spacer {
  height: 300vh;
}

/* ---- Slides ---- */

.slides-wrapper {
  z-index: 1;
}

.slide-section {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  /* flex-start statt stretch: erlaubt slide-inner, ueber 100vh hinaus
     zu wachsen, damit das initSlides()-Translate hoehere Inhalte korrekt
     hochscrollen kann (sonst clamped die Stretch-Auto-Hoehe inner auf
     genau 100vh und der fakeScrollRatio rechnet 0). */
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 2rem;
}

/* Letzter Slide hat keinen Pin/Scrub (siehe panels.pop() im JS). Er muss
   daher ohne fixe Hoehe + ohne Crop rendern, sonst wird Inhalt auf
   kleineren Desktops (z.B. 13" Macbook) abgeschnitten. */
.slide-section:last-of-type {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

.slide-inner {
  flex: 1;
  width: 100%;
  /* min-height statt height: inner darf groesser als Slide werden, der
     JS-Scrub uebernimmt das Hochschieben. */
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Zwei-Spalten-Variante: slide-inner liegt auf dem WP-Spalten-Block */
.slide-inner.wp-block-columns {
  flex-direction: row;
  align-items: stretch;
}

.slide-inner.wp-block-columns > .wp-block-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
}

/* ---- Parallax ---- */

.image-container {
  position: relative;
  overflow: hidden;
  height: 80vh;
  max-height: 500px;
}

.parallax-image {
  position: absolute;
  width: 100%;
  height: 160%;
  object-fit: cover;
  bottom: 0;
  will-change: transform;
}

/* ---- Content-Page Container ---- */

.content-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 4vw;
}

/* ---- Content-Reveal-Animationen ---- */

.reveal-up,
.reveal-clip,
.reveal-left,
.reveal-right {
  will-change: transform, opacity;
}

/* ---- Gallery Showcase ---- */

.gallery-showcase {
  /* WordPress-Galerie-Flex komplett ueberschreiben */
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  list-style: none;
  padding: 0 !important;
  flex-wrap: nowrap !important;
}

/* Abwechslungsreiches Layout */
.gallery-showcase > .wp-block-image:nth-child(1) { grid-column: 1 / -1; }
.gallery-showcase > .wp-block-image:nth-child(4) { grid-column: 1 / -1; }

.gallery-showcase > .wp-block-image {
  overflow: hidden;
  border-radius: 8px;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
  flex: none !important;
}

.gallery-showcase > .wp-block-image img {
  width: 100% !important;
  height: auto !important;
  display: block;
  max-width: none !important;
  will-change: transform;
}

/* ---- Horizontal-Scroll-Galerie (optional, fuer andere Seiten) ---- */

.horizontal-scroll {
  position: relative;
  overflow: visible;
}

.horizontal-scroll .hs-track {
  display: flex;
  gap: 3vw;
  width: max-content;
}

.hs-panel {
  width: 55vw;
  flex-shrink: 0;
}

.hs-panel .wp-block-image,
.hs-panel .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* ---- Zoom-Sektion ---- */

.zoom-section {
  min-height: 200vh;
}

.zoom-pin {
  position: relative;
  height: 100vh;
  overflow: visible;
}

.zoom-media {
  width: 40vw;
  max-width: none !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  will-change: transform;
}

.zoom-media .wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
}

.zoom-media figure.wp-block-image,
.zoom-media .wp-block-image {
  margin: 0 auto !important;
  width: 100%;
  max-width: none !important;
}

.zoom-caption {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  color: #fff;
  text-align: center;
  max-width: 60ch;
  opacity: 0;
  pointer-events: none;
}


/* ==========================================================================
   Tablet & schmaler Desktop (max-width: 1023px)
   ========================================================================== */

@media (max-width: 1023px) {

  /* Hero Cover: svh vermeidet iOS-Adressleisten-Problem */
  .hero-cover {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero-video {
    height: 100vh;
    height: 100svh;
    min-height: 100svh;
  }

  .hero-step1 {
    min-height: 100vh;
    min-height: 100svh;
  }

  /* Weniger Scroll-Strecke fuer die Hero-Text-Animation */
  .hero-spacer {
    height: 220vh;
  }

  /* Texte brauchen mehr Platz auf schmalem Screen */
  .hero-text1,
  .hero-text2,
  .hero-text3 {
    width: 90vw;
    text-align: center;
  }

  /* Slides: auf Mobile keine feste Höhe und kein Clip, damit gestapelte
     Spalten / höhere Inhalte komplett sichtbar sind. Das JS überspringt
     hier auch das Pinning, Slides scrollen also natürlich.
     Wir erzwingen flex-direction:column + align-items:stretch, damit die
     WP-generierten wp-container-core-*-Klassen (z.B. align-items:center,
     is-horizontal) keine schmalen oder verschobenen Inhalte produzieren. */
  .slide-section,
  .slide-section .slide-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    height: auto;
    min-height: 100svh;
    overflow: visible;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .slide-section {
    border-radius: 6px;
    margin-bottom: 0;
  }

  /* Riesiges Spacing-80 / Spacing-50-Padding der Slide-Section frisst auf
     schmalen Viewports zu viel Breite weg. Auf mobile auf 1rem reduzieren. */
  .slide-section {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Spalten-Block auf Mobile: vertikal stapeln, volle Breite. Wir bleiben
     bei flex (statt block), damit gap/Reihenfolge der WP-Spalten erhalten
     bleibt — aber mit flex-direction:column und stretch. */
  .slide-section .wp-block-columns {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .slide-section .wp-block-column {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
  }

  /* Verschachtelte WP-Gruppen innerhalb eines Slides: Breite freigeben,
     damit zentrierende Container-Layouts (align-items:center) keine
     schmalen Bloecke erzeugen. */
  .slide-section .wp-block-group {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Bilder und Figuren nie ueber Viewportbreite hinaus */
  .slide-section img,
  .slide-section figure {
    max-width: 100%;
    height: auto;
  }

  /* Parallax weniger aggressiv */
  .parallax-image {
    height: 120%;
  }

  .image-container {
    max-height: 300px;
  }

  /* Content-Page: weniger Padding auf Mobile */
  .content-page {
    padding: 1.5rem 5vw;
  }

  /* Gallery Showcase: eine Spalte, volle Breite auf Mobile */
  .gallery-showcase {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .gallery-showcase > .wp-block-image {
    grid-column: span 1 !important;
  }

  .gallery-showcase > .wp-block-image img {
    transform: none;
    max-height: 70vh;
  }

  /* Horizontal-Scroll: vertikaler Stapel auf Mobile */
  .horizontal-scroll .hs-track {
    display: block;
    width: 100%;
  }

  .hs-panel {
    width: 100%;
    margin-bottom: 1.5rem;
  }

  /* Zoom auf Mobile deaktivieren: normales Bild + sichtbarer Text */
  .zoom-media {
    width: 100% !important;
    transform: none !important;
    left: auto;
    position: relative;
  }

  .zoom-media .wp-block-image img {
    width: 100%;
    border-radius: 8px;
  }

  .zoom-caption {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    padding: 1.5rem 1rem;
    max-width: none;
  }
}


/* ==========================================================================
   Kleines Mobile (max-width: 480px)
   ========================================================================== */

@media (max-width: 480px) {

  .hero-text1,
  .hero-text2,
  .hero-text3 {
    width: 95vw;
  }

  .hero-spacer {
    height: 180vh;
  }

  .image-container {
    max-height: 220px;
    height: 60vh;
  }

  .slide-section {
    border-radius: 4px;
  }
}
