/* =========================================================
   SIGMAEQI NAVBAR
   Desktop preserved + clean mobile navigation
========================================================= */


/* =========================================================
   ROOT VARIABLES
========================================================= */

:root {
    --sigma-navy: #142b52;
    --sigma-navy-dark: #0c1d39;

    --sigma-red: #b6253a;
    --sigma-red-dark: #921d30;

    --sigma-text: #162c50;

    --sigma-white: #ffffff;

    --sigma-border: #e5e9f0;

    --sigma-mobile-submenu: #f5f7fb;

    --sigma-shadow:
        0 8px 25px rgba(20, 43, 82, 0.08);
}


/* =========================================================
   GLOBAL HEADER
========================================================= */

.site-header {
    width: 100%;
    background: var(--sigma-white);
    position: relative;
    z-index: 1000;
}
/* =========================================================
   TOP BAR
========================================================= */

.topbar {
    width: 100%;
    min-height: 52px;

    background:
        linear-gradient(
            100deg,
            var(--sigma-navy-dark) 0%,
            var(--sigma-navy) 48%,
            var(--sigma-red) 100%
        );

    color: #ffffff;
}


.topbar-container {
    width: min(100% - 70px, 1550px);
    min-height: 52px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


.topbar-tagline {
    margin: 0;

    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.25px;

    white-space: nowrap;
}


.topbar-contact {
    display: flex;
    align-items: center;
    gap: 30px;
}


.topbar-contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: #ffffff;
    text-decoration: none;

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

    white-space: nowrap;

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


.topbar-contact a:hover {
    opacity: 0.78;
    transform: translateY(-1px);
}


.topbar-contact svg {
    width: 16px;
    height: 16px;

    fill: currentColor;

    flex-shrink: 0;
}


/* =========================================================
   MAIN NAVBAR
========================================================= */
.main-navbar.navbar-fixed + .navbar-spacer {
    display: block;
}
.main-navbar {
    width: 100%;
    background: rgb(255, 255, 255);
    border-bottom: 1px solid var(--sigma-border);
    box-shadow: 0 4px 18px rgba(20, 43, 82, 0.045);
}

/* Applied only after the topbar scrolls out of view */
.main-navbar.navbar-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1001;
}

.navbar-container {
    width: min(100% - 70px, 1550px);

    min-height: 118px;

    margin: 0 auto;
    padding: 0;

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

    gap: 35px;
}


/* =========================================================
   BRAND
========================================================= */

.brand {
    display: flex;
    align-items: center;

    gap: 12px;

    flex-shrink: 0;

    text-decoration: none;

    height: 90px;
}


.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
    height: 90px;
}

.brand-logo {
    display: block;
    width: 210px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}


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

.navbar-container {
    width: min(100% - 40px, 1550px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

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

    gap: 28px;

    margin-left: auto;
}


.nav-link,
.nav-services-link {

    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 50px;

    padding: 0 12px;

    color: var(--sigma-text);

    background: transparent;
    border: none;

    text-decoration: none;

    font-size: 24px;
    font-weight: 620;

    white-space: nowrap;

    transition:
        color 0.22s ease;
}


.nav-link::after {

    content: "";

    position: absolute;

    left: 0;
    right: 0;

    bottom: 5px;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            var(--sigma-navy),
            var(--sigma-red)
        );

    transform: scaleX(0);

    transform-origin: center;

    transition:
        transform 0.25s ease;
}


.nav-link.active,
.nav-services-link.active,
.nav-dropdown > a.active {

    position: relative;

    color: var(--sigma-red);
}


.nav-link.active::after,
.nav-services-link.active::after,
.nav-dropdown > a.active::after {

    content: "";

    position: absolute;

    left: 0;
    right: 0;

    bottom: -8px;

    height: 2px;

    background: var(--sigma-red);

    border-radius: 2px;
}


.nav-link:hover {
    color: var(--sigma-red);
}


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


/* =========================================================
   DESKTOP DROPDOWN
========================================================= */

.nav-dropdown {

    position: relative;

    height: 50px;

    display: flex;
    align-items: center;
}


