/* ============================================================
   MATRICBASE — PROVINCE UNIVERSITY EXPLORER (shared)
   Scope: all province pages (Western Cape, KwaZulu-Natal, Eastern Cape,
   Free State, Limpopo, Mpumalanga, North West, Northern Cape).
   Mirrors gauteng-redesign.css 1:1 so every province matches the
   Gauteng template exactly. gauteng.html/gauteng-redesign.css are
   left untouched — this file is the shared copy for the rest.
   Gauteng.html itself continues to load its own gauteng-redesign.css.
   Reuses design tokens/components from home-redesign.css
   (--mb-* variables, .mb-btn, .mb-journey, .mb-step).
   ============================================================ */

.mb-province{
  background: var(--mb-bg);
  color: var(--mb-ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mb-province *{ box-sizing: border-box; }

.mb-province .mb-shell{
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Active step on the journey tracker ---------- */
/* Scoped to this page's body class so the homepage's tracker
   (which has no "current step" state) is untouched. */

.mb-province .mb-step-current .mb-step-num{
  background: var(--mb-gold);
  border-color: var(--mb-gold);
  color: var(--mb-ink);
}

.mb-province .mb-step-current .mb-step-label{
  color: #FBF9F2;
}

/* ---------- Province intro ---------- */

.mb-province-intro{
  padding: 40px 0 28px;
}

.mb-province-intro h1{
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--mb-ink);
  margin: 0;
}

.mb-province-intro p{
  margin-top: 12px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--mb-body);
  max-width: 52ch;
}

/* Province hero — full-width city/province photo, same cover-crop
   treatment as .mb-gauteng-hero and the university hero photos
   (.mb-uni-hero), for visual consistency across every page. */
.mb-province-hero{
  margin-top: 20px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--mb-line);
  background: var(--mb-line);
}

.mb-province-hero img{
  display: block;
  width: 100%;
  height: clamp(200px, 38vw, 380px);
  object-fit: cover;
}

.mb-province-meta{
  margin-top: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  color: var(--mb-muted);
}

/* ---------- University card grid ---------- */

.mb-uni-section{
  padding: 8px 0 56px;
}

.mb-uni-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 700px){
  .mb-uni-grid{ grid-template-columns: repeat(2, 1fr); }
}

.mb-uni-card{
  background: var(--mb-surface);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.mb-uni-card:hover{
  border-color: var(--mb-green);
  transform: translateY(-2px);
}

.mb-uni-card:active{
  border-color: var(--mb-green);
  transform: scale(0.98);
  transition: border-color 0.1s ease, transform 0.1s ease;
}

.mb-uni-head{
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.mb-uni-logo{
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--mb-line);
  background: #fff;
  object-fit: contain;
  padding: 4px;
  flex-shrink: 0;
}

.mb-uni-name{
  font-family: "Fraunces", Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--mb-ink);
}

.mb-uni-location{
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--mb-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.mb-uni-location i{ font-size: 11px; color: var(--mb-green); }

.mb-uni-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mb-uni-tag{
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mb-green-dark);
  background: var(--mb-green-tint);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.mb-uni-facts{
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--mb-body);
}

.mb-uni-facts .mb-uni-aps{
  display: flex;
  align-items: center;
  gap: 6px;
}

.mb-uni-facts .mb-uni-aps i{ color: var(--mb-gold); font-size: 11px; }

.mb-uni-programmes{
  display: flex;
  align-items: center;
  gap: 6px;
}

.mb-uni-programmes i{ color: var(--mb-green); font-size: 11px; }

