/*
 * GIFT City site header. The design follows the motilaloswal.com header (without search/login).
 * Markup: tools/site-header/header.html. Behaviour: gift-header.js.
 *
 * Every class is prefixed gh- and every size is in px, so the site's Bootstrap 3/5 rules
 * (html{font-size:10px}, a, button, img, ul, .active, .navbar ...) cannot change it.
 */
.gh-header,
.gh-drawer {
    --gh-blue: #2b2e8c;
    --gh-blue-dark: #222470;
    --gh-ink: #2e3238;
    --gh-grey: #414651;
    --gh-line: #e9eaeb;
    --gh-font: "Poppins", -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, sans-serif;
    font-family: var(--gh-font);
    -webkit-font-smoothing: antialiased;
}

.gh-header *,
.gh-drawer * {
    box-sizing: border-box;
}

.gh-header ul,
.gh-drawer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gh-header li,
.gh-drawer li {
    margin: 0;
    padding: 0;
}

.gh-header img,
.gh-drawer img {
    display: block;
    max-width: none;
    border: 0;
}

.gh-header a,
.gh-drawer a {
    text-decoration: none;
}

.gh-header button,
.gh-drawer button {
    font-family: var(--gh-font);
    background: none;
    border: 0;
    margin: 0;
    padding: 0;
    cursor: pointer;
    color: inherit;
    border-radius: 0;
    text-transform: none;
}

.gh-header :focus-visible,
.gh-drawer :focus-visible {
    outline: 2px solid var(--gh-blue);
    outline-offset: 3px;
    border-radius: 4px;
}

/* No ring after a mouse click or a tap: the site's Bootstrap 3 (bootstrap1.css) draws a 5px
   focus ring on every a:focus. Keyboard users still get the blue ring above. */
.gh-header :focus:not(:focus-visible),
.gh-drawer :focus:not(:focus-visible) {
    outline: none;
}

.gh-header,
.gh-drawer {
    -webkit-tap-highlight-color: transparent;
}

/* ---------- bar ---------- */
.gh-header {
    /* full height at the top of the page, shrunk once the page is scrolled.
       --gh-h-full is also read by pages to offset their content below the header. */
    --gh-h-full: 92px;
    --gh-h-small: 68px;
    --gh-logo: 72px; /* 139px wide - the size of the logo on motilaloswal.com */
    --gh-logo-small: 52px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.gh-header.is-scrolled {
    box-shadow: 0 4px 24px rgba(30, 51, 72, 0.12);
}

/* frosted glass once scrolled: see-through white with a soft blur of the page behind */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .gh-header.is-scrolled {
        background: rgba(255, 255, 255, 0.82);
        -webkit-backdrop-filter: saturate(180%) blur(14px);
        backdrop-filter: saturate(180%) blur(14px);
    }
}

