/* This is the file being used for the menu */

/* =============== Font =============== */
/* Now apply the custom font */
body {
    font-family: 'Rubik', sans-serif;
}

/* =============== VARIABLES CSS =============== */
:root {
    /* ========== Colors ========== */
    --black-color: #FFFFFF;
    --black-color-light: hsl(0, 0%, 20%);
    --black-color-lighten: hsl(0, 0%, 40%);
    --white-color: #fff;
    --body-color: hsl(220, 100%, 97%);

    /* ==== B2B Colours ===== */
    --bg-colour: #EFF6FF;
    --lines: #DDDDDD;
    --link-light: #347E9E;
    --link-dark: #025585;
    --text-light: #757575;
    --text-mid: #555D69;
    --text-dark: #111827;
    --top-menu: #FFFFFF;
    --second-menu: #F9F9F9;

    /* ========== Font and Typography ========== */
    --body-font: 'Rubik', sans-serif;
    --normal-font-size: 1rem;
    --font-regular: 400;
    --font-semi-bold: 600;

    /* ========== Z-index ========== */
    --z-tooltip: 10;
    --z-fixed: 100;

    /* ========== Sizing ========== */
    --header-height: 3.5rem;

    /* Default Page Padding in REM */
    --page-padding-max: clamp(20px, calc(5.56vw - 0px), 80px);
    --page-padding-min: clamp(20px, calc(5.56vw - 0px), 80px);
}

/* ========== Responsive Typography ========== */
@media screen and (min-width: 1024px) {
    :root {
        --normal-font-size: 1rem;
    }
}

/* =============== BASE =============== */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--top-menu);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

/* =============== REUSABLE CSS CLASSES =============== */
.container {
    padding-right: 8px;
    padding-left: 8px;
    /* margin-inline: 8px; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
}

/* =============== HEADER =============== */
.header {
    display: block;

    /* uncomment to enable sticky
    position: fixed; */
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--black-color);

    /* Enable Shadow
    box-shadow: 0 2px 16px hsla(220, 32%, 8%, .3); */
    z-index: var(--z-fixed);
}

/* =============== NAV =============== */
.nav {
    height: var(--header-height);
}



.nav-container {
    width: 100%;
    max-width: 1280px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.nav__logo,
.nav__burger,
.nav__close {
    color: var(--link-dark);
}

.nav__data {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    display: inline-flex;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-right: 8px;
    column-gap: .25rem;
    font-weight: var(--font-semi-bold);
    flex-direction: column;
}

.nav__logo i {
    font-weight: initial;
    font-size: 1.25rem;
}

.nav__toggle {
    position: relative;
    width: 32px;
    height: 32px;
}

.nav__burger,
.nav__close {
    position: absolute;
    width: max-content;
    height: max-content;
    inset: 0;
    margin: auto;
    cursor: pointer;
    transition: opacity .1s, transform .4s;
}

.nav__close {
    opacity: 0;
}

.bottom-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    padding-top: 16px;
    padding-bottom: 16px;
    padding-right: var(--page-padding-max);
    padding-left: var(--page-padding-max);
}

.nav__menu {
    width: 100%;
    max-width: 1280px;

    /* display: flex;
    justify-content: start;
    align-items: center; */
}

/* Navigation for mobile devices */
@media screen and (max-width: 1199px) {

    .nav.container{
        padding-right: 20px;
        padding-left: 20px;
    }

    .bottom-menu {
        padding: 0;
    }
    .nav__menu {
        position: absolute;
        left: 0;
        top: 2.5rem;
        width: 100%;
        height: calc(100vh - 3.5rem);
        overflow: auto;
        pointer-events: none;
        opacity: 0;
        transition: top .4s, opacity .3s;
        background-color: var(--top-menu);
    }

    ul.nav__list li {
        border-bottom: 1px solid var(--lines);
    }

    .nav__menu::-webkit-scrollbar {
        width: 0;
    }

    .nav__list {
        background-color: var(--black-color);
        /* padding-top: 1rem;
        padding-bottom: 1rem; */
        padding: 16px 24px;
    }

    .dropdown__menu {
        display: none; /* Hide dropdown menu by default */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        margin: 8px 0;
    }


    /* Class to show dropdown when active */
    .dropdown__menu.active {
        display: block;
        max-height: 1000px; /* Arbitrary large value */
        transition: max-height 0.4s ease-in;
    }

    .dropdown__menu li {
        border-bottom: none !important;
    }
}


