/* =====================================================================
   HEADER, NAV, DRAWER, FOOTER, FLOATING UI  — maroon/green/cream brand
   ===================================================================== */

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--maroon); color: #fff; padding: .6em 1.2em;
  border-radius: 0 0 var(--r-md) var(--r-md); z-index: 2000;
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus { top: 0; }

.site-header { position: fixed; top: 0; z-index: var(--z-header); width: 100%; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--green); color: rgba(255,255,255,.82);
  font-size: var(--fs-xs); height: var(--topbar-h); overflow: hidden;
  transition: height var(--dur-base) var(--ease-soft), opacity var(--dur-base) var(--ease-soft);
}
.topbar__inner { height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar a { display: inline-flex; align-items: center; gap: .45em; color: inherit; }
.topbar a:hover { color: var(--gold-300); }
.topbar__contact { display: flex; gap: 1.4rem; }
.tb-ico, .topbar svg { width: 15px; height: 15px; }
.topbar__right { display: flex; align-items: center; gap: 1rem; width: 100%;
  justify-content: center; }
.topbar__social { display: flex; gap: .35rem; }
.topbar__social a { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); }
.topbar__social svg { width: 15px; height: 15px; }
.topbar__social a:hover { background: var(--gold); color: var(--green-900); }
.topbar__sep { width: 1px; height: 16px; background: rgba(255,255,255,.22); }
.topbar__tag { font-weight: var(--fw-semi); color: rgba(255,255,255,.86); white-space: nowrap; }
.site-header.is-shrunk .topbar { height: 0; opacity: 0; }

/* ---------- Navbar ---------- */
.navbar {
  background: #FAF9F6 !important;
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  /* border-bottom: 1px solid var(--line); */
  transition: box-shadow var(--dur-base) var(--ease-soft); background: var(--dur-base) var(--ease-soft);
}
.site-header.is-shrunk .navbar { box-shadow: var(--sh-md); background: rgba(251,248,240,.96); }
.navbar__inner { height: var(--nav-h); display: flex; align-items: center; gap: 1.4rem; transition: height var(--dur-base) var(--ease-soft); }
.site-header.is-shrunk .navbar__inner { height: var(--nav-h-shrink); }

/* Brand + real wordmark logo (logo.webp) */
.brand { display: flex; align-items: center; margin-right: auto; }
.brand__logo {
  height: 32px; width: auto; flex: none;
  transition: height var(--dur-base) var(--ease-soft), transform var(--dur-base) var(--ease-back);
}
.site-header.is-shrunk .brand__logo { height: 38px; }
.brand:hover .brand__logo { transform: scale(1.03); }

/* Desktop nav */
.mainnav__list { display: flex; align-items: center; gap: 0; }
.mainnav__item { position: relative; }
.mainnav__link {
  display: inline-flex; align-items: center; gap: .25em; white-space: nowrap;
  padding: .6rem .62rem; font-weight: var(--fw-semi); font-size: var(--fs-sm);
  color: var(--charcoal); border-radius: var(--r-pill); position: relative;
}
/* flex-shrink:0 — without it, this SVG (a flex item inside .mainnav__link's
   inline-flex row) gets squeezed to 0 width by the flex layout whenever the
   text label doesn't leave quite enough room, making the caret invisible
   despite width:16px being set. */
.mainnav__link .caret { width: 16px; height: 16px; flex-shrink: 0; transition: transform var(--dur-base) var(--ease-soft); }
.mainnav__link::after {
  content: ""; position: absolute; left: 50%; bottom: .35rem; width: 0; height: 2.5px;
  border-radius: 3px; background: var(--gold); transform: translateX(-50%);
  transition: width var(--dur-base) var(--ease-out);
}
.mainnav__link:hover, .mainnav__link.is-active { color: var(--maroon); }
.mainnav__link:hover::after, .mainnav__link.is-active::after { width: 24px; }
.has-children:hover .caret { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 256px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-lg);
  padding: .5rem; opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility var(--dur-base);
  z-index: 10;
}
.has-children:hover .dropdown, .has-children:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li a { display: block; padding: .62rem .85rem; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--charcoal); }
.dropdown li a:hover { background: var(--cream); color: var(--maroon);  }

