header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  padding-top: 28px;
  background: rgba(255, 255, 255, 0);
  transition: all 0.4s ease;
}

@media (min-width: 1024px) {
  header {
    padding-left: 80px;
  }
}

/* Menu Toggle Button */
.menu-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  gap: 2px;
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: flex;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
  }
}

#menuButton {
  background-color: transparent;
  color: #000;
  border: none;
  font-size: 32px;
  padding: 0;
  cursor: pointer;
  transition: color 0.3s ease;
  margin-bottom: 0;
  line-height: 1;
}

#menuButton:hover {
  color: #555;
  background-color: transparent;
}

.menu-text {
  display: none;
}

/* Desktop Navigation */
.desktop-nav {
  display: flex;
  gap: 30px;
  align-items: center;
  margin-left: auto;
  /* Push to the right */
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

nav {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.desktop-nav a {
  text-decoration: none;
  color: #000;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.desktop-nav a:hover {
  color: #f33434;
}

/* Logo Stack */
.logo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  /* Center logo */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}





/* Initial state for logo-bottom */
header.glass-effect {
  background: rgba(140, 140, 140, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-bottom {
  width: 150px;
  opacity: 1;
}



@media (max-width: 1024px) {
  .desktop-nav {
    display: none;
  }

  .logo-stack {
    position: static;
    transform: none;
    margin: 0 auto;
  }
}

.side-menu {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100%;
  background-color: #fff;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  transition: left 0.3s ease-in-out;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.side-menu.open {
  left: 0;
}

.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.side-menu-header .logo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: static;
  transform: none;
  left: auto;
  top: auto;
}

.side-menu-header .logo-bottom {
  width: 100px;
}

.close-menu-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: #333;
  cursor: pointer;
}

.side-menu-nav {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.side-menu-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.side-menu-nav .menu-section {
  margin-bottom: 0;
}

.side-menu-nav li {
  border-bottom: 1px solid #eee;
  width: 100%;
}

.side-menu-nav a {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
  width: 100%;
  color: #333;
}

.primary-section {
  flex: 1;
  background-color: #ffffff;
}

.primary-section a:hover {
  background-color: #f5f5f5;
  color: #f33434;
}

.secondary-section {
  margin-top: auto;
  background-color: #ff0026;
}

.secondary-section li {
  border-bottom: 1px solid #a7001f;
}

.secondary-section a {
  color: #fff;
  padding: 15px 20px;
  display: block;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.secondary-section a:hover {
  background-color: #d90022;
}

/* Overlay for side menu */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#overlay.active {
  opacity: 1;
  pointer-events: auto;
}


/* Responsive adjustments for the header with menu button */
@media (max-width: 768px) {

  /* Center header content and move the menu button to an absolute left position
     so the logo-stack can remain centered on smaller viewports. */
  header {
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
    height: 82px;
  }

  /* keep menu toggle visible and positioned on the left */
  .menu-toggle {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1100;
  }

  /* center logo stack and make logos slightly smaller */
  .logo-stack {
    margin-left: 0;
    margin-right: 0;
    align-items: center;
  }

  .logo-bottom {
    width: 120px;
  }

  .menu-text {
    display: none;
  }
}

@media (max-width: 480px) {
  header {
    height: 78px;
  }

  #menuButton {
    font-size: 20px;
    padding: 6px 8px;
    border-radius: 6px;
  }

  .logo-bottom {
    width: 96px;
  }
}