/* =========================================================
   DOCTATECH SOLUTIONS
   NAVBAR
   Premium / Modern Navigation System
   ========================================================= */


/* =========================================================
   SITE HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    background: rgba(255, 255, 255, 0.96);

    border-bottom: 1px solid var(--color-border);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}


/* =========================================================
   MAIN NAVBAR
   ========================================================= */

.navbar {
    width: 100%;
}

.navbar__container {
    width: min(1200px, calc(100% - 48px));

    min-height: 76px;

    margin: 0 auto;

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

    gap: 32px;
}


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

.navbar__brand {
    display: inline-flex;
    align-items: center;

    flex-shrink: 0;

    text-decoration: none;
}

.navbar__brand-logo {
    display: block;

    width: 155px;
    height: auto;

    max-height: 42px;

    object-fit: contain;
}


/* =========================================================
   MAIN NAVIGATION
   ========================================================= */

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

    gap: 28px;

    margin-left: auto;
}

.navbar__link {
    position: relative;

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

    padding: 8px 0;

    color: var(--color-text-muted);

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

    text-decoration: none;

    transition:
        color 180ms ease;
}

.navbar__link:hover {
    color: var(--color-primary);
}

.navbar__link.active {
    color: var(--color-primary);
}

.navbar__link.active::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 0;

    width: 18px;
    height: 2px;

    background: var(--color-accent);

    border-radius: 999px;
}


/* =========================================================
   DROPDOWN WRAPPER
   ========================================================= */

.navbar__dropdown {
    position: relative;
}

.navbar__dropdown-main {
    display: flex;
    align-items: center;
}


/* =========================================================
   DROPDOWN CHEVRON
   ========================================================= */

.navbar__dropdown-toggle {
    width: 24px;
    height: 32px;

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

    margin-left: 2px;
    padding: 0;

    background: transparent;

    color: var(--color-text-muted);

    border: 0;

    cursor: pointer;

    transition:
        color 180ms ease;
}

.navbar__dropdown-toggle:hover {
    color: var(--color-primary);
}

.navbar__dropdown-toggle i {
    font-size: 9px;

    transition:
        transform 220ms ease;
}

.navbar__dropdown--open
.navbar__dropdown-toggle i {
    transform: rotate(180deg);
}


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

.navbar__dropdown-menu {
    position: absolute;

    top: calc(100% + 18px);
    left: 50%;

    width: 300px;

    padding: 10px;

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

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #fbf8fc 100%
        );

    border: 1px solid rgba(74, 0, 75, 0.10);

    border-radius: 16px;

    box-shadow:
        0 24px 55px rgba(43, 0, 45, 0.14),
        0 5px 18px rgba(0, 0, 0, 0.05);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 180ms ease,
        transform 180ms ease,
        visibility 180ms ease;
}


/* =========================================================
   DROPDOWN GOLD ACCENT
   ========================================================= */

.navbar__dropdown-menu::before {
    content: "";

    position: absolute;

    top: 0;
    left: 18px;
    right: 18px;

    height: 3px;

    background: var(--color-accent);

    border-radius: 0 0 999px 999px;
}


/* =========================================================
   DROPDOWN SMALL ARROW
   ========================================================= */

.navbar__dropdown-menu::after {
    content: "";

    position: absolute;

    top: -6px;
    left: 50%;

    width: 11px;
    height: 11px;

    background: #ffffff;

    border-left: 1px solid rgba(74, 0, 75, 0.10);
    border-top: 1px solid rgba(74, 0, 75, 0.10);

    transform: translateX(-50%) rotate(45deg);
}


/* =========================================================
   DESKTOP OPEN STATE
   ========================================================= */

.navbar__dropdown:hover
.navbar__dropdown-menu,

.navbar__dropdown:focus-within
.navbar__dropdown-menu,

.navbar__dropdown--open
.navbar__dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

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


/* =========================================================
   DROPDOWN ITEMS
   ========================================================= */

.navbar__dropdown-menu a {
    position: relative;

    display: grid;

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

    align-items: center;

    gap: 11px;

    min-height: 54px;

    padding: 7px 10px;

    box-sizing: border-box;

    color: var(--color-text);

    border-radius: 11px;

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

    text-decoration: none;

    overflow: hidden;

    transition:
        background-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}


/* =========================================================
   ICONS
   Generated from existing link text.

   This means your existing navbar HTML does not need
   to be rewritten.
   ========================================================= */

.navbar__dropdown-menu a::before {
    width: 36px;
    height: 36px;

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

    box-sizing: border-box;

    background: rgba(74, 0, 75, 0.07);

    color: var(--color-primary);

    border-radius: 10px;

    font-family: "Font Awesome 6 Free";
    font-weight: 900;

    font-size: 13px;

    transition:
        background-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}


/* =========================================================
   SERVICE ICON MAPPING
   ========================================================= */

.navbar__dropdown-menu a[href*="software-development"]::before {
    content: "\f121";
}