.nav__link {
    color: var(--text-dark);
    font-weight: var(--font-semi-bold);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color .3s;
    margin: 0;
}

.nav__link:hover {
    background-color: var(--black-color);
}

    /* Show menu */
    body.menu-open { 
        overflow: hidden; /* body will not scroll if menu is open */
        position: fixed;
        width: 100%;
        height: 100%;
    }
    .show-menu {
        opacity: 1;
        top: 100%;
        pointer-events: initial;
    }

    /* Show icon */
    .show-icon .nav__burger {
        opacity: 0;
        transform: rotate(90deg);
    }

    .show-icon .nav__close {
        opacity: 1;
        transform: rotate(90deg);
    }

/* =============== DROPDOWN =============== */
.dropdown__item {
    cursor: pointer;
    padding: 16px 16px 16px;
    
}

.dropdown__arrow {
    font-size: 1.25rem;
    font-weight: initial;
    transition: transform .4s;
}

.dropdown__item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dropdown__link ,
.dropdown__sublink {
    font-size: 16px;
    font-weight: initial;
    color: white;
    padding: 16px;
    width: 100%;
}

.dropdown__link:hover,
.dropdown__sublink:hover {
    background-color: var(--black-color);
}

.dropdown__menu,
.dropdown__submenu {
    max-height: 1000px;
}


/* Show dropdown menu & submenu */
.dropdown__item:hover .dropdown__menu,
.dropdown__subitem:hover > .dropdown__submenu {
    max-height: 1000px;
    transition: max-height .4s ease-in;
}

/* Rotate dropdown icon */
.dropdown__item:hover .dropdown__arrow {
    transform: rotate(180deg);
}

.dropdown__add {
    margin-left: auto;
}

.dropdown__sublink {
    background-color: var(--black-color-lighten);
}

/* =============== BREAKPOINTS =============== */
@media screen and (min-width: 300px) {
    .nav__link {
        padding-inline: 1rem;
    }
}

