/* Hero – Sectie 1 */


/*
Bron: MDN Web Docs
Gebruik van position:absolute en object-fit voor video backgrounds
https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
*/

/*
Bron: CSS-Tricks
Flexbox gebruikt voor verticale uitlijning van hero-content
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
*/


main > section:first-of-type {
  align-items: flex-start;
  background-color: #382611;   /* fallback als video niet laadt */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;                 
  justify-content: center; 
  min-height: 67vh;
  overflow: hidden;
  padding: 5rem 1rem 4rem;   
  position: relative;
}




section:first-of-type p:first-of-type {
  color: #fff;
  font-family: "Snickers 2";
  font-size: 1rem;
  letter-spacing: .08em;
  margin: 0;
  text-transform: uppercase;
  z-index: 2;

}

section:first-of-type h2{


  color: #fff;
  cursor: pointer;
  font-family: "Snickers 3";
  font-size: 10em;
  font-size: 2.4rem; 
  font-weight: 20;
  margin: 0;
  text-transform: uppercase;
  z-index: 2;

}

section:first-of-type a {
width: fit-content;
z-index: 2;

}



main > section:first-of-type > video {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: 50% 45%;  
  position: absolute;
  width: 100%;
  z-index: 1;
}






/* Sectie 2 – Doorsnede Snickers */

main > section:nth-of-type(2) {
  background-color: #E5AC49;
  display: flex;
  flex-direction: column;
  padding-block: 5rem;
  padding-inline: 1.25em;
}

main > section:nth-of-type(2) img {
  height: auto;
  margin: 0 auto 2rem auto;
  max-width: 16rem;
  order: 1;
  width: 100%;
}

main > section:nth-of-type(2) h2 {
  color: white;
  font-family: "Snickers 2";
  font-size: 2em;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 2rem 0;
  max-width: 22ch;
  order: 2;
  text-transform: uppercase;
}

main > section:nth-of-type(2) a {
  order: 3;
  width: fit-content;
}

main > section:nth-of-type(2) a:hover {
  background-color: white;
  border-color: #1b008e;
  color: #1b008e;
}

main > section:nth-of-type(2) a:focus {
  outline-offset: 4px;
  outline: 3px solid #1b008e;
}









/* Sectie 3 – Favorieten */

main > section:nth-of-type(3) {
  background-color: #fff;
  padding-block: 1rem;
  padding-inline: 1.25rem;
  text-align: center;
}

main > section:nth-of-type(3) h2 {

  color: #410C00;
  display: inline-block;
  font-family: "Snickers 3";
  font-size: 2.5em;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
  position: relative;
  text-transform: uppercase;

}

main > section:nth-of-type(3) h2::after {
  background-color: #C52323;
  content: "";
  display: block;
  height: 0.625rem;
  margin: 0.7rem auto 0;
  width: 2.8em;
}




main > section:nth-of-type(3) ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

main > section:nth-of-type(3) li {
  text-align: center;
}

main > section:nth-of-type(3) article {
  align-items: center;
  display: flex;
  flex-direction: column;
}

main > section:nth-of-type(3) img {
  display: block;
  height: auto;
  margin-inline: auto;
  max-width: 20rem;
  transition: transform 0.4s ease-in-out;
  width: 90%;
}

main > section:nth-of-type(3) img:hover {
  transform: scale(1.05);
}

main > section:nth-of-type(3) h3 {
  color: #382611;
  font-family: "Snickers 2";
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-top: 1.5rem;
  max-width: 8ch;
  text-transform: uppercase;
}

main > section:nth-of-type(3) button {
 
  margin-top: .5rem;

}

main > section:nth-of-type(3) button:hover {
  background-color: white;
  color: #210082;
}

/* volgorde in li */
main > section:nth-of-type(3) li img    { order: 1; }
main > section:nth-of-type(3) li h3    { order: 2; }
main > section:nth-of-type(3) li button { order: 3; }









