/* DAADScholarship header refresh. Scoped to this active child only. */
body.ds-header-refresh #theme-header,
body.ds-header-refresh #header-notification-bar {
  --ds-header-paper: #f5f6f7;
  --ds-header-ink: #070f24;
  --ds-header-accent: #102a50;
  --ds-header-active: #b42336;
  --ds-header-rule: #cfd2d5;
  --ds-header-gradient: linear-gradient(135deg, #070f24 0%, #102a50 52%, #183b68 100%);
}

/* Only the requested header surfaces receive this palette. */
body.ds-header-refresh #theme-header #top-nav,
body.ds-header-refresh #header-notification-bar {
  background: #102a50 !important;
  background-image: var(--ds-header-gradient) !important;
  color: #f5f6f7 !important;
  border-color: rgb(245 246 247 / 20%) !important;
}
body.ds-header-refresh #theme-header #top-nav .topbar-wrapper {
  background: transparent !important;
  color: #f5f6f7 !important;
  border-color: rgb(245 246 247 / 20%) !important;
}
body.ds-header-refresh #theme-header #top-nav .topbar-today-date,
body.ds-header-refresh #theme-header #top-nav .topbar-today-date a,
body.ds-header-refresh #theme-header #top-nav .top-menu > ul > li > a,
body.ds-header-refresh #theme-header #top-nav .components > li > a,
body.ds-header-refresh #theme-header #top-nav .breaking-news a,
body.ds-header-refresh #theme-header #top-nav .ticker-content,
body.ds-header-refresh #theme-header #top-nav .ticker-content a,
body.ds-header-refresh #header-notification-bar p,
body.ds-header-refresh #header-notification-bar p a {
  color: #f5f6f7 !important;
}
body.ds-header-refresh #theme-header #top-nav .top-menu > ul > li > a:hover,
body.ds-header-refresh #theme-header #top-nav .top-menu > ul > li > a:focus-visible,
body.ds-header-refresh #theme-header #top-nav .breaking-news a:hover,
body.ds-header-refresh #theme-header #top-nav .ticker-content a:hover {
  color: #fff !important;
  background-color: rgb(245 246 247 / 10%) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Opaque ticker layers preserve Jannah's existing reveal animation. */
