/* ==========================================================================
   VIPER — reusable header (includes/header.php)
   Brand tokens are shared with page stylesheets (e.g. css/home.css).
   ========================================================================== */
:root {
    --vp-purple: #9b2487;
    --vp-purple-dark: #7a1b6a;
    --vp-purple-soft: #f6eaf4;
    --vp-orange: #ec8022;
    --vp-orange-dark: #d26c12;
    --vp-navy: #1b325a;
    --vp-navy-dark: #132443;
    --vp-ink: #1d2433;
    --vp-muted: #5d6475;
    --vp-line: #e7e3ea;
    --vp-bg: #ffffff;
    --vp-bg-soft: #f7f5f9;
    --vp-radius: 14px;
    --vp-shadow: 0 10px 30px rgba(27, 50, 90, .08);
    --vp-shadow-lg: 0 20px 50px rgba(27, 50, 90, .16);
    --vh-top-h: 38px;
    --vp-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--vp-font);
    color: var(--vp-ink);
    background: var(--vp-bg);
}

.vh-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

.vh-skip {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 2000;
    background: var(--vp-navy);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: top .2s;
}
.vh-skip:focus { top: 12px; color: #fff; }

/* ── Sticky wrapper: utility bar scrolls away, main bar sticks ── */
.vh {
    position: sticky;
    top: calc(-1 * var(--vh-top-h));
    z-index: 1030;
    font-family: var(--vp-font);
}
.vh ul { list-style: none; margin: 0; padding: 0; }
.vh a { text-decoration: none; }

/* ── Utility bar ── */
.vh-top {
    background: var(--vp-purple);
    color: #fff;
    font-size: 12.5px;
    height: var(--vh-top-h);
}
.vh-top-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.vh-top-links, .vh-top-contact, .vh-social, .vh-top-right {
    display: flex;
    align-items: center;
}
.vh-top-links { gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.vh-top-links::-webkit-scrollbar { display: none; }
.vh-top-links li { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.vh-top-links li + li::before {
    content: "";
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, .35);
    margin-right: 8px;
}
.vh-top a { color: #fff; opacity: .92; transition: opacity .2s; }
.vh-top a:hover, .vh-top a:focus-visible { opacity: 1; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.vh-code {
    background: rgba(255, 255, 255, .16);
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #ffd8a8;
}
.vh-top .vh-top-pill {
    background: var(--vp-orange);
    border-radius: 999px;
    padding: 3px 12px;
    font-weight: 600;
    opacity: 1;
}
.vh-top .vh-top-pill:hover { background: var(--vp-orange-dark); text-decoration: none; }
.vh-top-right { gap: 18px; flex-shrink: 0; }
.vh-top-contact { gap: 16px; }
.vh-top-contact a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.vh-top-contact i { font-size: 11px; opacity: .85; }

.vh-social { gap: 6px; }
.vh-social a {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: rgba(255, 255, 255, .14);
    transition: background .2s, transform .2s;
}
.vh-top .vh-social a:hover { background: var(--vp-orange); text-decoration: none; transform: translateY(-1px); }
.vh-social img { width: 14px; height: 14px; object-fit: contain; border-radius: 50%; }

/* ── Main bar ── */
.vh-main {
    background: #fff;
    border-bottom: 1px solid var(--vp-line);
    transition: box-shadow .25s;
}
.vh.is-stuck .vh-main { box-shadow: 0 8px 24px rgba(27, 50, 90, .10); border-bottom-color: transparent; }
.vh-main-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 78px;
}
.vh-brand { flex-shrink: 0; display: block; line-height: 0; }
.vh-brand img { height: 54px; width: auto; max-width: 100%; }

.vh-nav { margin-left: auto; }
.vh-menu { display: flex; align-items: center; gap: 2px; }
.vh-item { position: static; }
.vh-item-sm { position: relative; }

.vh-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 78px;
    padding: 0 11px;
    background: none;
    border: 0;
    font: 500 14px/1 var(--vp-font);
    color: var(--vp-ink);
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    transition: color .2s;
}
.vh-link::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--vp-purple);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s;
}
.vh-link:hover, .vh-link:focus-visible, .vh-item.is-open > .vh-link, .vh-link.is-active { color: var(--vp-purple); }
.vh-link.is-active::after, .vh-item.is-open > .vh-link::after, .vh-link:hover::after { transform: scaleX(1); }
.vh-link:focus-visible { outline: 2px solid var(--vp-purple); outline-offset: -6px; border-radius: 8px; }
.vh-caret { font-size: 9px; transition: transform .25s; opacity: .7; }
.vh-item.is-open .vh-caret { transform: rotate(180deg); }

