/* Shared public header: Fast2Convert's production navigation. */
#site-header.master-header {
    position: sticky;
    top: 0;
    z-index: 5000;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(67, 97, 238, 0.12);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
}

/* Gradient border remains behind navigation overlays and menus. */
#site-header.master-header::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    z-index: 0;
    height: 2px;
    content: '';
    background: linear-gradient(90deg, #4361ee, #7209b7, #f72585);
    opacity: .8;
    pointer-events: none;
}

#site-header.master-header *,
#site-header.master-header *::before,
#site-header.master-header *::after {
    box-sizing: border-box;
}

#site-header.master-header .master-header__inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1280px;
    min-width: 0;
    min-height: 72px;
    margin: 0 auto;
    padding: 12px 24px;
}

#site-header.master-header .master-header__brand {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    min-width: 0;
    padding: 5px 10px;
    border-radius: 12px;
    transition: background-color .18s ease, transform .18s ease;
}

#site-header.master-header .master-header__brand img {
    display: block;
    width: auto;
    max-width: 160px;
    height: 40px;
    object-fit: contain;
}

#site-header.master-header .master-header__brand:hover {
    background: #f4f6ff;
    transform: translateY(-1px);
}

#site-header.master-header .master-header__nav {
    margin-left: auto;
}

#site-header.master-header .master-header__links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#site-header.master-header .master-header__links > li {
    position: relative;
}

/* The second logo is only shown inside the mobile slide-out drawer. */
#site-header.master-header .master-header__drawer-brand {
    display: none;
}

#site-header.master-header a,
#site-header.master-header .master-header__group-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 12px;
    border: 0;
    border-radius: 9px;
    color: #334155;
    background: transparent;
    font: 600 0.95rem/1.2 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
}

/* Neutralize older page-level nav effects inside the shared navigation. */
#site-header.master-header .master-header__nav a::after {
    content: none !important;
}

#site-header.master-header .master-header__nav ul {
    list-style: none;
}

#site-header.master-header a:hover,
#site-header.master-header a:focus-visible,
#site-header.master-header .master-header__group-toggle:hover,
#site-header.master-header .master-header__group-toggle:focus-visible,
#site-header.master-header a.is-active {
    color: #3156d3;
    background: #eef2ff;
    outline: none;
}

#site-header.master-header .master-header__group-toggle i {
    margin-left: 7px;
    font-size: .72rem;
    transition: transform .18s ease;
}

#site-header.master-header
.master-header__group.is-open
> .master-header__group-toggle i {
    transform: rotate(180deg);
}

/* Dropdown menu */
#site-header.master-header .master-header__submenu {
    position: absolute;
    top: calc(100% + 9px);
    left: 0;

    /*
     * Dropdown stays below the header's ::after gradient border.
     */
    z-index: 10;

    display: none;
    width: 230px;
    margin: 0;
    padding: 8px;
    list-style: none;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

#site-header.master-header
.master-header__group.is-open
> .master-header__submenu {
    display: block;
}

#site-header.master-header .master-header__submenu a {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    min-height: 39px;
    padding: 9px 10px;
    font-size: .91rem;
}


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

@media (min-width: 981px) {

    #site-header.master-header .master-header__nav {
        padding: 4px;
        border: 1px solid #e9eef7;
        border-radius: 14px;
        background: #f8fafc;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
    }

    #site-header.master-header .master-header__links {
        gap: 2px;
    }

    #site-header.master-header
    .master-header__links > li:first-child a {
        color: #fff;
        background: linear-gradient(135deg, #4361ee, #5b45d7);
        box-shadow: 0 5px 12px rgba(67, 97, 238, .22);
    }

    #site-header.master-header
    .master-header__links > li:first-child a:hover,

    #site-header.master-header
    .master-header__links > li:first-child a:focus-visible,

    #site-header.master-header
    .master-header__links > li:first-child a.is-active {
        color: #fff;
        background: linear-gradient(135deg, #3a56d4, #6334b8);
    }

    #site-header.master-header .master-header__submenu {
        overflow: hidden;
        z-index: 10;
    }
}


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

