/* About — vertikaler Stapel aus Bild/Text-Rows, ab Desktop abwechselnd links/rechts */

.about {
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
  padding-block: 0;
}

/* Row übernimmt das frühere .about-Flexverhalten (full-bleed Split): die
   content-width-Regel aus sections/00-base.css (.about > *) für die Row aufheben,
   damit das Bild bis zur Section-Kante reicht. */
.about > .about-row {
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}

.about-row {
  display: flex;
  flex-direction: column;
  gap: var(--gap-block);
}

.about-text {
  flex: 1;
  margin-block-start: var(--space-3);
  padding-inline: var(--padding-page);
}

.about-text span {
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-primary);
  margin-block-end: var(--space-3);
}

.about-text h2 {
  margin-block-end: var(--gap-block);
}

.about-text .btn {
  margin-block-start: var(--gap-block);
}

/* Bild flush bis zur Section-Kante (kein Negativmargin → kein Ghost-Scroll). */
.about-row figure {
  flex: 1;
  max-width: none;
  margin: 0;            /* <figure> hat Browser-Default-margin (~1em oben/unten) → vertikale Lücke zwischen den Rows. Komplett raus. */
  padding-inline: 0;
}

.about-row figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Mehrere Bilder: gestapelt in derselben Grid-Zelle, Crossfade via .active
   (about-slideshow.js). Gleiche Bildmaße empfohlen → kein Höhensprung. */
.about-slideshow {
  display: grid;
}

.about-slideshow img {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 1s ease;
}

.about-slideshow img.active {
  opacity: 1;
}

@media (min-width: 79.5rem) {
  /* „Stoß auf Stoß": kein Vertikalabstand zwischen den Rows → die alternierenden Bilder (rechts/links)
     stoßen ohne weißes Band aneinander. */
  .about {
    gap: 0;
  }

  /* Exakt 50/50 über CSS-Grid statt flex: `1fr 1fr` teilt garantiert hälftig (keine min-content-Effekte von
     Bild/Text), ohne Spalten-Lücke → das Bild reicht bündig bis zur Mitte. `align-items: stretch` (Grid-Default)
     zieht beide Zellen auf die volle Row-Höhe, damit das Bild oben/unten ohne Weißfläche an die Row-Kante — und
     damit an das Nachbarbild — stößt. min-width:0 verhindert, dass ein breites Bild die 1fr-Spalte sprengt. */
  .about-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;   /* WICHTIG: Mobile-Basis `gap: var(--gap-block)` zurücksetzen — sie wirkt sonst als Grid-Spaltenlücke
                 und schiebt die Bilder um gap/2 aus der Mitte (der verbliebene „fast"-Gap). */
  }
  .about-text,
  .about-row figure {
    min-width: 0;
  }
  /* Text vertikal zentriert (Zelle ist voll hoch); Mobile-margin-block-start hier raus, es verschöbe die Mitte. */
  .about-text {
    align-self: center;
    margin-block: 0;
  }
  .about-row figure img {
    height: 100%;
  }

  /* Alternieren: gerade Rows → Bild links, Text rechts (Mobile bleibt feste Lese-Reihenfolge). */
  .about-row:nth-child(even) > .about-text {
    grid-column: 2;
  }
  .about-row:nth-child(even) > figure {
    grid-column: 1;
    grid-row: 1;
  }
}
