/* ===== Base (mobile-first) ===== */

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #111827;
  background: #fff;
}

.diensten-pagina-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 10px;
  margin-top: 4rem;
}

.diensten-pagina-intro {
  text-align: center;
  color: #6b7280;
  max-width: 700px;
  margin: 0 auto 60px;
}

/* Cards */
.diensten-pagina-block {
  display: flex;
  flex-direction: column;     /* mobile: stack */
  gap: 20px;                  /* smaller gap on mobile */
  margin-bottom: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  align-items: stretch;       /* mobile: full width children */
}

/* We "flatten" the text wrapper so we can order H2 and text separately */
.diensten-pagina-text {
  /* NOTE: no flex basis on mobile */
  display: contents;
}

/* 1) Title first */
.diensten-pagina-text > h2 {
  font-size: 1.6rem;
  margin: 0 0 12px 0;
  order: 0;
  text-align: center;         /* optional */
}

/* 2) Image second */
.diensten-pagina-image {
  order: 1;
  margin: 0;                  /* mobile spacing handled by gap */
}

.diensten-pagina-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* 3) All remaining text last */
.diensten-pagina-text > *:not(h2) {
  order: 2;
  text-align: center;
}

.diensten-pagina-text p {
  font-size: 1rem;
  color: #374151;
  margin: 0;                  /* tighter mobile spacing */
}

/* ===== Tablet & Desktop (>=769px) ===== */

@media (min-width: 769px) {
  .diensten-pagina-block {
    flex-direction: row;
    gap: 40px;
    margin-bottom: 80px;
    align-items: center;
    flex-wrap: wrap;
  }

  .diensten-pagina-block.reverse {
    flex-direction: row-reverse;
  }

  /* Restore normal wrapper (no flatten) and set columns */
  .diensten-pagina-text {
    display: block;
    flex: 1 1 400px;          /* desktop/tablet only */
  }

  .diensten-pagina-image {
    flex: 1 1 400px;          /* desktop/tablet only */
    order: initial;
    margin: 0;
  }

  /* Reset ordering so natural flow returns in columns */
  .diensten-pagina-text > h2,
  .diensten-pagina-text > *:not(h2) {
    order: initial;
    text-align: left;
  }

  .diensten-pagina-text h2 {
    font-size: 1.6rem;
    margin: 0 0 12px 0;
  }
}


    /* CTA blok */
    .diensten-cta { margin: 0; }
    .diensten-cta p { margin: 0; }

    .diensten-button {
      display: inline-block;
      background: var(--cta-green);
      color: #ffffff;
      font-weight: 700;
      padding: 12px 20px;
      border-radius: 8px;
      text-decoration: none;
      transition: transform .06s ease, background .15s ease;
      box-shadow: 0 6px 20px rgba(34, 197, 94, 0.25);
    }
    .diensten-button:hover { background: var(--cta-green-hover); transform: translateY(-1px); }
    .diensten-button:active { background: var(--cta-green-pressed); transform: translateY(0); }

    .diensten-small-note {
      font-size: 0.85rem;
      opacity: 0.9;
    }