body.ds-header-refresh #theme-header #top-nav .ticker-content,
body.ds-header-refresh #theme-header #top-nav .ticker-swipe {
  background: #102a50 !important;
}
body.ds-header-refresh #theme-header #top-nav .top-menu .sub-menu {
  background: #102a50 !important;
  border-color: rgb(245 246 247 / 20%) !important;
}
body.ds-header-refresh #theme-header #top-nav .top-menu .sub-menu a {
  color: #f5f6f7 !important;
  border-color: rgb(245 246 247 / 20%) !important;
}
body.ds-header-refresh #theme-header #top-nav .top-menu .sub-menu a:hover,
body.ds-header-refresh #theme-header #top-nav .top-menu .sub-menu a:focus-visible {
  color: #fff !important;
  background-color: rgb(245 246 247 / 10%) !important;
}
body.ds-header-refresh #theme-header #top-nav .breaking-title,
body.ds-header-refresh #theme-header #top-nav .breaking-title span {
  color: #f5f6f7 !important;
}
body.ds-header-refresh #theme-header #top-nav .breaking-title::before {
  background: rgb(245 246 247 / 14%) !important;
}
body.ds-header-refresh #theme-header #top-nav .breaking-news-nav li {
  color: #f5f6f7 !important;
  border-color: rgb(245 246 247 / 36%) !important;
}
body.ds-header-refresh #theme-header #top-nav .breaking-news-nav li:hover {
  color: #fff !important;
  background: rgb(245 246 247 / 16%) !important;
  border-color: rgb(245 246 247 / 60%) !important;
}
body.ds-header-refresh #header-notification-bar .container > .button {
  background: #f5f6f7 !important;
  color: #102a50 !important;
  border-color: #f5f6f7 !important;
}
body.ds-header-refresh #header-notification-bar .container > .button:hover,
body.ds-header-refresh #header-notification-bar .container > .button:focus-visible {
  background: #fff !important;
  color: #070f24 !important;
  border-color: #fff !important;
}
body.ds-header-refresh #theme-header > .header-container,
body.ds-header-refresh #theme-header > .main-nav-wrapper,
body.ds-header-refresh #theme-header .header-layout-1-logo {
  background: var(--ds-header-paper);
}
body.ds-header-refresh #theme-header #logo {
  max-width: 100%;
  line-height: 1;
}
body.ds-header-refresh #theme-header #logo > a {
  max-width: 100%;
}
body.ds-header-refresh #theme-header #logo .tie-logo-img {
  display: block;
  height: auto !important;
  max-width: 100% !important;
}
/* A compact ds mark uses the parent's existing sticky-logo wrapper and link. */
body.ds-header-refresh #theme-header #sticky-logo > a > .tie-logo-picture {
  display: none !important;
}
body.ds-header-refresh #theme-header #sticky-logo .ds-header-sticky-mark {
  display: inline-block;
  width: 40px !important;
  height: 40px !important;
  max-width: 40px;
  padding: 0;
  margin-inline-end: 12px;
  top: 0;
  vertical-align: middle;
}
body.ds-header-refresh #theme-header #main-nav {
  --main-nav-background: #f5f6f7;
  --main-nav-secondry-background: #eceef0;
  --main-nav-primary-color: #102a50;
  --main-nav-contrast-primary-color: #ffffff;
  --main-nav-text-color: #070f24;
  --main-nav-secondry-text-color: #495362;
  --main-nav-main-border-color: #070f24;
  --main-nav-secondry-border-color: #cfd2d5;
  background: var(--ds-header-paper) !important;
  color: var(--ds-header-ink);
  box-shadow: none;
}
body.ds-header-refresh #theme-header #main-nav .main-menu > ul > li > a,
body.ds-header-refresh #theme-header #main-nav #main-nav-menu > ul > li > a {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  background: transparent !important;
  color: var(--ds-header-ink);
  text-shadow: none;
}
/* Match the ID-based base selector so states also win over legacy colours. */
body.ds-header-refresh #theme-header #main-nav #main-nav-menu > ul > li:hover > a,
body.ds-header-refresh #theme-header #main-nav #main-nav-menu > ul > li > a:focus-visible {
  color: var(--ds-header-accent) !important;
  background: rgb(16 42 80 / 6%) !important;
  box-shadow: inset 0 -2px 0 var(--ds-header-accent);
}
body.ds-header-refresh #theme-header #main-nav #main-nav-menu > ul > li:is(.tie-current-menu, .current-menu-item, .current-menu-ancestor, .current-menu-parent, .current_page_item, .current_page_parent, .current_page_ancestor) {
  border-top-color: var(--ds-header-active) !important;
  border-bottom-color: var(--ds-header-active) !important;
}
body.ds-header-refresh #theme-header #main-nav #main-nav-menu > ul > li:is(.tie-current-menu, .current-menu-item, .current-menu-ancestor, .current-menu-parent, .current_page_item, .current_page_parent, .current_page_ancestor) > a {
  --main-nav-primary-color: #b42336;
  color: var(--ds-header-active) !important;
  background: rgb(180 35 54 / 5%) !important;
  box-shadow: inset 0 -2px 0 var(--ds-header-active);
}
body.ds-header-refresh #theme-header #main-nav #main-nav-menu > ul > li > a:active {
  --main-nav-primary-color: #b42336;
  color: var(--ds-header-active) !important;
  background: rgb(180 35 54 / 10%) !important;
  box-shadow: inset 0 -3px 0 var(--ds-header-active);
}
body.ds-header-refresh #theme-header #main-nav .ds-header-navigator {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 6px;
  color: var(--ds-header-accent);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  margin-inline-start: auto;
  padding: 0 0 0 22px;
  min-height: 44px;
  line-height: 1.4;
  font-size: 18px;
  white-space: nowrap;
  cursor: pointer;
}
body.ds-header-refresh #theme-header #main-nav .ds-header-navigator:hover,
body.ds-header-refresh #theme-header #main-nav .ds-header-navigator:focus-visible {
  color: var(--ds-header-accent);
  background: rgb(16 42 80 / 6%);
  box-shadow: inset 0 -2px 0 var(--ds-header-accent);
}
body.ds-header-refresh #theme-header #main-nav .ds-header-navigator:active {
  color: var(--ds-header-active);
  background: rgb(180 35 54 / 10%);
  box-shadow: inset 0 -3px 0 var(--ds-header-active);
}
body.ds-header-refresh #theme-header #main-nav .ds-header-navigator:focus-visible,
body.ds-header-refresh #theme-header #main-nav #main-nav-menu > ul > li > a:focus-visible {
  outline: 2px solid var(--ds-header-accent);
  outline-offset: 3px;
}

