/**
 * WFI 2026 — shared design header
 * Logo left · nav center · Login + CTA right
 */

.wfi-site-header {
    --wfi-header-orange: #d3612b;
    --wfi-header-orange-hover: #c0551c;
    --wfi-header-black: #000000;
    --wfi-header-border: #ececec;

    background: #ffffff !important;
    border-bottom: 1px solid var(--wfi-header-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.wfi-site-header a {
    text-decoration: none;
}

.wfi-site-header ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wfi-site-header__inner {
    max-width: var(--wfi-container, 1280px);
}

.wfi-site-header__nav {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 2rem;
    min-height: 80px;
}

.wfi-site-header__brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
    align-self: center;
}

.wfi-site-header__brand img {
    width: 178px;
    height: auto;
    display: block;
}

.wfi-site-header__brand.pl_logo {
    display: none;
}

.wfi-site-header__brand.pl_logo img {
    width: 220px;
}

.cms-self-paced-programs .wfi-site-header__brand.wfi {
    display: none;
}

.cms-self-paced-programs .wfi-site-header__brand.pl_logo {
    display: inline-flex;
}

.wfi-site-header__toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    align-self: center;
    margin-left: auto;
    position: relative;
    z-index: 260;
}

.wfi-site-header__mobile-bar {
    display: none;
}

.wfi-site-header__backdrop {
    display: none;
}

.wfi-site-header__toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--wfi-header-black);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.wfi-site-header__toggle.is-open .wfi-site-header__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.wfi-site-header__toggle.is-open .wfi-site-header__toggle-bar:nth-child(2) {
    opacity: 0;
}

.wfi-site-header__toggle.is-open .wfi-site-header__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.wfi-site-header__collapse {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 2.5rem;
    flex: 1;
    min-width: 0;
}

