/* ============================================================
   TTU NAVIGATION  v3 — Transparent → solid on scroll
   Mega menu with KNUST-style section images
   ============================================================ */

/* ── CSS BASELINE ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --navy:#0d1f4e; --navy2:#162d6e;
  --gold:#F5B800; --gold2:#c9920a;
  --white:#ffffff; --off:#f8f7f4;
  --line:#e5e3de; --mid:#5e687a; --ink:#141420;
  --r:4px;
  --sh:0 4px 24px rgba(13,31,78,.10);
  --sh-lg:0 12px 48px rgba(13,31,78,.16);
  --display:'Canela','Georgia',serif;
  --body:'GT America','Inter',sans-serif;
  --mono:'JetBrains Mono','Fira Code',monospace;
}

/* ── TOPBAR NAV ────────────────────────────────────────────── */
.tnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; flex-direction: column;
  transition: background .28s ease, box-shadow .28s ease, backdrop-filter .28s ease;
}
/* Transparent (default — both home and inner pages until scroll) */
.tnav.is-transparent {
  background: transparent;
  box-shadow: none;
}
/* Scrolled state */
.tnav.is-scrolled {
  background: rgba(8,20,60,.97);
  backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: 0 2px 32px rgba(8,20,60,.4);
}
.tnav.is-transparent .tnav__bar::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(0,0,0,.52) 0%, transparent 100%);
  pointer-events: none;
}

/* Utility strip */
.tnav__util {
  display: flex; justify-content: flex-end; align-items: center;
  padding: 0 5vw; height: 32px;
  background: rgba(0,0,0,.22);
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background .28s ease, opacity .25s, height .25s;
}
/* Over page-banner: util strip blends into banner background */
.tnav.is-transparent .tnav__util {
  background: transparent;
  border-bottom-color: rgba(255,255,255,.08);
}
.tnav.is-scrolled .tnav__util { background: rgba(255,255,255,.04); }
.tnav__util a {
  font-family: var(--mono); font-size: .61rem;
  color: rgba(255,255,255,.52);
  padding: 0 .65rem; height: 32px;
  display: flex; align-items: center;
  border-right: 1px solid rgba(255,255,255,.07);
  transition: color .14s; letter-spacing: .04em;
  text-decoration: none;
}
.tnav__util a:first-child { border-left: 1px solid rgba(255,255,255,.07); }
.tnav__util a:hover { color: #fff; }
.tnav__util .u-apply {
  background: var(--gold); color: var(--navy);
  font-weight: 700; border: none; margin-left: .4rem;
  padding: 0 .85rem;
}
.tnav__util .u-apply:hover { background: var(--gold2); }

/* Main bar */
.tnav__bar {
  display: flex; align-items: stretch;
  padding: 0 5vw; height: 74px;
  position: relative;
}
.tnav.is-scrolled .tnav__bar::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: rgba(255,255,255,.08);
}

/* Logo */
.tnav__logo {
  display: flex; align-items: center; gap: 8rem;
  margin-right: 2rem; flex-shrink: 0; text-decoration: none;
}
.tnav__logo-img { height: 46px; width: auto; display: block; background: #fff;
  border-radius: 16px; }
.tnav.is-transparent .tnav__logo-img { filter: brightness(-1) invert(1); }
.tnav__logo-txt { line-height: 1.2; }
.tnav__logo-txt strong {
  font-family: var(--display); font-size: .92rem; font-weight: 700;
  color: #fff; display: block; letter-spacing: -.01em;
}
.tnav__logo-txt span {
  font-family: var(--mono); font-size: .57rem;
  color: rgba(255,255,255,.38); letter-spacing: .1em; text-transform: uppercase;
}