/* Sectie 4 - Snickers Ingredienten */

main > section:nth-of-type(4) {
  margin: 0;
  padding: 0;
}

main > section:nth-of-type(4) img {
  display: block;
  height: auto;
  margin: 0;
  padding: 0;
  width: 100%;
}









/* Sectie 5 - Snickers Ice Cream*/

main > section:nth-of-type(5) {
  align-items: center;
  background-color: #3a1508;
  background-image: url("../images/snicker-ice-cream.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2rem;
  padding-inline: 1rem;
  padding-top: 2rem;
  text-align: center;

}

main > section:nth-of-type(5) p:first-of-type {
  font-family: "Snickers 2";
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin-bottom: -2rem;
  text-transform: uppercase;
}

main > section:nth-of-type(5) h2 {

  display: inline-block;
  font-family: "Snickers 3";
  font-size: 2.25em;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
  position: relative;
  text-transform: uppercase;
  
}



main > section:nth-of-type(5) h2::after {
  background-color: #C52323;
  content: "";
  display: block;
  height: 0.625rem;
  margin: 1rem auto 0;
  width: 2.8em;
}







main > section:nth-of-type(5) p:last-of-type {
  font-family: "Snickers";
  font-size: 1.3em;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 auto 2rem auto;
  max-width: 24ch;
}

main > section:nth-of-type(5) button {
  margin-bottom: 3rem;
 
}

main > section:nth-of-type(5) button:hover {
  background-color: #fff;
  color: #210082;
}

main > section:nth-of-type(5) img {
  display: block;
  height: auto;
  margin-top: 2rem;
  width: 100%;
}




/* Desktop CSS (>= 40em) */

@media (min-width: 40em) {


main > section:first-of-type {
  padding: 6rem 5rem 5rem;

}

main > section:first-of-type h2 {
  font-size: 3.5rem;
}




main > section:nth-of-type(2) {
    align-items: center;
    column-gap: 1rem;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    padding: 5rem 5rem 5rem 1.5rem;
  

}

main > section:nth-of-type(2) h2 {
  font-size: 3em;
}

main > section:nth-of-type(2) a {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin-left: 0;
    margin-right: 0;
  }


main > section:nth-of-type(2) img {
  width: auto;
  height: auto;
}


}







/* Desktop CSS (>= 64em) */

@media (min-width: 64em) {


  main > section:first-of-type {
    /* min-height: 80vh; */
    padding: 6rem 10rem 5rem; 
    
  }

  main > section:first-of-type h2 {
    font-size: 4.5rem;
  }


  /* Section 2 desktop – tekst rechts, beeld links */
  main > section:nth-of-type(2) {
    align-items: center;
    column-gap: 1rem;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    padding: 8rem 4rem 8rem 1.5rem;
  }

  main > section:nth-of-type(2) img {
    grid-column: 1;
    grid-row: 1 / 3;
    margin-left: 10em;
    max-width: 100%;
    transform: translateX(-20%);
  }

  main > section:nth-of-type(2) h2 {

    font-size: 3.5rem;
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 2rem;
  }

 main > section:nth-of-type(2) a {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin-left: 0;
    margin-right: 0;
  }


  main > section:nth-of-type(3) {
    padding-left: 4em;
    padding-right: 4em;

  }

main > section:nth-of-type(3) h2 {

    font-size: 4em;
    font-weight: 10;
    margin-bottom: .5em;
}

  main > section:nth-of-type(3) ul {
    display: grid;
    gap: 2rem ; /* verticale, horizontale ruimte */
    grid-template-columns: repeat(3, 1fr);
  }

  main > section:nth-of-type(3) article {
    margin: 0;
  }


  main > section:nth-of-type(5) h2 {
    font-size: 3.5em;
    font-weight: 10;

  }


  main > section:nth-of-type(5) p:last-of-type {
    max-width: fit-content;
    font-size: 1.4em;
    
  }

}