/*Algemene structuur terug + header + footer)*/
html {
  overflow-y: scroll; /* scrollbar altijd tonen */
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-weight: 400;
  text-align: left;
  color: black;
  font-family: Nunito, sans-serif;
  text-decoration: none;
  max-width: 100%;

  .title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .title-text {
    font-family: lobster, sans-serif;
    font-weight: bold;
  }
}

.flash-message {
  width: 100%;
  padding: 0.5rem;
  text-align: center;
  font-weight: bold;
  background-color: #4caf50;
  color: white;
  border-radius: 0;
  margin: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.flash-message.error {
  background-color: #f44336; 
}

body {
  display: grid;
  grid-template-areas:
    "flash flash flash flash"
    "header header header header"
    "main   main   main   main"
    "footer footer footer footer";
  grid-template-rows: auto auto 1fr auto; /* flash, header, main, footer */
  grid-template-columns: 1fr 1fr 1fr 1fr;
  line-height: 1.5;
  background-color: var(--color-beige);
  min-height: 100vh;
  width: 100%;
}

header {
  grid-area: header;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  padding: 10px 20px;
  background-color: var(--color-light-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

  .nav {
    display: flex;
    gap: 6rem;
    align-content: center;
    #logoheader {
      height: 90px;
      width: 90px;
    }
  }
  #navOpties {
    display: flex;
    align-items: center;
    flex-grow: 2;
    a {
      flex-grow: 1;
    }
  }

  #rightheader {
    display: flex;
    align-self: center;
    align-items: center;
    #bestelButton {
      background: var(--primary-color);
      color: var(--color-light-bg);
      font-size: large;
      border: none;
      padding: 8px 12px;
      border-radius: var(--border-radius-large);
      cursor: pointer;
      text-decoration: none;
    }
    #bestelButton:hover {
      background-color: var(--color-green-dark);
      transform: scale(1.05); /* Subtiele vergroting */
    }
  }
}

main {
  grid-area: main;
  box-sizing: border-box;
}

footer {
  height: 10vh;
  grid-area: footer;
  background: #f5f5f5;
  box-shadow: -3px -1px 21px 11px rgba(0, 0, 0, 0.1);
  
  display: flex;
  align-items: center;

  #logoConFooter {
    padding-left: 1rem;
    #logofooter {
      height: 55px;
      width: 55px;
    }
    
  }
  #top{
    margin-left: 5px;
  }
  #marker {
    padding-right: 1rem;
  }
  #contact {
    
    flex-grow: 2;
    text-align: center;
    justify-items: center;
    ul {
      display: flex;
      gap: 1rem;
    }
  }
}

h1,span {
  font-family: Lobster;
  font-size: 2.3rem;
}

h2 {
  font-family: lora;
  font-size: 2rem;
}

p {
  font-size: 1.3rem;
}

ul {
  list-style-type: none;
}


button:hover,
.orderbutton:hover,
.orderbuttonpizzalist:hover,
#bestelButton:hover {
  background-color: var(--color-green-dark);
  transform: scale(1.05); /* Subtiele vergroting */
}

.logout:hover {
  background: transparent;
  transform: none;
  cursor: pointer;
}

button:active,
.orderbutton:active,
.orderbuttonpizzalist:active,
#bestelButton:active {
  transform: scale(0.95); /* Subtiele verkleining bij klik */
}

.hidden {
  display: none;
}

#navOptiesMobile {
  width: 200px; 
  height: 100%;

  display: flex;
  flex-direction: column;

  justify-content: space-between;

  position: fixed; /* Zorg dat het menu bovenop de content verschijnt */
  left: 0;
  top:  0;

  background-color: var(--color-light-bg);

  padding: 1rem;

  z-index: 1000; /* Zorg dat het menu bovenop alles staat */

  transform: translateX(-100%); 
  transition: transform 0.3s ease-in-out; 

  

  &.show {
    transform: translateX(0); 
  }

  a, .logout{
    display: inline-block;
    width: 100%; 
    font-size: 2rem; 
    color: var(--primary-color); 
    padding: 0.5rem 1rem;
    &:hover {
      color: var(--color-green-dark);
      transform: scale(1.05); 
    }

    &:active {
      transform: scale(0.95); 
    }
  }

  section{
    margin-top: 15vh;
  }
}

.leaflet-container,
.leaflet-pane,
.leaflet-map-pane {
  z-index: 0; 
}
.hamburger-menu {
  &.open {
    z-index: 1100; 

    span:nth-child(1) {
      transform: rotate(45deg);
      position: absolute;
    }

    span:nth-child(2), span:nth-child(3){
      opacity: 0;
    }

    span:nth-child(4) {
      transform: rotate(-45deg);
      position: absolute;
    }
  }
}

header {
  & .nav {
    #logoheader {
      z-index: 1100; /* Zorg dat het logo boven het menu staat */
    }
  }
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(0.1em);
  z-index: 900;
  opacity: 0;

  pointer-events: none;
}

.menu-overlay.show {
  opacity: 1;
  pointer-events: all;
}

html {
  scroll-behavior: smooth;
}

@media (max-width: 1000px) {
  header {
    .leftheader {
      padding-right: 2rem;
    }
    .nav {
      #navOpties {
        display: none;
      }
      #rightheader {
        margin-right: 0px;
        margin-left: auto;
      }
      align-items: center;
      gap: 1rem;
      .title {
        .title-text {
          display: none;
        }
      }
      .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 10px;
        background: transparent;
        border: none;
        cursor: pointer;
        span {
          display: block;
          width: 40px;
          height: 3px;
          background: var(--primary-color);
          border-radius: 3px;
          transition: transform 0.25s ease, opacity 0.2s ease;
        }
      }
    }

    #navOpties {
      flex-direction: column;
    }
    #navOpties:active {
      display: flex;
    }
  }

  
}

@media (max-width: 767px) {
  footer {
    height: auto;
    padding: 1.5rem 1rem;
    display: grid;
    grid-template-areas: 
      "contact contact"
      "logo marker";
    grid-template-rows: auto auto;
    gap: 1rem;
    align-items: center;

    #logoConFooter {
      grid-area: logo;
      padding-left: 0;
      justify-self: start;
      
      .title span {
        display: none;
      }
      
      #logofooter {
        height: 45px;
        width: 45px;
      }
    }

    #marker {
      grid-area: marker;
      padding-right: 0;
      justify-self: end;
      font-size: 0.85rem;
    }

    #contact {
      grid-area: contact;
      flex-grow: 0;
      width: 100%;
      
      ul {
        gap: 1.5rem;
        justify-content: center;
        flex-wrap: wrap;
      }
    }
  }
}