.gh-bar {
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: 1400px;
    height: var(--gh-h-full);
    margin: 0 auto;
    padding: 0 24px;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gh-header.is-scrolled .gh-bar {
    height: var(--gh-h-small);
}

.gh-logo {
    display: flex;
    flex: none;
}

.gh-logo img {
    width: auto;
    height: var(--gh-logo, 72px);
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gh-header.is-scrolled .gh-logo img {
    height: var(--gh-logo-small);
}

/* ---------- desktop menu ---------- */
.gh-nav {
    flex: 1;
    align-self: stretch;
    min-width: 0;
}

.gh-nav__list {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.gh-nav__list > li {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.gh-header .gh-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 100%;
    padding: 0;
    font: 400 15px/24px var(--gh-font);
    color: var(--gh-blue);
    white-space: nowrap;
}

.gh-header .gh-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(50% + 17px);
    height: 2px;
    border-radius: 2px;
    background: var(--gh-blue);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.gh-header .gh-nav__link:hover::after,
.gh-header .gh-nav__link.is-active::after,
.gh-header .gh-nav__toggle[aria-expanded="true"]::after {
    transform: scaleX(1);
}

.gh-header .gh-nav__link.is-active::after,
.gh-header .gh-link.is-active::after {
    height: 3px;
    background: var(--gh-blue);
}

.gh-header .gh-nav__link:visited,
.gh-header .gh-nav__link:hover,
.gh-header .gh-nav__link:focus {
    color: var(--gh-blue);
    text-decoration: none;
}

.gh-chevron {
    flex: none;
    transition: transform 0.2s ease;
}

[aria-expanded="true"] > .gh-chevron {
    transform: rotate(180deg);
}

/* dropdown panel (same look as the MOSL menu panels) */
.gh-dropdown {
    position: absolute;
    top: calc(100% - 8px);
    right: -24px;
    z-index: 1;
    min-width: 340px;
    padding: 8px;
    border-radius: 8px;
    background: #f7f7f7;
    box-shadow: 0 4px 32px 24px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

/* About sits next to the logo, so its panel opens towards the right */
.gh-dropdown--start {
    left: -24px;
    right: auto;
    min-width: 400px; /* the full company names fit on one line */
}

.gh-dropdown.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.gh-dropdown[hidden] {
    display: none;
}

.gh-dropdown__card {
    padding: 20px 24px 12px;
    border-radius: 8px;
    background: #fff;
}

.gh-header .gh-dropdown__title {
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gh-line);
    font: 600 14px/20px var(--gh-font);
    color: var(--gh-blue);
    text-transform: uppercase;
}

.gh-header .gh-dropdown__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font: 600 15px/20px var(--gh-font);
    color: var(--gh-ink);
}

.gh-header .gh-dropdown__item:visited {
    color: var(--gh-ink);
}

.gh-header .gh-dropdown__item:hover,
.gh-header .gh-dropdown__item:focus,
.gh-header .gh-dropdown__item.is-active {
    color: var(--gh-blue);
    text-decoration: none;
}

/* item with a second line (About > MO IFSC / MOFSL) */
.gh-dropdown__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gh-header .gh-dropdown__desc {
    font: 400 13px/18px var(--gh-font);
    color: var(--gh-grey);
}

/* document icon in a light tile, like the MOSL menu item icons */
.gh-doc {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 7px;
    background: #f9f9f9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%232b2e8c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E") center / 22px no-repeat;
}

/* building icon for the About items */
.gh-doc.gh-doc--org {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%232b2e8c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16M16 9h2a2 2 0 0 1 2 2v10M3 21h18M8 7h4M8 11h4M8 15h4'/%3E%3C/svg%3E");
}

/* ---------- right side: contact link + account button ---------- */
.gh-actions {
    display: flex;
    flex: none;
    align-items: center;
    gap: 28px;
}

.gh-header .gh-link,
.gh-header .gh-link:visited {
    position: relative;
    padding: 8px 0;
    font: 500 15px/24px var(--gh-font);
    color: var(--gh-blue);
    white-space: nowrap;
}

.gh-header .gh-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--gh-blue);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.gh-header .gh-link:hover,
.gh-header .gh-link:focus {
    color: var(--gh-blue);
    text-decoration: none;
}

.gh-header .gh-link:hover::after,
.gh-header .gh-link.is-active::after {
    transform: scaleX(1);
}

.gh-header .gh-btn,
.gh-drawer .gh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--gh-blue);
    border-radius: 12px;
    font: 600 14px/16px var(--gh-font);
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.gh-header .gh-btn--outline,
.gh-drawer .gh-btn--outline,
.gh-header .gh-btn--outline:visited,
.gh-drawer .gh-btn--outline:visited {
    background: #fff;
    color: var(--gh-blue);
}

.gh-header .gh-btn--outline:hover,
.gh-drawer .gh-btn--outline:hover,
.gh-header .gh-btn--outline.is-active {
    background: #f1f1f9;
    color: var(--gh-blue);
}

.gh-header .gh-btn--primary,
.gh-drawer .gh-btn--primary,
.gh-header .gh-btn--primary:visited,
.gh-drawer .gh-btn--primary:visited {
    background: var(--gh-blue);
    color: #fff;
    text-transform: uppercase;
    box-shadow: 0 16px 40px rgba(50, 77, 103, 0.15);
}

.gh-header .gh-btn--primary:hover,
.gh-drawer .gh-btn--primary:hover,
.gh-header .gh-btn--primary:focus,
.gh-drawer .gh-btn--primary:focus {
    background: var(--gh-blue-dark);
    color: #fff;
}

