/* ============================================================
   Praise Baptist Church — desktop header revamp (>= 992px)
   Self-contained. Complements mobile-header.css (drawer, < 992px).
   ============================================================ */

/* The theme sets overflow-x:hidden on body/html, which can turn them into
   scroll containers and silently break position:sticky. "clip" keeps the
   horizontal clipping without creating a scroll container (falls back to
   hidden on browsers that don't support it). */
html,
body {
    overflow-x: hidden;
    overflow-x: clip;
}

@media (min-width: 992px) {

    .pbc-deskhead {
        display: block;
        position: sticky;
        top: 0;
        z-index: 1030;
        background: #ffffff;
        border-bottom: 1px solid #e9edf4;
        box-shadow: 0 6px 24px rgba(16, 28, 51, .06);
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    }

    .pbc-deskhead__inner {
        max-width: 1280px;
        margin: 0 auto;
        padding: 13px 26px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    /* ------------------------------------------------ Logo */
    .pbc-deskhead__logo {
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
    }

    .pbc-deskhead__logo img {
        height: 52px;
        width: auto;
        display: block;
    }

    /* ------------------------------------------------ Nav */
    .pbc-desknav {
        margin: 0 auto;
    }

    .pbc-desknav > ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        gap: 2px;
    }

    .pbc-desknav > ul > li {
        position: relative;
    }

    .pbc-desknav > ul > li > a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 11px 15px;
        font-size: 15px;
        font-weight: 600;
        line-height: 1;
        color: #1c2430;
        text-decoration: none;
        border-radius: 8px;
        white-space: nowrap;
        transition: color .2s ease, background-color .2s ease;
    }

    .pbc-desknav > ul > li > a:hover {
        color: #00468c;
        background: #f4f7fb;
    }

    .pbc-desknav > ul > li.is-active > a {
        color: #00468c;
    }

    .pbc-desknav > ul > li.is-active > a::after {
        content: "";
        position: absolute;
        left: 15px;
        right: 15px;
        bottom: 1px;
        height: 2px;
        border-radius: 2px;
        background: #00468c;
    }

    .pbc-caret {
        font-size: 11px;
        line-height: 1;
        transition: transform .2s ease;
    }

    .pbc-desknav > ul > li:hover > a .pbc-caret {
        transform: rotate(180deg);
    }

    /* ------------------------------------------------ Dropdown */
    .pbc-dd {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        min-width: 246px;
        margin: 0;
        padding: 8px;
        list-style: none;
        background: #ffffff;
        border: 1px solid #e9edf4;
        border-radius: 12px;
        box-shadow: 0 18px 40px rgba(16, 28, 51, .14);
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }

    .pbc-desknav > ul > li:hover > .pbc-dd,
    .pbc-desknav > ul > li:focus-within > .pbc-dd {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .pbc-dd li {
        margin: 0;
    }

    .pbc-dd li a {
        display: block;
        padding: 11px 14px;
        border-radius: 8px;
        font-size: 14.5px;
        font-weight: 500;
        color: #33405a;
        text-decoration: none;
        transition: background-color .18s ease, color .18s ease;
    }

    .pbc-dd li a:hover {
        background: #f4f7fb;
        color: #00468c;
    }

    .pbc-dd li.is-active a {
        color: #00468c;
        background: #eef3fb;
    }

    /* ------------------------------------------------ Actions */
    .pbc-deskhead__actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 0 0 auto;
    }

    .pbc-deskico {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #e9edf4;
        border-radius: 50%;
        background: #ffffff;
        color: #33405a;
        font-size: 16px;
        cursor: pointer;
        text-decoration: none;
        transition: background-color .2s ease, color .2s ease, border-color .2s ease;
    }

    .pbc-deskico:hover {
        background: #00468c;
        border-color: #00468c;
        color: #ffffff;
    }

    .pbc-deskhead__cta {
        display: inline-flex;
        align-items: center;
        height: 42px;
        padding: 0 24px;
        border-radius: 999px;
        background: #00468c;
        color: #ffffff;
        font-size: 15px;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        transition: background-color .2s ease;
    }

    .pbc-deskhead__cta:hover {
        background: #003a73;
        color: #ffffff;
    }

    /* ------------------------------------------------ Social (wide screens) */
    .pbc-deskhead__social {
        display: none;
        align-items: center;
        gap: 6px;
    }

    .pbc-deskhead__social a {
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #f4f7fb;
        color: #6b7688;
        font-size: 15px;
        text-decoration: none;
        transition: background-color .2s ease, color .2s ease;
    }

    .pbc-deskhead__social a:hover {
        background: #00468c;
        color: #ffffff;
    }

    /* ------------------------------------------------ Search */
    .pbc-searchwrap {
        position: relative;
    }

    .pbc-search {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        width: 320px;
        padding: 10px;
        background: #ffffff;
        border: 1px solid #e9edf4;
        border-radius: 12px;
        box-shadow: 0 18px 40px rgba(16, 28, 51, .14);
        display: none;
    }

    .pbc-search.is-open {
        display: block;
    }

    .pbc-search form {
        display: flex;
        gap: 8px;
    }

    .pbc-search input {
        flex: 1;
        height: 42px;
        padding: 0 14px;
        border: 1px solid #e1e6ef;
        border-radius: 8px;
        font-size: 15px;
        color: #1c2430;
        outline: none;
    }

    .pbc-search input:focus {
        border-color: #00468c;
    }

    .pbc-search button {
        width: 46px;
        height: 42px;
        border: none;
        border-radius: 8px;
        background: #00468c;
        color: #ffffff;
        cursor: pointer;
        transition: background-color .2s ease;
    }

    .pbc-search button:hover {
        background: #003a73;
    }
}

/* Social row only where there is room for it */
@media (min-width: 1200px) {
    .pbc-deskhead__social {
        display: inline-flex;
    }
}

/* Never show the desktop header inside the mobile layout */
@media (max-width: 991px) {
    .pbc-deskhead {
        display: none !important;
    }
}