.mb-uni-actions{
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mb-uni-actions .mb-btn{ font-size: 14px; padding: 12px 20px; }

.mb-uni-visit{
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--mb-body);
  text-decoration: none;
  padding: 8px;
  border-radius: var(--mb-radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.mb-uni-visit:hover{
  color: var(--mb-ink);
  background: var(--mb-green-tint);
}

.mb-uni-visit:active{
  color: var(--mb-ink);
  background: var(--mb-green-tint);
  transform: scale(0.95);
  transition: color 0.1s ease, background 0.1s ease, transform 0.1s ease;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .mb-uni-card{ transition: none; }
}

/* ============================================================
   MATRICBASE — SHARED NAVIGATION (merged from per-page inline
   <style> blocks that were byte-for-byte duplicated across all
   8 province pages). Poppins @import intentionally dropped here —
   already imported once at the top of style.css, which every
   page using this file also loads.
   ============================================================ */

html, body {
    overflow-y: auto;
}


@media only screen and (max-width:768px) {
  .sticky-section{
   Display: None ;
  }
}


@media only screen and (max-width:768px) {
  .Logo1{
   Display: None ;
  }
}


/* ======================================
   MATRICBASE NAVIGATION
====================================== */

:root {
    --nav-primary: #4C7A0E;
    --nav-primary-light: #669E14;
    --nav-background: #fffdf8;
    --nav-surface: #ffffff;
    --nav-text: #171717;
    --nav-muted: #6f7280;
    --nav-border: #e8e5de;
    --nav-accent: #6B9E12;
    --nav-shadow: 0 12px 35px rgba(76, 122, 14, 0.1);
}


/* Prevent horizontal scrolling */
html,
body {
    overflow-x: hidden;
}


/* Add spacing because navbar is fixed */
body {
    padding-top: 86px;
}


/* Main header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(255, 253, 248, 0.97);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: 0 4px 20px rgba(76, 122, 14, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}


/* Navbar content wrapper */
.navbar-container {
    width: min(1450px, calc(100% - 48px));
    min-height: 86px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 40px;
}


/* Brand */
.navbar-brand,
.mobile-brand {
    display: inline-flex;
    flex-direction: column;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-name {
    color: var(--nav-primary);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.1;
}

.brand-tagline {
    margin-top: 6px;
    color: var(--nav-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

/* Sticky top nav brand: logo + serif wordmark, no tagline */
.navbar-brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

/* Drawer header brand: logo + serif wordmark, matches top nav */
.mobile-brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.mobile-brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    object-fit: cover;
    flex-shrink: 0;
}

.mobile-brand .brand-name {
    font-family: Georgia, 'Times New Roman', serif;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 19px;
}

.navbar-brand .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    flex-shrink: 0;
    object-fit: cover;
}

.navbar-brand .brand-name {
    font-family: Georgia, 'Times New Roman', serif;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 22px;
}


/* Desktop menu */
.desktop-navigation {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}


/* Standard navigation link */
.nav-link {
    position: relative;
    border: 0;
    background: transparent;
    color: var(--nav-text);
    padding: 32px 17px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition:
        color 0.25s ease,
        background-color 0.25s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    right: 17px;
    bottom: 20px;
    left: 17px;
    height: 2px;
    border-radius: 10px;
    background: var(--nav-accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--nav-accent);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
    transform: scaleX(1);
}


/* Dropdown wrapper */
.nav-dropdown {
    position: relative;
}


/* Dropdown button */
.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 9px;
}


/* Dropdown arrow */
.dropdown-arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.25s ease;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.dropdown-open .dropdown-arrow {
    transform: rotate(225deg) translate(-2px, -2px);
}


/* Dropdown panel */
.mega-menu {
    position: absolute;
    top: calc(100% - 3px);
    right: 0;
    z-index: 20;
    padding: 34px 36px;
    background: var(--nav-background);
    border: 1px solid var(--nav-border);
    border-radius: 0 0 16px 16px;
    box-shadow: var(--nav-shadow);
    visibility: hidden;
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}


/* Universities panel */
.universities-menu {
    left: 0;
    right: auto;
    width: 620px;
    max-width: calc(100vw - 32px);
}

/* Resources panel */
.resources-menu {
    right: 0;
    left: auto;
    width: 420px;
    max-width: calc(100vw - 32px);
}

/* Open desktop menu */
.nav-dropdown:hover .mega-menu,
.nav-dropdown.dropdown-open .mega-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}


/* Dropdown heading */
.mega-menu-title {
    display: block;
    margin-bottom: 20px;
    color: var(--nav-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}


/* Dropdown grids */
/* Navbar university links only */
.navbar-province-grid,
.resources-grid {
    display: grid;
    gap: 0 34px;
}

.navbar-province-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.resources-grid {
    grid-template-columns: 1fr;
}

.navbar-province-grid a,
.resources-grid a {
    display: block;
    padding: 12px 0;
    color: var(--nav-text);
    border-bottom: 1px solid var(--nav-border);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition:
        color 0.2s ease,
        padding-left 0.2s ease;
}

.navbar-province-grid a:hover,
.resources-grid a:hover {
    color: var(--nav-accent);
    padding-left: 5px;
}

/* Mobile menu button */
.mobile-menu-button {
    display: none;
    width: 48px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--nav-border);
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-button span {
    width: 21px;
    height: 2px;
    border-radius: 10px;
    background: var(--nav-text);
}


/* Mobile overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(76, 122, 14, 0.45);
    visibility: hidden;
    opacity: 0;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    visibility: visible;
    opacity: 1;
}


/* Mobile navigation drawer */
.mobile-navigation {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1100;
    width: min(430px, 100%);
    height: 100dvh;
    background: var(--nav-background);
    box-shadow: -15px 0 40px rgba(76, 122, 14, 0.15);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    overflow-y: auto;
}

.mobile-navigation.active {
    transform: translateX(0);
}


/* Mobile header */
.mobile-navigation-header {
    min-height: 86px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--nav-border);
}


/* Mobile close button */
.mobile-close-button {
    position: relative;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mobile-close-button span {
    position: absolute;
    top: 20px;
    left: 10px;
    width: 23px;
    height: 2px;
    border-radius: 10px;
    background: var(--nav-primary);
}

.mobile-close-button span:first-child {
    transform: rotate(45deg);
}

.mobile-close-button span:last-child {
    transform: rotate(-45deg);
}


/* Mobile content */
.mobile-menu-content {
    padding: 6px 20px 32px;
}


/* Mobile nav groups (LEARN / DISCOVER / PLAN) */
.mobile-nav-section {
    margin-top: 24px;
}

.mobile-nav-section:first-child {
    margin-top: 6px;
}

.mobile-nav-group-title {
    display: block;
    margin: 0 4px 10px;
    color: var(--nav-primary);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.mobile-nav-card {
    background: var(--nav-surface);
    border: 1px solid var(--nav-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(22, 36, 28, 0.04);
}

.mobile-menu-content .mobile-nav-item {
    width: 100%;
    min-height: 56px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 0;
    border-bottom: 1px solid var(--nav-border);
    background: transparent;
    color: var(--nav-text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.mobile-menu-content .mobile-nav-item:last-child {
    border-bottom: 0;
}

.mobile-menu-content .mobile-nav-item:hover {
    background: rgba(107, 158, 18, 0.07);
}

.mobile-menu-content .mobile-nav-item:active {
    transform: scale(0.97);
    background: rgba(107, 158, 18, 0.14);
    transition: background-color 0.1s ease, transform 0.1s ease;
}

.mobile-menu-content .mobile-nav-item.active {
    color: var(--nav-primary);
    background: rgba(107, 158, 18, 0.06);
}

.mobile-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    flex-shrink: 0;
    background: rgba(107, 158, 18, 0.1);
    color: var(--nav-primary);
    font-size: 14px;
}

.mobile-menu-content .mobile-nav-item.active .mobile-nav-icon {
    background: var(--nav-primary);
    color: #ffffff;
}

.mobile-nav-label {
    flex: 1;
}


/* Prevent page scrolling when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}


/* ======================================
   TABLET AND MOBILE
====================================== */

@media (max-width: 1100px) {

    body {
        padding-top: 76px;
    }

    .navbar-container {
        width: calc(100% - 32px);
        min-height: 76px;
    }

    .desktop-navigation {
        display: none;
    }

    .mobile-menu-button {
        display: flex;
        margin-left: auto;
    }

    .brand-name {
        font-size: 19px;
    }

    .navbar-brand .brand-name {
        font-size: 18px;
    }

    .navbar-brand .brand-logo {
        width: 30px;
        height: 30px;
    }

}


/* ======================================
   SMALL MOBILE
====================================== */

@media (max-width: 480px) {

    .navbar-container {
        width: calc(100% - 24px);
    }

    .brand-name {
        font-size: 17px;
    }

    .navbar-brand .brand-name {
        font-size: 16px;
    }

    .navbar-brand .brand-logo {
        width: 28px;
        height: 28px;
    }

    .brand-tagline {
        font-size: 8px;
    }

    .mobile-menu-button {
        width: 44px;
        height: 42px;
    }

    .mobile-navigation-header {
        padding-right: 16px;
        padding-left: 16px;
    }

    .mobile-menu-content {
        padding-right: 16px;
        padding-left: 16px;
    }

}

/* ======================================
   NAVBAR RESPONSIVE FIX
====================================== */

/* Keep the full navbar inside the screen */
.site-header {
    width: 100%;
}

.site-header .navbar-container {
    width: calc(100% - 40px);
    max-width: 1450px;
    margin: 0 auto;
    padding: 0;
}

/* Universities dropdown must open towards the right */
.site-header .universities-menu {
    left: 0;
    right: auto;
    width: 620px;
    max-width: calc(100vw - 32px);
}

/* Student Resources dropdown opens towards the left */
.site-header .resources-menu {
    right: 0;
    left: auto;
    width: 420px;
    max-width: calc(100vw - 32px);
}

/* Prevent dropdown content from leaving the screen */
.site-header .mega-menu {
    box-sizing: border-box;
}

/* Keep navigation links properly spaced */
.site-header .desktop-navigation {
    min-width: 0;
    gap: 4px;
}

.site-header .desktop-navigation .nav-link {
    white-space: nowrap;
    padding-left: 14px;
    padding-right: 14px;
}

/* Slightly reduce navbar text on medium desktop screens */
@media (max-width: 1350px) {

    .site-header .navbar-container {
        width: calc(100% - 28px);
        gap: 20px;
    }

    .site-header .desktop-navigation .nav-link {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 14px;
    }

    .site-header .brand-name {
        font-size: 18px;
    }
}

/* Switch to mobile menu earlier before links become cramped */
@media (max-width: 1180px) {

    body {
        padding-top: 76px;
    }

    .site-header .navbar-container {
        width: calc(100% - 28px);
        min-height: 76px;
    }

    .site-header .desktop-navigation {
        display: none;
    }

    .site-header .mobile-menu-button {
        display: flex;
        margin-left: auto;
    }
}

/* Mobile drawer */
@media (max-width: 600px) {

    .mobile-navigation {
        width: 100%;
        max-width: 100%;
    }

    .mobile-navigation-header {
        min-height: 76px;
    }

    .site-header .navbar-container {
        width: calc(100% - 24px);
    }
}


