* {
  -moz-box-sizing: border-box; 
  box-sizing: border-box;
}

:root {
  --color1: rgb(1, 1, 90);
  --color2: white;
  --color3: #e3d5fd;
  --color4: #af87f8;
  --color5: #c5a8fc;
  --color6: #87aff8;
  --color7: #eaffcc;
  --color8: #6363b6;
  --textcolor1: black;
  --textcolor2: white;
  --shadowcolor: #c0a1ff;
  --shadowcolor2: lightgrey;
  --font1: 'Nunito', sans-serif;
  --font2: 'Quicksand', sans-serif;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

/* tekst */
section:nth-of-type(4) h3, p, .menu, ul, section:nth-of-type(6) a, .tud_origineel h1, .deel2 figcaption, section.portfoliopagina a {
  font-family: var(--font1);
}

h1, h2, h3, h4, section:nth-of-type(5) a, .mobile-nav li, footer ul, .tud_origineel p {
  font-family: var(--font2);
  font-weight: 600;
}


/* nav */
nav:first-of-type {
  box-shadow: 1px 1px 8px var(--shadowcolor);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
  padding: 1em 2em;
  background-color: var(--color1);
}

nav img {
 position: absolute;
 width: 2.5em;
 top: 0.5em;
}

nav img:first-of-type {
  border: 4px solid var(--color1);
  border-radius: 35px;
}

@keyframes hover {
  0%  {border-color: var(--color1);}
  100% {border-color: var(--color4);}
}

nav a img:hover {
  animation: hover 0.5s ease-in;
  animation-iteration-count: 1;
  border-color: var(--color4);
}

nav div ul li a {
 padding: 1.8em 1em; 
 color: var(--textcolor2);
 font-size: 1.1em;
 text-decoration: none;
 transition: 0.3s ease-in-out;
 font-weight: bold;
}

nav div ul li a:hover, nav div ul li a.active {
 color: var(--textcolor2);
 background-color: var(--color4);
 transition: 0.3s ease-in-out;
}

.hamburger {
  display: block;
  z-index: 1;
  user-select: none;
  appearance: none;
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
  left: 22em;
  float: right;
}

.hamburger span {
  display: block;
  width: 2.0625em;
  height: 0.25em;
  margin-bottom: 0.3125em;
  position: relative;
  background-color: var(--color2);
  border-radius: 0.375em;
  z-index: 1;
  transform-origin: 0 0;
  transition: 0.4s;
}

.hamburger:hover span:nth-child(2) {
  transform: translateX(0.625em);
  background-color: var(--color4);
}

.hamburger.is-active span:nth-child(1) {
  transform: translate(0em, -0.125em) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
  transform: translateX(0.9375em);
}

.hamburger.is-active span:nth-child(3) {
  transform: translate(-0.1875em, 0.1875em) rotate(-45deg);
}

.hamburger.is-active:hover span {
  background-color: var(--color4);
}

.menu {
  list-style-type: none;
  display: flex;
  justify-content: flex-end;
  display: none;
}

.mobile-nav {
  display: block;
  position: fixed;
  top: 0;
  left: 100%;
  width: 100%;
  min-height: 100vh;
  z-index: 98;
  background-color: var(--color5);
  padding-top: 4em;
  transition: 0.4s ease-in-out;
}

.mobile-nav.is-active {
  left: 0;
  transition: 0.4s ease-in-out;
}

.mobile-nav li {
  display: block;
  text-align: center;
  list-style-type: none;
  padding-right: 2.5em;
  margin-top: 1em;
  font-size: 22px;
  text-transform: uppercase;
  transition: 0.3s ease-in-out;
}

.mobile-nav li a:hover {
  color: var(--textcolor1);
  transition: 0.3s ease-in-out;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--color2);
  width: 100%;
  padding: 10px 7px;  
  display: block;
}

@media (min-width: 768px) {
  .hamburger {
   display: none;
  }

  .menu {
   display: flex;
  }

  nav img {
    width: 4em;
  }
}

