/* =========================================================
   Diensten section
   Desktop: 01-03 boven, 04 links, 05 + CTA rechts
   Mobiel: 01-05 in één horizontale scroll, CTA eronder
========================================================= */

#diensten.services-section {
  position: relative;
  padding: 110px 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 18%, rgba(102, 116, 91, 0.10), transparent 32%),
    linear-gradient(180deg, var(--sand) 0%, var(--cream) 54%, var(--cream) 100%);
}

/* Horizontale lijn bovenaan */
#diensten.services-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(100% - 56px, 1320px);
  height: 1px;
  background: rgba(23, 32, 51, 0.12);
  transform: translateX(-50%);
  pointer-events: none;
}

#diensten .services-head,
#diensten .services-track,
#diensten .services-cta {
  position: relative;
  z-index: 1;
}

/* =========================================================
   Desktop layout
========================================================= */

#diensten .container {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 22px;
  row-gap: 22px;
}

/* Header */
#diensten .services-head {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
  align-items: center;
  gap: clamp(48px, 6vw, 96px);
  margin-bottom: clamp(42px, 6vw, 74px);
}

#diensten .services-title-block {
  max-width: 720px;
}

#diensten .section-title {
  max-width: 760px;
  font-size: clamp(58px, 6.2vw, 96px);
  line-height: 0.92;
}

#diensten .section-title em {
  display: block;
  font-size: 0.82em;
  line-height: 0.9;
}

#diensten .services-intro {
  max-width: 590px;
  margin: 0;
  color: #30394b;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.58;
  transform: translateY(18px);
}

/*
  Belangrijk:
  .services-track is op desktop géén zichtbare grid-wrapper.
  De cards worden direct in de hoofdgrid van .container geplaatst.
*/
#diensten .services-track {
  display: contents;
}

/* 01, 02, 03 bovenste rij */
#diensten .services-track > .service-card:nth-child(1) {
  grid-column: 1 / span 2;
  grid-row: 2;
}

#diensten .services-track > .service-card:nth-child(2) {
  grid-column: 3 / span 2;
  grid-row: 2;
}

#diensten .services-track > .service-card:nth-child(3) {
  grid-column: 5 / span 2;
  grid-row: 2;
}

/* 04 links onder */
#diensten .services-track > .service-card:nth-child(4) {
  grid-column: 1 / span 2;
  grid-row: 3 / span 2;
}

/* 05 rechtsboven naast 04 */
#diensten .services-track > .service-card:nth-child(5) {
  grid-column: 3 / -1;
  grid-row: 3;
}

/* CTA rechts onder 05 */
#diensten .services-cta {
  grid-column: 3 / -1;
  grid-row: 4;
  align-self: end;
}

/* =========================================================
   Cards
========================================================= */

#diensten .service-card {
  position: relative;
  min-height: 100%;
  padding: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(23, 32, 51, 0.09);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(23, 32, 51, 0.08);
  backdrop-filter: blur(16px);
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    border-color 0.32s ease,
    background 0.32s ease;
}

#diensten .service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(102, 116, 91, 0.24);
  box-shadow: 0 26px 70px rgba(23, 32, 51, 0.13);
  background: rgba(255, 255, 255, 0.95);
}

#diensten .service-card--featured {
  background: var(--ink);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

#diensten .service-card--featured:hover {
  background: var(--ink);
  border-color: rgba(255, 255, 255, 0.16);
}

#diensten .service-card--wide {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  column-gap: 34px;
  align-items: start;
  min-height: auto;
}

#diensten .service-card-main,
#diensten .service-card-content {
  min-width: 0;
}

#diensten .service-card--wide .service-card-content {
  padding-top: 4px;
}

/* =========================================================
   Card content
========================================================= */

#diensten .service-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

#diensten .service-number {
  color: var(--green);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.07em;
}

#diensten .service-card--featured .service-number {
  color: #c8d6ba;
}

#diensten .service-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 7px 11px;
  color: var(--green-dark);
  background: rgba(102, 116, 91, 0.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

#diensten .service-card--featured .service-tag {
  color: #c8d6ba;
  background: rgba(255, 255, 255, 0.08);
}

#diensten .service-card h3 {
  position: relative;
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(25px, 2.1vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

#diensten .service-card--featured h3 {
  color: var(--white);
}

#diensten .service-card p {
  position: relative;
  margin: 0;
  color: rgba(23, 32, 51, 0.72);
  font-size: 16px;
  line-height: 1.58;
}

#diensten .service-card--featured p {
  color: rgba(255, 255, 255, 0.72);
}