/* Nav item list */
.tnav__menu {
  display: flex; align-items: stretch;
  list-style: none; padding: 0; margin: 0;
  gap: 0;
}
.tnav__menu > li {
  position: static;
  display: flex; align-items: stretch;
}
.tnav__menu > li > a,
.tnav__menu > li > button.tnav__menu-btn {
  display: flex; align-items: center; gap: .22rem;
  height: 100%;
  padding: 0 .9rem;
  font-size: .79rem; font-weight: 500;
  color: rgba(255,255,255,.88);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer; font-family: var(--body);
  transition: color .15s, border-color .15s;
  white-space: nowrap; letter-spacing: .01em;
  text-decoration: none;
}
.tnav__menu > li > a:hover,
.tnav__menu > li > button.tnav__menu-btn:hover,
.tnav__menu > li.open > button.tnav__menu-btn,
.tnav__menu > li.open > a {
  color: #fff; border-bottom-color: var(--gold);
}
.tnav__chev {
  font-size: .5rem; margin-left: .12rem; margin-top: 1px;
  opacity: .5; transition: transform .2s, opacity .2s;
}
.tnav__menu > li.open .tnav__chev { transform: rotate(180deg); opacity: 1; }

/* Right controls */
.tnav__right {
  display: flex; align-items: center; gap: .45rem;
  margin-left: auto; padding-left: .75rem; flex-shrink: 0;
}
.icon-btn {
  background: rgba(255,255,255,.1); border: none;
  color: rgba(255,255,255,.7); font-size: .82rem; cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.icon-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.tnav__cta {
  background: var(--gold); color: var(--navy);
  padding: .42rem 1.05rem; border-radius: var(--r);
  font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; transition: background .15s;
  white-space: nowrap; text-decoration: none;
  display: flex; align-items: center;
}
.tnav__cta:hover { background: var(--gold2); }
.tnav__burger { display: none !important; }

/* ── MEGA MENU DROP ────────────────────────────────────────── */
.mega-drop {
  position: fixed;
  top: 106px; /* util(32) + bar(74) */
  left: 0; right: 0;
  background: #fff;
  border-top: 3px solid var(--gold);
  box-shadow: 0 32px 96px rgba(8,20,60,.22);
  opacity: 0; visibility: hidden;
  transform: translateY(-10px);
  transition: opacity .22s ease, transform .22s ease, visibility 0s .22s;
  z-index: 490;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.tnav__menu > li.open .mega-drop {
  opacity: 1; visibility: visible;
  transform: translateY(0);
  transition: opacity .22s ease, transform .22s ease, visibility 0s 0s;
}
.mega-inner {
  display: grid;
  max-width: 1360px; margin: 0 auto;
  padding: 2rem 5vw 2.5rem;
}
/* Grid variants */
.mega-inner--about { grid-template-columns: 220px repeat(4, 1fr); gap: 1.75rem; }
.mega-inner--img   { grid-template-columns: 220px 1.6fr 1fr 1fr; gap: 2rem; }
.mega-inner--2col  { grid-template-columns: 1fr 1fr; gap: 2rem; }
.mega-inner--3col  { grid-template-columns: 1fr 1fr 1fr; gap: 2rem; }
.mega-inner--4col  { grid-template-columns: 1fr 1fr 1fr 1fr; gap: 1.5rem; }

/* ── FEATURED IMAGE COL ────────────────────────────────────── */
.mega-img-col {
  position: relative; border-radius: 8px; overflow: hidden;
  min-height: 260px;
}
.mega-img-col img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block; transition: transform .5s ease;
}
.mega-img-col:hover img { transform: scale(1.04); }
.mega-img-col__caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(8,20,60,.92) 0%, transparent 100%);
  padding: 1.5rem 1.1rem 1.1rem;
}
.mega-img-col__caption h4 {
  font-family: var(--display); font-size: 1rem; font-weight: 700;
  color: #fff; line-height: 1.2; margin-bottom: .2rem;
}
.mega-img-col__caption p {
  font-size: .68rem; color: rgba(255,255,255,.55); line-height: 1.5;
}
.mega-img-col__btn {
  display: inline-flex; align-items: center;
  margin-top: .65rem; background: var(--gold); color: var(--navy);
  font-size: .65rem; font-weight: 700; padding: .3rem .75rem;
  border-radius: var(--r); text-decoration: none;
  text-transform: uppercase; letter-spacing: .06em;
  transition: background .14s;
}
.mega-img-col__btn:hover { background: var(--gold2); }

