/* Hide original GeneratePress header */
#masthead {
    display: none !important;
}



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

.fplf-custom-header {
    position: relative;
    z-index: 1000;

    width: 100%;
    max-width: 100%;

    background: #000032;
}

.fplf-custom-header,
.fplf-custom-header * {
    box-sizing: border-box;
}


/* ==========================================
   HEADER INNER
========================================== */

.fplf-header-inner {
    position: relative;

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

    width: 100%;
    max-width: 1140px;
    height: 72px;

    margin: 0 auto;
    padding: 0 24px;
}


/* ==========================================
   LOGO + NAVIGATION
========================================== */

.fplf-header-left {
    display: flex;
    align-items: center;

    gap: 38px;

    min-width: 0;
}

.fplf-header-logo {
    display: flex;
    align-items: center;

    flex-shrink: 0;

    text-decoration: none;
}

.fplf-header-logo img {
    display: block;

    width: 205px;
    height: auto;
}


/* Desktop navigation */

.fplf-header-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 26px;

    white-space: nowrap;
}

.fplf-header-nav a {
    display: inline-flex;
    align-items: center;

    color: #f4f7fc;

    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;

    text-decoration: none;

    transition: color 0.2s ease;
}

.fplf-header-nav a:hover,
.fplf-header-nav a:focus-visible {
    color: #a9ceff;
    text-decoration: none;
}


/* ==========================================
   HEADER RIGHT
========================================== */

.fplf-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex-shrink: 0;

    margin-left: auto;
}


/* ==========================================
   DESKTOP + TABLET SEARCH
========================================== */

.fplf-header-search {
    display: flex;
    align-items: center;

    position: relative;
    margin: 0;
}

.fplf-header-search summary {
    list-style: none;
}

.fplf-header-search summary::-webkit-details-marker {
    display: none;
}

.fplf-header-search summary::marker {
    content: "";
}


/* Search icon */

.fplf-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    padding: 8px;
    margin: 0;

    border: 0;
    background: transparent;

    cursor: pointer;
}

