@font-face {
  font-family: "Fredoka";
  src: url("../fonts/Fredoka-VariableFont_wdth\,wght.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }

:root {
  font-family: "Fredoka", sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;

  --bg: oklch(0.8794 0.0592 254.12);
  --primary: oklch(0% 0 0);
  --header: oklch(0.3398 0.0592 254.12);
  --hover: oklch(0.8794 0.0592 254.12);
  --headertxt: oklch(1 0 0);

  background: var(--bg);
  color: var(--primary);
}

body {
  margin: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

header { 
  background: var(--header); 
}

main { 
  flex: 1; 
}

footer {
  background: var(--header);
  color: var(--headertxt);
  margin-block-start: 1rem;
  text-align: center;
  padding: 1rem 0;

  a { 
    color: var(--headertxt); 
  }
}

img { border-radius: .5rem; }

/*----------------------------------------------------------*/

.topnav {
  background: var(--header);
  position: relative;
  overflow: hidden;

  > a:not(.icon),
  #myLinks a {
    display: inline-block;
    padding: .875rem 1rem;
    color: var(--headertxt);
    text-decoration: none;

    &:hover {
      background: var(--hover);
      color: var(--primary);
    }
  }

  img {
    max-height: 3rem;
    height: auto;
    width: auto;
  }

  a.icon {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    font-size: 1.75rem;  /*groter maken van het icoon*/



    background: var(--header);
    color: var(--headertxt);
    text-decoration: none;
    line-height: 1;

    &:hover {
      background: var(--hover);
      color: var(--primary);
    }
  }

  #myLinks {
    display: none;
    width: 100%;
    background: var(--header);

    a { 
      display: block; 
    }
  }

  &:hover #myLinks,
  &:focus-within #myLinks { 
    display: block; 
  }
}

/*----------------------------------------------------------*/

ul.cards {
  margin: 0;
  padding: 0;
  list-style: none;

  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  

  li {
    border-radius: 1rem;
    position: relative;

    flex: 1 1 18rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 .2rem oklch(100% 0.00011 271.152 / 0.2), 0 0 2rem oklch(0% 0 0 / 0.6);

    .content { 
      padding: 0 1rem 1rem; 
    }

    img {
      width: 100%;
      order: -1;
      border-radius: 1rem 1rem 0 0;
    }
  }

  .overlay-link {
    position: absolute;
    inset: 0;
    text-indent: 100%;
    border-radius: 1rem;
    white-space: nowrap;
    overflow: hidden;

    &:hover,
    &:focus-visible {
      background: oklch(40% .15 .30 / .15);
    }
  }

  a:not(.overlay-link) { 
    position: relative; 
    z-index: 1; 
  }
}

/* Groot scherm, computer */
@media (min-width: 48rem) {
  :root { 
    font-size: 1.125rem; 
  }

  .topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;

    #myLinks {
      display: flex;
      flex-direction: row;
      justify-content: flex-end;
      background: none;
      width: auto;

      a { 
        display: inline-block; 
      }
    }

    a.icon { 
      display: none; 
    }
  }

  ul.cards {
    gap: 2.5rem;
    li { 
      flex-basis: 20rem; 
    }
  }
}

/* Kleiner scherm, telefoon */
@media (max-width: 48rem) {
  :root { 
    font-size: 1rem; 
  }

  .topnav #myLinks {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--header);

    a { 
      display: block; text-align: left; 
    }
  }

  footer { 
    padding: .75rem 0; 
  }
}
