.scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Mobile menu animation */
#mobile-menu {
  transition: opacity 0.3s ease;
}

#mobile-menu.hidden {
  display: none;
  opacity: 0;
}

#mobile-menu:not(.hidden) {
  display: flex;
  opacity: 1;
}

/* Back to top button animation */
#back-to-top {
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

#back-to-top:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Fix for preventing content jump when overflow is toggled */
body.overflow-hidden {
  padding-right: var(--scrollbar-width, 0);
}

/* Prevent mobile menu links from being too close to the bottom on small screens */
@media (max-height: 640px) {
  #mobile-menu nav {
    margin-top: 4rem;
  }
}