@media (min-width: 992px) {
  body.ds-header-refresh #theme-header {
    /* The top bar retains its own background; this fills masthead gutters. */
    background-color: var(--ds-header-paper) !important;
    background-image: none !important;
  }
  body.ds-header-refresh #theme-header > .header-container .logo-row {
    margin-top: 18px;
    border-top: 1px solid var(--ds-header-rule);
  }
  body.ds-header-refresh #theme-header > .header-container #logo {
    float: none;
    margin: 30px 0 !important;
    text-align: start;
  }
  body.ds-header-refresh #theme-header > .header-container #logo > a {
    display: inline-block;
    width: min(600px, 100%);
  }
  body.ds-header-refresh #theme-header > .header-container #logo .tie-logo-img {
    width: 100% !important;
    max-height: none !important;
    margin: 0;
  }
  body.ds-header-refresh #theme-header.no-stream-item > .header-container .logo-container,
  body.ds-header-refresh #theme-header.header-layout-2 > .header-container .logo-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }
  body.ds-header-refresh #theme-header.no-stream-item > .header-container #logo,
  body.ds-header-refresh #theme-header.header-layout-2 > .header-container #logo {
    flex: 1 1 auto;
    min-width: 0;
  }
  body.ds-header-refresh #theme-header #main-nav:not(.fixed-nav) {
    border-top: 4px solid var(--ds-header-accent);
    border-bottom: 1px solid var(--ds-header-accent);
    border-image: var(--ds-header-gradient) 1;
    line-height: 68px;
  }
  body.ds-header-refresh #theme-header #main-nav #menu-components-wrap {
    align-items: center;
    justify-content: space-between;
  }
  body.ds-header-refresh #theme-header #main-nav:not(.fixed-nav) .main-menu > ul > li > a,
  body.ds-header-refresh #theme-header #main-nav:not(.fixed-nav) #main-nav-menu > ul > li > a {
    padding-inline: 22px;
    font-size: 18px;
  }
  body.ds-header-refresh #theme-header #main-nav:not(.fixed-nav) .main-menu > ul > li:first-child > a {
    padding-inline-start: 0;
  }
  body.ds-header-refresh #theme-header #main-nav .main-menu > ul > li > a::after {
    border-color: currentColor;
  }
  body.ds-header-refresh #theme-header #main-nav.fixed-nav {
    border-image: none;
    border-bottom: 1px solid var(--ds-header-rule);
  }
  body.ds-header-refresh #theme-header #main-nav.fixed-nav .main-menu > ul > li > a {
    font-size: 15px;
  }
  body.ds-header-refresh #theme-header #main-nav.fixed-nav .ds-header-navigator {
    font-size: 15px;
  }
  /* For layouts with the logo embedded in the nav, keep their native flow. */
  body.ds-header-refresh #theme-header.header-layout-1 .header-layout-1-logo,
  body.ds-header-refresh #theme-header.header-layout-4 .header-layout-1-logo {
    min-width: 0;
    max-width: 340px;
    padding-inline-end: 22px;
  }
  body.ds-header-refresh #theme-header.header-layout-1 #logo .tie-logo-img,
  body.ds-header-refresh #theme-header.header-layout-4 #logo .tie-logo-img {
    max-width: 340px !important;
    width: 100% !important;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  body.ds-header-refresh #theme-header #main-nav:not(.fixed-nav) .main-menu > ul > li > a,
  body.ds-header-refresh #theme-header #main-nav:not(.fixed-nav) #main-nav-menu > ul > li > a {
    font-size: 16px;
    padding-inline: 15px;
  }
  body.ds-header-refresh #theme-header #main-nav .ds-header-navigator {
    font-size: 16px;
    padding-inline-start: 15px;
  }
}

@media (max-width: 991px) {
  /* Native mobile controls and menu visibility continue to be owned by Jannah. */
  body.ds-header-refresh #theme-header .logo-container,
  body.ds-header-refresh #theme-header.header-layout-1 .main-menu-wrapper {
    background: var(--ds-header-paper) !important;
    color: var(--ds-header-ink);
    box-shadow: none;
    border-bottom: 1px solid var(--ds-header-rule);
    min-width: 0;
  }
  body.ds-header-refresh #theme-header .logo-container {
    flex-wrap: wrap;
    column-gap: 0;
    row-gap: 0;
  }
  body.ds-header-refresh #theme-header #logo {
    flex: 1 1 0%;
    min-width: 0;
    margin-block: 19px !important;
    text-align: start;
  }
  body.ds-header-refresh #theme-header .logo-container > .mobile-header-components {
    flex: 0 0 auto;
    width: auto;
    margin-inline-start: auto;
  }
  body.ds-header-refresh #theme-header .logo-container .mobile-header-components > .components > li > a {
    color: var(--ds-header-ink);
  }
  body.ds-header-refresh #theme-header .logo-container .mobile-header-components .nav-icon,
  body.ds-header-refresh #theme-header .logo-container .mobile-header-components .nav-icon::before,
  body.ds-header-refresh #theme-header .logo-container .mobile-header-components .nav-icon::after {
    background-color: var(--ds-header-ink);
  }
  body.ds-header-refresh #theme-header #logo > a {
    display: block;
    width: 100%;
  }
  body.ds-header-refresh #theme-header #logo .tie-logo-img {
    width: min(285px, 100%) !important;
    max-width: 100% !important;
    max-height: none !important;
    margin-inline: 0;
  }
}

@media (max-width: 480px) {
  body.ds-header-refresh #theme-header #logo .tie-logo-img {
    width: min(230px, 100%) !important;
  }
}