/* section 2 */
section:nth-of-type(2) {
  color: var(--color1);
  text-align: center;
}

section:nth-of-type(2) h1 {
  font-size: 3em;
  margin-bottom: 0em;
  padding-top: 3.2em;
}

section:nth-of-type(2) h2 {
  font-size: 3em;
  margin-top: 0em;
  margin-bottom: 1.8em;
}

@media (min-width: 768px) {
  section:nth-of-type(2) h1 {
    padding-top: 3em;
    font-size: 5em;
  }

  section:nth-of-type(2) h2 {
    margin-bottom: 2.5em;
    font-size: 5em;
  }
}

/* carousel */
section:nth-of-type(3) {
  margin: 0;
  display: grid;
  grid-template-rows: 500px 100px;
  grid-template-columns: 1fr 30px 30px 30px 30px 30px 1fr;
  align-items: center;
  justify-items: center;
  position: relative;
}

main#carousel {
  grid-row: 1 / 2;
  grid-column: 1 / 8;
  width: 100%;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 600px;
  --items: 5;
  --middle: 3;
  --position: 1;
  pointer-events: none;
}

div.item {
  position: absolute;
  width: 300px;
  height: 400px;
  background-color: coral;
  --r: calc(var(--position) - var(--offset));
  --abs: max(calc(var(--r) * -1), var(--r));
  transition: all 0.25s linear;
  transform: rotateY(calc(-10deg * var(--r)))
  translateX(calc(-300px * var(--r)));
  z-index: calc((var(--position) - var(--abs)));
}

div.item:nth-of-type(1) {
  --offset: 1;
  background-image: url("/images/spiegelfoto.jpeg");
  background-size: cover;
}

div.item:nth-of-type(2) {
  --offset: 2;
  background-image: url("/images/picknick.jpeg");
  background-size: cover;
}

div.item:nth-of-type(3) {
  --offset: 3;
  background-image: url("/images/sportschool.jpeg");
  background-size: cover;
}

div.item:nth-of-type(4) {
  --offset: 4;
  background-image: url("/images/switch.jpeg");
  background-size: cover;
}

div.item:nth-of-type(5) {
  --offset: 5;
  background-image: url("/images/eten.jpeg");
  background-size: cover;
}

input:nth-of-type(1) {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}

input:nth-of-type(1):checked ~ main#carousel {
  --position: 1;
}

input:nth-of-type(2) {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
}

input:nth-of-type(2):checked ~ main#carousel {
  --position: 2;
}

input:nth-of-type(3) {
  grid-column: 4 /5;
  grid-row: 2 / 3;
}

input:nth-of-type(3):checked ~ main#carousel {
  --position: 3;
}

input:nth-of-type(4) {
  grid-column: 5 / 6;
  grid-row: 2 / 3;
}

input:nth-of-type(4):checked ~ main#carousel {
  --position: 4;
}

input:nth-of-type(5) {
  grid-column: 6 / 7;
  grid-row: 2 / 3;
}

input:nth-of-type(5):checked ~ main#carousel {
  --position: 5;
}

input {
    color: var(--shadowcolor);
}

/* section 4 */
section:nth-of-type(4) {
  margin: 0em 1em 0em 1.5em;
  display: flex;
}

section:nth-of-type(4) h2 {
  margin-top: 0em;
}

section:nth-of-type(4) article {
  margin: 0em 1em;
}

section:nth-of-type(4) article:nth-of-type(2) {
  min-width: 50%;
}

@media (max-width: 768px) {
  section:nth-of-type(4) {
    justify-content: center;
    flex-direction: column;
  }

section:nth-of-type(4) article {
    max-width: 95%;
    margin: 1em 0em;
  }
}

@media (min-width: 768px) {
  section:nth-of-type(4) article:nth-of-type(2) {
    margin-left: 5em;
    margin-bottom: 1em;
  }
}

/* section 5 */
section:nth-of-type(5) {
  padding: 1.8em 1.5em 1.8em 1.5em;
  background-color: var(--color3);
}

