/* MTC site header and footer. Colours come from the LMS token file. */

:root {
  --mtc-navy: #16256B;
  --mtc-red:  #D3202A;
}

.mtc-site-header { background: #fff; border-bottom: 1px solid var(--mtc-line, #E5DEEA); position: relative; z-index: 20; }

/* ---------- top strip ---------- */
.mtc-topbar { background: var(--mtc-plum, #3D0B60); color: #fff; font-size: 12.5px; }
.mtc-topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 7px; padding-bottom: 7px;
}
.mtc-topbar-note { opacity: .85; }
.mtc-topbar-link {
  color: #fff; text-decoration: none; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.mtc-topbar-link:hover { color: var(--mtc-gold, #C8811B); }

/* ---------- main bar ---------- */
.mtc-header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-top: 14px; padding-bottom: 14px;
}
.mtc-brand { display: flex; align-items: center; gap: 13px; text-decoration: none; min-width: 0; }
.mtc-brand-mark { width: 50px; height: auto; flex: 0 0 auto; }
.mtc-brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.mtc-brand-name {
  font-size: 17px; font-weight: 800; letter-spacing: -.01em;
  color: var(--mtc-navy); text-transform: uppercase;
}
.mtc-brand-sub {
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--mtc-purple, #6B2B8F); margin-top: 2px;
}

.mtc-primary-nav { display: flex; align-items: center; gap: 26px; }
.mtc-menu { list-style: none; display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; }
.mtc-menu a {
  color: var(--mtc-ink, #221A28); text-decoration: none;
  font-size: 14.5px; font-weight: 600; padding: 6px 0; display: inline-block;
  border-bottom: 2px solid transparent;
}
.mtc-menu a:hover { color: var(--mtc-purple, #6B2B8F); border-bottom-color: var(--mtc-purple, #6B2B8F); }
.mtc-menu .current-menu-item > a { color: var(--mtc-plum, #3D0B60); border-bottom-color: var(--mtc-gold, #C8811B); }

.mtc-header-actions { display: flex; align-items: center; gap: 9px; }

.mtc-navtoggle {
  display: none; background: none; border: 1px solid var(--mtc-line, #E5DEEA);
  border-radius: 9px; padding: 8px 10px; cursor: pointer; color: var(--mtc-plum, #3D0B60);
}
.mtc-navtoggle:focus-visible, .mtc-topbar-link:focus-visible, .mtc-brand:focus-visible {
  outline: 2px solid var(--mtc-gold, #C8811B); outline-offset: 2px;
}
/* ---------- footer ---------- */
.mtc-site-footer { background: var(--mtc-plum, #3D0B60); color: #EBE2F1; margin-top: 60px; }
.mtc-site-footer a { color: #EBE2F1; text-decoration: none; }
.mtc-site-footer a:hover { color: var(--mtc-gold, #C8811B); text-decoration: underline; }

.mtc-footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1.4fr 1fr;
  gap: 40px; padding-top: 52px; padding-bottom: 44px;
}
.mtc-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; }
.mtc-footer-head {
  font-size: 11.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--mtc-gold, #C8811B); margin: 0 0 16px;
}
.mtc-footer-mark { width: 62px; height: auto; margin-bottom: 14px; }
.mtc-footer-name { margin: 0; font-size: 16px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: .01em; }
.mtc-footer-tagline { margin: 8px 0 0; font-size: 14px; font-style: italic; opacity: .82; max-width: 30ch; }
.mtc-footer-contact { line-height: 1.6; }
.mtc-footer-contact li { opacity: .92; }
.mtc-footer-accred { text-align: left; }
.mtc-dherst {
  width: 92px; height: auto; background: #fff; border-radius: 50%;
  padding: 5px; display: block; margin-bottom: 12px;
}
.mtc-footer-small { font-size: 12.5px; opacity: .72; margin: 0; line-height: 1.55; }

.mtc-footer-base { border-top: 1px solid rgba(255,255,255,.14); }
.mtc-footer-base-inner {
  display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px; font-size: 13px;
}
.mtc-footer-base-inner p { margin: 0; opacity: .8; }

/* the course player renders its own shell, so no site chrome there */
.mtc-player-html .mtc-site-header, .mtc-player-html .mtc-site-footer { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .mtc-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 860px) {
  .mtc-navtoggle { display: inline-flex; }
  .mtc-primary-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--mtc-line, #E5DEEA);
    box-shadow: 0 18px 40px -22px rgba(61,11,96,.4);
    flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 18px;
  }
  .mtc-primary-nav.is-open { display: flex; }
  .mtc-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .mtc-menu a { padding: 12px 0; border-bottom: 1px solid var(--mtc-line, #E5DEEA); }
  .mtc-menu a:hover { border-bottom-color: var(--mtc-line, #E5DEEA); }
  .mtc-header-actions { padding-top: 14px; }
  .mtc-header-actions .mtc-button { flex: 1; justify-content: center; }
  .mtc-topbar-note { display: none; }
  .mtc-topbar-inner { justify-content: flex-end; }
}
@media (max-width: 560px) {
  .mtc-brand-name { font-size: 14.5px; }
  .mtc-brand-mark { width: 42px; }
  .mtc-footer-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 38px; }
}
/* ---------- floating header ---------- */
.mtc-site-header {
  position: sticky; top: 0; z-index: 100;
  transition: box-shadow .22s ease;
}
/* clear the WordPress admin bar for signed-in staff */
body.admin-bar .mtc-site-header { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .mtc-site-header { top: 46px; } }

/* Once scrolled, the DHERST strip rolls up and the bar tightens so the
   floating header takes as little vertical space as possible. */
.mtc-topbar { overflow: hidden; max-height: 60px; transition: max-height .25s ease; }
.mtc-site-header.is-stuck .mtc-topbar { max-height: 0; }
.mtc-site-header.is-stuck { box-shadow: 0 10px 30px -14px rgba(61,11,96,.42); }
.mtc-header-inner { transition: padding .25s ease; }
.mtc-site-header.is-stuck .mtc-header-inner { padding-top: 9px; padding-bottom: 9px; }
.mtc-brand-mark { transition: width .25s ease; }
.mtc-site-header.is-stuck .mtc-brand-mark { width: 40px; }

/* anchor links should not land underneath the floating header */
html { scroll-padding-top: 96px; }

@media (prefers-reduced-motion: reduce) {
  .mtc-site-header, .mtc-topbar, .mtc-header-inner, .mtc-brand-mark { transition: none; }
}

/* the course player draws its own shell, so nothing floats there */
.mtc-player-html { scroll-padding-top: 0; }