.nav-dropdown-toggle {

    height: 50px;

    padding: 0;

    display: inline-flex;

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

    color: var(--sigma-text);

    background: transparent;
    border: none;

    font-family: inherit;

    cursor: pointer;

    transition:
        color 0.22s ease;
}


.nav-dropdown-toggle:hover {
    color: var(--sigma-red);
}


.nav-dropdown-toggle svg {

    width: 15px;
    height: 15px;

    fill: none;

    stroke: currentColor;

    stroke-width: 2;

    stroke-linecap: round;
    stroke-linejoin: round;

    transition:
        transform 0.25s ease;
}


.dropdown-menu {

    position: absolute;

    top: calc(100% + 1px);

    left: 50%;

    transform:
        translateX(-50%)
        translateY(8px);

    min-width: 225px;

    padding: 9px;

    background: #ffffff;

    border: 1px solid var(--sigma-border);

    border-radius: 10px;

    box-shadow:
        0 18px 45px rgba(12, 29, 57, 0.14);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}


.dropdown-menu::before {

    content: "";

    position: absolute;

    top: -1px;

    left: 18px;
    right: 18px;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            var(--sigma-navy),
            var(--sigma-red)
        );

    border-radius: 2px;
}


.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform:
        translateX(-50%)
        translateY(0);
}


.nav-dropdown:hover .nav-dropdown-toggle svg,
.nav-dropdown.open .nav-dropdown-toggle svg {

    transform: rotate(180deg);
}


.dropdown-menu a {

    display: flex;

    align-items: center;

    min-height: 42px;

    padding: 0 14px;

    border-radius: 7px;

    color: var(--sigma-text);

    text-decoration: none;

    font-size: 13.5px;

    font-weight: 550;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        padding-left 0.2s ease;
}


.dropdown-menu a:hover {

    background: #f3f6fb;

    color: var(--sigma-red);

    padding-left: 18px;
}


/* =========================================================
   CONTACT BUTTON
========================================================= */

.nav-contact-button {

    height: 52px;

    padding: 0 22px;

    display: inline-flex;

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

    gap: 12px;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            var(--sigma-navy),
            var(--sigma-red)
        );

    color: #ffffff;

    text-decoration: none;

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

    white-space: nowrap;

    box-shadow:
        0 9px 22px rgba(65, 38, 70, 0.18);

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


.nav-contact-button:hover {

    color: #ffffff;

    transform: translateY(-2px);

    box-shadow:
        0 13px 28px rgba(65, 38, 70, 0.25);
}


.nav-contact-button svg {

    width: 18px;
    height: 18px;

    fill: none;

    stroke: currentColor;

    stroke-width: 2.4;

    stroke-linecap: round;
    stroke-linejoin: round;
}


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

.menu-toggle {

    display: none;

    width: 44px;
    height: 44px;

    border: none;

    border-radius: 8px;

    background: #ffffff;

    cursor: pointer;

    flex-direction: column;

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

    gap: 5px;

    flex-shrink: 0;
}


.menu-toggle span {

    display: block;

    width: 23px;
    height: 2px;

    background: var(--sigma-navy);

    border-radius: 2px;

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


/* =========================================================
   MOBILE MENU BUTTON -> X
========================================================= */

.menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}


.menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}


.menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   LARGE LAPTOP
   DESKTOP DESIGN PRESERVED
========================================================= */

@media (max-width: 1350px) {

    .navbar-container {

        width: min(100% - 40px, 1500px);

        gap: 22px;
    }


    .brand-symbol {

        width: 90px;
        height: 72px;
    }


    .brand-name {

        width: 145px;
        height: 52px;
    }


    .nav-menu {
        gap: 20px;
    }


    .nav-link,
    .nav-dropdown-toggle {
        font-size: 13px;
    }


    .nav-contact-button {
        padding: 0 18px;
    }
}


/* =========================================================
   MOBILE
========================================================= */
/* =========================================================
   SIGMAEQI MOBILE NAVIGATION
   FINAL VIEWPORT-BASED VERSION

   Desktop is NOT affected.
========================================================= */

@media (max-width: 650px) {
    .site-header {
        top: -44px;
    }
}

