
/* =========================================
   NATIONAL COLLEGE AUSTRALIA
   SINGLE RESPONSIVE HEADER
========================================= */

.nca-site-nav {
    --nca-navy: #123d55;
    --nca-dark: #092c41;
    --nca-gold: #f5c451;
    --nca-gold-dark: #d6a12c;
    --nca-border: #e6ebef;

    position: relative !important;

    top: auto !important;

    width: 100%;

    background: #ffffff !important;

    border-top: 3px solid #e3b650;
    border-bottom: 1px solid #e6ebef;

    box-shadow:
        0 3px 15px rgba(18,61,85,0.07);

    z-index: 100;

    font-family: inherit;
}

/* Remove old template's floating header
   behaviour when this new header is present */

.full-width-header:has(.nca-site-nav),
#rs-header:has(.nca-site-nav) {

    position: relative !important;

    top: auto !important;
    left: auto !important;
    right: auto !important;

    width: 100% !important;

    transform: none !important;
}

.nca-site-nav * {
    box-sizing: border-box;
}

/* =========================================
   HEADER LAYOUT
========================================= */

.nca-site-nav > .container {

    width: 100%;
    max-width: 1500px;

    margin: 0 auto;

    padding-left: 24px;
    padding-right: 24px;
}

.nca-header-layout {

    display: grid;

    grid-template-columns:
        auto minmax(0, 1fr) auto;

    grid-template-areas:
        "logo navigation enquiry";

    align-items: center;

    column-gap: 26px;

    min-height: 100px;
}

/* =========================================
   NCA LOGO
========================================= */

.nca-header-logo {

    grid-area: logo;

    display: flex;
    align-items: center;

    text-decoration: none !important;

    flex-shrink: 0;
}

.nca-header-logo img {

    display: block !important;

    width: 155px;
    max-width: 100%;

    height: auto;

    object-fit: contain;
}

/* =========================================
   DESKTOP NAVIGATION
========================================= */

.nca-main-navigation {

    grid-area: navigation;

    display: block;

    min-width: 0;
}

.nca-nav-list {

    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: clamp(12px, 1.3vw, 22px);

    list-style: none;

    margin: 0 !important;
    padding: 0 !important;
}

.nca-nav-list > li {

    position: relative;

    margin: 0 !important;
    padding: 0 !important;

    list-style: none;
}

.nca-nav-list > li > a,
.nca-dropdown-details > summary {

    display: flex;

    align-items: center;
    gap: 7px;

    padding: 14px 0;

    color: var(--nca-navy) !important;

    font-size: 14px;
    font-weight: 600;

    line-height: 1.4;

    white-space: nowrap;

    text-decoration: none !important;

    cursor: pointer;

    transition: color 0.2s ease;
}

/* Navigation Hover */

.nca-nav-list > li > a:hover,
.nca-dropdown-details > summary:hover {

    color: #a97718 !important;
}

/* Underline Hover Effect */

.nca-nav-list > li > a::after {

    content: "";

    position: absolute;

    left: 0;
    bottom: 5px;

    width: 0;
    height: 2px;

    background: var(--nca-gold-dark);

    transition: width 0.25s ease;
}

.nca-nav-list > li > a:hover::after {

    width: 100%;
}

/* =========================================
   DROPDOWN NAVIGATION
========================================= */

.nca-dropdown-details summary,
.nca-course-group summary {

    list-style: none;

    cursor: pointer;
}

.nca-dropdown-details summary::-webkit-details-marker,
.nca-course-group summary::-webkit-details-marker {

    display: none;
}

/* Dropdown Arrow */

.nca-dropdown-details > summary::after,
.nca-course-group > summary::after {

    content: "";

    width: 7px;
    height: 7px;

    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;

    transform: rotate(45deg);

    margin-top: -4px;

    flex-shrink: 0;

    transition: transform 0.2s ease;
}

.nca-dropdown-details[open] > summary::after,
.nca-course-group[open] > summary::after {

    transform: rotate(225deg);

    margin-top: 3px;
}

/* Main Dropdown Panel */

