.tab-layout__wrap {
  z-index: 1;
  grid-row-gap: 3em;
  flex-flow: row-reverse wrap; 
  padding-left: 1em;
  padding-right: 100px;
  display: flex;
  position: relative;
  align-items: stretch; 
}

.tab-layout__col {
  width: 50%;
  padding-left: .5em;
  padding-right: .5em;
  position: relative; 
}

.tab-content__inner {
  grid-column-gap: 3em;
  grid-row-gap: 3em;
  flex-flow: column;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 100%;
  padding-top: 1em;
  padding-bottom: 0;
  display: flex;
}

.tab-content__top {
  grid-column-gap: 2em;
  grid-row-gap: 2em;
  flex-flow: column;
  justify-content: flex-start;
  align-items: flex-start;
  display: flex;
}

.tab-heading {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 3.5em;
    font-weight: 600;
    line-height: 1;
}

/* STICKY GEDEELTE */
.tab-visual__wrap {
  height: 50em; /* Vaste hoogte is nodig voor sticky */
  max-height: 80vh; /* Zorg dat hij op kleinere laptops in beeld past */
  margin-left: -3em;
  position: -webkit-sticky; /* Voor Safari support */
  position: sticky;
  top: 5em;
  clip-path: polygon(0 3%, 100% 0, 88% 86%, 0% 100%);
}

.tab-visual__item {
  visibility: hidden;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  height: 100%;
  display: flex;
  position: absolute;
  top: 0; 
  left: 0;
}

.tab-visual__item.active {
  visibility: visible;
}

.tab-visual__inner {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tab-image {
  object-fit: cover;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Mobiele afbeelding verbergen op desktop */
.tab-mobile-image-wrap {
    display: none;
}

.tab-content__wrap {
    width: 100%;
    max-width: 40em;
    height: 100%;
    margin-left: auto;
    margin-right: 0;
}

.tab-content__bottom {
  flex-flow: column;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0;
  display: flex;
}

.tab-content__item {
  color: #131313;
  width: 100%;
  padding-top: 2em;
  padding-bottom: 2em;
  text-decoration: none;
  transition: opacity .25s;
  position: relative;
  display: block; 
}

.tab-content__item-main {
  grid-column-gap: 2em;
  grid-row-gap: 2em;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  display: flex;
}

.content-item__nr {
    background-color: #0064ad;
    border: 1px solid #0064ad;
    color: white;
    justify-content: center;
    align-items: center;
    width: 2.5em;
    height: 2.5em;
    margin-top: .2em;
    font-size: .75em;
    font-weight: 400;
    transition: transform .4s cubic-bezier(.625, .05, 0, 1);
    display: flex;
    flex-shrink: 0;
}

.content-item__heading {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 2em;
    font-weight: 600;
    line-height: 1;
    color: #575760;
    max-width: 575px;
}

.tab-content__item-detail {
  width: 100%;
  height: 0;
  padding-left: 4.5em; 
  overflow: hidden;
  box-sizing: border-box;
}

.tab-description {
  margin-bottom: 0;
  font-size: 1.15em;
  color: var(--contrast-2);
}

.tab-description__spacer {
  padding-top: 1em;
}

.tab-content__item-bottom {
  background-color: #0003;
  width: 100%;
  height: 1px;
  transition: background-color .2s;
  position: absolute;
  inset: auto 0% 0%;
}

.tab-progress {
  transform-origin: 0%;
  transform-style: preserve-3d;
  background-color: #0064ad;
  width: 100%;
  height: 4px;
  transform: scale3d(0, 1, 1);
}

/* --- MOBILE & TABLET --- */

@media screen and (max-width: 991px) {
  .tab-layout__wrap {
    flex-direction: row; /* Reset reverse */
    align-items: flex-start; /* Reset stretch, mag op mobiel wel */
  }

  .tab-layout__wrap {
    padding-left: 40px;
    padding-right: 40px;
  }

  .tab-layout__col {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
  
  .tab-layout__col.desktop-visuals {
    display: none;
  }

  .tab-content__item-detail {
    padding-left: 3.5em;
  }

  .tab-mobile-image-wrap {
    display: block;
    width: 100%;
    margin-top: 1em;
    overflow: hidden;
  }

  .tab-description {
  font-size: 1.05em;
  }
  
  .tab-image.mobile-img {
      height: auto;
  }

  .tab-content__inner {
    padding: 0;
  }

  .tab-content__top {
    grid-column-gap: 1.5em;
    grid-row-gap: 1.5em;
  }

  .tab-content__wrap {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

@media screen and (max-width: 767px) {
  .tab-layout__wrap {
    grid-row-gap: 2em;
  }

  .tab-heading {
    font-size: 2.8em;
  }

  .tab-content__item-main {
    grid-column-gap: 1.5em;
    grid-row-gap: 1.5em;
  }

  .content-item__nr {
    margin-top: -.2em;
  }

  .content-item__heading {
    font-size: 1.5em;
  }
}

@media screen and (max-width: 479px) {
  .tab-heading {
    font-size: 3em;
  }

  .tab-content__item {
    padding-top: 1.5em;
    padding-bottom: 1.5em;
  }

  .tab-content__item-main {
    grid-column-gap: 1em;
    grid-row-gap: 1em;
  }

  .content-item__nr {
    flex: none;
  }

  .tab-content__item-detail {
    padding-left: 0; 
    padding-top: 1em;
  }
  
  .tab-mobile-image-wrap {
      margin-top: 0.5em;
  }
}