.navbar__dropdown-menu a[href*="web-development"]::before {
    content: "\f1d8";
}

.navbar__dropdown-menu a[href*="graphic-design"]::before {
    content: "\f303";
}

.navbar__dropdown-menu a[href*="printing"]::before {
    content: "\f02f";
}

.navbar__dropdown-menu a[href*="digital-services"]::before {
    content: "\f0ac";
}

.navbar__dropdown-menu a[href*="educational-technology"]::before {
    content: "\f19d";
}


/* =========================================================
   PRODUCT ICON MAPPING
   ========================================================= */

.navbar__dropdown-menu a[href*="/products/sems"]::before {
    content: "\f6cf";
}

.navbar__dropdown-menu a[href*="quiz-scoreboard"]::before {
    content: "\f03d";
}

.navbar__dropdown-menu a[href*="presentation-picker"]::before {
    content: "\f03d";
}

.navbar__dropdown-menu a[href="/products"]::before {
    content: "\f1b3";
}


/* =========================================================
   DROPDOWN ARROW
   ========================================================= */

.navbar__dropdown-menu a::after {
    content: "\f054";

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

    color: #b9adb9;

    font-family: "Font Awesome 6 Free";
    font-weight: 900;

    font-size: 8px;

    transition:
        color 180ms ease,
        transform 180ms ease;
}


/* =========================================================
   DROPDOWN HOVER
   ========================================================= */

.navbar__dropdown-menu a:hover {
    background: rgba(74, 0, 75, 0.055);

    color: var(--color-primary);

    transform: translateX(3px);
}

.navbar__dropdown-menu a:hover::before {
    background: var(--color-primary);

    color: var(--color-accent);

    transform: scale(1.05);
}

.navbar__dropdown-menu a:hover::after {
    color: var(--color-accent);

    transform: translateX(2px);
}


/* =========================================================
   DESKTOP CTA
   ========================================================= */

