.kandidatur-block {
  width: 100%;
  box-sizing: border-box;

  & .text {
    width: 100%;
    max-width: 65rem;
    margin-inline: auto;
    box-sizing: border-box;

    & h2,
    & h5,
    & span {
      color: var(--cl-accent-900);
      font-family: var(--font-accent);

      &.ff-italic,
      &.abschluss-kandidatur {
        font-family: var(--font-accent-italic);
      }
    }

    /* EIGENE KLASSE FÜR DIE BEGRÜSSUNG */
    & .liebe-buergerinnen {
      width: 100%;
      margin-bottom: 1.5rem;
      box-sizing: border-box;

      & p {
        margin: 0;
      }

      @media (width >= 48rem) {
        max-width: 60ch;
        margin-left: 0;
      }
    }

    /* Freistehende Textabsätze */
    & > p {
      max-width: 100%;
      margin-inline: auto;
      margin-bottom: 1.5rem;
      box-sizing: border-box;

      @media (width >= 48rem) {
        max-width: 60ch;
      }
    }

    /* GRID-ABSCHNITT (Bild + Text) */
    & .kandidatur-abschnitt {
      display: grid;
      grid-template-columns: 100%; /* Verhindert horizontales Überlaufen auf Mobile */
      gap: 1.5rem;
      align-items: center;
      justify-content: center;
      margin-bottom: 3rem;
      margin-inline: auto;
      width: 100%;
      box-sizing: border-box;

      /* Bild-Styling MOBIL: Bleibt hart im Raster */
      & .abschnitt-bild {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 350px;
        aspect-ratio: 16 / 9;
        position: relative;
        overflow: hidden;
        box-sizing: border-box;

        & img {
          width: 100%;
          height: 100%;
          object-fit: cover;
          object-position: center top;
          display: block; /* Verhindert unerwünschte Inline-Abstände */
        }
      }

      /* Text-Spalte MOBIL */
      & .abschnitt-text {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        
        & p {
          margin: 0;
          width: 100%;
        }
      }

      /* DESKTOP-UMSCHALTUNG ab 48rem (~768px) */
      @media (width >= 48rem) {
        gap: 2rem;
        margin-bottom: 2.5rem;

        & .abschnitt-bild {
          max-width: 280px;
          aspect-ratio: 4 / 3;
        }

        & .abschnitt-text {
          max-width: 60ch;

          & p {
            max-width: 60ch;
          }
        }

        /* UNGERADE (1, 3, 5): TEXT LINKS, BILD RECHTS */
        &:nth-of-type(odd) {
          grid-template-columns: minmax(0, 60ch) minmax(200px, 280px);

          & .abschnitt-text {
            grid-column: 1;
            grid-row: 1;
            justify-self: start;
          }

          & .abschnitt-bild {
            grid-column: 2;
            grid-row: 1;
          }
        }

        /* GERADE (2, 4, 6): BILD LINKS, TEXT RECHTS */
        &:nth-of-type(even) {
          grid-template-columns: minmax(200px, 280px) minmax(0, 60ch);

          & .abschnitt-bild {
            grid-column: 1;
            grid-row: 1;
          }

          & .abschnitt-text {
            grid-column: 2;
            grid-row: 1;
            justify-self: start;
          }
        }
      }
    }
  }
}