.nca-dropdown-panel {

    position: absolute;

    top: calc(100% + 8px);
    left: 0;

    width: 365px;

    max-width: calc(100vw - 32px);

    max-height: min(70vh, 550px);

    overflow-y: auto;

    background: #ffffff;

    border: 1px solid #e3e9ed;
    border-top: 3px solid #e2b54c;

    border-radius: 10px;

    padding: 10px;

    box-shadow:
        0 12px 40px rgba(9,44,65,0.16);

    z-index: 200;
}

/* Course Categories */

.nca-course-group {

    margin: 0;

    border-bottom: 1px solid #edf1f4;
}

.nca-course-group:last-child {

    border-bottom: none;
}

.nca-course-group > summary {

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 14px 12px;

    color: var(--nca-navy);

    font-size: 14px;
    font-weight: 700;

    border-radius: 6px;
}

.nca-course-group > summary:hover,
.nca-course-group[open] > summary {

    background: #f0f5f8;

    color: var(--nca-navy);
}

/* Individual Course Links */

.nca-course-links {

    padding: 6px 6px 12px 14px;

    background: #f9fbfc;

    border-radius: 6px;
}

.nca-course-links a,
.nca-career-panel a {

    display: block;

    padding: 11px 10px;

    color: #395567 !important;

    font-size: 13px;
    font-weight: 500;

    line-height: 1.6;

    white-space: normal;

    text-decoration: none !important;

    border-radius: 5px;
}

.nca-course-links a:hover,
.nca-career-panel a:hover {

    background: #fff3d7;

    color: #123d55 !important;
}

.nca-career-panel {

    width: 200px;
}

/* =========================================
   REFERRAL NAVIGATION LINK
========================================= */

.nca-nav-list > li > .nca-header-referral {

    color: #986c19 !important;

    font-weight: 700;
}

/* =========================================
   SEARCH BUTTON
========================================= */

.nca-header-search {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    padding: 0;

    background: #f2f6f8;

    border: 1px solid #e2e9ed;

    border-radius: 7px;

    color: var(--nca-navy);

    cursor: pointer;
}

.nca-header-search:hover {

    background: #e5edf2;
}

/* =========================================
   PREMIUM ENQUIRE NOW BUTTON
========================================= */