.navbar__cta {
    display: inline-flex;

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

    gap: 8px;

    padding: 11px 17px;

    background: var(--color-primary);
    color: var(--color-white);

    border-radius: 8px;

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

    text-decoration: none;

    box-shadow:
        0 7px 18px rgba(74, 0, 75, 0.12);

    transition:
        background-color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.navbar__cta:hover {
    background: #5d075e;

    transform: translateY(-1px);

    box-shadow:
        0 10px 22px rgba(74, 0, 75, 0.18);
}

.navbar__cta span {
    color: var(--color-accent);
}


/* =========================================================
   MOBILE CTA
   ========================================================= */

.navbar__mobile-cta {
    display: none;
}


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

.navbar__menu-toggle {
    display: none;

    width: 42px;
    height: 42px;

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

    flex-direction: column;

    gap: 5px;

    padding: 0;

    background: var(--color-white);

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

    border-radius: 9px;

    cursor: pointer;
}

.navbar__menu-toggle span {
    width: 18px;
    height: 2px;

    display: block;

    background: var(--color-text);

    transition:
        transform 180ms ease,
        opacity 180ms ease;
}


/* =========================================================
   HAMBURGER → X
   ========================================================= */

.navbar__menu-toggle[aria-expanded="true"]
span:nth-child(1) {
    transform:
        translateY(7px)
        rotate(45deg);
}

.navbar__menu-toggle[aria-expanded="true"]
span:nth-child(2) {
    opacity: 0;
}

.navbar__menu-toggle[aria-expanded="true"]
span:nth-child(3) {
    transform:
        translateY(-7px)
        rotate(-45deg);
}


/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 960px) {

    /* -----------------------------------------------------
       NAVBAR
       ----------------------------------------------------- */

    .navbar__container {
        width: min(100% - 32px, 1200px);

        min-height: 68px;
    }


    /* -----------------------------------------------------
       DESKTOP CTA
       ----------------------------------------------------- */

    .navbar__cta {
        display: none;
    }


    /* -----------------------------------------------------
       MOBILE CTA
       ----------------------------------------------------- */

    .navbar__mobile-cta {
        display: flex;

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

        gap: 8px;

        width: 100%;

        min-height: 43px;

        margin-top: 12px;

        padding: 0 18px;

        box-sizing: border-box;

        background: var(--color-primary);
        color: var(--color-white);

        border-radius: 8px;

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

        text-decoration: none;

        transition:
            background-color 180ms ease,
            transform 180ms ease;
    }

    .navbar__mobile-cta span {
        color: var(--color-accent);
    }

    .navbar__mobile-cta:hover {
        background: #5d075e;
    }


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

    .navbar__menu-toggle {
        display: flex;

        flex-shrink: 0;
    }


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

    .navbar__links {
        position: absolute;

        top: 100%;
        left: 0;
        right: 0;

        width: 100%;

        display: flex;

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

        gap: 0;

        margin: 0;

        padding:
            8px
            16px
            14px;

        box-sizing: border-box;

        background: #ffffff;

        border-top: 1px solid var(--color-border);
        border-bottom: 1px solid var(--color-border);

        box-shadow:
            0 18px 35px rgba(43, 0, 45, 0.10);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: translateY(-6px);

        transition:
            opacity 180ms ease,
            transform 180ms ease,
            visibility 180ms ease;

        max-height: calc(100vh - 68px);

        overflow-y: auto;
    }


    .navbar__links.navbar__links--open {
        opacity: 1;

        visibility: visible;

        pointer-events: auto;

        transform: translateY(0);
    }


    /* -----------------------------------------------------
       MOBILE LINKS
       ----------------------------------------------------- */

    .navbar__link {
        width: 100%;

        display: flex;
        align-items: center;

        padding: 13px 4px;

        box-sizing: border-box;

        color: var(--color-text-muted);

        font-size: 15px;

        border-bottom: 1px solid var(--color-border);
    }

    .navbar__link:hover,
    .navbar__link.active {
        color: var(--color-primary);
    }

    .navbar__link.active::after {
        left: auto;
        right: 4px;

        bottom: 50%;

        width: 5px;
        height: 5px;

        border-radius: 50%;

        background: var(--color-accent);

        transform: translateY(50%);
    }


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

    .navbar__dropdown {
        position: relative;

        width: 100%;
    }

    .navbar__dropdown-main {
        width: 100%;

        display: flex;
        align-items: center;

        box-sizing: border-box;

        border-bottom: 1px solid var(--color-border);
    }

    .navbar__dropdown-main
    .navbar__link {
        flex: 1;

        border-bottom: 0;
    }


    /* -----------------------------------------------------
       MOBILE CHEVRON
       ----------------------------------------------------- */

    .navbar__dropdown-toggle {
        width: 40px;
        height: 44px;

        margin: 0;

        flex-shrink: 0;

        color: var(--color-text-muted);
    }

    .navbar__dropdown-toggle:hover {
        color: var(--color-primary);
    }

    .navbar__dropdown-toggle i {
        font-size: 9px;
    }


    /* -----------------------------------------------------
       MOBILE SUBMENU
       ----------------------------------------------------- */

    .navbar__dropdown-menu {
        position: static !important;

        width: 100% !important;
        max-width: none !important;

        box-sizing: border-box;

        display: none;

        margin: 5px 0 7px !important;

        padding: 5px !important;

        transform: none !important;

        background:
            linear-gradient(
                145deg,
                #faf7fb,
                #f5f0f6
            );

        border: 1px solid rgba(74, 0, 75, 0.08) !important;

        border-radius: 12px;

        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.9),
            0 5px 14px rgba(74, 0, 75, 0.04) !important;

        opacity: 1 !important;

        visibility: visible !important;

        pointer-events: auto !important;
    }


    /* Remove desktop decorative elements */

    .navbar__dropdown-menu::before {
        top: 0;
        left: 12px;
        right: 12px;

        height: 2px;
    }

    .navbar__dropdown-menu::after {
        display: none;
    }


    /* -----------------------------------------------------
       OPEN MOBILE SUBMENU
       ----------------------------------------------------- */

    .navbar__dropdown--open >
    .navbar__dropdown-menu {
        display: block !important;
    }


    /* -----------------------------------------------------
       MOBILE SUBMENU LINKS
       ----------------------------------------------------- */

    .navbar__dropdown-menu a {
        width: 100%;

        min-height: 48px;

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

        gap: 10px;

        padding:
            6px
            7px;

        color: var(--color-text);

        border-radius: 9px;

        border-bottom: 0;

        font-size: 14px;

        transform: none;
    }

    .navbar__dropdown-menu a::before {
        width: 30px;
        height: 30px;

        border-radius: 8px;

        font-size: 11px;
    }

    .navbar__dropdown-menu a::after {
        font-size: 7px;
    }

    .navbar__dropdown-menu a:hover {
        background: rgba(74, 0, 75, 0.07);

        transform: none;
    }

    .navbar__dropdown-menu a:last-child {
        border-bottom: 0;
    }


    /* -----------------------------------------------------
       DISABLE DESKTOP HOVER ON MOBILE
       ----------------------------------------------------- */

    .navbar__dropdown:hover >
    .navbar__dropdown-menu {
        display: none;
    }

    .navbar__dropdown--open:hover >
    .navbar__dropdown-menu {
        display: block !important;
    }

}


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

@media (max-width: 600px) {

    .navbar__container {
        width: calc(100% - 32px);
    }

    .navbar__brand-mark {
        width: 34px;
        height: 34px;

        font-size: 17px;
    }

    .navbar__brand-name {
        font-size: 19px;
    }

    .navbar__menu-toggle {
        width: 40px;
        height: 40px;
    }

    .navbar__links {
        padding-left: 14px;
        padding-right: 14px;
    }

    .navbar__brand-logo {
        width: 135px;
        max-height: 38px;
    }

}


/* =========================================================
   BODY LOCK
   ========================================================= */

body.menu-open {
    overflow: hidden;
}