/* CTA + small secondary links group */
.navbar__cta { display: flex; align-items: center; gap: .9rem; flex: none; }
.navbar__secondary { display: flex; flex-direction: column; line-height: 1.2; font-size: .72rem; font-weight: var(--fw-semi); }
.navbar__secondary a { color: var(--green-600); }
.navbar__secondary a:hover { color: var(--maroon); }

/* Hamburger */
.hamburger { display: none; width: 44px; height: 44px; border-radius: var(--r-sm); flex-direction: column; justify-content: center; gap: 5px; padding: 0 9px; }
.hamburger span { display: block; height: 2.5px; width: 100%; border-radius: 3px; background: var(--maroon); transition: transform var(--dur-base) var(--ease-back), opacity var(--dur-fast); }
.hamburger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Mobile drawer ---------- */
.drawer-overlay { position: fixed; inset: 0; z-index: var(--z-drawer); background: rgba(20,50,38,.5); backdrop-filter: blur(2px); opacity: 0; transition: opacity var(--dur-base) var(--ease-soft); }
.drawer-overlay.is-open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: calc(var(--z-drawer) + 1);
  width: min(360px, 86vw); background: var(--cream); box-shadow: var(--sh-xl);
  transform: translateX(105%); transition: transform var(--dur-slow) var(--ease-out);
  display: flex; flex-direction: column; overflow-y: auto;
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem var(--gutter); border-bottom: 1px solid var(--line); background: #fff; }
.drawer__head .brand__logo { height: 27px; }
.drawer__close { font-size: 2rem; line-height: 1; color: var(--maroon); width: 40px; height: 40px; }
.drawer__nav { padding: .5rem var(--gutter); flex: 1; }
.drawer__nav > ul > li { border-bottom: 1px solid var(--line); }
.drawer__nav a, .drawer__toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .95rem .2rem; font-weight: var(--fw-semi); font-size: var(--fs-base); color: var(--charcoal); text-align: left; }
.drawer__nav a:hover, .drawer__toggle:hover { color: var(--maroon); }
/* parent row: label link grows, caret button is compact */
.drawer__row { display: flex; align-items: center; }
.drawer__row a { flex: 1; }
.drawer__toggle--caret { width: auto; flex: none; padding: .95rem .3rem .95rem .8rem; }
.drawer__toggle .caret { width: 18px; transition: transform var(--dur-base) var(--ease-soft); }
.drawer__toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }
.drawer__sub { max-height: 0; overflow: hidden; transition: max-height var(--dur-base) var(--ease-soft); }
.drawer__sub li a { padding: .6rem .2rem .6rem 1rem; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-soft); }
.drawer__sub li a::before { content: "—"; margin-right: .5rem; color: var(--gold); }
.drawer__foot { padding: 1.2rem var(--gutter) 2rem; border-top: 1px solid var(--line); background: #fff; }
.drawer__foot .btn { width: 100%; }
.drawer__contact { margin-top: 1rem; display: flex; flex-direction: column; gap: .6rem; font-size: var(--fs-sm); }
.drawer__contact a { display: flex; align-items: center; gap: .5rem; color: var(--text-soft); }
.drawer__contact svg { width: 18px; height: 18px; color: var(--green-600); }

/* ---------- Footer ---------- */
.site-footer { position: relative; }
/* image band with dark overlay */
.footer-band { position: relative; isolation: isolate; background: var(--footer-bg) center/cover no-repeat, var(--green-900); padding-top: clamp(2.5rem, 5vw, 4.5rem); padding-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.footer-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,40,30,.86), rgba(15,30,22,.92)); }
.footer-band .container { position: relative; }

/* floating contact card */
.footer-contact { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.6rem, 3vw, 3rem); color: #fff; background: linear-gradient(135deg, var(--maroon), var(--maroon-900)); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: clamp(2rem, 4vw, 3.4rem) clamp(1.4rem, 3.4vw, 2.8rem); }
.footer-contact__campus { padding: 0 1.4rem; }
.footer-contact__campus + .footer-contact__campus { border-left: 1px solid rgba(255,255,255,.16); }
.footer-contact__head { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.2rem; }
.footer-contact__dash { flex: none; width: 24px; height: 2px; background: rgba(255,255,255,.55); }
.footer-contact__campus h4 { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: #fff; margin: 0; }
.footer-contact__row { display: flex; align-items: flex-start; gap: .7rem; margin-bottom: .7rem; }
.footer-contact__row:last-child { margin-bottom: 0; }
.footer-contact__row svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: rgba(255,255,255,.7); }
.footer-contact__row p { font-size: var(--fs-sm); line-height: 1.6; color: rgba(255,255,255,.9); margin: 0; }
.footer-contact__row a { color: rgba(255,255,255,.9); transition: color var(--dur-fast); }
.footer-contact__row a:hover { color: var(--gold-300); }
.subfooter {
  margin-bottom: -80px;
  position: relative;
  z-index: 99;
}
.subfooter {
  padding: 30px 0px;
}