@media screen and (min-width: 1200px) {
    /* Container and navigation layout */
    .container {
        padding-right: var(--page-padding-max);
        padding-left: var(--page-padding-max);
        margin-left: auto;
        margin-right: auto;
    }

    .nav {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .nav__toggle {
        display: none;
    }

    .nav__list {
        height: 100%;
        width: 100%;
        max-width: 1280px;
        display: flex;
        justify-content: space-between;
        margin: 0;
        padding: 0;
    }

    .nav__list li {
        padding: 0 16px;
    }

    /* Remove padding left from first child */
    .nav__list li:first-child {
        padding-left: 0;
    }

    .nav__list li:hover {
        text-decoration: underline;
    }

    .nav__link {
        height: 100%;
        padding: 0;
        justify-content: initial;
        column-gap: .25rem;
    }

    .dropdown-navlink {
        position: relative;
    }

    /* Link transitions and hover effects */
    .nav__link,
    .dropdown__link,
    .dropdown__sublink {
        transition: color 0.3s ease, background-color 0.3s ease;
    }

    .nav__link:hover {
        background-color: var(--second-menu);
    }

    .dropdown__link:hover {
        color: var(--text-dark);
    }

    .dropdown__sublink:hover {
        color: var(--bright-yellow);
    }

    /* Dropdown positioning */
    .dropdown__item,
    .dropdown__subitem {
        position: relative;
        padding: 0;
    }

    /* Create invisible bridge between menu item and dropdown */
    .dropdown__item::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: 15px; /* Height of invisible bridge */
        background-color: transparent; /* Make it invisible */
    }

    /* Fixed positioning for dropdown menus */
    .dropdown__menu,
    .dropdown__submenu {
        /* Fixed absolute positioning */
        position: absolute;
        left: 0;
        
        /* Prevent shifting during transitions */
        transform: translateZ(0); /* Force GPU acceleration */
        will-change: opacity, visibility; /* Hint to browser about what will change */
        
        /* Visibility properties */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        
        /* Consistent box model */
        margin: 0;
        padding: 0;
        
        /* Visual styling */
        background-color: var(--black-color-lighten);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 100;
        
        /* Clean transition - only animate opacity */
        transition: opacity 0.3s ease;
    }

    /* Position dropdown menu below the parent + bridge */
    .dropdown__menu {
        top: calc(100% + 15px) !important;
        min-width: 200px; /* Prevent width shifting */
        
    }

    /* Position submenus that appear to the side */
    .dropdown__submenu {
        top: 0 !important; /* Align with parent item */
        left: calc(100% + 5px); /* Move slightly away from parent */
        min-width: 200px; /* Prevent width shifting */
    }

    /* Show dropdown menu on hover */
    .dropdown__item:hover .dropdown__menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Show dropdown submenu on hover */
    .dropdown__subitem:hover > .dropdown__submenu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }


    /* Remove padding from dropdown items */
    .dropdown__menu li {
        padding: 0;
    }

}

/* For mobile view - hide dropdown menus by default */
@media screen and (max-width: 1199px) {
    .dropdown__menu {
        display: none; /* Hide dropdown menu by default */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
    
    /* Class to show dropdown when active */
    .dropdown__menu.active {
        display: block;
        max-height: 1000px; /* Arbitrary large value */
        transition: max-height 0.4s ease-in;
        padding: 0;
    }

        .dropdown__link ,
    .dropdown__sublink {
        color: var(--text-dark);
        
    }
}

/* Remove blue highlight on click/tap */
.nav__link,
.dropdown__link, .dropdown__sublink,
.dropdown__item a,
.nav__toggle,
.nav__burger,
.nav__close {
    -webkit-tap-highlight-color: transparent; /* For iOS Safari */
    outline: none; /* Remove outline */
}

/* Add this to ensure focus states don't show the blue highlight */
.nav__link:focus,
.dropdown__link:focus,
.dropdown__item a:focus,
.nav__toggle:focus,
.nav__burger:focus,
.nav__close:focus {
    outline: none;
    background-color: transparent; /* Or whatever background you want */
}

/* For accessibility, you might want to add a different focus style */
.nav__link:focus-visible,
.dropdown__link:focus-visible,
.dropdown__item a:focus-visible,
.nav__toggle:focus-visible,
.nav__burger:focus-visible,
.nav__close:focus-visible {
    /* Custom focus style that's not blue */
    outline: 2px solid var(--link-dark);
    outline-offset: -2px;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Utility classes */
div.call-btn {
    background-color: transparent;
    display: flex;
    font-feature-settings: 'liga' off, 'clig' off;
    font-family: "Rubik";
    font-style: normal;
    font-weight: 600;
    height: 40px;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

span.nav-cta {
    color: var(--bright-yellow);
    font-feature-settings: 'liga' off, 'clig' off;
    font-family: "Noto Sans";
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
}

@media (max-width: 768px) {
    span.nav-cta {
        display: none;
    }
}

@media (max-width: 440px) {
    span.head-cta-btn {
        display: none;
    }
}

.nav-call-cta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.head-cta-btn {
    font-size: 20px;
    font-family: "Noto Sans";
    line-height: 32px;
    display: flex;
    color: var(--text-light);
    font-weight: 500;
    position: relative;
}

