#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: all 0.3s ease;
  background-color: #f8f6f3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Logo */
.header-logo {
  height: 100%;
  width: auto;
  max-height: 60px;
  opacity: 1;
  transition: opacity 0.3s ease;
  object-fit: contain;
}

/* Logo container */
#main-header a:first-child {
  display: flex;
  align-items: center;
  height: 60px;
}

/* Desktop Navigation - Always on right */
.nav-menu {
  margin-left: auto;
}

.nav-menu ul {
  display: flex;
  gap: 1rem;
  list-style: none;
}

.nav-menu a {
  color: #333333;
  text-decoration: none;
  font-weight: 400;
  font-family: 'Lato', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Navigation links maintain consistent color in scrolled state */

/* Scrolled State */
.header-scrolled {
  background-color: #f5f3f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.header-scrolled .header-logo {
  opacity: 1;
}

/* Mobile Menu Button */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #333333;
  font-size: 24px;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1002;
}

.hamburger.active {
  color: #333333;
}

.header-scrolled .hamburger {
  color: #333333;
}

/* Add Social Buttons Styles */
.menu-socials {
  display: none;
}

.besprekings-button {
  display: none;
}
  
.bespreek-button-text {
  display: none;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;min-height: 100vh; /* Add this */
    min-height: -webkit-fill-available; /* Add this */
    height: 100dvh; /* Replace your existing height: 100dvh with this line */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); /* Add this */
    padding-bottom: 80px; /* Add safe bottom padding */
    background-color: #f8f6f3;
    color: #A6572D;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    text-align: center;
    overflow-y: auto; /* Enable vertical scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }

  .nav-menu.active {
    transform: translateY(0);
    overflow-y: auto;
  }
  
  .nav-menu::before {
    content: '';
    background-image: url('../images/bernice-logo-dark.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 200px;
    height: 50px;
    display: block;
    margin: 2rem auto;
    flex-shrink: 0; /* Prevent logo from shrinking */
  }

  .nav-menu ul {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 1rem 0;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s;
    flex-shrink: 0; /* Prevent list from shrinking */
  }

  .nav-menu.active ul {
    visibility: visible;
    opacity: 1;
  }

  .nav-menu a {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    color: #333333;
    font-weight: 400;
    font-family: 'Lato', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
  }

  /* Social Buttons Styles */
  .menu-socials {
    position: relative; /* Ensure proper stacking */
    bottom: 0;
    padding-bottom: 20px; /* Additional padding at bottom */

    display: none;
    width: 100%;
    padding-top: 1.5rem;
    margin-top: auto; /* Push to bottom */
    flex-shrink: 0; /* Prevent social buttons from shrinking */
  }

  .nav-menu.active .menu-socials {
    display: block;
  }

  .menu-socials-title {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: #333;
    margin-bottom: 1rem;
    text-transform: uppercase;
  }

  .menu-socials-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0 1rem 20px 1rem;
  }

  .menu-socials-container .menu-social-button {
    width: 3rem !important;
    height: 3rem !important;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }

  .besprekings-button {
    display: block;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    max-width: 200px;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Prevent button from shrinking */
  }
  
  .bespreek-button-text {
    display: block;
    color: #333333;
  }
  
  .besprekings-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
  }
}

@media (max-height: 640px) {
 
  .menu-socials {
    padding: 1.5rem;
  }
}

@media (max-height: 630px) {
  .menu-socials {
    display: none !important;
  }
}