/* logo + nav + social + copy over the image */
.footer-band__logo { display: block; width: max-content; margin: clamp(2rem, 4vw, 3rem) auto clamp(1.2rem, 2.5vw, 1.8rem); }
.footer-band__logo img { height: 60px; width: auto; border-radius: 12px; padding: 8px 14px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem clamp(1.2rem, 3vw, 2.2rem); margin-bottom: 1.6rem; }
.footer-nav a { color: #fff; font-weight: var(--fw-semi); font-size: var(--fs-sm); letter-spacing: .02em; text-transform: uppercase; transition: color var(--dur-fast); }
.footer-nav a:hover { color: var(--gold-300); }
.footer-social { display: flex; justify-content: center; gap: .7rem; margin-bottom: 1.6rem; }
.footer-social a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; transition: transform var(--dur-base) var(--ease-back), background var(--dur-base); }
.footer-social a:hover { background: var(--gold); color: var(--green-900); transform: translateY(-4px); }
.footer-social svg { width: 22px; height: 22px; }
.footer-copy { text-align: center; font-size: var(--fs-sm); color: rgba(255,255,255,.82); border-top: 1px solid rgba(255,255,255,.14); padding-top: 1.4rem; }
.footer-copy a { color: rgba(255,255,255,.82); transition: color var(--dur-fast); }
.footer-copy a:hover { color: var(--gold-300); }
.footer-copy__sep { color: var(--gold); margin: 0 .2rem; }

/* ---------- Floating UI ---------- */
.whatsapp-float { position: fixed; right: 22px; bottom: 22px; z-index: var(--z-float); width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #25D366; color: #fff; box-shadow: 0 12px 30px rgba(37,211,102,.45); transition: transform var(--dur-base) var(--ease-back); }
.whatsapp-float svg { width: 30px; height: 30px; }
.whatsapp-float::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366; animation: ripple 2.2s var(--ease-out) infinite; }
.whatsapp-float:hover { transform: scale(1.1); }
@keyframes ripple { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.7); opacity: 0; } }
.to-top { position: fixed; right: 24px; bottom: 22px; z-index: var(--z-float); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--maroon); color: #fff; box-shadow: var(--sh-lg); opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity var(--dur-base), transform var(--dur-base) var(--ease-back), visibility var(--dur-base); }
.to-top svg { width: 22px; height: 22px; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--maroon-800); }
@media (prefers-reduced-motion: reduce) { .whatsapp-float::after { animation: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .mainnav { display: none; }
  .hamburger { display: flex; }
  .navbar__cta .btn { display: none; }
}
@media (max-width: 900px) {
  .topbar__social, .topbar__sep { display: none; }
}
@media (max-width: 720px) {
  .brand__logo { height: 32px; }
  .site-header.is-shrunk .brand__logo { height: 34px; }
  .topbar__contact a span { display: none; }   /* phone/mail icons only */
  .topbar__contact { gap: .9rem; }
  .topbar__inner { gap: .6rem; }
  /* fixed 80px height (with width:auto) rendered the ~5:1 logo at ~400px
     wide, wider than most phone screens — it overflowed off the edge
     instead of shrinking, since nothing here scaled it down for mobile. */
  .footer-band__logo img { height: 48px; }
  .footer-contact { grid-template-columns: 1fr; gap: 0; }
  .footer-contact__campus { padding: 1.4rem 1rem; }
  .footer-contact__campus + .footer-contact__campus { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); }
}
@media (max-width: 620px) {
  /* mobile topbar shows just the "Two Campuses" tag, centred */
  .topbar__contact { display: none; }
  .topbar__inner { justify-content: center; }
  .topbar__tag { font-size: .74rem; }
}
@media (max-width: 480px) {
  .footer-nav { gap: .5rem 1rem; }
  .footer-nav a { font-size: var(--fs-xs); }
}