.nca-header-cta {

    grid-area: enquiry;

    display: inline-flex !important;

    align-items: center;
    justify-content: center;

    gap: 9px;

    position: relative;

    min-height: 48px;

    padding: 13px 21px;

    background: linear-gradient(
        135deg,
        #ffe6a6 0%,
        #f5c451 50%,
        #e4b13f 100%
    ) !important;

    border: 1px solid #e0b14b !important;

    border-radius: 8px;

    color: #123d55 !important;

    font-family: inherit;

    font-size: 14px;
    font-weight: 800;

    line-height: 1.4;

    white-space: nowrap;

    cursor: pointer;

    box-shadow:
        0 4px 12px rgba(190,143,40,0.22),
        inset 0 1px 1px rgba(255,255,255,0.75);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.nca-header-cta span {

    color: #123d55 !important;
}

.nca-header-cta svg {

    flex-shrink: 0;

    color: #123d55;
}

.nca-header-cta:hover {

    transform: translateY(-2px);

    box-shadow:
        0 6px 16px rgba(190,143,40,0.30);
}

.nca-header-cta:active {

    transform: scale(0.98);
}

/* Accessible Focus */

.nca-site-nav a:focus-visible,
.nca-site-nav button:focus-visible,
.nca-site-nav summary:focus-visible {

    outline: 3px solid #bb8b31;

    outline-offset: 4px;
}

/* =========================================
   MOBILE MENU BUTTON
========================================= */

.nca-menu-toggle {

    display: none !important;

    grid-area: toggle;
}

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

@media screen and (max-width: 1199px) {

    .nca-site-nav > .container {

        padding-left: 18px;
        padding-right: 18px;
    }

    .nca-header-layout {

        grid-template-columns:
            minmax(0, 1fr) auto auto;

        grid-template-areas:
            "logo enquiry toggle"
            "navigation navigation navigation";

        column-gap: 14px;

        row-gap: 0;

        min-height: auto;

        padding-top: 14px;
        padding-bottom: 14px;
    }

    /* Mobile Logo */

    .nca-header-logo img {

        width: 135px;
    }

    /* Mobile Enquiry Button */

    .nca-header-cta {

        min-height: 44px;

        padding: 11px 15px;

        font-size: 13px;

        gap: 7px;
    }

    /* Mobile Hamburger */

    .nca-menu-toggle {

        display: flex !important;

        flex-direction: column;

        align-items: center;
        justify-content: center;

        gap: 5px;

        width: 44px;
        height: 44px;

        padding: 9px;

        background: #f6f8fa;

        border: 1px solid #dce5eb;

        border-radius: 8px;

        cursor: pointer;
    }

    .nca-menu-toggle span {

        display: block;

        width: 21px;
        height: 2px;

        background: #123d55;

        border-radius: 3px;

        transition:
            transform 0.25s ease,
            opacity 0.25s ease;
    }

    /* Hamburger to Close Icon */

    .nca-menu-toggle[aria-expanded="true"]
    span:nth-child(1) {

        transform: translateY(7px) rotate(45deg);
    }

    .nca-menu-toggle[aria-expanded="true"]
    span:nth-child(2) {

        opacity: 0;
    }

    .nca-menu-toggle[aria-expanded="true"]
    span:nth-child(3) {

        transform: translateY(-7px) rotate(-45deg);
    }

    /* Hide Mobile Navigation Initially */

    .nca-main-navigation {

        display: none;

        padding-top: 12px;

        margin-top: 15px;

        border-top: 1px solid #e6ebef;
    }

    /* Open Mobile Navigation */

    .nca-main-navigation.is-open {

        display: block;
    }

    .nca-nav-list {

        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 0;
    }

    .nca-nav-list > li {

        width: 100%;

        border-bottom: 1px solid #edf1f4;
    }

    .nca-nav-list > li:last-child {

        border-bottom: none;
    }

    .nca-nav-list > li > a,
    .nca-dropdown-details > summary {

        width: 100%;

        padding: 15px 8px;

        font-size: 15px;

        white-space: normal;

        justify-content: space-between;
    }

    /* No Desktop Underline on Mobile */

    .nca-nav-list > li > a::after {

        display: none;
    }

    /* Mobile Dropdown */

    .nca-dropdown-panel {

        position: static;

        width: 100%;

        max-width: 100%;
        max-height: none;

        overflow: visible;

        margin: 0 0 12px;

        padding: 8px;

        background: #f8fafb;

        border: 1px solid #e3e9ed;

        border-radius: 8px;

        box-shadow: none;
    }

    .nca-course-group > summary {

        padding: 13px 10px;

        font-size: 14px;
    }

    .nca-course-links a {

        font-size: 13px;

        padding: 12px 10px;
    }

    .nca-search-item {

        padding-top: 12px !important;
    }
}

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

@media screen and (max-width: 480px) {

    .nca-site-nav > .container {

        padding-left: 12px;
        padding-right: 12px;
    }

    .nca-header-layout {

        column-gap: 10px;

        padding-top: 12px;
        padding-bottom: 12px;
    }

    .nca-header-logo img {

        width: 112px;
    }

    .nca-header-cta {

        min-height: 42px;

        padding: 10px 12px;

        font-size: 12px;

        gap: 5px;
    }

    .nca-header-cta svg {

        width: 14px;
        height: 14px;
    }

    .nca-menu-toggle {

        width: 40px;
        height: 42px;
    }
}

/* Extra Small Screens */

@media screen and (max-width: 360px) {

    .nca-header-layout {

        column-gap: 7px;
    }

    .nca-header-logo img {

        width: 95px;
    }

    .nca-header-cta {

        padding: 10px;

        font-size: 11px;
    }

    .nca-menu-toggle {

        width: 36px;
    }
}

/* =========================================
   ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {

    .nca-site-nav * {

        transition: none !important;

        animation: none !important;
    }
}
