/* ============================================================
   Header hierarchy refinement â€” v37 enhancement layer
   Loaded after legacy styles and home refinements.
   ============================================================ */

/* â”€â”€ Banner shell â”€â”€ */
.gd-banner {
  border-top-width: 3px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  transition: box-shadow var(--gd-transition-base, 240ms ease);
}

.gd-banner.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.13);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* â”€â”€ Content wrapper â”€â”€ */
.gd-banner__content {
  width: min(1200px, calc(100% - 40px));
  padding: 0 !important;
}

/* â”€â”€ Main triptych row â”€â”€ */
.gd-banner__main {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 300px) auto;
  gap: clamp(0.9rem, 2vw, 1.6rem);
  min-height: 88px;
  padding: 0.4rem 0 !important;
}

/* â”€â”€ CRMD logo â”€â”€ */
.gd-banner__logo {
  width: min(460px, 100%) !important;
  height: 82px !important;
}

/* â”€â”€ University logo â”€â”€ */
.gd-banner__ub-logo {
  width: 100%;
  max-width: 300px !important;
  height: 62px !important;
}

/* â”€â”€ Language switcher â”€â”€ */
.gd-language-switch {
  align-self: center;
  gap: 0.3rem;
  padding-left: 0.2rem;
}

.gd-language-switch > a,
.gd-language-switch > span {
  width: 34px !important;
  height: 34px !important;
  padding: 4px !important;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: none;
  transition: border-color var(--gd-transition-fast, 160ms ease),
              box-shadow var(--gd-transition-fast, 160ms ease),
              transform var(--gd-transition-fast, 160ms ease);
}

.gd-language-switch > a:hover {
  transform: scale(1.08);
  border-color: rgba(0, 0, 0, 0.28);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gd-language-switch [aria-current="page"] {
  border-color: var(--gd-terracotta);
  box-shadow: inset 0 0 0 1px rgba(189, 9, 44, 0.12);
}

.gd-language-flag {
  width: 22px !important;
  height: 22px !important;
  box-shadow: none;
}

/* â”€â”€ Primary navigation bar â”€â”€ */
.gd-banner__nav {
  justify-content: center;
  min-height: 42px !important;
  padding: 0;
  border-radius: 0;
  background: var(--gd-ocean);
  box-shadow: none;
  font-size: 0.78rem !important;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.gd-banner__nav a {
  min-height: 42px !important;
  padding: 0.8rem clamp(0.85rem, 1.6vw, 1.2rem) !important;
  border-right: 0 !important;
  border-top: 3px solid transparent !important; border-bottom: none !important;
  color: rgba(255, 255, 255, 0.84);
  transition: background-color var(--gd-transition-fast, 160ms ease),
              color var(--gd-transition-fast, 160ms ease),
              border-color var(--gd-transition-fast, 160ms ease);
}

.gd-banner__nav a::after {
  content: none;
}

.gd-banner__nav a:hover,
.gd-banner__nav a:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-top-color: var(--gd-terracotta) !important;
}

.gd-banner__nav a.active,
.gd-banner__nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-top-color: var(--gd-terracotta) !important;
}

/* â”€â”€ Medium breakpoint â”€â”€ */
@media (max-width: 980px) {
  .gd-banner__main {
    grid-template-columns: minmax(0, 1fr) minmax(205px, 250px) auto;
    min-height: 74px;
    gap: 0.75rem;
  }

  .gd-banner__logo {
    width: min(370px, 100%) !important;
    height: 60px !important;
  }

  .gd-banner__ub-logo {
    max-width: 230px !important;
    height: 50px !important;
  }

  .gd-banner__nav,
  .gd-banner__nav a {
    min-height: 40px !important;
  }

  .gd-banner__nav {
    font-size: 0.73rem !important;
  }
}

/* â”€â”€ Mobile breakpoint â”€â”€ */
@media (max-width: 720px) {
  .gd-banner__content {
    width: min(1200px, calc(100% - 32px));
  }

  .gd-banner__main {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) auto;
    min-height: 54px;
    gap: 0.3rem;
    padding: 0.3rem 0 !important;
  }

  .gd-banner__logo,
  .gd-banner__ub-logo {
    height: 40px !important;
  }

  .gd-banner__logo {
    width: 100% !important;
  }

  .gd-banner__ub-logo {
    max-width: none !important;
  }

  .gd-language-switch > a,
  .gd-language-switch > span {
    width: 30px !important;
    height: 30px !important;
  }

  .gd-language-flag {
    width: 18px !important;
    height: 18px !important;
  }

  .gd-banner__nav {
    justify-content: center;
    min-height: 38px !important;
    padding: 0;
    font-size: 0.65rem !important;
    letter-spacing: 0.04em;
  }

  .gd-banner__nav a {
    min-height: 38px !important;
    padding: 0.6rem 0.4rem !important;
  }
}