section:nth-of-type(5) div {
  display: flex;
  align-items: center;
  flex-direction: column;
}

section:nth-of-type(5) a {
  background-color: var(--color2);
  color: var(--textcolor1);
  max-width: 20em;
  border-radius: 2%;
  box-shadow: 1px 1px 8px var(--shadowcolor2);
  margin: 1.5em 0em;
  text-decoration: none;
}

section:nth-of-type(5) a:hover {
  scale: 1.05;
  transition: 1s;
}

section:nth-of-type(5) div a:nth-of-type(1) {
  grid-area: article1;
}

section:nth-of-type(5) div a:nth-of-type(2) {
  grid-area: article2;
}

section:nth-of-type(5) div a:nth-of-type(3) {
  grid-area: article3;
}

section:nth-of-type(5) div a:nth-of-type(4) {
  grid-area: article4;
}

section:nth-of-type(5) div a:nth-of-type(5) {
  grid-area: article5;
}

section:nth-of-type(5) div a:nth-of-type(6) {
  grid-area: article6;
}

section:nth-of-type(5) div a:nth-of-type(7) {
  grid-area: article7;
}

section:nth-of-type(5) div a:nth-of-type(8) {
  grid-area: article8;
}

section:nth-of-type(5) a img {
  max-width: 20em;
  border-radius: 2% 2% 0% 0%;
  min-height: 256.2px;
  max-height: 256.2px;
  min-width: 320px;
}

section:nth-of-type(5) a div {
  display: block;
  background-color: var(--color6);
  border-radius: 2% 2% 0% 0%;
}

section:nth-of-type(5) a div img {
  padding: 0.5em;
  object-fit: cover;
}

section:nth-of-type(5) div a:nth-of-type(4) img {
  padding: 2em 2.5em;
  background-color: var(--color7);
}

section:nth-of-type(5) div a:nth-of-type(5) img {
  padding: 1em 0em;
  background-color: var(--color8);
}

section:nth-of-type(5) div a:nth-of-type(7), section:nth-of-type(5) div a:nth-of-type(8) {
  display: none;
} 

section:nth-of-type(5) a h3 {
  margin: 0.5em;
}

section:nth-of-type(5) a h4 {
  margin: 0.5em;
}

a.button2 {
  margin-left: 8em;
}

@media (min-width: 730px) {
  section:nth-of-type(5) div {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    grid-template-areas: "article1 article2"
    "article3 article4" 
    "article5 article6";
    grid-gap: 1.5em;
    justify-items: center;
  }
}

@media (min-width: 1080px) {
  section:nth-of-type(5) div {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    grid-template-areas: "article1 article2 article3"
    "article4 article5 article6";
    grid-gap: 1.5em;
    justify-items: center;
  }
}

/* section 6 */
section:nth-of-type(6) {
  margin: 0em 1.5em;
}

section:nth-of-type(6) > div {
  display: flex;
  flex-direction: column;
  padding: 0em;
  justify-content: center;
  width: 100%;
}

section:nth-of-type(6) div > div {
  display: inline-flex;
  padding: 0.5em;
  justify-content: center;
}

section:nth-of-type(6) div > div > a {
  color: var(--textcolor1);
  font-family: var(--font2);
  border: 2px solid var(--color3);
  border-radius: 5px;
  display: block;
  padding: 7px;
  transition: 0.3s ease-in-out;
  text-decoration: none;
  text-align: center;
  width: 220px;
}

section:nth-of-type(6) div div a:hover {
  border: 2px solid var(--color4);
  transition: 0.3s ease-in-out;
  padding: 7px 15px;
  color: var(--textcolor1);
  width: 235px;
}

@media (min-width: 480px) {
  section:nth-of-type(6) > div {
    display: flex;
    flex-direction: row;
    justify-content: center;
  }
}

@media (min-width: 680px) {
  section:nth-of-type(6) > div {
    justify-content: start;
    padding-left: 2em;
  }
}