/* ── Dropdown panels ── */
.vh-panel {
    position: absolute;
    top: 100%;
    background: #fff;
    border-radius: 0 0 var(--vp-radius) var(--vp-radius);
    box-shadow: var(--vp-shadow-lg);
    border-top: 3px solid var(--vp-purple);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s, visibility 0s linear .2s;
    z-index: 20;
}
.vh-item.is-open > .vh-panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .2s, transform .2s, visibility 0s;
}

.vh-mega {
    left: 24px;
    right: 24px;
    display: flex;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}
.vh-mega-intro {
    flex: 0 0 210px;
    padding: 28px 24px;
    background: linear-gradient(160deg, var(--vp-purple) 0%, var(--vp-navy) 100%);
    color: #fff;
    border-radius: 0 0 0 var(--vp-radius);
}
.vh-mega-eyebrow { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; opacity: .75; }
.vh-mega-title { font-size: 26px; font-weight: 700; margin: 4px 0 8px; line-height: 1.2; color: #fff; }
.vh-mega-count { display: inline-block; font-size: 12px; background: rgba(255,255,255,.16); padding: 3px 10px; border-radius: 999px; }
.vh-mega-cols {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px 28px;
    padding: 26px 28px;
}
.vh-mega-col.is-wide { grid-column: span 2; }
.vh-mega-col.is-wide ul { column-count: 2; column-gap: 28px; }
.vh-mega-heading {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--vp-orange-dark);
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--vp-line);
}
.vh-panel li { break-inside: avoid; }
.vh-panel li a {
    display: block;
    padding: 6px 8px;
    margin: 0 -8px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--vp-ink);
    transition: background .15s, color .15s, padding .15s;
}
.vh-panel li a:hover, .vh-panel li a:focus-visible {
    background: var(--vp-purple-soft);
    color: var(--vp-purple);
    padding-left: 12px;
}

.vh-drop { left: 0; min-width: 240px; padding: 14px 18px; }
/* Last menu items open leftwards so their (hidden) panel never pokes past the viewport edge */
.vh-menu > .vh-item-sm:nth-last-child(-n+2) > .vh-drop { left: auto; right: 0; }
.vh-drop .vh-mega-cols { display: block; padding: 0; }