.wfi-site-header__menu {
    display: flex;
    align-items: stretch;
    gap: 0 1.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wfi-site-header__item {
    margin: 0;
    position: relative;
    display: flex;
    align-items: stretch;
}

.wfi-site-header__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--wfi-header-black);
    font-family: var(--wfi-font-display, "Sora", sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    padding: 0 0.1rem;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.wfi-site-header__link:hover,
.wfi-site-header__item.is-active > .wfi-site-header__link {
    color: var(--wfi-header-orange);
    border-bottom-color: var(--wfi-header-orange);
    text-decoration: none;
}

.wfi-site-header__chevron {
    display: inline-block;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    background: currentColor;
    /* chevron down */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23000' d='M2.2 4.2a.75.75 0 0 1 1.06 0L6 6.94l2.74-2.74a.75.75 0 1 1 1.06 1.06l-3.27 3.27a.75.75 0 0 1-1.06 0L2.2 5.26a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23000' d='M2.2 4.2a.75.75 0 0 1 1.06 0L6 6.94l2.74-2.74a.75.75 0 1 1 1.06 1.06l-3.27 3.27a.75.75 0 0 1-1.06 0L2.2 5.26a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wfi-site-header__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    margin: 0;
    padding: 0.5rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--wfi-header-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    z-index: 120;
}

.wfi-site-header__item--dropdown:hover > .wfi-site-header__dropdown,
.wfi-site-header__item--dropdown:focus-within > .wfi-site-header__dropdown {
    display: block;
}

.wfi-site-header__dropdown a {
    display: block;
    padding: 0.7rem 1.1rem;
    color: #1a1a1a;
    font-family: var(--wfi-font-body, "Inter", sans-serif);
    font-size: 0.9rem;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
}

.wfi-site-header__dropdown a:hover {
    background: #fff6f1;
    color: var(--wfi-header-orange);
}

/* Rich dropdown cards (Job Seeker) */
.wfi-site-header__dropdown--rich {
    min-width: 360px;
    padding: 0.55rem;
    left: 0;
    transform: none;
}

.wfi-site-header__nav-card {
    display: flex !important;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.85rem 0.9rem !important;
    border-radius: 12px;
    white-space: normal !important;
    color: inherit !important;
    text-decoration: none !important;
}

.wfi-site-header__nav-card:hover {
    background: #fff6f1 !important;
}

.wfi-site-header__nav-card-icon {
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f0e9ff 0%, #ffe8ef 55%, #fff4ec 100%);
    color: var(--wfi-header-orange, #d3612b);
}

.wfi-site-header__nav-card-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.wfi-site-header__nav-card-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.wfi-site-header__nav-card-title {
    display: block;
    font-family: var(--wfi-font-display, "Sora", sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    color: #2a2a2a;
}

.wfi-site-header__nav-card-desc {
    display: block;
    font-family: var(--wfi-font-body, "Inter", sans-serif);
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.4;
    color: #6b6b6b;
    white-space: normal;
}

.wfi-site-header__nav-card:hover .wfi-site-header__nav-card-title {
    color: var(--wfi-header-orange, #d3612b);
}

/* ---------- Full-width mega menu (Learn) ---------- */
.wfi-site-header__item--mega {
    position: static;
}

.wfi-site-header__mega {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid var(--wfi-header-border);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.1);
    z-index: 120;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.wfi-site-header__item--mega:hover > .wfi-site-header__mega,
.wfi-site-header__item--mega:focus-within > .wfi-site-header__mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.wfi-site-header__mega-inner {
    max-width: var(--wfi-container, 1280px);
    margin: 0 auto;
    padding: 2.25rem 1.5rem 2.5rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.5rem;
    box-sizing: border-box;
}

.wfi-site-header__mega-col {
    min-width: 0;
    padding-left: 2.5rem;
    border-left: 1px solid var(--wfi-header-border);
}

.wfi-site-header__mega-col:first-child {
    padding-left: 0;
    border-left: 0;
}

.wfi-site-header__mega-heading {
    margin: 0 0 1.1rem;
    font-family: var(--wfi-font-display, "Sora", sans-serif);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #8a8f98;
}

.wfi-site-header__mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.wfi-site-header__mega-list a {
    display: inline-block;
    color: var(--wfi-header-black);
    font-family: var(--wfi-font-body, "Inter", sans-serif);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    transition: color 0.15s ease;
}

.wfi-site-header__mega-list a:hover {
    color: var(--wfi-header-orange);
}

.wfi-site-header__mega-partners {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.wfi-site-header__mega-partners a {
    display: inline-flex;
    align-items: center;
}

.wfi-site-header__mega-partners img {
    max-height: 34px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.7;
    transition: filter 0.15s ease, opacity 0.15s ease;
}

.wfi-site-header__mega-partners a:hover img {
    filter: none;
    opacity: 1;
}

.wfi-site-header__actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
    align-self: center;
}

.wfi-site-header__login {
    color: var(--wfi-header-black);
    font-family: var(--wfi-font-body, "Inter", sans-serif);
    font-size: 0.9375rem;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
}

.wfi-site-header__login:hover {
    color: var(--wfi-header-orange);
    text-decoration: none;
}

.wfi-site-header__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--wfi-header-orange);
    color: #fff !important;
    font-family: var(--wfi-font-display, "Sora", sans-serif);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    padding: 0.75rem 1.2rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.wfi-site-header__cta:hover {
    background: var(--wfi-header-orange-hover);
    color: #fff !important;
}

/* Free-trial HubSpot popup */
.wfi-free-trial-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.wfi-free-trial-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.wfi-free-trial-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 30, 54, 0.55);
}

.wfi-free-trial-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: min(90vh, 720px);
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(15, 30, 54, 0.28);
    padding: 1.75rem 1.5rem 1.5rem;
}

.wfi-free-trial-modal__close {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: #0e1133;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.wfi-free-trial-modal__title {
    margin: 0 1.5rem 1rem 0;
    font-family: var(--wfi-font-display, "Sora", sans-serif);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0e1133;
    text-align: center;
}

.wfi-free-trial-modal__error {
    margin: 0;
    color: #8a1f11;
    text-align: center;
}

body.wfi-free-trial-modal-open {
    overflow: hidden;
}

.wfi-site-header__cta-arrow {
    font-size: 1.05rem;
    line-height: 1;
    font-weight: 400;
}

.wfi-site-header__cart {
    display: flex;
    align-items: center;
}

@media (max-width: 1199.98px) {
    .wfi-site-header__menu {
        gap: 0 1.25rem;
    }

    .wfi-site-header__collapse {
        gap: 1.5rem;
    }

    .wfi-site-header__link {
        font-size: 0.85rem;
    }

    .wfi-site-header__brand img {
        width: 150px;
    }
}

