/* <div class="year">S SPACING
The name of the class determines which side it is on and how many years are between the blocks.
Left are put directly beneath the right blocks, so is in relation to previous period. 
Right blocks stack on previous right blocks, so is in relation to two periods ago.

So 'left-2' is a block on the left with 2 years from the right block above it. 'right-20' would be a block to the right and 20 years beneath the right block above it.

One year equals 15 pixels.
We need to account for block height of 230px: 10yrs is 150px - 230px = -80px, 20yrs is 300px - 230px = 70px */

.left-2 {
  margin-top: -200px;
}

.left-3 {
  margin-top: -185px;
}

.left-5 {
  margin-top: -155px;
}

.left-6 {
  margin-top: -140px;
}
.left-7 {
  margin-top: -125px;
}
.left-8 {
  margin-top: -110px;
}
.left-9 {
  margin-top: -95px;
}
.left-10 {
  margin-top: -80px;
}

.left-11 {
  margin-top: -65px;
}

.left-13 {
  margin-top: -35px;
}

.left-15 {
  margin-top: -5px;
}

.left-16 {
  margin-top: 10px;
}

.left-17 {
  margin-top: 25px;
}

.left-18 {
  margin-top: 40px;
}

.left-22 {
  margin-top: 100px;
}

.left-30 {
  margin-top: 220px;
}

.left-35 {
  margin-top: 295px;
}

.left-36 {
  margin-top: 310px;
}

.left-37 {
  margin-top: 325px;
}

.left-38 {
  margin-top: 340px;
}

.left-39 {
  margin-top: 355px;
}

.left-40 {
  margin-top: 370px;
}

.right-11 {
  margin-top: -65px;
}
.right-13 {
  margin-top: -35px;
}

.right-15 {
  margin-top: -5px;
}

.right-16 {
  margin-top: 10px;
}

.right-19 {
  margin-top: 55px;
}

.right-20 {
  margin-top: 70px;
}

.right-21 {
  margin-top: 85px;
}

.right-22 {
  margin-top: 100px;
}

.right-23 {
  margin-top: 115px;
}

.right-29 {
  margin-top: 205px;
}

.right-30 {
  margin-top: 220px;
}

.right-31 {
  margin-top: 235px;
}

.right-38 {
  margin-top: 340px;
}

.right-42 {
  margin-top: 400px;
}

.right-44 {
  margin-top: 430px;
}

.right-46 {
  margin-top: 460px;
}

.right-47 {
  margin-top: 475px;
}

.right-48 {
  margin-top: 490px;
}

.right-49 {
  margin-top: 505px;
}

.right-50 {
  margin-top: 520px;
}

.right-51 {
  margin-top: 535px;
}

.right-65 {
  margin-top: 745px;
}

@media only screen and (max-width: 1200px) {
  .left-3 {
    margin-top: -150px;
  }
}

@media only screen and (max-width: 991px) {
  .left-3 {
    margin-top: -130px;
  }

  .right-10 {
    margin-top: 0px;
  }
}

/* GENERAL SETTINGS */

.main-timeline {
  position: relative;
  margin-bottom: 8rem;
}

.main-timeline:after,
.main-timeline:before {
  content: "";
  display: block;
  width: 100%;
  clear: both;
}

.main-timeline:before {
  content: "";
  width: 3px;
  height: 100%;
  background: #b28544;
  position: absolute;
  top: 0;
  left: 50%;
}

.timeline {
  height: 230px;
  width: 50%;
  float: left;
  position: relative;
  z-index: 1;
}

.timeline:last-child:before {
  top: auto;
  bottom: 0;
}

.timeline:last-child {
  height: 180px;
}

.timeline:last-child:nth-child(2n):before {
  right: auto;
  left: -10px;
  bottom: -20px;
}

.timeline-content {
  text-align: center;
  position: relative;
  transition: all 0.3s ease 0s;
  width: 100%;
  cursor: pointer;
}

.line {
  width: 100%;
  height: 2px;
  background: #0581a1;
  position: absolute;
  margin-top: 50px;
  left: 0;
  z-index: 1;
  transition: height 0.1s, transform 0.1s;
}

.timeline-content:hover .line {
  height: 6px;
  transform: translateY(-2px);
}

.rectangle {
  width: 120px;
  height: 48px;
  border-radius: 0.5rem 0 0 0.5rem;
  background: #0581a1;
  border: 3px solid #0581a1;
  margin-top: 27px;
  margin-right: 25px;
  position: absolute;
  z-index: 2;
  transition: height 0.1s, transform 0.1s;
}