/* ── Actions ── */
.vh-actions { display: flex; align-items: center; gap: 8px; }
.vh-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--vp-line);
    background: #fff;
    color: var(--vp-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.vh-icon-btn:hover, .vh-icon-btn:focus-visible { background: var(--vp-purple); border-color: var(--vp-purple); color: #fff; }
.vh-icon-btn:focus-visible { outline: 2px solid var(--vp-orange); outline-offset: 2px; }
.vh-burger { display: none; flex-direction: column; gap: 4px; }
.vh-burger span { width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

/* ── News ticker ── */
.vh-ticker { background: var(--vp-navy); color: #fff; font-size: 13px; }
.vh-ticker-inner { display: flex; align-items: center; gap: 14px; height: 40px; }
.vh-ticker-label {
    flex-shrink: 0;
    background: var(--vp-orange);
    border-radius: 999px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.vh-ticker-track {
    overflow: hidden;
    flex: 1;
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.vh-ticker-move { display: inline-flex; white-space: nowrap; animation: vh-ticker 45s linear infinite; }
.vh-ticker:hover .vh-ticker-move, .vh-ticker:focus-within .vh-ticker-move { animation-play-state: paused; }
.vh-ticker-item { padding-right: 48px; position: relative; }
.vh-ticker-item::after {
    content: "";
    position: absolute;
    right: 21px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: var(--vp-orange);
}
@keyframes vh-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Search overlay ── */
.vh-search {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(19, 36, 67, .55);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 12vh 16px 16px;
}
.vh-search[hidden] { display: none; }
.vh-search-box {
    width: 100%;
    max-width: 640px;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--vp-shadow-lg);
    overflow: hidden;
    font-family: var(--vp-font);
}
.vh-search-form { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--vp-line); margin: 0; }
.vh-search-form > i { color: var(--vp-purple); }
.vh-search-form input[type=search] {
    flex: 1;
    border: 0;
    outline: 0;
    font: 500 17px var(--vp-font);
    color: var(--vp-ink);
    min-width: 0;
    background: transparent;
    height: auto;
    box-shadow: none;
    padding: 6px 0;
}
.vh-search-close { border: 0; background: var(--vp-bg-soft); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; color: var(--vp-ink); }
.vh-search-results { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.vh-search-results:empty { display: none; }
.vh-search-results a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--vp-ink);
    text-decoration: none;
    font-size: 14px;
}
.vh-search-results a small { color: var(--vp-muted); font-size: 12px; white-space: nowrap; }
.vh-search-results a:hover, .vh-search-results a:focus-visible, .vh-search-results a.is-active { background: var(--vp-purple-soft); color: var(--vp-purple); outline: none; }
.vh-search-hint { margin: 0; padding: 10px 20px; font-size: 12px; color: var(--vp-muted); background: var(--vp-bg-soft); }
.vh-search-hint kbd { background: #fff; color: var(--vp-ink); border: 1px solid var(--vp-line); border-radius: 4px; padding: 1px 6px; font-size: 11px; box-shadow: none; }

.vh-search-form input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }

/* ── Off-canvas (mobile) ──
   Self-contained: the bundled framework CSS has broken .offcanvas rules (media queries stripped),
   so position/visibility/transitions are defined here for Bootstrap 5.3's show/showing/hiding classes. */
.offcanvas.vh-offcanvas {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 1045;
    display: flex !important;
    flex-direction: column;
    width: min(360px, 88vw) !important;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #fff !important;
    border: 0;
    box-shadow: -20px 0 50px rgba(19, 36, 67, .25);
    visibility: hidden !important;
    transform: translateX(100%) !important;
    transition: transform .3s ease, visibility 0s linear .3s !important;
    font-family: var(--vp-font);
}
.offcanvas.vh-offcanvas.showing,
.offcanvas.vh-offcanvas.show:not(.hiding) {
    visibility: visible !important;
    transform: none !important;
    transition: transform .3s ease, visibility 0s !important;
}
.offcanvas.vh-offcanvas.hiding { visibility: visible !important; }
.vh-offcanvas .offcanvas-header { display: flex; align-items: center; justify-content: space-between; }
.vh-offcanvas .offcanvas-body { flex: 1; overflow-y: auto; }
body > .offcanvas-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background: #132443;
    opacity: 0;
    transition: opacity .3s;
}
body > .offcanvas-backdrop.show { opacity: .55; }
.vh-offcanvas .offcanvas-header { border-bottom: 1px solid var(--vp-line); padding: 14px 16px; }
.vh-off-logo { height: 40px; width: auto; max-width: 75%; }
.vh-offcanvas .offcanvas-body { padding: 8px 16px 24px; }
.vh-off-link, .vh-off-toggle {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 14px 4px;
    border: 0;
    border-bottom: 1px solid var(--vp-line);
    background: none;
    font: 600 15px var(--vp-font);
    color: var(--vp-ink);
    text-decoration: none;
    text-align: left;
}
.vh-off-link.is-active { color: var(--vp-purple); }
.vh-off-toggle i { font-size: 11px; transition: transform .25s; color: var(--vp-muted); }
.vh-off-toggle:not(.collapsed) { color: var(--vp-purple); }
.vh-off-toggle:not(.collapsed) i { transform: rotate(180deg); color: var(--vp-purple); }
.vh-off-section { padding: 8px 4px 4px 12px; }
.vh-off-section p { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--vp-orange-dark); margin: 6px 0 4px; }
.vh-off-section ul { list-style: none; margin: 0; padding: 0; }
.vh-off-section a { display: block; padding: 8px 0; font-size: 14px; color: var(--vp-muted); text-decoration: none; }
.vh-off-section a:hover { color: var(--vp-purple); }
.vh-off-contact { margin-top: 20px; display: grid; gap: 10px; font-size: 14px; }
.vh-off-contact > a { color: var(--vp-ink); text-decoration: none; display: flex; gap: 10px; align-items: center; word-break: break-all; }
.vh-off-contact > a i { color: var(--vp-purple); width: 16px; }
.vh-off-contact .vh-social { display: flex; gap: 8px; list-style: none; margin: 6px 0 0; padding: 0; }
.vh-off-contact .vh-social a { background: var(--vp-purple-soft); color: var(--vp-purple); width: 36px; height: 36px; font-size: 15px; }

/* ==========================================================================
   Shared footer (includes/footer.php)
   ========================================================================== */
/* ── Footer ── */
.vp-footer { background: var(--vp-navy-dark); color: rgba(255,255,255,.75); font-size: 14px; }
.vp-footer a { color: rgba(255,255,255,.75); text-decoration: none; transition: color .2s; }
.vp-footer a:hover, .vp-footer a:focus-visible { color: #fff; }
.vp-footer ul { list-style: none; margin: 0; padding: 0; }
.vp-footer h2 { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #fff; margin: 0 0 18px; }
.vp-footer-grid {
    display: grid;
    grid-template-columns: 1.15fr 2fr 1fr 1fr;
    gap: 40px;
    padding: 64px 0 48px;
}
.vp-footer-logo { display: inline-block; background: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 18px; }
.vp-footer-logo img { height: 46px; width: auto; display: block; }
.vp-footer-brand p { display: flex; gap: 10px; line-height: 1.6; margin: 0 0 18px; }
.vp-footer-brand p i { color: var(--vp-orange); margin-top: 5px; }
.vp-footer .vh-social { display: flex; gap: 8px; }
.vp-footer .vh-social a { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.1); color: #fff; font-size: 14px; transition: background .2s; }
.vp-footer .vh-social a:hover { background: var(--vp-orange); }
.vp-campus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; }
.vp-campus h3 { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: #ffc58f; margin: 0 0 8px; }
.vp-campus h3 img { width: 28px; height: 28px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px; }
.vp-campus li, .vp-footer-links li { padding: 3px 0; line-height: 1.5; }
.vp-footer-contact li { display: flex; gap: 10px; padding: 4px 0; word-break: break-word; }
.vp-footer-contact i { color: var(--vp-orange); margin-top: 5px; width: 14px; }
.vp-footer-bottom { border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.vp-footer-bottom .vh-container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }

.vp-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1020;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--vp-purple);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--vp-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s, transform .25s, visibility 0s linear .25s, background .2s;
}
.vp-to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .25s, background .2s; }
.vp-to-top:hover { background: var(--vp-orange); color: #fff; }

@media (max-width: 1199.98px) {
    .vp-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767.98px) {
    .vp-footer-grid { grid-template-columns: 1fr; gap: 32px; padding: 48px 0 32px; }
    .vp-campus-grid { grid-template-columns: 1fr; }
    .vp-footer-links ul { column-count: 2; column-gap: 20px; }
    .vp-footer-bottom .vh-container { flex-direction: column; text-align: center; }
}

/* ── Responsive ── */
@media (max-width: 1399.98px) {
    .vh-brand img { height: 46px; }
    .vh-link { padding: 0 9px; font-size: 13.5px; }
    .vh-link::after { left: 9px; right: 9px; }
}
@media (max-width: 1199.98px) {
    .vh-nav { display: none; }
    .vh-actions { margin-left: auto; }
    .vh-burger { display: inline-flex; }
    .vh-main-inner { min-height: 70px; }
    .vh-top-contact li:nth-child(n+2) { display: none; }
}
@media (max-width: 767.98px) {
    .vh-container { padding: 0 16px; }
    .vh-top-contact { display: none; }
    .vh-main-inner { min-height: 64px; gap: 12px; }
    .vh-brand { min-width: 0; flex: 1; }
    .vh-brand img { height: auto; max-height: 42px; }
    .vh-icon-btn { width: 40px; height: 40px; }
    .vh-ticker-inner { height: 36px; }
    .vh-ticker-label span, .vh-ticker-label { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    .vh-ticker-move { animation: none; white-space: normal; }
    .vh *, .vh-search * { transition: none !important; }
}
