/* ========================================
   flex--content-rows
   ======================================== */

.flex--content-rows {
  position: relative;
  background: transparent;
  overflow: hidden;
}

/* Optional Background Image Layer
.flex--content-rows__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.flex--content-rows__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
  */

/* Inner Content Layer */
.flex--content-rows__inner {
  position: relative;
  z-index: 1;
}

/* Heading */
.flex--content-rows__heading {
  margin-bottom: var(--space-xl);
}

/* Rows Wrapper */
.flex--content-rows__rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

/* Single Row (Mobile stacked) */
.flex--content-rows__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
}

/* Text Block */
.flex--content-rows__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}

/* Button */
.flex--content-rows__button {
  align-self: flex-start;
  margin-top: var(--space-s);
}

/* Image */
.flex--content-rows__figure {
  margin: 0;
  inline-size: clamp(200px, 100%, 500px);
  max-width: 500px;
  block-size: auto;
  aspect-ratio: 2 / 3;
  overflow: visible;
  border-radius: 0;
  position: relative;
  order: -1; /*Bild auf Mobil immer zuerst*/
}

:root {
  --offset: clamp(15px, 2vw, 30px);
}

.flex--content-rows__figure::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--primary-light);
  transform: translate(var(--offset), calc(var(--offset) * -1));
  z-index: -1;
}

.flex--content-rows__row:nth-child(even) .flex--content-rows__figure::before {
  transform: translate(calc(var(--offset) * -1), calc(var(--offset) * -1));
}

.flex--content-rows__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ========================================
   Tablet & Up (Flex Alternating Layout)
   ======================================== */

@media (min-width: 760px) {
  .flex--content-rows__rows {
    gap: var(--space-l);
  }

  .flex--content-rows__row {
    flex-direction: row;
    align-items: center;
    gap: var(--space-xl);
  }

  .flex--content-rows__heading {
    text-align: center;
    margin-bottom: var(--space-2xl);
  }

  /* Verhältnis Text / Bild */
  .flex--content-rows__text {
    flex: 1.3;
  }

  .flex--content-rows__figure {
    flex: 1;
    order: 0;
  }

  /* Alternieren */
  .flex--content-rows__row:nth-child(even) {
    flex-direction: row-reverse;
  }
}

/* Optional Hover */
.flex--content-rows__figure img {
  transition: transform 0.4s ease;
}

@media (hover: hover) {
  .flex--content-rows__figure:hover img {
    transform: scale(1.01);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .flex--content-rows__figure img {
    transition: none;
  }
}
