/* Main WP navigation: eight aligned labels, with one site logo in the header. */
body > header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2vw, 30px);
  padding: 12px clamp(20px, 3vw, 56px);
}
body > header > .brand {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}
body > header > .brand .site-logo {
  display: block;
  width: clamp(175px, 16vw, 225px);
  height: 74px !important;
  object-fit: contain;
}
body > header > .mobile-menu {
  display: none;
}
body > header > #primary-nav {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: clamp(3px, .5vw, 9px);
  border: 0;
  order: 0;
}
body > header > #primary-nav > div {
  flex: 0 0 auto;
  min-width: 0;
  position: relative;
}
body > header > #primary-nav > div > button,
body > header > #primary-nav > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 10px clamp(7px, .7vw, 11px);
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  border-radius: 9px;
}
body > header > #primary-nav > div > button {
  color: #30104e;
}
body > header > #primary-nav > a.btn {
  background: #08764c;
  color: #fff;
}
body > header > #primary-nav > div > .dropdown {
  top: 100%;
  left: 0;
  right: auto;
  width: min(290px, 85vw);
  max-height: min(65vh, 620px);
  overflow-y: auto;
}
body > header > #primary-nav > div:nth-last-child(-n + 3) > .dropdown {
  left: auto;
  right: 0;
}

/* Page identity is carried by the title and a relevant photograph. */
.wp-special-brand > .wp-section-identity-image {
  display: block;
  width: 112px !important;
  height: 74px !important;
  object-fit: cover;
  border-radius: 12px;
  background: transparent;
  padding: 0;
}
.wp-section-sidebar .wp-special-sidebar-photo,
.wp-special-sidebar .wp-special-sidebar-photo {
  display: block;
  padding: 0 !important;
  margin: 0;
  background: transparent !important;
}
.wp-special-sidebar-photo > .wp-section-sidebar-image {
  display: block;
  width: 100%;
  height: 155px;
  object-fit: cover;
}
.wp-beseen-brand > .wp-beseen-service-image {
  display: block;
  width: 160px;
  height: 105px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.footer-membership-row .footer-membership-image {
  display: block;
  width: 240px;
  height: 150px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 14px;
}
.wp-brand-context-image {
  display: block;
  width: 100%;
  max-width: 650px;
  max-height: 360px;
  height: auto;
  object-fit: cover;
  border-radius: 14px;
}
.newsroom-brand > .newsroom-channel-image {
  display: block;
  width: 112px;
  height: 70px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 9px;
}
.newsroom-live-screen > .newsroom-screen-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.newsroom-live-screen:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #30104e10, #210b3ccc);
}
.newsroom-live-screen .newsroom-screen-play,
.newsroom-live-screen .newsroom-screen-caption {
  z-index: 1;
}
.newsroom-live-screen .newsroom-screen-caption {
  align-self: end;
}

@media (max-width: 1024px) {
  body > header {
    flex-wrap: wrap;
    gap: 10px 20px;
    padding: 10px 20px;
  }
  body > header > .brand .site-logo {
    width: 190px;
    height: 66px !important;
  }
  body > header > .mobile-menu {
    display: inline-flex;
    min-height: 44px;
    margin-left: auto;
    color: #30104e;
  }
  body > header > #primary-nav {
    display: none;
    flex: 1 0 100%;
    width: 100%;
    order: 3;
    padding: 8px 0 4px;
  }
  body > header > #primary-nav.open {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
  }
  body > header > #primary-nav > div > button,
  body > header > #primary-nav > a {
    width: 100%;
    min-height: 48px;
    padding: 12px 8px;
    font-size: 14px;
    white-space: normal;
    background: #f7f2fa;
  }
  body > header > #primary-nav > div:nth-child(4n) > .dropdown {
    left: auto;
    right: 0;
  }
  .newsroom-brand > .newsroom-channel-image {
    width: 82px;
    height: 58px;
  }
}
@media (max-width: 600px) {
  body > header > .brand .site-logo {
    width: clamp(150px, 48vw, 190px);
  }
  body > header > #primary-nav.open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body > header > #primary-nav > div:nth-child(odd) > .dropdown {
    left: 0;
    right: auto;
  }
  body > header > #primary-nav > div:nth-child(even) > .dropdown {
    left: auto;
    right: 0;
  }
  .wp-special-brand > .wp-section-identity-image {
    width: 86px !important;
    height: 62px !important;
  }
  .footer-membership-row .footer-membership-image {
    width: 100%;
    max-width: 320px;
    height: 175px;
  }
}

/* Compact quick navigation: no decorative plus signs, two rows on phones. */
#wp-utility > details > summary::after,
#wp-utility > details[open] > summary::after {
  content: none !important;
  display: none !important;
}
@media (max-width: 700px) {
  #wp-utility {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto);
    gap: 0 2px;
    padding: 4px 8px;
    align-items: stretch;
  }
  #wp-utility > a,
  #wp-utility > details > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 2px;
    font-size: clamp(8px, 2.4vw, 12px);
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
    margin: 0;
  }
  #wp-utility > [data-teacher-link] { grid-column: span 2; }
  #wp-utility > details { min-width: 0; }
  #wp-utility > details > summary { height: 100%; }
}
@media(max-width:650px){[data-listigram-invite]{grid-template-columns:1fr!important}[data-listigram-invite]>img{max-height:180px;object-fit:cover}}