#site-header.master-header .master-header__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 46px;
    min-width: 46px;
    flex: 0 0 46px;
    flex-shrink: 0;
    margin-left: auto;
    height: 46px;
    gap: 5px;
    padding: 10px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    color: #1e293b;
    background: #fff;
    cursor: pointer;
}

#site-header.master-header .master-header__toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
}

#site-header.master-header.is-menu-open
.master-header__toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#site-header.master-header.is-menu-open
.master-header__toggle span:nth-child(2) {
    opacity: 0;
}

#site-header.master-header.is-menu-open
.master-header__toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


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

@media (max-width: 980px) {

    body.master-header-menu-open {
        overflow: hidden;
    }

    /*
     * A backdrop filter creates a containing block for fixed children in some
     * mobile browsers. Disable it here so the drawer is genuinely viewport
     * sized instead of being clipped to the header's 68px height.
     */
    #site-header.master-header {
        background: rgba(255, 255, 255, .98);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    #site-header.master-header .master-header__inner {
        min-height: 68px;
        max-width: none;
        padding: 10px 16px;
        overflow: visible;
    }

    #site-header.master-header .master-header__brand {
        max-width: calc(100% - 54px);
    }

    #site-header.master-header .master-header__brand img {
        width: min(160px, calc(100vw - 112px));
        height: auto;
        max-height: 36px;
    }

    #site-header.master-header .master-header__toggle {
        display: flex;
    }

    #site-header.master-header .master-header__nav {
        position: fixed;
        z-index: 1;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        overflow-y: auto;
        padding: 0;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        background: rgba(15, 23, 42, .5);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        transition: opacity .22s ease, visibility 0s linear .22s;
    }

    #site-header.master-header.is-menu-open
    .master-header__nav {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transition: opacity .22s ease;
    }

    #site-header.master-header .master-header__links {
        display: block;
        width: min(86vw, 380px);
        min-height: 100vh;
        min-height: 100dvh;
        margin: 0;
        padding: 82px 12px 24px;
        border-radius: 0 20px 20px 0;
        background: #fff;
        box-shadow: 0 22px 48px rgba(15, 23, 42, .28);
        transform: translateX(-105%);
        transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    }

    #site-header.master-header.is-menu-open .master-header__links {
        transform: translateX(0);
    }

    #site-header.master-header .master-header__links > li {
        border-bottom: 1px solid #edf1f7;
    }

    #site-header.master-header .master-header__drawer-brand {
        display: block;
        padding: 0 6px 12px;
        border-bottom: 1px solid #edf1f7;
    }

    #site-header.master-header .master-header__drawer-brand a {
        display: inline-flex;
        width: auto;
        min-height: 44px;
        padding: 4px 6px;
        background: transparent;
    }

    #site-header.master-header .master-header__drawer-brand a:hover,
    #site-header.master-header .master-header__drawer-brand a:focus-visible {
        background: #f4f6ff;
    }

    #site-header.master-header .master-header__drawer-brand img {
        display: block;
        width: 160px;
        max-width: 100%;
        height: auto;
        max-height: 40px;
        object-fit: contain;
    }

    #site-header.master-header
    .master-header__links > li:last-child {
        border-bottom: 0;
    }

    #site-header.master-header a,
    #site-header.master-header .master-header__group-toggle {
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        padding: 12px;
        font-size: 1rem;
        text-align: left;
    }

    #site-header.master-header .master-header__submenu {
        position: static;
        width: auto;
        margin: 0 0 8px;
        padding: 4px 0 4px 14px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    #site-header.master-header .master-header__submenu a {
        min-height: 44px;
        font-size: .95rem;
    }
}


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

@media (max-width: 480px) {

    #site-header.master-header .master-header__inner {
        padding-right: 10px;
        padding-left: 10px;
    }

    #site-header.master-header .master-header__brand {
        padding-right: 6px;
        padding-left: 6px;
    }

    #site-header.master-header .master-header__brand img {
        width: min(150px, calc(100vw - 94px));
        max-height: 34px;
    }

    #site-header.master-header .master-header__toggle {
        width: 44px;
        min-width: 44px;
        flex-basis: 44px;
        height: 44px;
    }

    #site-header.master-header .master-header__links {
        width: min(90vw, 360px);
        padding-top: 76px;
    }
}
