.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  background-color: transparent;
}

.site-header.scrolled {
  background-color: #181818;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
  padding: 1rem 0;
  transition: padding 0.3s ease;
}

.nav-container {
  max-width: 1580px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.nav-logo {
  flex-shrink: 0;
}

.nav-logo a {
  display: inline-block;
  line-height: 0;
}

.nav-logo img {
  height: 50px;
  width: auto;
  transition: height 0.3s ease;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a:not(.weachieve-button) {
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.3s ease;
  position: relative;
}

.nav-list > li > a.weachieve-button {
  transform: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transform: skew(-9deg);
}

.nav-list > li > a.weachieve-button svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.nav-list > li > a.weachieve-button > * {
  transform: skew(9deg);
}

.nav-list > li > a[href="#"],
.nav-list > li > a[role="button"] {
  cursor: pointer;
}

.nav-list > li > a[href="#"]:not(.weachieve-button),
.nav-list > li > a[role="button"]:not(.weachieve-button) {
  user-select: none;
}

.nav-list a:focus-visible {
  outline: 2px solid #fb273c;
  outline-offset: 4px;
  border-radius: 2px;
}

.site-header .nav-list > li > a {
  color: #fefefe;
}

.nav-list > li a:hover,
.nav-list > li a:focus {
  color: #fb273c;
}

.dropdown-icon {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.has-dropdown[aria-expanded="true"] .dropdown-icon,
.has-dropdown.active .dropdown-icon,
.has-dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% - 6px);
  left: 0;
  background-color: #f8f7f3;
  min-width: 200px;
  width: max-content;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  margin-top: 0.5rem;
  padding: 0.5rem 0;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown.active .dropdown-menu,
.has-dropdown[aria-expanded="true"] .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu li:last-child {
  border-bottom: none;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: #333;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
  background-color: #f8f9fa;
  color: #fb273c;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  border-radius: 4px;
}

.nav-toggle:focus-visible {
  outline: none;
  border-color: #fb273c;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: #fefefe;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.site-header:not(.scrolled) .nav-toggle span {
  background-color: #ffffff;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .nav-list a:focus {
    outline-width: 3px;
  }

  .site-header.scrolled {
    border-bottom: 2px solid #000;
  }
}

.overview-item {
  display: none !important;
}

.mobile-mode .overview-item {
  display: block !important;
}

.is-touch-device .overview-item {
  display: block !important;
}

@media (pointer: coarse) {
  .overview-item {
    display: block !important;
  }
}

/* Mobile Styles */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav-container {
    flex-wrap: wrap;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, box-shadow 0.3s ease;
    order: 3;
  }

  .nav-menu.active {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0 !important;
    width: 100%;
  }

  .nav-list a:focus {
    outline: none;
  }

  .nav-list > li {
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-menu.active .nav-list > li {
    opacity: 1;
    transform: translateY(0);
  }

  /* Staggered animation voor menu items */
  .nav-menu.active .nav-list > li:nth-child(1) {
    transition-delay: 0.05s;
  }
  .nav-menu.active .nav-list > li:nth-child(2) {
    transition-delay: 0.1s;
  }
  .nav-menu.active .nav-list > li:nth-child(3) {
    transition-delay: 0.15s;
  }
  .nav-menu.active .nav-list > li:nth-child(4) {
    transition-delay: 0.2s;
  }
  .nav-menu.active .nav-list > li:nth-child(5) {
    transition-delay: 0.25s;
  }
  .nav-menu.active .nav-list > li:nth-child(6) {
    transition-delay: 0.3s;
  }

  .nav-list > li > a {
    padding: 1rem 2rem !important;
    width: 100%;
    color: #181818 !important;
  }

  .nav-list > li > a.weachieve-button {
    flex-direction: row-reverse;
    justify-content: flex-end;
    border: none;
    font-weight: 400;
  }

  .nav-list > li > a.weachieve-button:hover {
    color: #181818 !important;
    opacity: 1 !important;
  }

  .nav-list > li > a.weachieve-button svg {
    width: 16px;
    height: 16px;
    fill: #181818;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background-color: #f8f9fa;
    margin: 0;
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .dropdown-menu a {
    padding: 0.75rem 2.75rem;
  }

  .has-dropdown.active .dropdown-menu,
  .has-dropdown[aria-expanded="true"] .dropdown-menu {
    display: block;
    max-height: 500px;
  }

  .menu-button {
    margin: 1rem 2rem;
    text-align: center;
    display: block;
    width: calc(100% - 4rem);
  }

  /* Prevent body scroll on mobile when menu is open */
  body.menu-open {
    overflow: hidden;
  }

  /* Smooth dropdown animation op mobile */
  .dropdown-menu {
    width: 100% !important;
    max-width: 100% !important;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .has-dropdown.active .dropdown-menu,
  .has-dropdown[aria-expanded="true"] .dropdown-menu {
    padding: 0.5rem 0;
  }

  /* Hamburger Animation */
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}

/* Tablet Styles */
@media (max-width: 1024px) {
  .nav-list {
    gap: 1.5rem;
  }

  .nav-container {
    padding: 0 1.5rem;
  }
}

/* Print styles */
@media print {
  .site-header {
    position: relative;
    background-color: #fff !important;
    box-shadow: none;
  }

  .nav-toggle {
    display: none;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
  }
}