/* footer */
footer {
  background-color: var(--color1);
  width: 100%;
  margin: 2em 0em;
  color: var(--textcolor2);
}

footer ul {
  display: flex;
  list-style-type: none;
  justify-content: flex-end;
  align-items: center;
  padding: 0px 10px;
}

footer ul ul {
  margin-left: auto;
}

footer ul li {
  justify-content: flex-start;
  margin-right: auto;
}

footer img {
  width: 30px;
}

/* portfolio pagina styling
section 2 */
/* styling tekst positionering pagina */
section.portfoliopagina {
  margin: 4.5em 0.5em 0em 0.5em;
  text-align: start;
  display: block;
}

/* styling linkjes behalve terugbuttoovern */
section.portfoliopagina a {
  text-decoration: none;
  font-family: var(--font1);
  display: block;
  text-decoration: underline;
}

section.portfoliopagina div div:nth-of-type(3) a:first-of-type:hover {
  color: #fa7be9;
}

/* styling terug button */
section.portfoliopagina a.terugbutton {
  font-family: var(--font2);
  border: 2px solid var(--color3);
  border-radius: 5px;
  display: inline;
  padding: 7px;
  transition: 0.3s ease-in-out;
  text-decoration: none;
}

section.portfoliopagina a.terugbutton:hover {
  border: 2px solid var(--color4);
  transition: 0.3s ease-in-out;
  padding: 7px 15px;
  color: var(--textcolor1);
}

/* styling tekst */
section.portfoliopagina h1, section.portfoliopagina h2, section.portfoliopagina h3, section.portfoliopagina p, section.portfoliopagina a {
  color: var(--textcolor1);
  margin: 1em 1em 0.2em 0.5em;
  padding-top: 0em;
}

section.portfoliopagina h1, section.portfoliopagina h2 {
  font-size: 1.5em;
}

/* juiste margins styling */
section.portfoliopagina {
  margin-left: 1.5em;
}

section.portfoliopagina h3:first-of-type {
  margin-top: 0em;
}

section.portfoliopagina p, section.portfoliopagina a {
  margin: 0em 0em 0.5em 0.7em;
}

@media (min-width: 768px) {
  section.portfoliopagina {
    margin-top: 7em;
  }
}

/* tabel */
section.portfoliopagina > div {
  display: flex;
  flex-direction: column;
  margin-right: 2em;
}

section.portfoliopagina > div > div > div {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-auto-rows: minmax(min-content, max-content);
  grid-gap: 1em;
}