.fplf-search-toggle svg {
    width: 21px;
    height: 21px;

    fill: none;
    stroke: #ffffff;

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


/* Closed search form */

.fplf-header-search-form {
    display: flex;
    align-items: center;

    width: 0;
    height: 42px;

    opacity: 0;
    visibility: hidden;
    overflow: hidden;

    background: #ffffff;
    border-radius: 24px;

    transition:
        width 0.25s ease,
        opacity 0.2s ease;
}


/* Open search */

.fplf-header-search[open] .fplf-header-search-form {
    width: 260px;

    opacity: 1;
    visibility: visible;
}

.fplf-header-search[open] .fplf-search-toggle {
    display: none;
}


/* Search input */

.fplf-header-search-form input {
    flex: 1;

    width: 100%;
    min-width: 0;
    height: 42px;

    margin: 0;
    padding: 0 14px 0 18px;

    border: 0;
    outline: none;
    box-shadow: none;

    background: transparent;

    color: #1f2937;

    font-size: 14px;
    font-family: inherit;
}

.fplf-header-search-form input::placeholder {
    color: #94a3b8;
    opacity: 1;
}


/* Search button */

.fplf-header-search-form button {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 46px;

    width: 46px;
    height: 42px;

    padding: 0;
    margin: 0;

    border: 0;
    border-radius: 0 24px 24px 0;

    background: #3b82f6;

    cursor: pointer;

    transition: background 0.2s ease;
}

.fplf-header-search-form button:hover {
    background: #2563eb;
}

.fplf-header-search-form button svg {
    width: 18px;
    height: 18px;

    fill: none;
    stroke: #ffffff;

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


/* ==========================================
   HAMBURGER - HIDDEN BY DEFAULT
========================================== */

.fplf-mobile-menu-toggle {
    display: none;

    position: relative;

    width: 42px;
    height: 42px;

    padding: 0;
    margin: 0;

    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 7px;

    background: transparent;

    cursor: pointer;
}

.fplf-hamburger-line {
    position: absolute;
    left: 9px;

    display: block;

    width: 22px;
    height: 2px;

    background: #ffffff;
    border-radius: 2px;

    transform-origin: center;

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

.fplf-hamburger-line:nth-child(1) {
    top: 13px;
}

.fplf-hamburger-line:nth-child(2) {
    top: 20px;
}

.fplf-hamburger-line:nth-child(3) {
    top: 27px;
}


/* Hamburger to X */

.fplf-menu-open .fplf-hamburger-line:nth-child(1) {
    top: 20px;
    transform: rotate(45deg);
}

.fplf-menu-open .fplf-hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.fplf-menu-open .fplf-hamburger-line:nth-child(3) {
    top: 20px;
    transform: rotate(-45deg);
}


/* Mobile panel hidden on desktop/tablet */

.fplf-mobile-nav-panel {
    display: none;
}


/* ==========================================
   TABLET
   768px - 1199px
========================================== */

@media (min-width: 768px) and (max-width: 1199px) {

    .fplf-header-inner {
        width: 100%;
        max-width: 100%;

        height: 68px;

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

    .fplf-header-left {
        gap: 22px;
    }

    .fplf-header-logo img {
        width: 175px;
    }

    .fplf-header-nav {
        gap: 18px;
    }

    .fplf-header-nav a {
        font-size: 14px;
    }

    /* Search opens over the right side
       instead of squeezing navigation */

    .fplf-header-search[open] {
        position: absolute;

        top: 50%;
        right: 24px;

        z-index: 10;

        transform: translateY(-50%);
    }

    .fplf-header-search[open] .fplf-header-search-form {
        width: 250px;
    }

}


/* ==========================================
   SMALL TABLET
   768px - 900px
========================================== */

@media (min-width: 768px) and (max-width: 900px) {

    .fplf-header-inner {
        padding-left: 18px;
        padding-right: 18px;
    }

    .fplf-header-left {
        gap: 15px;
    }

    .fplf-header-logo img {
        width: 155px;
    }

    .fplf-header-nav {
        gap: 12px;
    }

    .fplf-header-nav a {
        font-size: 14px;
    }

    .fplf-search-toggle {
        width: 34px;
        height: 34px;
    }

    .fplf-search-toggle svg {
        width: 19px;
        height: 19px;
    }

    .fplf-header-search[open] {
        right: 18px;
    }

}


/* ==========================================
   SMALL DESKTOP
   1024px - 1199px: navigation labels 16px
   (768px - 1023px keep 14px from the tablet rules)
========================================== */

@media (min-width: 1024px) and (max-width: 1199px) {

    .fplf-header-nav a {
        font-size: 16px;
    }

}


/* ==========================================
   MOBILE ONLY
   UP TO 767px
========================================== */

@media (max-width: 767px) {

    /* Header */

    .fplf-header-inner {
        height: 66px;

        padding: 0 18px;
    }

    .fplf-header-logo img {
        width: 175px;
    }


    /* Hide desktop navigation and search */

    .fplf-header-nav,
    .fplf-header-search {
        display: none !important;
    }


    /* Show hamburger */

    .fplf-mobile-menu-toggle {
        display: block;
        flex-shrink: 0;
    }


/* ======================================
   FULL HEIGHT MOBILE PANEL
====================================== */

.fplf-mobile-nav-panel {
    display: block;

    position: fixed;

    top: 66px;
    left: 0;
    right: 0;

    width: 100%;

    height: var(
        --fplf-menu-height,
        calc(100dvh - 66px)
    );

    max-height: 0;

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

    overflow: hidden;

    background: #000032;

    border-top: 1px solid rgba(255,255,255,0.12);

    box-shadow: 0 14px 24px rgba(0,0,0,0.12);

    transform: translateY(-12px);

    transition:
        max-height 0.35s ease,
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0s linear 0.35s;

    z-index: 9999;
}


/* Open state */

.fplf-menu-open .fplf-mobile-nav-panel {
    max-height: var(
        --fplf-menu-height,
        calc(100dvh - 66px)
    );

    opacity: 1;
    visibility: visible;
    pointer-events: auto;

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

    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;

    transform: translateY(0);

    transition:
        max-height 0.35s ease,
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0s;
}


/* Keep header fixed when menu is open */

.fplf-custom-header.fplf-menu-open {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    width: 100%;
    z-index: 99999;
}


/* Prevent background scrolling */

html.fplf-mobile-menu-locked,
html.fplf-mobile-menu-locked body {
    overflow: hidden !important;
}

    /* Panel content */

.fplf-mobile-nav-inner {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-height: 100%;

    margin: 0 auto;

    padding: 24px 24px
             calc(32px + env(safe-area-inset-bottom, 0px));

    box-sizing: border-box;
}


    /* Navigation links */

.fplf-mobile-nav-links {
    display: flex;
    flex-direction: column;

    flex: 0 0 auto;

    width: 100%;
    margin-bottom: 24px;
}

.fplf-mobile-nav-links a {
    display: flex;
    align-items: center;

    min-height: 64px;
    padding: 16px 0;

    color: #ffffff;

    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;

    border-bottom:
        1px solid rgba(255,255,255,0.24);

    text-decoration: none;

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

    .fplf-mobile-nav-links a:hover,
    .fplf-mobile-nav-links a:focus-visible {
        color: #a9ceff;
        padding-left: 6px;
        text-decoration: none;
    }


/* Mobile Search */

.fplf-mobile-search-form {
    display: flex;
    align-items: center;

    flex: 0 0 48px;

    width: 100%;
    height: 48px;

    margin: auto 0 0;

    background: #ffffff;

    border: 1px solid #d8e2ef;
    border-radius: 50px;

    overflow: hidden;
}

    .fplf-mobile-search-form input {
        flex: 1;

        width: 100%;
        min-width: 0;
        height: 46px;

        padding: 0 16px;
        margin: 0;

        border: 0;
        outline: none;
        box-shadow: none;

        background: transparent;

        color: #1f2937;

        font-size: 16px;
        font-family: inherit;
    }

    .fplf-mobile-search-form input::placeholder {
        color: #94a3b8;
        opacity: 1;
    }

    .fplf-mobile-search-form button {
        display: flex;
        align-items: center;
        justify-content: center;

        flex: 0 0 48px;

        width: 48px;
        height: 46px;

        padding: 0;
        margin: 0;

        border: 0;

        background: #367ce8;
        color: #ffffff;

        cursor: pointer;
    }

    .fplf-mobile-search-form button:hover {
        background: #2868cc;
    }

    .fplf-mobile-search-form button svg {
        width: 19px;
        height: 19px;

        fill: none;
        stroke: currentColor;
        stroke-width: 2;

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

}


/* ==========================================
   SMALL MOBILE
   UP TO 400px
========================================== */

@media (max-width: 400px) {

    .fplf-header-inner {
        padding: 0 16px;
    }

    .fplf-header-logo img {
        width: 155px;
    }

    .fplf-mobile-nav-inner {
        padding: 16px 20px 26px;
    }

    .fplf-mobile-nav-links a {
        font-size: 21px;
        min-height: 68px;
    }

}


/* ==========================================
   ACCESSIBILITY
========================================== */

.fplf-custom-header a:focus-visible,
.fplf-custom-header button:focus-visible,
.fplf-custom-header summary:focus-visible {
    outline: 2px solid #a9ceff;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    .fplf-custom-header *,
    .fplf-custom-header *::before,
    .fplf-custom-header *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

}

/* ==========================================
   FPLF HEADER - TABLET SEARCH FINAL FIX
   768px - 1199px
========================================== */

@media (min-width: 768px) and (max-width: 1199px) {

    .fplf-header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;

        position: relative;

        width: 100%;
        max-width: 1140px;

        margin: 0 auto;
        padding: 0 24px;

        gap: 20px;
        box-sizing: border-box;
    }

    /* Logo and navigation */

    .fplf-header-left {
        display: flex;
        align-items: center;

        flex: 0 1 auto;
        min-width: 0;
    }

    /* Right search container */

    .fplf-header-right {
        position: static !important;

        flex: 0 0 38px;

        width: 38px;
        height: 38px;

        margin-left: auto;
        padding: 0;

        transform: none !important;

        overflow: visible;
        z-index: 20;
    }

    /* Search stays within reserved 38px */

    .fplf-header-search,
    .fplf-header-search[open] {
        position: relative !important;

        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;

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

        flex: 0 0 38px;

        width: 38px !important;
        height: 38px;

        margin: 0;

        transform: none !important;
        overflow: visible;
    }

    /* Search icon */

    .fplf-search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 38px;
        height: 38px;

        padding: 8px;
        margin: 0;
    }

    .fplf-search-toggle svg {
        display: block;

        width: 20px;
        height: 20px;

        flex-shrink: 0;
    }

    /* Expanded search overlays navigation */

    .fplf-header-search-form {
        position: absolute;

        top: 50%;
        right: 0;

        transform: translateY(-50%);

        z-index: 30;
    }

    .fplf-header-search[open]
    .fplf-header-search-form {
        width: 250px;
        max-width: calc(100vw - 48px);
    }

    .fplf-header-search[open]
    .fplf-search-toggle {
        display: none;
    }

}