/* ── SECTION ───────────────────────────────────────────────── */
.mega-section + .mega-section {
  border-left: 1px solid var(--line);
  padding-left: 1.5rem;
}

/* Section with inline image header */
.mega-section__img {
  width: 100%; aspect-ratio: 16/7;
  border-radius: 6px; overflow: hidden;
  margin-bottom: .85rem; display: block;
  position: relative;
}
.mega-section__img img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block; transition: transform .4s;
}
.mega-section__img:hover img { transform: scale(1.05); }
.mega-section__img-label {
  position: absolute; bottom: .5rem; left: .6rem;
  background: rgba(0,0,0,.55); color: #fff;
  font-family: var(--mono); font-size: .56rem; letter-spacing: .1em;
  text-transform: uppercase; padding: .18rem .55rem; border-radius: 3px;
}

.mega-section__title {
  font-family: var(--mono); font-size: .59rem; font-weight: 600;
  color: var(--gold2); text-transform: uppercase; letter-spacing: .14em;
  padding-bottom: .55rem; margin-bottom: .35rem;
  border-bottom: 1px solid var(--line);
}
.mega-section__links { list-style: none; padding: 0; margin: 0; }
.mega-section__links a {
  display: flex; align-items: center; gap: .5rem;
  padding: .36rem 0; font-size: .77rem; color: var(--mid);
  text-decoration: none; transition: all .14s;
  border-bottom: 1px solid rgba(0,0,0,.03);
}
.mega-section__links a:hover {
  color: var(--navy); padding-left: .35rem;
}
.lnk-icon {
  width: 22px; height: 22px; background: var(--off);
  border-radius: 4px; display: inline-flex; align-items: center;
  justify-content: center; font-size: .82rem; flex-shrink: 0;
  transition: background .14s; color: var(--navy);
}
.mega-section__links a:hover .lnk-icon { background: var(--gold); color: var(--navy); }

/* Section with image thumbnail next to title */
.mega-section--with-thumb {
  display: flex; flex-direction: column; gap: 0;
}