@media (max-width: 1000px) {

    /* -----------------------------------------------------
       MOBILE NAVIGATION PANEL

       IMPORTANT:
       The menu is fixed to the viewport, not the header.
    ----------------------------------------------------- */

    .nav-menu {
        position: fixed;

        /*
         * Topbar + navbar height.
         *
         * At normal mobile sizes:
         * topbar ≈ 44px
         * navbar ≈ 88px
         * total ≈ 132px
         */
        top: 132px;

        left: 0;
        right: 0;
        bottom: 0;

        width: 100%;

        display: none;

        flex-direction: column;
        align-items: stretch;

        gap: 0;

        padding: 12px 12px 24px;

        box-sizing: border-box;

        background: #ffffff;

        border-top: 1px solid var(--sigma-border);

        box-shadow:
            0 15px 35px rgba(20, 43, 82, 0.12);

        /*
         * THIS IS THE IMPORTANT PART.
         */
        overflow-y: auto;
        overflow-x: hidden;

        /*
         * Smooth scrolling on mobile browsers.
         */
        -webkit-overflow-scrolling: touch;

        /*
         * Makes sure the menu itself receives scrolling.
         */
        overscroll-behavior: contain;

        z-index: 9999;
    }


    /* -----------------------------------------------------
       OPEN MOBILE MENU
    ----------------------------------------------------- */

    .nav-menu.active,
    .nav-menu.mobile-open {
        display: flex;
    }


    /* -----------------------------------------------------
       NORMAL LINKS
    ----------------------------------------------------- */

    .nav-menu > .nav-link {

        width: 100%;

        min-height: 52px;
        height: 52px;

        display: flex;

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

        padding: 0 16px;

        box-sizing: border-box;

        color: var(--sigma-text);

        background: transparent;

        border-radius: 8px;

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

        text-decoration: none;

        flex-shrink: 0;
    }


    .nav-menu > .nav-link:hover {
        color: var(--sigma-red);
        background: #f7f9fc;
    }


    /* Remove desktop underline */
    .nav-menu > .nav-link::after {
        display: none;
    }


    /* -----------------------------------------------------
       DROPDOWN WRAPPER

       IMPORTANT:
       No fixed height.
       No absolute positioning.
    ----------------------------------------------------- */

    .nav-dropdown {

        position: relative;

        width: 100%;

        height: auto !important;

        min-height: 52px;

        margin: 0;
        padding: 0;

        display: grid !important;

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

        grid-template-rows: auto auto;

        align-items: stretch;

        flex-shrink: 0;

        box-sizing: border-box;

        overflow: visible;
    }


    /* -----------------------------------------------------
       DROPDOWN TITLE
    ----------------------------------------------------- */

    .nav-dropdown > .nav-services-link {

        grid-column: 1;
        grid-row: 1;

        width: 100%;

        min-width: 0;

        min-height: 52px;
        height: 52px;

        display: flex;

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

        padding: 0 16px;

        box-sizing: border-box;

        color: var(--sigma-text);

        background: transparent;

        border-radius: 8px 0 0 8px;

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

        text-decoration: none;

        text-align: left;

        white-space: nowrap;
    }


    /* Active dropdown page */

    .nav-dropdown > .nav-services-link.active {

        color: var(--sigma-red);

        background: rgba(182, 37, 58, 0.045);
    }


    /* -----------------------------------------------------
       ARROW BUTTON
    ----------------------------------------------------- */

    .nav-dropdown > .nav-dropdown-toggle {

        grid-column: 2;
        grid-row: 1;

        width: 52px;
        min-width: 52px;

        height: 52px;
        min-height: 52px;

        margin: 0;
        padding: 0;

        display: flex;

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

        border: none;

        border-radius: 0 8px 8px 0;

        background: transparent;

        color: var(--sigma-text);

        cursor: pointer;

        box-sizing: border-box;

        flex-shrink: 0;
    }


    .nav-dropdown > .nav-dropdown-toggle:hover {
        background: #f5f7fb;
    }


    /* -----------------------------------------------------
       ARROW
    ----------------------------------------------------- */

    .nav-dropdown-toggle svg {

        width: 17px;
        height: 17px;

        fill: none;

        stroke: currentColor;

        stroke-width: 2;

        stroke-linecap: round;
        stroke-linejoin: round;

        transition:
            transform 0.25s ease;
    }


    .nav-dropdown.open .nav-dropdown-toggle svg,
    .nav-dropdown.active .nav-dropdown-toggle svg {

        transform: rotate(180deg);
    }


    /* -----------------------------------------------------
       MOBILE DROPDOWN

       THE CRITICAL PART:
       position: static

       Therefore the dropdown becomes part of the
       normal height of the scrolling nav-menu.
    ----------------------------------------------------- */

    .nav-dropdown > .dropdown-menu {

        grid-column: 1 / -1;
        grid-row: 2;

        position: static !important;

        width: 100%;

        min-width: 0;

        height: auto;

        max-height: none;

        margin: 0;

        padding: 6px 8px 10px 28px;

        box-sizing: border-box;

        display: none;

        /*
         * Override desktop dropdown animation.
         */
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: none !important;

        /*
         * VERY IMPORTANT:
         * Do NOT create another scroll area here.
         */
        overflow: visible;

        background: #f5f7fb;

        border: none;

        border-left: 2px solid var(--sigma-red);

        border-radius: 0 0 10px 10px;

        box-shadow: none;
    }


    /* -----------------------------------------------------
       OPEN DROPDOWN
    ----------------------------------------------------- */

    .nav-dropdown.open > .dropdown-menu,
    .nav-dropdown.active > .dropdown-menu {

        display: block;

        height: auto;

        opacity: 1;

        visibility: visible;

        pointer-events: auto;

        transform: none !important;
    }


    /* Remove desktop decorative line */

    .nav-dropdown > .dropdown-menu::before {
        display: none;
    }


    /* -----------------------------------------------------
       DROPDOWN ITEMS
    ----------------------------------------------------- */

    .nav-dropdown > .dropdown-menu a {

        width: 100%;

        min-height: 44px;

        height: auto;

        display: flex;

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

        padding: 10px 12px;

        box-sizing: border-box;

        color: #243b61;

        background: transparent;

        border-radius: 6px;

        border-bottom:
            1px solid rgba(20, 43, 82, 0.07);

        font-size: 14px;

        font-weight: 500;

        line-height: 1.35;

        text-decoration: none;

        white-space: normal;

        transition:
            color 0.2s ease,
            background 0.2s ease,
            padding-left 0.2s ease;
    }


    .nav-dropdown > .dropdown-menu a:last-child {
        border-bottom: none;
    }


    .nav-dropdown > .dropdown-menu a:hover {

        color: var(--sigma-red);

        background:
            rgba(182, 37, 58, 0.055);

        padding-left: 16px;
    }


    /* -----------------------------------------------------
       VIEW ALL
    ----------------------------------------------------- */

    .dropdown-view-all {

        margin-top: 3px;

        font-weight: 650 !important;

        color: var(--sigma-navy) !important;
    }


    /* -----------------------------------------------------
       CONTACT BUTTON
    ----------------------------------------------------- */

    .nav-menu > .nav-contact-button {

        width: 100%;

        min-height: 54px;
        height: 54px;

        margin: 14px 0 0;

        padding: 0 20px;

        display: flex;

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

        gap: 12px;

        box-sizing: border-box;

        border-radius: 11px;

        flex-shrink: 0;
    }


    /* -----------------------------------------------------
       MOBILE HEADER
    ----------------------------------------------------- */

    .navbar-container {

        width: calc(100% - 24px);

        min-height: 88px;

        margin: 0 12px;

        padding: 0;

        box-sizing: border-box;

        display: flex;

        align-items: center;

        justify-content: space-between;

        gap: 12px;
    }


    /* -----------------------------------------------------
       BRAND
    ----------------------------------------------------- */

    .brand {

        height: auto;

        min-width: 0;

        display: flex;

        align-items: center;

        gap: 7px;

        flex-shrink: 1;

        text-decoration: none;
    }


    .brand-symbol {

        width: 72px;
        max-width: 72px;

        height: 58px;

        object-fit: contain;

        flex-shrink: 0;
    }


    .brand-name {

        width: 120px;
        max-width: 120px;

        height: 43px;

        object-fit: contain;

        flex-shrink: 1;
    }


    /* -----------------------------------------------------
       HAMBURGER
    ----------------------------------------------------- */

    .menu-toggle {

        display: flex;

        width: 44px;
        height: 44px;

        min-width: 44px;
        min-height: 44px;

        margin-left: auto;

        padding: 0;

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

        flex-direction: column;

        gap: 5px;

        background: #ffffff;

        border: none;

        border-radius: 8px;

        cursor: pointer;

        flex-shrink: 0;

        position: relative;

        z-index: 10001;
    }


    .menu-toggle span {

        width: 23px;

        height: 2px;

        display: block;

        background: var(--sigma-navy);

        border-radius: 2px;

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


    /* Hamburger → X */

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}


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

@media (max-width: 600px) {

    /*
     * Your actual small-phone topbar is approximately 44px.
     * Navbar is approximately 88px.
     *
     * Therefore menu starts at 132px.
     */

    .nav-menu {

        top: 132px;

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


    .topbar-container {

        width: calc(100% - 20px);

        margin: 0 10px;

        min-height: 44px;

        padding: 0;
    }


    .topbar-tagline {

        max-width: calc(100% - 95px);

        font-size: 10px;

        white-space: nowrap;

        overflow: hidden;

        text-overflow: ellipsis;
    }


    .topbar-contact {

        gap: 10px;

        flex-shrink: 0;
    }


    .topbar-contact span {
        display: none;
    }


    .topbar-contact svg {

        width: 15px;
        height: 15px;
    }


    .navbar-container {

        width: calc(100% - 20px);

        margin: 0 10px;

        min-height: 88px;
    }


    .brand {
        gap: 5px;
    }


    .brand-symbol {

        width: 68px;
        max-width: 68px;

        height: 54px;
    }


    .brand-name {

        width: 112px;
        max-width: 112px;

        height: 40px;
    }


    .menu-toggle {

        width: 42px;
        height: 42px;

        min-width: 42px;
        min-height: 42px;
    }


    .nav-menu > .nav-link,
    .nav-dropdown > .nav-services-link {

        font-size: 15px;

        min-height: 52px;
        height: 52px;

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


    .nav-dropdown > .nav-dropdown-toggle {

        width: 48px;
        min-width: 48px;
    }


    .nav-dropdown > .dropdown-menu {

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


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    .nav-menu {

        top: 132px;

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


    .brand-symbol {

        width: 62px;
        max-width: 62px;
    }


    .brand-name {

        width: 102px;
        max-width: 102px;
    }


    .nav-dropdown > .dropdown-menu a {

        font-size: 13.5px;

        min-height: 42px;
    }
}


/* =========================================================
   PREVENT PAGE BEHIND MOBILE NAV FROM SCROLLING

   JavaScript adds .nav-open to body.
========================================================= */

body.nav-open {
    overflow: hidden;
}

/* =========================================================
   FINAL MOBILE NAVIGATION SCROLL FIX
   Does NOT change desktop
   Does NOT require navbar JavaScript
========================================================= */

@media (max-width: 1000px) {

    .nav-menu {
        position: fixed;

        /*
         * Topbar = approximately 44px
         * Main navbar = approximately 88px
         */
        top: 132px;

        left: 0;
        right: 0;
        bottom: 0;

        width: 100%;

        /*
         * THIS IS THE IMPORTANT FIX
         *
         * Your desktop .nav-menu has:
         * justify-content: flex-end;
         *
         * That pushes the mobile menu to the bottom.
         *
         * We explicitly reset it here.
         */
        justify-content: flex-start;

        align-items: stretch;

        flex-direction: column;

        gap: 0;

        padding: 12px 12px 24px;

        box-sizing: border-box;

        background: #ffffff;

        /*
         * THE WHOLE MOBILE MENU SCROLLS
         */
        overflow-y: auto;
        overflow-x: hidden;

        -webkit-overflow-scrolling: touch;

        overscroll-behavior: contain;

        /*
         * Important for flex containers that need to scroll.
         */
        min-height: 0;

        z-index: 9999;
    }


    /* -----------------------------------------------------
       DROPDOWNS MUST BECOME PART OF THE MENU FLOW
    ----------------------------------------------------- */

    .nav-dropdown {
        position: relative;

        width: 100%;

        height: auto !important;

        min-height: 52px;

        display: grid !important;

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

        grid-template-rows: auto auto;

        flex-shrink: 0;

        overflow: visible;
    }


    /* -----------------------------------------------------
       MOBILE DROPDOWN
    ----------------------------------------------------- */

    .nav-dropdown > .dropdown-menu {

        position: static !important;

        grid-column: 1 / -1;
        grid-row: 2;

        width: 100%;

        min-width: 0;

        height: auto;

        max-height: none;

        display: none;

        margin: 0;

        box-sizing: border-box;

        /*
         * DO NOT SCROLL THE DROPDOWN SEPARATELY.
         *
         * The parent .nav-menu will scroll.
         */
        overflow: visible;

        opacity: 1;

        visibility: visible;

        pointer-events: auto;

        transform: none !important;

        background: #f5f7fb;

        border: none;

        border-left: 2px solid var(--sigma-red);

        border-radius: 0 0 10px 10px;

        box-shadow: none;

        padding: 6px 8px 10px 24px;
    }


    /* -----------------------------------------------------
       OPEN DROPDOWN
    ----------------------------------------------------- */

    .nav-dropdown.open > .dropdown-menu,
    .nav-dropdown.active > .dropdown-menu {

        display: block;

        height: auto;

        max-height: none;

        overflow: visible;
    }


    /* -----------------------------------------------------
       DROPDOWN ITEMS
    ----------------------------------------------------- */

    .nav-dropdown > .dropdown-menu a {

        width: 100%;

        min-height: 44px;

        height: auto;

        display: flex;

        align-items: center;

        padding: 10px 12px;

        box-sizing: border-box;

        color: var(--sigma-text);

        background: transparent;

        border-bottom:
            1px solid rgba(20, 43, 82, 0.07);

        font-size: 14px;

        line-height: 1.35;

        white-space: normal;
    }


    .nav-dropdown > .dropdown-menu a:last-child {
        border-bottom: none;
    }


    /* -----------------------------------------------------
       REMOVE DESKTOP DROPDOWN DECORATION
    ----------------------------------------------------- */

    .nav-dropdown > .dropdown-menu::before {
        display: none;
    }
}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 600px) {

    .nav-menu {
        top: 132px;

        /*
         * Explicitly keep menu at the TOP.
         */
        justify-content: flex-start;

        overflow-y: auto;
        overflow-x: hidden;

        padding: 12px 12px 24px;
    }
}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    .nav-menu {
        top: 132px;

        justify-content: flex-start;

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


/* =====================================================
   SIGMAEQI NAVBAR — FINAL RESPONSIVE POLISH
   Add this at the END of navbar.css
===================================================== */

/* ---------- Desktop spacing and typography ---------- */

@media (min-width: 1001px) {
    .topbar-container {
        width: min(calc(100% - 64px), 1600px);
    }

    .topbar-tagline {
        font-size: 14.5px;
    }

    .topbar-contact {
        gap: clamp(18px, 2vw, 32px);
    }

    .topbar-contact a {
        font-size: 14px;
    }

    .main-navbar .navbar-container {
        width: min(calc(100% - 48px), 1600px);
        min-height: 112px;
        gap: 24px;
    }

    .brand {
        height: auto;
        flex-shrink: 0;
    }

    /* Your current HTML uses one logo image */
    .brand-logo {
        width: clamp(155px, 13vw, 200px);
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }

    .nav-menu {
        gap: clamp(13px, 1.35vw, 22px);
    }

    .nav-link,
    .nav-services-link {
        font-size: clamp(15px, 1.05vw, 16.5px);
        font-weight: 600;
    }

    .nav-dropdown-toggle {
        width: 20px;
    }

    .nav-dropdown-toggle svg {
        width: 14px;
        height: 14px;
    }

    .nav-contact-button {
        min-height: 50px;
        padding: 0 19px;
        font-size: 15px;
        border-radius: 9px;
    }
}

/* ---------- Topbar icons ---------- */

.topbar-contact i {
    display: inline-block;
    font-size: 17px;
    line-height: 1;
    flex-shrink: 0;
}

/* Make sure SVG and Font Awesome icons align consistently */
.topbar-contact svg {
    display: block;
    flex-shrink: 0;
}

/* ---------- Tablet and mobile header ---------- */

@media (max-width: 1000px) {
    .topbar {
        min-height: 44px;
    }

    .topbar-container {
        width: calc(100% - 28px);
        min-height: 44px;
        gap: 12px;
    }

    .topbar-tagline {
        min-width: 0;
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-contact {
        display: flex;
        align-items: center;
        gap: clamp(12px, 3vw, 22px);
        flex-shrink: 0;
    }

    .topbar-contact a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        min-width: 30px;
        min-height: 36px;
        font-size: 14px;
    }

    /* On smaller screens, show the icons without labels */
    .topbar-contact a span {
        display: none;
    }

    .topbar-contact i,
    .topbar-contact svg {
        width: 19px;
        height: 19px;
        font-size: 19px;
    }

    /* Hide LinkedIn on mobile: retain WhatsApp, email and phone */
    .topbar-contact a[aria-label="SigmaEQI LinkedIn"] {
        display: none;
    }

    .main-navbar .navbar-container {
        width: calc(100% - 28px);
        min-height: 88px;
        margin: 0 auto;
        gap: 12px;
    }

    .brand {
        display: flex;
        align-items: center;
        min-width: 0;
        height: auto;
        flex: 0 1 auto;
    }

    /* Responsive sizing for your actual single logo image */
    .brand-logo {
        display: block;
        width: clamp(135px, 27vw, 205px);
        max-width: 100%;
        height: auto;
        max-height: 68px;
        object-fit: contain;
    }

    .menu-toggle {
        width: 44px;
        height: 44px;
        min-width: 44px;
        flex-shrink: 0;
        margin-left: auto;
    }

    /* Keep the mobile menu aligned at the top */
    .nav-menu {
        justify-content: flex-start;
        align-items: stretch;
    }
}

/* ---------- Small phones ---------- */

@media (max-width: 600px) {
    .topbar-container {
        width: calc(100% - 20px);
        margin: 0 auto;
        gap: 8px;
    }

    .topbar-tagline {
        max-width: 55%;
        font-size: 10px;
        letter-spacing: 0;
    }

    .topbar-contact {
        gap: 10px;
    }

    .topbar-contact a {
        min-width: 28px;
        min-height: 34px;
    }

    .topbar-contact i,
    .topbar-contact svg {
        width: 18px;
        height: 18px;
        font-size: 18px;
    }

    .main-navbar .navbar-container {
        width: calc(100% - 20px);
        min-height: 78px;
    }

    .brand-logo {
        width: clamp(120px, 43vw, 175px);
        max-height: 60px;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    /* Keep menu panel below the 44px topbar + 78px navbar */
    .nav-menu {
        top: 122px;
    }
}

/* ---------- Very narrow phones ---------- */

@media (max-width: 380px) {
    .topbar-tagline {
        max-width: 48%;
        font-size: 9px;
    }

    .topbar-contact {
        gap: 7px;
    }

    .topbar-contact i,
    .topbar-contact svg {
        width: 16px;
        height: 16px;
        font-size: 16px;
    }

    .main-navbar .navbar-container {
        min-height: 72px;
    }

    .brand-logo {
        width: clamp(110px, 39vw, 145px);
        max-height: 54px;
    }

    .nav-menu {
        top: 116px;
    }
}


/* =====================================================
   FINAL NAVBAR FONT SIZE OVERRIDES
===================================================== */

/* Desktop and laptop */
@media (min-width: 1001px) {
    .main-navbar .nav-menu > .nav-link,
    .main-navbar .nav-menu .nav-dropdown > .nav-services-link {
        font-size: 17px !important;
        font-weight: 600 !important;
    }

    .main-navbar .nav-menu .nav-dropdown-toggle {
        font-size: 17px !important;
    }

    .main-navbar .nav-menu .dropdown-menu a {
        font-size: 15px !important;
    }

    .main-navbar .nav-menu .nav-contact-button {
        font-size: 16px !important;
    }
}

/* Hide mobile-only shortcuts on desktop */
.mobile-contact-icons {
    display: none;
}

/* Mobile and tablet */
@media (max-width: 1000px) {
    /* Place logo, contact icons and hamburger in one row */
    .main-navbar .navbar-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .mobile-contact-icons {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: clamp(9px, 2.5vw, 16px);
        flex: 0 0 auto;
    }

    .mobile-contact-icons a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 40px;
        color: var(--sigma-navy);
        text-decoration: none;
        font-size: 21px;
        transition: color 0.2s ease, transform 0.2s ease;
    }

    .mobile-contact-icons a:hover {
        color: var(--sigma-red);
        transform: translateY(-1px);
    }

    /* WhatsApp icon */
    .mobile-contact-icons a:first-child {
        color: #168b52;
    }

    /* Make the logo responsive */
    .main-navbar .brand {
        min-width: 0;
        flex: 0 1 auto;
    }

    .main-navbar .brand-logo {
        width: clamp(105px, 25vw, 185px) !important;
        max-width: 100%;
        height: auto;
        max-height: 58px;
        object-fit: contain;
    }

    /* Hide the old contact shortcuts in the topbar on mobile */
    .topbar-contact a[aria-label="Contact SigmaEQI on WhatsApp"],
    .topbar-contact a[aria-label="Email SigmaEQI"],
    .topbar-contact a[aria-label="Call SigmaEQI"] {
        display: none !important;
    }

    /* Keep the hamburger visible */
    .main-navbar .menu-toggle {
        display: flex !important;
        flex: 0 0 42px;
        width: 42px;
        min-width: 42px;
        height: 42px;
        margin-left: 0;
    }

    /* Increase mobile navigation font size */
    .main-navbar .nav-menu > .nav-link,
    .main-navbar .nav-menu .nav-dropdown > .nav-services-link {
        font-size: 17px !important;
        font-weight: 600 !important;
    }

    .main-navbar .nav-menu .dropdown-menu a {
        font-size: 15px !important;
    }

    .main-navbar .nav-menu .nav-contact-button {
        font-size: 16px !important;
    }
}

/* Compact layout for narrow phones */
@media (max-width: 380px) {
    .main-navbar .navbar-container {
        gap: 6px;
    }

    .main-navbar .brand-logo {
        width: clamp(90px, 27vw, 115px) !important;
        max-height: 48px;
    }

    .mobile-contact-icons {
        gap: 5px;
    }

    .mobile-contact-icons a {
        width: 27px;
        font-size: 18px;
    }

    .main-navbar .menu-toggle {
        flex-basis: 38px;
        width: 38px;
        min-width: 38px;
    }
}

/* FINAL FIX: mobile contact icons */
.mobile-contact-icons {
    display: none;
}

@media (max-width: 1000px) {
    .main-navbar .navbar-container > .mobile-contact-icons {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;

        flex-direction: row;
        align-items: center;
        justify-content: center;

        gap: 12px;
        flex: 0 0 auto;

        position: relative;
        z-index: 10002;
    }

    .main-navbar .mobile-contact-icons a {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;

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

        width: 30px;
        min-width: 30px;
        height: 40px;

        padding: 0;
        margin: 0;

        color: #142b52;
        background: transparent;

        text-decoration: none;
        font-size: 20px;
        line-height: 1;

        flex-shrink: 0;
    }

    .main-navbar .mobile-contact-icons a:first-child {
        color: #168b52;
    }

    .main-navbar .mobile-contact-icons a i {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-family: "Font Awesome 6 Brands", "Font Awesome 6 Free";
        font-style: normal;
        line-height: 1;
    }

    .main-navbar .mobile-contact-icons a:nth-child(2) i,
    .main-navbar .mobile-contact-icons a:nth-child(3) i {
        font-weight: 900;
    }
}

@media (max-width: 380px) {
    .main-navbar .mobile-contact-icons {
        gap: 20px;
    }

    .main-navbar .mobile-contact-icons a {
        width: 25px;
        min-width: 25px;
        font-size: 17px;
    }
}

