/*****************************
 * CONTAINER & WRAPPER
 *****************************/
.mueller-menu {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 997;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.mueller-menu__container {
  position: relative;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 20px 0px 20px;
  transition: pointer-events 0.3s ease-in-out;
}

/* Click-through states */
.mueller-menu.click-through,
.mueller-menu__container.click-through {
  pointer-events: none;
}

.mueller-menu.click-through .mueller-menu__nav,
.mueller-menu.click-through .mueller-menu__overlay--active,
.mueller-menu__container.click-through .mueller-menu__hamburger:not(.hidden-hamburger),
.mueller-menu__container.click-through .mueller-menu__logo:not(.hidden-logo) {
  pointer-events: auto;
}

/*****************************
 * LOGO STYLING
 *****************************/
.mueller-menu__logo {
  padding: 0;
  transition: opacity 0.3s ease-in-out;
  max-width: 100%;
  position: relative;
  z-index: 1; /* Ensure logo has proper stacking context for JS operations */
}

/* IMPORTANT: This rule must come before any media queries to ensure it takes precedence */
.mueller-menu__logo.hidden-logo {
  opacity: 0 !important; /* Force this to override all other opacity settings */
  pointer-events: none !important;
  transition: opacity 0.3s ease-in-out;
}

.mueller-menu__logo-link {
  display: block;
  text-decoration: none;
}

/* Desktop logo - starts at full size */
.mueller-menu__logo .desktop-logo {
  display: block;
  max-width: 100%;
  width: 552px;
  height: auto;
  opacity: 1;
  object-fit: contain;
  object-position: left;
  transition: opacity 0.3s ease-in-out, width 0.3s ease-in-out;
}

/* Mobile logo - hidden by default */
.mueller-menu__logo .mobile-logo {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 100%;
  width: 224px;
  height: auto;
  opacity: 0;
  object-fit: contain;
  object-position: left;
  transition: opacity 0.3s ease-in-out;
}

/* Ensure both logos respect the parent's opacity */
.mueller-menu__logo.hidden-logo .desktop-logo,
.mueller-menu__logo.hidden-logo .mobile-logo {
  opacity: 0 !important; /* Override any media query opacity settings when parent is hidden */
}

/* Ensure container's click-through behavior works */
.mueller-menu__container.click-through .mueller-menu__logo:not(.hidden-logo) {
  pointer-events: auto;
}

/*****************************
 * HAMBURGER BUTTON
 *****************************/


.mueller-menu__hamburger {
  position: absolute;
  top: 36px;
  right: 20px;
  z-index: 1000;
  cursor: pointer;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  display: flex;
  padding: 0;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease;
}

.mueller-menu__hamburger.hidden-hamburger {
  opacity: 0;
  pointer-events: none;
}

.mueller-menu__bar {
  position: absolute;
  width: 30px;
  height: 4px;
  background-color: #bbbcbc;
  display: block;
  z-index: 999;
  transition: all 0.3s ease;
}

.mueller-menu__hamburger .mueller-menu__bar:nth-child(1) {
  top: 0;
}

.mueller-menu__hamburger .mueller-menu__bar:nth-child(2) {
  top: 8px;
}

.mueller-menu__hamburger .mueller-menu__bar:nth-child(3) {
  top: 16px;
}

/* Hamburger to X animation */
.mueller-menu__hamburger.mueller-menu__hamburger--active .mueller-menu__bar:nth-child(1) {
  transform: rotate(45deg);
  top: 8px;
  background-color: #ffffff;
}

.mueller-menu__hamburger.mueller-menu__hamburger--active .mueller-menu__bar:nth-child(2) {
  opacity: 0;
}

.mueller-menu__hamburger.mueller-menu__hamburger--active .mueller-menu__bar:nth-child(3) {
  transform: rotate(-45deg);
  top: 8px;
  background-color: #ffffff;
}

/*****************************
 * OVERLAY (MODAL BACKGROUND)
 *****************************/
.mueller-menu__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 998;
}

.mueller-menu__overlay--active {
  opacity: 1;
  pointer-events: all;
}

/*****************************
 * NAVIGATION
 *****************************/
.mueller-menu__nav {
  background: #272727;
  height: 100vh;
  padding: 1.875rem 2.5rem;
  position: fixed;
  right: 0;
  top: 0;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  width: 300px;
  z-index: 999;
}

.mueller-menu__nav--active {
  transform: translateX(0);
}

/* Navigation list styling */
.mueller-menu__nav ul {
  list-style: none;
  margin-top: 3.125rem;
  padding: 0;
}

.mueller-menu__nav li {
  margin-bottom: 1rem;
}

.mueller-menu__nav a {
  font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
  color: #fff;
  font-size: .8125rem;
  line-height: 1.125rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}

/*****************************
 * DONATE BUTTON
 *****************************/
.mueller-menu .button:active, 
.mueller-menu .button:focus, 
.mueller-menu .button:hover, 
.mueller-menu button:active, 
.mueller-menu button:focus, 
.mueller-menu button:hover {
  background: none;
  border: none;
}

.mueller-menu__donate-button {
  position: relative;
  margin-top: 1.875rem;
  padding: .65625rem 1.125rem;
  padding-right: 2.578125rem;
  background-color: #f08122;
  color: #fff;
  border-radius: 3px;
  font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
  color: #fff;
  font-size: .8125rem;
  line-height: 1.125rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.mueller-menu__donate-button:after {
  speak: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #e56510;
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: 0.9em;
  content: "\e902";
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: icons-cc-magazine !important;
  font-size: 1rem;
  font-style: normal;
  font-variant: normal;
  font-weight: 400;
  height: 100%;
  line-height: 1;
  padding: 0;
  position: absolute;
  top: 0;
  right: 0;
  bottom; 0;
  text-transform: none;
  transition: all 0.3s ease-in-out;
  height: 100%;
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
  width: 1.875rem;
}

.mueller-menu__donate-button:hover {
  background: #f28f3a;
  color: white;
  text-decoration: none;
}

.mueller-menu__donate-button:hover:after,
.mueller-menu__donate-button:focus:after {
  width: 2.109375rem;
  background-color: #f08122; 
  border-top-right-radius: 3px; 
  border-bottom-right-radius: 3px;
}

/*****************************
 * RESPONSIVE STYLING
 *****************************/

/* Increase nav width on larger screens */
@media (min-width: 576px) {
  .mueller-menu__nav {
    width: 360px; /* 22.5rem = 360px */
    text-align: left;
  }
}


/* Progressive width scaling for desktop logo */
@media (max-width: 1024px) {
  .mueller-menu__logo .desktop-logo {
    width: 450px;
  }
}

@media (max-width: 900px) {
  .mueller-menu__logo .desktop-logo {
    width: 380px;
  }
}

@media (max-width: 800px) {
  .mueller-menu__logo .desktop-logo {
    width: 320px;
  }
}

/* Mobile adjustments at 768px and below */
@media (max-width: 768px) {
  /* Container adjustments */
  .mueller-menu__container {
    padding: 20px 15px 0px 15px;
  }
  
  /* Hamburger position */
  .mueller-menu__hamburger {
    top: 20px;
    right: 15px;
  }
  
  /* Logo transitions */
  .mueller-menu__logo .desktop-logo {
    opacity: 0;
    position: absolute;
    pointer-events: none;
  }
  
  .mueller-menu__logo .mobile-logo {
    display: block;
    opacity: 1;
    position: static;
    pointer-events: auto;
  }
}