.rectangle .year {
  color: #fff;
  margin: auto;
  transition: transform 0.1s;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.3;
  font-family: var(--font-family-titles), sans-serif;
}

.triangle {
  position: absolute;
  display: block;
  content: "";
  width: 0;
  height: 0;
  margin-top: 27px;
  margin-left: 120px;
  border-top: 24px solid #fff;
  border-bottom: 24px solid #fff;
  border-left: 30px solid #0581a1;
  border-right: 6px solid #fff;
  z-index: 2;
  transition: border-width 0.1s transform 0.1s;
}

.rectangle span:after,
.rectangle span:before {
  width: 28px;
  height: 50px;
  background: #fff;
  border-radius: 0 0 0 21px;
  top: -54px;
}

.rectangle span:after {
  border-radius: 21px 0 0;
  top: 0;
  bottom: -56px;
}

.content {
  padding: 90px 32px 0px 32px;
  width: 100%;
  position: relative;
  display: table;
  text-align: right;
}

.timeline:nth-child(2n) .content {
  text-align: left;
}

.text-content {
  position: relative;
  transition: transform 0.1s;
}

.timeline .timeline-title {
  position: absolute;
  color: #443121;
  font-weight: 600;
  margin-top: 20px;
  right: 32px;
  z-index: 1000;
}

.timeline:nth-child(2n) .timeline-title {
  right: auto;
  left: 32px;
}

.icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #b28544;
  border: 6px solid #fff;
  position: absolute;
  top: 36px;
  right: -16px;
  z-index: 2;
  transition: height 0.1s, width 0.1s, transform 0.1s;
}

.timeline-content:hover .icon {
  width: 34px;
  height: 34px;
  transform: translate(2px, -2px);
}

.timeline:nth-child(2n) .timeline-content:hover .icon {
  transform: translate(-2px, -2px);
}

.timeline:nth-child(2n) .rectangle,
.timeline:nth-child(2n) .timeline-content {
  right: 0;
  margin-top: 0;
}

.timeline:nth-child(2n) .rectangle {
  margin: 27px 0 0 25px;
  border-radius: 0 0.5rem 0.5rem 0;
}

.timeline:nth-child(2n) .content {
  margin: auto;
}

.timeline:nth-child(2n) .icon {
  right: auto;
  left: -14px;
}

.timeline:nth-child(2n) .icon span:after,
.timeline:nth-child(2n) .icon span:before,
.timeline:nth-child(2n) .icon:before {
  left: auto;
  right: -15px;
}

.timeline:nth-child(2n) .icon span:before {
  border-radius: 0 0 0 21px;
}
.timeline:nth-child(2n) .icon span:after {
  border-radius: 21px 0 0;
}

.timeline:nth-child(2) {
  margin-top: 150px;
}

#stakingen-second {
  margin-top: 90px;
}

p {
  margin-bottom: 0.5rem;
}

.important-description {
  color: #0581a1;
}

.read-more {
  color: var(--cbs-dark-aqua);
  text-decoration: underline;
  z-index: 9999;
}

#tijdlijn-primair-onderwijs .rectangle-periods {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#tijdlijn-primair-onderwijs .periods {
  font-size: 1.2rem;
}

@media only screen and (min-width: 992px) {
  .timeline:nth-child(2n) .triangle {
    right: 0;
    margin: 27px 120px 0 0;
    border-top: 24px solid #fff;
    border-bottom: 24px solid #fff;
    border-right: 30px solid #0581a1;
    border-left: 6px solid #fff;
  }

  .main-timeline {
    margin-bottom: 5rem;
  }

  #historische-energie-second {
    margin-top: 195px;
  }

  #tijdlijn-primair-onderwijs-second {
    margin-top: 300px;
  }
}

.timeline:nth-child(6n - 4) .line {
  background: #0058b8;
}

.timeline:nth-child(6n - 4) .rectangle {
  border-color: #0058b8;
  background: #0058b8;
}

.timeline:nth-child(6n - 4) .triangle {
  border-right-color: #0058b8;
}
.timeline:nth-child(6n - 4) .important-description {
  color: #0058b8;
}

.timeline:nth-child(6n - 3) .line {
  background: #368726;
}

.timeline:nth-child(6n - 3) .rectangle {
  background: #368726;
  border-color: #368726;
}

.timeline:nth-child(6n - 3) .triangle {
  border-left-color: #368726;
}

.timeline:nth-child(6n - 3) .important-description {
  color: #368726;
}

.timeline:nth-child(6n - 2) .line {
  background: #d82c88;
}

.timeline:nth-child(6n - 2) .rectangle {
  background: #d82c88;
  border-color: #d82c88;
}

