header {
    max-width: 1920px;
    position: sticky;
    top:0;
    z-index: 1000; /* ensure it stays on top */
}

nav {
    display: flex;
    padding: 12px 24px;
    justify-content: space-between;
    align-items: center;
    transition: padding 1s;
    background-color: var(--main-bg-color);
    color: var(--dark-bg-color);
}

.logo-header {
    height: 48px;
    width: auto;
}

.inline-menu > ul > li {
    display: inline-block;
    list-style-type: none;
    padding: 16px 8px;
}

.inline-menu > ul > li:hover {
    transform: scale(1.05);
    transition: transform .3s ease;
}

/* Sidebar Menu */
.off-screen-menu {
    background: var(--light-text-color);
    border-radius: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    color: #f9f9f9;
    height: 84vh;
    width: 94vw;
    display: flex;
    position: fixed;
    top: 54%;
    left: 50%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.5rem;
    transform-origin: center;
    transform: translate(-50%, -50%) scale(0);
    transition: .3s ease;
    z-index: 999;
}

.off-screen-menu.active {
    transform: translate(-50%, -50%) scale(1);
}

.burger-menu-btn {
    height: 24px;
    width: 24px;
    position: relative;
    display: none;
}

.burger-menu-btn span {
    height: 2px;
    width: 100%;
    background-color: var(--brand-color);
    border-radius: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: .3s ease;
}

.burger-menu-btn span:nth-child(1) {
    top: 25%;
}

.burger-menu-btn span:nth-child(3) {
    top: 75%;
}

.burger-menu-btn.active span:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    background-color: #96a4b1;
}

.burger-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu-btn.active span:nth-child(3) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    background-color: #96a4b1;
}

#menu > ul > li {
    list-style-type: none;
    padding: 8px 12px;
    text-decoration: none;
    transition: transform .3s ease;
    position: relative;
}

#menu > ul > li:hover {
    transform: scale(1.05);
    transition: .3s ease;
}

#menu > ul > li > a, .inline-menu > ul > li > a, .dropbtn, .dropdown-content a {
    text-decoration: none;
    font-weight: 600;
}

#menu > ul > li a {
    color: var(--dark-bg-color);
    transition: transform .3s ease;
}

#menu > ul > li a:hover {
    transform: scale(1.05);
}

.accordion {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-bg-color);
    background: transparent;
    border: none;
    transition: 0.4s;
}

.accordion:hover {
    transform: none;
}

#arrow {
    border: solid var(--dark-bg-color);
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: 3px;
    border-radius: 2px;
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    transition: 0.2s ease;
}

.panel {
    background-color: transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    position: static;  /* keep in document flow */
}
.panel a {
    display: block;
    text-decoration: none;
    font-size: 1.25rem;
    padding: 0 1rem;
}
.accordion + .active .panel {
    max-height: 500px;
}

.inline-menu > ul > li > a, .dropbtn {
    color: var(--dark-bg-color);
}

/* Dropdown Menu */
.dropbtn {
  background-color: transparent;
  font-size: 1rem;
  border: none;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--light-text-color);
  border-radius: 12px;
  min-width: 200px;
  overflow: hidden;
  box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.1);
  z-index: 1;
  /* top: 100%; */
  left: -50%;
  margin-top: 0.5rem;
  text-align: center;
  transition: all 0.2s ease;
}

.dropdown-content a {
  padding: 12px 16px;
  display: block;
  color: var(--dark-bg-color);
  transition: all 0.2s ease;
}

.dropdown-content a:hover {color: var(--brand-color);}

.dropdown:hover .dropdown-content {display: block;}

@media (max-width:480px) {
    nav {
        padding: 8px 16px;
    }
}

@media (max-width:768px) {
    .inline-menu {
        display: none;
    }

    .burger-menu-btn {
        display: block;
    }
}