/* Scoped to theme wrapper */
.layout-container .ie-header {
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  height: 173px;                 /* Figma */
  display: flex;
  align-items: center;
}

.layout-container .ie-header__inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Logo */
.layout-container .ie-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}

.layout-container .ie-header__logo {
  width: 300px;                  /* Figma */
  height: auto;
  max-width: 100%;
  display: block;
}

/* Nav takes remaining space and right-aligns the menu group */
.layout-container .ie-header__nav {
  flex: 1 1 auto;
  width: auto;
  display: flex;
  align-items: center;
}

/* Wrapper div inside nav contains BOTH menu blocks */
.layout-container .ie-header__nav > div {
  margin-left: auto;             /* push to the far right */
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;                     /* space between main + account */
}

/* Menu ULs */
.layout-container .ie-header__nav ul.ie-menu {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Nav links */
.layout-container .ie-menu__link {
  color: #414141;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;               /* Figma */
}

/* Buttons */
.layout-container .ie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 2px;
  font-weight: 700;
  text-decoration: none;
}

.layout-container .ie-btn--yellow { background: #f2c14b; color: #414141; }
.layout-container .ie-btn--blue { background: #3ea6c3; color: #414141; }

/* Mobile */
@media (max-width: 820px) {
  .layout-container .ie-header {
    height: auto;
    min-height: 120px;
  }

  .layout-container .ie-header__inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .layout-container .ie-header__logo {
    width: 220px;
  }

  .layout-container .ie-header__nav > div {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
  }
}

/* ===== CSS-only burger nav ===== */

/* Hide the checkbox */
.ie-nav-toggle-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Burger button */
.ie-nav-toggle {
  display: none;
  margin-left: auto;
  padding: 10px;
  cursor: pointer;
}

.ie-nav-toggle__icon {
  width: 26px;
  height: 2px;
  background: #2b2b2b;
  position: relative;
  display: block;
}

.ie-nav-toggle__icon::before,
.ie-nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 26px;
  height: 2px;
  background: #2b2b2b;
}

.ie-nav-toggle__icon::before { top: -8px; }
.ie-nav-toggle__icon::after  { top: 8px; }

/* Mobile behaviour */
@media (max-width: 820px) {
  /* Show burger */
  .ie-nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  /* Hide nav by default */
  .ie-header__nav {
    display: none;
    width: 100%;
    margin-top: 10px;
  }

  /* Open when checkbox checked */
  .ie-nav-toggle-checkbox:checked + .ie-nav-toggle + .ie-header__nav {
    display: block;
  }

  /* Stack menus */
  .ie-header__nav > div {
    display: grid;
    gap: 14px;
  }

  .ie-header__nav ul.ie-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  /* Full-width buttons */
  .ie-header__nav .ie-menu__link.ie-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== Mobile burger toggle (CSS-only) ===== */

/* Hide checkbox (but keep it clickable via the label) */
.ie-nav-toggle-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Burger hidden on desktop */
.ie-nav-toggle {
  display: none;
  margin-left: auto;
  padding: 10px;
  cursor: pointer;
}

/* Burger icon */
.ie-nav-toggle__icon {
  width: 26px;
  height: 2px;
  background: #2b2b2b;
  display: block;
  position: relative;
}
.ie-nav-toggle__icon::before,
.ie-nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 26px;
  height: 2px;
  background: #2b2b2b;
}
.ie-nav-toggle__icon::before { top: -8px; }
.ie-nav-toggle__icon::after  { top: 8px; }

@media (max-width: 820px) {
  /* Show burger */
  .ie-nav-toggle { display: inline-flex; align-items: center; }

  /* Hide nav by default on mobile */
  .ie-header__nav { display: none !important; width: 100%; margin-top: 10px; }

  /* Show nav when checkbox checked (matches your exact HTML order) */
  .ie-nav-toggle-checkbox:checked + .ie-nav-toggle + .ie-header__nav {
    display: block !important;
  }

  /* Stack menus when open */
  .ie-header__nav > div {
    display: grid;
    gap: 14px;
  }

  .ie-header__nav ul.ie-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .ie-header__nav .ie-menu__link.ie-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 820px) {
  /* Stack logo + burger + nav vertically */
  .layout-container .ie-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Burger sits on the right of the logo row */
  .layout-container .ie-header__brand {
    width: 100%;
    display: flex;
    align-items: center;
  }

  .layout-container .ie-nav-toggle {
    margin-left: auto;
  }

  /* Open nav sits below and aligns left */
  .layout-container .ie-header__nav.is-open,
  .layout-container .ie-nav-toggle-checkbox:checked + .ie-nav-toggle + .ie-header__nav {
    margin-top: 8px;
  }

  .layout-container .ie-header__nav > div {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
  }

  /* Make menu items tidy/left-aligned */
  .layout-container .ie-header__nav ul.ie-menu {
    align-items: flex-start;
  }

  /* Buttons full-width but constrained */
  .layout-container .ie-header__nav .ie-menu__link.ie-btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

@media (max-width: 820px) {
  .layout-container .ie-header__top {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
  }
}

@media (max-width: 820px) {
  /* Keep header normal height rules you already have; just change the nav behavior */
  .layout-container .ie-nav-toggle { display: inline-flex; align-items: center; }

  /* Hide nav by default on mobile */
  .layout-container .ie-header__nav { display: none; width: 100%; margin-top: 10px; }

  /* Show nav when checked */
  .layout-container .ie-nav-toggle-checkbox:checked + .ie-nav-toggle + .ie-header__nav {
    display: block;
  }

  /* Stack the two menu blocks vertically (main first, account second) */
  .layout-container .ie-header__nav > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  /* Ensure each menu list becomes vertical */
  .layout-container .ie-header__nav ul.ie-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Remove the desktop "push right" behavior for account on mobile */
  .layout-container #block-custom-useraccountmenu {
    margin-left: 0 !important;
  }

  /* Make mobile menu buttons tidy (not fixed 235px here) */
  .layout-container .ie-header__nav .ie-menu__link.ie-btn {
    width: auto;
    max-width: 320px;
    justify-content: center;
  }
}
