/* UKIEE 2027 v2.0.266 — responsive catalogue-tab repair.
   Loaded after the single compiled exhibition stylesheet. No changes to page bodies or forms. */
.site-header .site-header__inner,
.site-header .primary-nav,
.site-header .primary-nav .menu { min-width: 0; }
.site-header .primary-nav a { text-decoration: none; }

/* Seven navigation tabs need the entire container width, not the space left beside a logo. */
@media (min-width:1180px) {
  .site-header .site-header__inner {
    box-sizing: border-box;
    width: min(calc(100% - 3rem), 1280px);
    max-width: 1280px;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 78px auto;
    row-gap: 0;
    align-items: center;
    padding: 9px 0 0;
  }
  .site-header .site-branding { grid-column: 1; grid-row: 1; justify-self: start; }
  .site-header .site-branding img { width: 220px; max-width: 220px; max-height: 66px; }
  .site-header .primary-nav {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    display: block;
    overflow: visible;
  }
  .site-header .primary-nav .menu {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: clamp(.15rem, .4vw, .65rem);
    margin: 0;
    padding: 0 0 10px;
    width: 100%;
    list-style: none;
  }
  .site-header .primary-nav .menu > li { display: block; flex: 0 1 auto; min-width: 0; }
  .site-header .primary-nav .menu > li > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .7rem clamp(.42rem, 1vw, .9rem);
    min-height: 45px;
    border-radius: 5px;
    white-space: nowrap;
    line-height: 1.2;
    font-size: clamp(.82rem, .9vw, .97rem);
    font-weight: 600;
  }
  .site-header .primary-nav .menu > li > a:hover,
  .site-header .primary-nav .menu > li > a:focus-visible { background: #eff4f9; }
  .site-header .menu-toggle { display:none; }
}

/* The catalogue tab is identifiable, consistent with the existing navy palette. */
.site-header .primary-nav .menu > li.menu-item--catalogue > a {
  color: #061f4a;
  background: #eef4fa;
  border: 1px solid #cbdaea;
  font-weight: 700;
}
.site-header .primary-nav .menu > li.menu-item--catalogue > a:hover,
.site-header .primary-nav .menu > li.menu-item--catalogue > a:focus-visible,
.site-header .primary-nav .menu > li.menu-item--catalogue > a[aria-current="page"] {
  color: #fff;
  background: #061f4a;
  border-color: #061f4a;
}

@media (max-width:1179px) {
  .site-header .site-header__inner {
    width: min(calc(100% - 2rem), 1120px);
    max-width: 1120px;
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 10px 0;
  }
  .site-header .primary-nav {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    top: var(--iee-mobile-nav-top, 84px);
    max-height: min(78vh, calc(100dvh - 90px));
    overflow-x: hidden;
    overflow-y: auto;
    padding: .5rem 1.5rem 1rem;
    background: #fff;
    z-index: 1205;
  }
  .site-header .primary-nav.is-simple-open { display: block; }
  .site-header .primary-nav .menu { display: block; margin:0; padding:0; list-style:none; }
  .site-header .primary-nav .menu > li { display:block; width:100%; }
  .site-header .primary-nav .menu > li > a {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: .73rem .85rem;
    font-size: .98rem;
    border-bottom: 1px solid #e6edf5;
  }
  .site-header .primary-nav .menu > li.menu-item--catalogue > a { margin:.35rem 0; border-radius:5px; }
  .site-header .menu-toggle { display: block; flex-shrink: 0; }
}

/* A usable header without JavaScript: the browser still exposes every link. */
@media (max-width:1179px) {
  body.iee-menu-no-js .site-header .primary-nav { display:block; position:static; width:100%; max-height:none; }
}