#diensten .service-card ul {
  position: relative;
  display: grid;
  gap: 9px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

#diensten .service-card li {
  position: relative;
  padding-left: 22px;
  color: #30394b;
  font-size: 15.5px;
  line-height: 1.42;
}

#diensten .service-card--featured li {
  color: rgba(255, 255, 255, 0.78);
}

#diensten .service-card li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 999px;
  transform: translateY(-50%);
}

#diensten .service-card--featured li::before {
  background: #c8d6ba;
}

/* =========================================================
   CTA desktop
========================================================= */

#diensten .services-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 0;
  padding: 24px 28px;
  background: rgba(235, 228, 216, 0.74);
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(23, 32, 51, 0.05);
}

#diensten .services-cta p {
  max-width: 720px;
  margin: 0;
  color: #30394b;
  font-size: 17px;
  line-height: 1.5;
}

#diensten .services-cta .btn {
  flex: 0 0 auto;
}

/* =========================================================
   Tablet
========================================================= */

@media (max-width: 1100px) {
  #diensten .container {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 22px;
    row-gap: 22px;
  }

  #diensten .services-head {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
    margin-bottom: 42px;
  }

  #diensten .services-intro {
    max-width: 760px;
    transform: none;
  }

  #diensten .services-track {
    display: contents;
  }

  #diensten .services-track > .service-card:nth-child(1) {
    grid-column: 1 / span 3;
    grid-row: 2;
  }

  #diensten .services-track > .service-card:nth-child(2) {
    grid-column: 4 / span 3;
    grid-row: 2;
  }

  #diensten .services-track > .service-card:nth-child(3) {
    grid-column: 1 / span 3;
    grid-row: 3;
  }

  #diensten .services-track > .service-card:nth-child(4) {
    grid-column: 4 / span 3;
    grid-row: 3;
  }

  #diensten .services-track > .service-card:nth-child(5) {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  #diensten .services-cta {
    grid-column: 1 / -1;
    grid-row: 5;
    margin-top: 0;
  }

  #diensten .service-card--wide {
    grid-template-columns: 0.9fr 1fr;
  }
}

/* =========================================================
   Mobiel
   01 t/m 05 in één horizontale scroll
   CTA los eronder
========================================================= */

@media (max-width: 900px) {
  #diensten.services-section {
    padding: 72px 0 76px;
    overflow: hidden;
  }

  #diensten.services-section::before {
    width: min(100% - 40px, 1320px);
  }

  #diensten .container {
    display: block;
  }

  #diensten .services-head {
    display: block;
    margin-bottom: 0;
  }

  #diensten .services-title-block {
    max-width: 100%;
  }

  #diensten .section-title {
    max-width: 100%;
    font-size: clamp(48px, 13vw, 70px);
    line-height: 0.9;
  }

  #diensten .section-title em {
    display: block;
    font-size: 0.74em;
    line-height: 0.92;
  }

  #diensten .services-intro {
    max-width: 100%;
    margin-top: 24px;
    color: #30394b;
    font-size: 16.5px;
    line-height: 1.55;
    transform: none;
  }

  /*
    Horizontale scroll mobiel:
    - zelfde gedrag als tarieven/reviews slider
    - nette witruimte links/rechts
    - compactere cards
    - JS bepaalt max. 1 card per swipe
  */
  #diensten .services-track {
    --diensten-card-width: 78%;

    display: flex;
    align-items: stretch;
    gap: 14px;
    margin-top: 36px;
    margin-inline: calc((100vw - 100%) / -2);
    padding: 4px 16px 22px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scroll-snap-type: none;
    -webkit-overflow-scrolling: auto;
    scrollbar-width: none;
    touch-action: pan-y;
  }

  #diensten .services-track::-webkit-scrollbar {
    display: none;
  }

  #diensten .service-card,
  #diensten .service-card--wide,
  #diensten .services-track > .service-card:nth-child(1),
  #diensten .services-track > .service-card:nth-child(2),
  #diensten .services-track > .service-card:nth-child(3),
  #diensten .services-track > .service-card:nth-child(4),
  #diensten .services-track > .service-card:nth-child(5) {
    flex: 0 0 var(--diensten-card-width);
    display: block;
    min-width: 0;
    min-height: auto;
    padding: 20px;
    border-radius: 22px;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
    transform: none;
  }

  #diensten .service-card:hover {
    transform: none;
  }

  #diensten .service-card--wide .service-card-content {
    padding-top: 0;
  }

  #diensten .service-card-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
  }

  #diensten .service-number {
    font-size: 32px;
  }

  #diensten .service-tag {
    padding: 5px 9px;
    font-size: 10.5px;
    line-height: 1;
  }

  #diensten .service-card h3 {
    margin-bottom: 10px;
    font-size: 22px;
    line-height: 1.04;
    letter-spacing: -0.055em;
  }

  #diensten .service-card p {
    font-size: 13.8px;
    line-height: 1.42;
  }

  #diensten .service-card ul {
    gap: 6px;
    margin-top: 15px;
  }

  #diensten .service-card li {
    padding-left: 17px;
    font-size: 13.6px;
    line-height: 1.3;
  }

  #diensten .service-card li::before {
    top: 0.68em;
    width: 6px;
    height: 6px;
  }

  /* Premium CTA mobiel */
  #diensten .services-cta {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 18px;
    margin-top: 18px;
    padding: 22px;
    overflow: hidden;
    background:
      radial-gradient(circle at 90% 0%, rgba(102, 116, 91, 0.10), transparent 34%),
      rgba(235, 228, 216, 0.78);
    border: 1px solid rgba(23, 32, 51, 0.08);
    border-radius: 26px;
    box-shadow:
      0 18px 50px rgba(23, 32, 51, 0.07),
      inset 0 1px 0 rgba(255, 255, 255, 0.45);
  }

  /*
    Achtergrondvlak achter CTA, zodat mobiel geen afwijkende strook toont.
    Dit houdt de CTA visueel in dezelfde section.
  */
  #diensten .services-cta::after {
    content: "";
    position: absolute;
    z-index: -2;
    top: -28px;
    right: calc((100vw - 100%) / -2);
    bottom: -28px;
    left: calc((100vw - 100%) / -2);
    background: var(--cream);
    pointer-events: none;
  }

  #diensten .services-cta::before {
    content: "Klaar voor de volgende stap?";
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    color: var(--green-dark);
    background: rgba(102, 116, 91, 0.10);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  #diensten .services-cta p {
    max-width: none;
    margin: 0;
    color: #30394b;
    font-size: 15.5px;
    line-height: 1.48;
  }

  #diensten .services-cta .btn {
    width: 100%;
    min-height: 52px;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 999px;
    box-shadow: 0 14px 34px rgba(82, 98, 72, 0.18);
  }
}