@media (max-width: 991.98px) {
    .wfi-site-header__nav {
        align-items: center;
        min-height: 68px;
        padding: 0.5rem 0;
    }

    .wfi-site-header__toggle {
        display: inline-flex;
    }

    .wfi-site-header__collapse {
        display: none;
        position: fixed;
        inset: 0 0 0 12%;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 1.25rem;
        padding: 1.15rem 1.5rem 2rem;
        overflow-y: auto;
        z-index: 250;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
    }

    .wfi-site-header__collapse.is-open {
        display: flex;
    }

    .wfi-site-header__mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin: 0 0 0.25rem;
        padding-bottom: 0.85rem;
        border-bottom: 1px solid var(--wfi-header-border);
        flex-shrink: 0;
    }

    .wfi-site-header__mobile-title {
        font-family: var(--wfi-font-display, "Sora", sans-serif);
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--wfi-header-black);
    }

    .wfi-site-header__mobile-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        margin: 0;
        padding: 0;
        border: 1px solid var(--wfi-header-border);
        border-radius: 999px;
        background: #fff;
        color: var(--wfi-header-black);
        font-size: 1.65rem;
        line-height: 1;
        cursor: pointer;
        transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
    }

    .wfi-site-header__mobile-close:hover {
        border-color: rgba(211, 97, 43, 0.45);
        color: var(--wfi-header-orange);
        background: #fff8f3;
    }

    .wfi-site-header__backdrop {
        display: none;
        position: fixed;
        inset: 0;
        border: 0;
        padding: 0;
        margin: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 240;
        cursor: pointer;
    }

    .mobile-menu-shown .wfi-site-header__backdrop {
        display: block;
    }

    .mobile-menu-shown {
        overflow: hidden;
    }

    .mobile-menu-shown::before {
        display: none;
    }

    .wfi-site-header__menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .wfi-site-header__item {
        display: block;
    }

    .wfi-site-header__link {
        width: 100%;
        justify-content: space-between;
        padding: 0.95rem 0;
        border-bottom: 1px solid var(--wfi-header-border);
    }

    .wfi-site-header__item.is-active > .wfi-site-header__link,
    .wfi-site-header__link:hover {
        border-bottom-color: var(--wfi-header-border);
    }

    .wfi-site-header__dropdown {
        position: static;
        transform: none;
        display: none;
        border: 0;
        box-shadow: none;
        border-radius: 0;
        padding: 0 0 0.5rem 0.75rem;
        min-width: 0;
    }

    .wfi-site-header__dropdown--rich {
        min-width: 0;
        padding: 0 0 0.5rem 0.35rem;
        left: auto;
    }

    .wfi-site-header__nav-card {
        padding: 0.75rem 0.55rem !important;
    }

    .wfi-site-header__item--dropdown:hover > .wfi-site-header__dropdown {
        display: none;
    }

    .wfi-site-header__item--dropdown.is-open > .wfi-site-header__dropdown {
        display: block;
    }

    /* Mega menu collapses into a stacked list on mobile */
    .wfi-site-header__mega {
        position: static;
        width: auto;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        box-shadow: none;
        border-top: 0;
        display: none;
    }

    .wfi-site-header__item--mega:hover > .wfi-site-header__mega,
    .wfi-site-header__item--mega:focus-within > .wfi-site-header__mega {
        display: none;
    }

    .wfi-site-header__item--mega.is-open > .wfi-site-header__mega {
        display: block;
    }

    .wfi-site-header__mega-inner {
        display: block;
        max-width: none;
        margin: 0;
        padding: 0.25rem 0 0.5rem 0.75rem;
    }

    .wfi-site-header__mega-col {
        border-left: 0;
        padding-left: 0;
        margin-bottom: 1.25rem;
    }

    .wfi-site-header__mega-col:last-child {
        margin-bottom: 0;
    }

    .wfi-site-header__mega-heading {
        margin-bottom: 0.75rem;
    }

    .wfi-site-header__mega-partners {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.25rem;
        align-items: center;
    }

    .wfi-site-header__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
        padding-top: 0.5rem;
        align-self: stretch;
    }

    .wfi-site-header__cta {
        justify-content: center;
    }

    .wfi-site-header__cart {
        justify-content: center;
    }
}