.gh-arrow {
    width: 8px;
    height: 8px;
    margin-left: 2px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.gh-btn:hover .gh-arrow,
.gh-btn:focus-visible .gh-arrow {
    transform: translateX(3px) rotate(45deg);
}

/* ---------- hamburger (mobile/tablet only) ---------- */
.gh-header .gh-burger {
    display: none;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    margin-left: -6px;
    color: var(--gh-blue);
}

/* ---------- one row gets tighter as the screen narrows (measured with the 139px logo; keeps >=30px between menu and buttons) ---------- */
@media (max-width: 1399px) {
    .gh-bar {
        gap: 24px;
    }

    .gh-nav__list {
        gap: 16px;
    }

}

@media (max-width: 1359px) {
    .gh-bar {
        gap: 20px;
    }

    .gh-nav__list {
        gap: 12px;
    }

    .gh-header .gh-nav__link,
    .gh-header .gh-link {
        font-size: 14px;
    }

    .gh-actions {
        gap: 20px;
    }
}

/* ---------- below 1280px: mobile bar + drawer ---------- */
@media (max-width: 1279px) {
    .gh-header {
        --gh-h-full: 78px;
        --gh-h-small: 64px;
        --gh-logo: 47px; /* 90px wide, as on the motilaloswal.com mobile header */
        --gh-logo-small: 40px;
    }

    .gh-bar {
        gap: 12px;
        padding: 0 16px; /* as on the MOSL mobile bar; 24px would push the button off 320px phones */
    }

    .gh-header .gh-burger {
        display: flex;
    }

    .gh-nav,
    .gh-actions .gh-link {
        display: none;
    }

    .gh-actions {
        margin-left: auto;
    }

    .gh-header .gh-btn {
        height: 36px;
        padding: 0 12px;
        font-size: 12px;
    }
}

/* very small phones (320-359px): drop the button arrow so the bar fits */
@media (max-width: 359px) {
    .gh-header .gh-btn .gh-arrow {
        display: none;
    }
}

/* ---------- drawer ---------- */
.gh-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
}

.gh-drawer[hidden] {
    display: none;
}

.gh-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease; /* closing */
}

.gh-drawer__panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: min(344px, 88vw);
    padding: 16px;
    overflow-y: auto;
    background: #fff;
    transform: translateX(-100%);
    box-shadow: none;
    /* closing: quick and accelerating, like a native sheet being dismissed */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.6, 1), box-shadow 0.3s ease;
    touch-action: pan-y; /* vertical scroll stays native; sideways drags go to the swipe-to-close code */
}

.gh-drawer.is-open .gh-drawer__overlay {
    opacity: 1;
    transition: opacity 0.42s ease;
}

/* opening: a smooth glide - starts gently, settles softly (Material "standard" easing) */
.gh-drawer.is-open .gh-drawer__panel {
    transform: none;
    box-shadow: 8px 0 32px rgba(30, 51, 72, 0.18);
    transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.42s ease;
}

.gh-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.gh-drawer__head .gh-logo img {
    height: 47px;
}

.gh-drawer .gh-drawer__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--gh-grey);
}

.gh-drawer .gh-drawer__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
    font: 600 16px/24px var(--gh-font);
    color: var(--gh-grey);
    text-align: left;
}

.gh-drawer .gh-drawer__link:visited {
    color: var(--gh-grey);
}

.gh-drawer .gh-drawer__link.is-active {
    position: relative;
}

.gh-drawer .gh-drawer__link.is-active::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 50%;
    width: 4px;
    height: 24px;
    border-radius: 0 3px 3px 0;
    background: var(--gh-blue);
    transform: translateY(-50%);
}

.gh-drawer .gh-drawer__link:hover,
.gh-drawer .gh-drawer__link:focus,
.gh-drawer .gh-drawer__link.is-active {
    color: var(--gh-blue);
    text-decoration: none;
}

.gh-drawer .gh-drawer__toggle .gh-chevron {
    color: var(--gh-blue);
}

.gh-drawer__sub {
    padding: 4px 0 8px 12px !important;
    border-bottom: 1px solid #ddd;
}

.gh-drawer__sub[hidden] {
    display: none;
}

.gh-drawer .gh-drawer__sub a,
.gh-drawer .gh-drawer__sub a:visited {
    display: block;
    padding: 10px 0;
    font: 400 15px/22px var(--gh-font);
    color: var(--gh-blue);
}

.gh-drawer .gh-drawer__sub a.is-active {
    font-weight: 600;
}

.gh-drawer__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.gh-drawer .gh-drawer__actions .gh-btn {
    width: 100%;
}

html.gh-lock,
html.gh-lock body {
    overflow: hidden;
}

/* The header is fixed, so the page's first section starts right below its full height.
   (The site's own .scrolled-offset reserves 80px/70px for the old header; only the section
   directly after the header is moved, other .scrolled-offset sections keep their spacing.) */
.gh-drawer + .scrolled-offset {
    margin-top: 92px;
}

@media (max-width: 1279px) {
    .gh-drawer + .scrolled-offset {
        margin-top: 78px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gh-header *,
    .gh-drawer *,
    .gh-header,
    .gh-drawer__overlay,
    .gh-drawer__panel {
        transition: none !important;
    }
}