/* =========================================================
   Kleine mobiel
========================================================= */

@media (max-width: 520px) {
  #diensten.services-section {
    padding: 64px 0 72px;
  }

  #diensten.services-section::before {
    width: calc(100% - 32px);
  }

  #diensten .section-title {
    font-size: clamp(44px, 14vw, 58px);
    line-height: 0.9;
    letter-spacing: -0.065em;
  }

  #diensten .section-title em {
    font-size: 0.72em;
  }

  #diensten .services-intro {
    margin-top: 22px;
    font-size: 16px;
  }

  #diensten .services-track {
    --diensten-card-width: 78%;

    margin-top: 36px;
    gap: 14px;
    padding-left: 16px;
    padding-right: 16px;
  }

  #diensten .service-card,
  #diensten .service-card--wide,
  #diensten .services-track > .service-card:nth-child(1),
  #diensten .services-track > .service-card:nth-child(2),
  #diensten .services-track > .service-card:nth-child(3),
  #diensten .services-track > .service-card:nth-child(4),
  #diensten .services-track > .service-card:nth-child(5) {
    flex-basis: var(--diensten-card-width);
    padding: 18px;
    border-radius: 21px;
  }

  #diensten .service-card-top {
    gap: 7px;
    margin-bottom: 16px;
  }

  #diensten .service-number {
    font-size: 31px;
  }

  #diensten .service-tag {
    padding: 5px 9px;
    font-size: 10px;
  }

  #diensten .service-card h3 {
    margin-bottom: 9px;
    font-size: 21px;
    line-height: 1.04;
  }

  #diensten .service-card p {
    font-size: 13.5px;
    line-height: 1.4;
  }

  #diensten .service-card ul {
    gap: 5px;
    margin-top: 14px;
  }

  #diensten .service-card li {
    font-size: 13.4px;
    line-height: 1.28;
  }

  #diensten .services-cta {
    margin-top: 16px;
    padding: 20px;
    border-radius: 24px;
  }

  #diensten .services-cta p {
    font-size: 15.5px;
    line-height: 1.48;
  }

  #diensten .services-cta .btn {
    min-height: 52px;
  }
}
@media (max-width: 900px) {
  #diensten .services-cta {
    margin-top: 50px;
  }
}

@media (max-width: 520px) {
  #diensten .services-cta {
    margin-top: 48px;
  }
}