/* ── FACULTY CARDS ─────────────────────────────────────────── */
.mega-faculty-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .45rem;
  margin-top: .25rem;
}
.mega-fac-card {
  display: flex; align-items: center; gap: .55rem;
  padding: .5rem .65rem; border: 1px solid var(--line);
  border-radius: var(--r); text-decoration: none;
  transition: all .15s; background: var(--off);
}
.mega-fac-card:hover {
  border-color: var(--navy); background: var(--navy);
  transform: translateX(2px);
}
.fac-ico {
  width: 30px; height: 30px; background: var(--navy);
  border-radius: 5px; display: flex; align-items: center;
  justify-content: center; font-size: 1rem; flex-shrink: 0;
  color: var(--gold); transition: background .14s;
}
.mega-fac-card:hover .fac-ico { background: rgba(255,255,255,.12); }
.fac-name { font-size: .71rem; font-weight: 600; color: var(--navy); line-height: 1.25; transition: color .14s; }
.mega-fac-card:hover .fac-name { color: #fff; }
.fac-abbr { font-family: var(--mono); font-size: .54rem; color: var(--mid); letter-spacing: .06em; display: block; transition: color .14s; }
.mega-fac-card:hover .fac-abbr { color: rgba(255,255,255,.5); }

/* Mega divider */
.mega-divider { grid-column: 1/-1; height: 1px; background: var(--line); margin: .5rem 0; }

/* Simple dropdown */
.tnav__drop {
  position: absolute; top: calc(100% + 2px); left: 0;
  min-width: 215px; background: #fff;
  border: 1px solid var(--line); border-top: 3px solid var(--gold);
  box-shadow: var(--sh-lg); border-radius: 0 0 var(--r) var(--r);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .18s; z-index: 500; pointer-events: none;
}
.tnav__menu > li.open .tnav__drop {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: all;
}
.tnav__drop ul { padding: .5rem 0; list-style: none; }
.tnav__drop li a { display: block; padding: .46rem 1.1rem; font-size: .77rem; color: var(--ink); transition: all .14s; text-decoration: none; }
.tnav__drop li a:hover { background: var(--off); color: var(--navy2); padding-left: 1.4rem; }

/* ── HAMBURGER BAR ─────────────────────────────────────────── */
.hbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  align-items: center; justify-content: space-between;
  padding: 0 5vw; height: 68px;
  background: rgba(8,20,60,.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(8,20,60,.35);
}
.hbar__logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.hbar__logo img { height: 40px; filter: brightness(-1) invert(1); border-radius: 26px;
    background: #fff; }
.hbar__logo-txt strong { font-family: var(--display); font-size: .86rem; font-weight: 700; color: #fff; display: block; line-height: 1.1; }
.hbar__logo-txt span   { font-family: var(--mono); font-size: .54rem; color: rgba(255,255,255,.4); letter-spacing: .1em; text-transform: uppercase; }
.hbar__right { display: flex; align-items: center; gap: .6rem; }
.hbar__apply { background: var(--gold); color: var(--navy); padding: .4rem .9rem; border-radius: var(--r); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-decoration: none; }
.hbar__toggle {
  background: none; border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r); width: 38px; height: 38px;
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
}
.hbar__toggle span { display: block; width: 17px; height: 2px; background: #fff; border-radius: 1px; }

/* ── OVERLAY NAV ───────────────────────────────────────────── */
.ov {
  position: fixed; inset: 0; z-index: 700;
  background: var(--navy);
  transform: translateX(-100%);
  transition: transform .4s cubic-bezier(.77,0,.18,1);
  display: grid; grid-template-columns: 1fr 320px;
  overflow: hidden;
}
.ov.open { transform: translateX(0); }
.ov__left  { padding: 2rem 3rem; overflow-y: auto; display: flex; flex-direction: column; }
.ov__right { background: rgba(255,255,255,.04); border-left: 1px solid rgba(255,255,255,.07); padding: 2.5rem 1.75rem; display: flex; flex-direction: column; justify-content: space-between; }
.ov__close { position: absolute; top: 1rem; right: 1.2rem; background: rgba(255,255,255,.08); border: none; color: #fff; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1rem; transition: background .15s; }
.ov__close:hover { background: rgba(255,255,255,.14); }
.ov__logo { height: 80px; width: 150px; margin-bottom: 2.25rem; border-radius: 26px; background: #fff; filter: brightness(-1) invert(1); }
.ov-nav ul { padding: 0; list-style: none; }
.ov-nav li { border-bottom: 1px solid rgba(255,255,255,.07); }
.ov-nav li > a,
.ov-nav li > button {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: .8rem 0; color: rgba(255,255,255,.78);
  font-size: 1rem; font-weight: 500; background: none; border: none;
  cursor: pointer; font-family: var(--body); transition: color .14s; text-align: left;
  text-decoration: none;
}
.ov-nav li > a:hover,
.ov-nav li > button:hover { color: var(--gold); }
.ov-sub { max-height: 0; overflow: hidden; transition: max-height .3s; padding-left: .9rem; }
.ov-sub.open { max-height: 1000px; }
.ov-sub li { border-bottom: 1px solid rgba(255,255,255,.04); }
.ov-sub a { display: block; padding: .38rem 0; font-size: .8rem; color: rgba(255,255,255,.45); transition: color .14s; text-decoration: none; }
.ov-sub a:hover { color: var(--gold); }
.ov-sub__group-title { font-family: var(--mono); font-size: .58rem; color: rgba(255,255,255,.25); text-transform: uppercase; letter-spacing: .12em; padding: .7rem 0 .2rem; display: block; }
.ov__quicklinks { border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.4rem; margin-top: auto; }
.ov__quicklinks h6 { font-family: var(--mono); font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.26); margin-bottom: .6rem; }
.ov__quicklinks a { display: inline-block; font-size: .72rem; color: rgba(255,255,255,.45); background: rgba(255,255,255,.05); border-radius: var(--r); padding: .24rem .55rem; margin: .18rem .2rem .18rem 0; transition: all .14s; text-decoration: none; }
.ov__quicklinks a:hover { color: #fff; background: rgba(255,255,255,.09); }
.ov__info h3 { font-family: var(--display); font-size: 1.35rem; font-weight: 700; color: #fff; margin-bottom: .75rem; line-height: 1.2; }
.ov__info p  { font-size: .78rem; color: rgba(255,255,255,.4); line-height: 1.75; margin-bottom: 1.2rem; }
.ov__stats   { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.ov-stat { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); padding: .85rem; border-radius: var(--r); }
.ov-stat strong { display: block; font-family: var(--display); font-size: 1.45rem; font-weight: 700; color: var(--gold); line-height: 1; }
.ov-stat span   { font-family: var(--mono); font-size: .6rem; color: rgba(255,255,255,.35); letter-spacing: .06em; text-transform: uppercase; margin-top: .2rem; display: block; }
.ov__cta { margin-top: 2rem; }
.ov__cta a { display: block; background: var(--gold); color: var(--navy); text-align: center; padding: .8rem; border-radius: var(--r); font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.ov__cta a:hover { background: var(--gold2); }

/* ── SEARCH OVERLAY ────────────────────────────────────────── */
.srch { position: fixed; inset: 0; z-index: 600; background: rgba(8,16,48,.97); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all .22s; }
.srch.open { opacity: 1; visibility: visible; }
.srch__close { position: absolute; top: 1.75rem; right: 1.75rem; background: rgba(255,255,255,.07); border: none; color: #fff; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.srch__inner { width: 90%; max-width: 620px; }
.srch__label { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.28); margin-bottom: .9rem; }
.srch__form  { display: flex; align-items: center; border-bottom: 2px solid rgba(255,255,255,.18); padding-bottom: .6rem; }
.srch__form:focus-within { border-bottom-color: var(--gold); }
.srch__form input  { flex: 1; background: none; border: none; color: #fff; font-size: 1.9rem; font-family: var(--display); font-weight: 400; outline: none; }
.srch__form input::placeholder { color: rgba(255,255,255,.18); }
.srch__form button { background: none; border: none; color: rgba(255,255,255,.45); font-size: 1.3rem; cursor: pointer; padding: .4rem; transition: color .14s; }
.srch__form button:hover { color: var(--gold); }

/* ── NAV STYLE SWITCHER ────────────────────────────────────── */
.nav-sw { position: fixed; bottom: 1.2rem; left: 1.2rem; z-index: 990; background: rgba(8,16,48,.82); backdrop-filter: blur(10px); padding: .3rem; border-radius: 20px; display: flex; gap: .25rem; }
.nsw-btn { background: transparent; border: none; color: rgba(255,255,255,.42); padding: .28rem .7rem; border-radius: 16px; font-size: .62rem; font-family: var(--mono); cursor: pointer; transition: all .2s; letter-spacing: .04em; }
.nsw-btn.active { background: var(--gold); color: var(--navy); font-weight: 700; }
.nsw-btn:hover  { background: rgba(255,255,255,.1); color: #fff; }
.nsw-btn.active:hover { background: var(--gold2); color: var(--navy); }

/* Push */
.nav-push { height: 106px; }
body > main, body > .page-banner, body > section:first-of-type { padding-top: 0; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media(max-width:1080px) {
  .tnav { display: none; }
  .hbar { display: flex; }
}
@media(max-width:680px) {
  .tnav__logo-txt, .hbar__logo-txt { display: none; }
  .ov { grid-template-columns: 1fr; }
  .ov__right { display: none; }
  .ov__left { padding: 1.5rem 1.25rem; }
  .ov__logo { height: 80px; width: 150px; border-radius: 26px; background: #fff; margin-bottom: 1.5rem; }
  .ov-nav li > a, .ov-nav li > button { font-size: .92rem; padding: .7rem 0; }
  .ov-sub a { font-size: .82rem; padding: .45rem 0; }
  .mega-inner--about, .mega-inner--img { grid-template-columns: 1fr !important; }
  .mega-section + .mega-section { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 1rem; }
}