.timeline:nth-child(6n - 2) .triangle {
  border-right-color: #d82c88;
}

.timeline:nth-child(6n - 2) .important-description {
  color: #d82c88;
}

.timeline:nth-child(6n - 1) .line {
  background: #9a5eb0;
}

.timeline:nth-child(6n - 1) .rectangle {
  background: #9a5eb0;
  border-color: #9a5eb0;
}

.timeline:nth-child(6n - 1) .triangle {
  border-left-color: #9a5eb0;
}

.timeline:nth-child(6n - 1) .important-description {
  color: #9a5eb0;
}

.timeline:nth-child(6n) .line {
  background: #c90c0f;
}

.timeline:nth-child(6n) .rectangle {
  background: #c90c0f;
  border-color: #c90c0f;
}

.timeline:nth-child(6n) .triangle {
  border-right-color: #c90c0f;
}

.timeline:nth-child(6n) .important-description {
  color: #c90c0f;
}

.years-container {
  margin-bottom: 5rem;
}

@media only screen and (max-width: 991px) {
  .main-timeline {
    margin-right: 40px;
  }

  .main-timeline:before {
    left: 100%;
  }

  .timeline {
    width: 100%;
    height: auto;
    margin-bottom: 20px !important;
  }

  .timeline:first-child:before,
  .timeline:last-child:before {
    left: auto !important;
    right: -13px !important;
  }

  .timeline:nth-child(2n) .rectangle {
    left: 0;
    margin: 27px 25px 0 0;
    border-radius: 0.5rem 0 0 0.5rem;
  }

  .timeline:nth-child(2n) .content {
    right: 0;
    text-align: right;
  }

  .timeline:nth-child(2n) .timeline-title {
    left: auto;
    right: 32px;
  }

  .timeline:nth-child(2n) .icon {
    right: -16px;
    left: auto;
  }

  .timeline:nth-child(2),
  .timeline:nth-child(2n),
  .timeline:nth-child(2n + 1) {
    margin: 0;
  }

  .timeline:nth-child(6n - 4) .triangle {
    border-left-color: #0058b8;
    border-right-color: #fff;
  }

  .timeline:nth-child(6n - 3) .triangle {
    border-left-color: #368726;
    border-right-color: #fff;
  }

  .timeline:nth-child(6n - 2) .triangle {
    border-left-color: #d82c88;
    border-right-color: #fff;
  }

  .timeline:nth-child(6n - 1) .triangle {
    border-left-color: #9a5eb0;
    border-right-color: #fff;
  }

  .timeline:nth-child(6n) .triangle {
    border-left-color: #c90c0f;
    border-right-color: #fff;
  }
}

@media only screen and (max-width: 576px) {
  .main-timeline {
    margin-right: 10px;
  }
}

@media only screen and (max-width: 436px) {
  .timeline-title {
    font-size: var(--font-size-small);
  }
}

@media only screen and (min-width: 426px) and (max-width: 991px) {
  #tijdlijn-primair-onderwijs span.timeline-title {
    max-width: 255px;
    text-align: right;
    margin-top: 0;
  }
}

@media only screen and (max-width: 426px) {
  .timeline-title {
    max-width: 177px;
    right: 33px !important;
    text-align: right;
    z-index: 2;
  }

  #ongevallen-en-gezondheidswet,
  #algemene-ouderdomswet,
  #wet-werk-en-bijstand {
    max-width: 198px;
    margin-top: 0;
  }

  #tijdlijn-primair-onderwijs .timeline .timeline-title {
    margin-top: 0;
  }

  #tijdlijn-primair-onderwijs .row .col-sm {
    margin-bottom: 2rem;
  }
}

@media (max-width: 425px) {
  #groeiende-energieverslaving {
    margin-top: 0px;
    max-width: 140px;
  }

  #molens-hout-en-turf {
    max-width: 86px;
    margin-top: 0px;
  }
}

@media (min-width: 768px) {
  #algemene-bijstandswet {
    margin-top: 0px !important;
  }
}

@media (max-width: 768px) {
  #tijdlijn-primair-onderwijs .main-timeline {
    margin-bottom: 2rem;
  }

  #tijdlijn-primair-onderwijs .row .col-sm {
    text-align: right;
  }
}

@media (min-width: 1024px) {
  #algemene-bijstandswet {
    margin-top: -83px !important;
  }

  #bijzonder-onderwijs,
  #kleuteronderwijs {
    max-width: 280px;
    margin-top: -6px;
  }

  #bijzonder-onderwijs {
    text-align: left;
  }

  #kleuteronderwijs {
    text-align: right;
  }
}
