/* =====================================================
   MYCAREERFINDER NAVIGATION (same as requirements/CUT.php)
   Loaded after style.css on the career pages.
===================================================== */
:root {
    --mcf-primary: #0b5563;
    --mcf-primary-soft: #e2eef0;
    --mcf-accent: #f2b33d;
    --mcf-ink: #1d2433;
    --mcf-muted: #5c6878;
    --mcf-surface: #ffffff;
    --mcf-line: #d8e4e6;
    --mcf-font-display: "Sora", "Segoe UI", system-ui, sans-serif;
    --mcf-font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
    --mcf-radius-lg: 18px;
    --mcf-radius-sm: 8px;
    --nav-background: var(--mcf-surface);
    --nav-text: var(--mcf-ink);
    --nav-border: var(--mcf-line);
    --nav-shadow: 0 16px 40px rgba(11, 85, 99, 0.12);
}

html, body { overflow-x: hidden; }
body { padding-top: 80px; }

/* Reset anything the old career-page header styles might add */
.site-header,
.site-header * { box-sizing: border-box; }
.site-header a:hover { text-decoration: none; }

.site-header {
    position: fixed;
    top: 0; left: 0;
    z-index: 1000;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--mcf-primary);
    box-shadow: 0 2px 18px rgba(11, 85, 99, 0.25);
}

.site-header .navbar-container {
    width: calc(100% - 40px);
    max-width: 1280px;
    min-height: 80px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 32px;
}

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

.brand-name {
    font-family: var(--mcf-font-display);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.brand-name::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border-radius: 50%;
    border: 3px solid var(--mcf-accent);
    vertical-align: 1px;
}

.brand-tagline {
    margin-top: 4px;
    font-family: var(--mcf-font-body);
    font-size: 12px;
    font-weight: 500;
}

.site-header .brand-name { color: #ffffff; }
.site-header .brand-tagline { color: rgba(255, 255, 255, 0.7); }
.mobile-navigation .brand-name { color: var(--mcf-primary); }
.mobile-navigation .brand-tagline { color: var(--mcf-muted); }

.site-header .desktop-navigation {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2px;
}

.site-header .desktop-navigation .nav-link {
    position: relative;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    padding: 30px 14px;
    font-family: var(--mcf-font-body);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.site-header .desktop-navigation .nav-link::after {
    content: "";
    position: absolute;
    right: 14px; bottom: 20px; left: 14px;
    height: 3px;
    border-radius: 3px;
    background: var(--mcf-accent);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.site-header .desktop-navigation .nav-link:hover,
.site-header .desktop-navigation .nav-link:focus-visible,
.site-header .desktop-navigation .nav-link.is-current { color: #ffffff; }

.site-header .desktop-navigation .nav-link:hover::after,
.site-header .desktop-navigation .nav-link:focus-visible::after,
.site-header .desktop-navigation .nav-link.is-current::after { transform: scaleX(1); }

.nav-dropdown { position: relative; }

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

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

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

.site-header .mega-menu {
    position: absolute;
    top: 100%;
    z-index: 20;
    padding: 26px 28px;
    background: var(--nav-background);
    border: 1px solid var(--nav-border);
    border-top: 3px solid var(--mcf-accent);
    border-radius: 0 0 var(--mcf-radius-lg) var(--mcf-radius-lg);
    box-shadow: var(--nav-shadow);
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.site-header .careers-menu {
    right: 0; left: auto;
    width: 560px;
    max-width: calc(100vw - 32px);
}

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

.mega-menu-title {
    display: block;
    margin-bottom: 12px;
    font-family: var(--mcf-font-display);
    color: var(--mcf-primary);
    font-size: 15px;
    font-weight: 700;
}

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

.navbar-province-grid a {
    display: block;
    padding: 11px 0;
    color: var(--nav-text);
    border-bottom: 1px solid var(--nav-border);
    font-family: var(--mcf-font-body);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease, padding-left 0.15s ease;
}

.navbar-province-grid a:hover {
    color: var(--mcf-primary);
    padding-left: 6px;
}

.mega-menu-footer-link {
    display: inline-block;
    margin-top: 16px;
    font-family: var(--mcf-font-body);
    font-weight: 700;
    color: var(--mcf-primary);
}

/* Mobile menu */
.mobile-menu-button {
    display: none;
    width: 48px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--mcf-radius-sm);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-button span {
    width: 21px;
    height: 2px;
    border-radius: 2px;
    background: #ffffff;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(11, 85, 99, 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 {
    position: fixed;
    top: 0; right: 0;
    z-index: 1100;
    width: min(430px, 100%);
    height: 100dvh;
    background: var(--mcf-surface);
    box-shadow: -15px 0 40px rgba(11, 85, 99, 0.18);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    overflow-y: auto;
}

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

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

.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: 2px;
    background: var(--mcf-primary);
}

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

.mobile-menu-content { padding: 4px 22px 35px; }

.mobile-menu-link,
.mobile-dropdown-button {
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    border: 0;
    border-bottom: 1px solid var(--nav-border);
    background: transparent;
    color: var(--nav-text);
    font-family: var(--mcf-font-body);
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.mobile-menu-link:hover { color: var(--mcf-primary); text-decoration: none; }

.mobile-dropdown-arrow {
    width: 9px;
    height: 9px;
    margin-right: 5px;
    border-right: 2px solid var(--mcf-primary);
    border-bottom: 2px solid var(--mcf-primary);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.mobile-dropdown.active .mobile-dropdown-arrow { transform: rotate(225deg); }

.mobile-submenu {
    display: none;
    padding: 8px 10px 14px 18px;
    background: var(--mcf-primary-soft);
    border-bottom: 1px solid var(--nav-border);
}

.mobile-dropdown.active .mobile-submenu { display: block; }

.mobile-submenu a {
    display: block;
    padding: 11px 4px;
    color: var(--nav-text);
    border-bottom: 1px solid rgba(11, 85, 99, 0.1);
    font-family: var(--mcf-font-body);
    font-size: 15px;
    text-decoration: none;
}

.mobile-submenu a:last-child { border-bottom: 0; }
.mobile-submenu a:hover { color: var(--mcf-primary); }

body.mobile-menu-open { overflow: hidden; }

@media (max-width: 1250px) {
    .site-header .navbar-container { width: calc(100% - 28px); gap: 20px; }
    .site-header .desktop-navigation .nav-link { padding-left: 10px; padding-right: 10px; font-size: 15px; }
    .site-header .brand-name { font-size: 20px; }
}

@media (max-width: 1080px) {
    body { padding-top: 72px; }
    .site-header .navbar-container { min-height: 72px; }
    .site-header .desktop-navigation { display: none; }
    .site-header .mobile-menu-button { display: flex; margin-left: auto; }
}

@media (max-width: 600px) {
    .mobile-navigation { width: 100%; max-width: 100%; }
    .mobile-navigation-header { min-height: 72px; padding: 18px 16px; }
    .mobile-menu-content { padding-left: 16px; padding-right: 16px; }
    .site-header .navbar-container { width: calc(100% - 24px); }
    .brand-name { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .site-header *, .mobile-navigation, .mobile-menu-overlay { transition: none !important; }
}