@media (min-width: 580px) {
  section.portfoliopagina > div {
    flex-direction: column;
    margin-right: 1.5em;
  }

  section.portfoliopagina > div > div > div {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 990px) {
  section.portfoliopagina > div {
    flex-direction: row;
  }

  section.portfoliopagina > div > div {
    margin: 0em 1.5em 0em 1em;
  }

  section.portfoliopagina > div > div > div {
    grid-template-columns: repeat(2, 200px);
    grid-gap: 1em;
  }

  section.deel2 {
    padding-left: 1em;
    padding-right: 1em;
  }
}

/* hover linkjes */
section.portfoliopagina a:hover {
  color: var(--color4);
  transition: 0.4s;
}

/* styling de opdracht onderdeel */
section.deel2 {
  margin-top: 0em;
  text-align: start;
  display: block;
  margin: 2.5em 2em 0em 2em;
}

.deel2 div:nth-of-type(2) {
  display: flex;
  flex-direction: column;
}

.deel2 figure {
  margin: 0;
  justify-self: center
}

.deel2 img {
  max-width: 100%;
}

.deel2 figure:nth-of-type(2) {
  margin-top: 2em;
}

.deel2 figcaption {
  text-align: center;
}

.deel2 video {
  max-width: 100%;
  margin-top: 4em;
}

@media (min-width: 950px) {
  .deel2 div:nth-of-type(2) {
    max-width: 70%;
  }

  .deel2 figure {
    max-width: 50%;
  }

  .deel2 figure:nth-of-type(2) {
    margin-top: 0;
  }
}

@media (min-width: 1090px) {
  .deel2 div:first-of-type {
    max-width: 75%;
  }
}

@media (min-width: 1500px) {
  .deel2 div:first-of-type {
    max-width: 70%;
  }
}

/* the upside down originele website pagina */
/* terug button styling */
a.terugbutton {
  font-family: var(--font2);
  border: 2px solid var(--color3);
  border-radius: 5px;
  display: inline;
  padding: 7px;
  transition: 0.3s ease-in-out;
  text-decoration: none;
  color: var(--textcolor1);
}

a.terugbutton:hover {
  border: 2px solid var(--color4);
  transition: 0.3s ease-in-out;
  padding: 7px 15px;
}

/* styling pagina 375px */
/* juiste margin terug button */
div.tud_origineel {
  margin-top: 5em;
  margin-left: 1em;
}

/* styling images */
img.images {
  max-width: 49%;
  border: 2px solid var(--textcolor1);
}

/* juiste margin section */
section.tud_origineel {
  margin-top: 0em;
  margin-right: 1.5em;
}

section.tud_origineel h1,section.tud_origineel h2, section.tud_origineel p {
  margin-left: 0;
  margin-bottom: 1em;
}

/* styling pagina 768px */
@media (min-width: 768px) {
  div.tud_origineel {
    margin-top: 7em;
  }

  img.images {
    max-width: 32%;
  }
}

/* styling pagina 920px */
@media (min-width: 920px) {
  section.tud_origineel p {
    max-width: 98%;
  }
}

/* styling pagina 1000px */
@media (min-width: 1000px) {
  section.tud_origineel p {
    max-width: 90%;
  }
}

/* styling pagina 1030px */
@media (min-width: 1030px) {
  img.images {
    max-width: 24%;
  }
}

/* portfolio pagina 2 */
/* styling link naar HvanA website */
.hvanalink {
  margin: 0em !important;
  display: inline !important;
}

/* juiste images laten zien bij juiste formaat scherm */
figure.displayMobile {
  display: block;
  margin-top: 2em !important;
}

figure.displayDesktop {
  display: none;
  margin-top: 2em !important;
}

.hvana div:nth-of-type(2) {
  display: block;
}

.hvana div:nth-of-type(3) figure:nth-of-type(3) {
  margin-bottom: 3em;
}

@media (min-width: 800px) {
  figure.displayMobile {
    display: none;
  }
  
  figure.displayDesktop {
    display: block;
  }
}

@media (min-width: 950px) {
  .hvana div:nth-of-type(3) {
    display: block !important;
  }

  .hvana div:nth-of-type(3) figure {
    max-width: 100%;
  }
}

@media (min-width: 1090px) {
  section.hvana div:nth-of-type(2) {
    max-width: 75%;
  }
}

@media (min-width: 1500px) {
  section.hvana div:nth-of-type(2) {
    max-width: 70%;
  }
}

/* image 3 layouts */
.layouts {
  width: 100%;
}

/* portfoliopagina 3 */
section.sustainableclub div:nth-of-type(2) {
  display: block;
}

@media (min-width: 950px) {
  section.sustainableclub figure.displayDesktop, section.sustainableclub div:nth-of-type(2) {
    max-width: 100%;
  }
}

@media (min-width: 1090px) {
section.sustainableclub div:nth-of-type(2), section.sustainableclub div:nth-of-type(3) {
    max-width: 75%;
 }
}

/* tamagotchi */
.displayDesktop.poes {
  display: block;
}

@media (min-width: 950px) {
  .deel2.poes div:nth-of-type(2) {
    max-width: 100%;
  }
}

@media (min-width: 1090px) {
  .deel2.poes div:nth-of-type(2) {
    max-width: 75%;
  }
}

/* clockwise */
@media (min-width: 1090px) {
  .deel2 div.clockwise2 {
    max-width: 100%;
  }
}

@media (min-width: 1150px) {
  .clockwise2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, fit-content);
    grid-gap: 1em;
  }
}