
/* GP MOBILE NAVIGATION START */

header .gp-mobile-menu {
    display: none;
}

@media (max-width: 900px) {

    header {
        position: relative;
        z-index: 100;
    }

    header .nav,
    header .bar {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 10px;
        padding-right: 14px;
    }

    header .nav > a:not(:first-child),
    header .bar > nav {
        display: none !important;
    }

    header .nav > a:first-child,
    header .bar > a:first-child {
        display: block !important;
        min-width: 0;
        flex-shrink: 1;
    }

    header .nav > a:first-child img,
    header .bar > a:first-child img {
        max-width: 190px;
        max-height: 52px;
        height: auto;
        object-fit: contain;
    }

    header .gp-mobile-menu {
        display: block !important;
        margin-left: auto;
        flex-shrink: 0;
    }

    header .gp-mobile-menu summary {
        list-style: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid #ffffff66;
        border-radius: 9px;
        background: #071e48;
        color: #fff;
    }

    header .gp-mobile-menu summary::-webkit-details-marker {
        display: none;
    }

    .gp-menu-icon {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 23px;
    }

    .gp-menu-icon span {
        display: block;
        width: 23px;
        height: 2px;
        border-radius: 2px;
        background: #fff;
    }

    .gp-mobile-menu[open] .gp-menu-icon span:first-child {
        transform: translateY(7px) rotate(45deg);
    }

    .gp-mobile-menu[open] .gp-menu-icon span:nth-child(2) {
        opacity: 0;
    }

    .gp-mobile-menu[open] .gp-menu-icon span:last-child {
        transform: translateY(-7px) rotate(-45deg);
    }

    header .gp-mobile-menu:not([open]) .gp-mobile-panel {
        display: none !important;
    }

    header .gp-mobile-menu[open] .gp-mobile-panel {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
        padding: 12px;
        margin: 0;
        background: #071e48;
        box-shadow: 0 12px 24px #0003;
        border-radius: 0 0 12px 12px;
        z-index: 999;
        box-sizing: border-box;
    }

    header .gp-mobile-panel a {
        display: block !important;
        color: #fff !important;
        text-decoration: none;
        font-size: 15px;
        font-weight: 650;
        padding: 13px 15px;
        margin: 0 !important;
        border-radius: 8px;
    }

    header .gp-mobile-panel a:hover,
    header .gp-mobile-panel a:focus-visible {
        background: #ffc247;
        color: #071e48 !important;
    }

    header .gp-mobile-menu summary:focus-visible {
        outline: 3px solid #ffc247;
        outline-offset: 3px;
    }
}

/* GP MOBILE NAVIGATION END */

/* GP DESKTOP HEADER FIX START */

@media (min-width: 901px) {

    header .gp-mobile-menu {
        display: none !important;
    }

    /* Restore homepage desktop navigation */
    header .wrap.bar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 20px;
    }

    header .wrap.bar > nav {
        display: flex !important;
        visibility: visible !important;
        align-items: center;
        gap: 16px;
    }

    header .wrap.bar > nav > .links {
        display: flex !important;
        visibility: visible !important;
        align-items: center;
        gap: 18px;
    }

    /* Digital store desktop header */
    header:has(> .nav) {
        background: #ffffff !important;
        color: #071e48 !important;
        box-shadow: 0 2px 12px #071e4814;
        border-bottom: 1px solid #e5e7eb;
    }

    header > .nav {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        min-height: 80px;
        padding: 8px 24px;
        box-sizing: border-box;
    }

    header > .nav > a:first-child {
        flex-shrink: 0;
        display: flex !important;
        align-items: center;
    }

    header > .nav img.logo {
        content: url("/assets/gyanpilot-logo-light.webp");
        width: 290px !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 70px !important;
        aspect-ratio: auto !important;
        object-fit: contain !important;
        display: block !important;
    }

    header > .nav > a {
        color: #071e48 !important;
        font-weight: 700;
        text-decoration: none;
    }

    header > .nav > a:hover {
        color: #e88a00 !important;
    }
}

/* GP DESKTOP HEADER FIX END */
