/* =========================================================
   Site navigation (header, drawer, mobile action bar)
   Always-visible links; Listings and Contact emphasized.
   ========================================================= */
.pag-hdr {
    --pag-clay: #9F4932;
    --pag-gold: #F4ECD8;
    --pag-ink: #1b1b1e;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9990;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, rgba(17,17,19,.78) 0%, rgba(17,17,19,.35) 70%, rgba(17,17,19,0) 100%);
    transition: background-color .25s ease, box-shadow .25s ease;
}
.pag-hdr.is-scrolled,
.pag-hdr.is-open {
    background: var(--pag-ink);
    box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
body.admin-bar .pag-hdr { top: 32px; }
.pag-hdr *, .pag-hdr *::before, .pag-hdr *::after { box-sizing: border-box; }
.pag-hdr a { text-decoration: none; }

.pag-hdr__bar {
    max-width: 1440px;
    margin: 0 auto;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    gap: 28px;
    transition: padding .25s ease;
}
.pag-hdr.is-scrolled .pag-hdr__bar { padding-top: 10px; padding-bottom: 10px; }

.pag-hdr__logo { flex: 0 0 auto; display: block; line-height: 0; }
.pag-hdr__logo img { height: 52px; width: auto; display: block; transition: height .25s ease; }
.pag-hdr.is-scrolled .pag-hdr__logo img { height: 44px; }

.pag-hdr__nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.pag-hdr__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: none;
    border: 0;
    color: #fff !important;
    font: 500 14px/1 'Inter', sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}
.pag-hdr__link::after {
    content: "";
    position: absolute;
    left: 12px; right: 12px; bottom: 2px;
    height: 2px;
    background: var(--pag-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}
.pag-hdr__link:hover::after,
.pag-hdr__link:focus-visible::after,
.pag-hdr__link.is-active::after { transform: scaleX(1); }
.pag-hdr__link--listings { color: var(--pag-gold) !important; font-weight: 700; }
.pag-hdr__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--pag-gold);
    color: var(--pag-ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
}

/* Services dropdown */
.pag-hdr__item { position: relative; }
.pag-hdr__menu-toggle svg { transition: transform .2s ease; }
.pag-hdr__item.is-open .pag-hdr__menu-toggle svg { transform: rotate(180deg); }
.pag-hdr__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    width: 320px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 18px 40px rgba(0,0,0,.22);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.pag-hdr__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
@media (hover: hover) {
    .pag-hdr__item:not(.is-closed):hover .pag-hdr__menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
}
.pag-hdr__item.is-open .pag-hdr__menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
.pag-hdr__menu a {
    display: block;
    padding: 12px 14px;
    border-radius: 4px;
    color: var(--pag-ink) !important;
}
.pag-hdr__menu a:hover, .pag-hdr__menu a:focus-visible { background: #F7F2EC; }
.pag-hdr__menu strong { display: block; font-size: 15px; font-weight: 600; color: var(--pag-clay); }
.pag-hdr__menu span { display: block; margin-top: 3px; font-size: 13px; color: #555; }

/* Right-side actions */
.pag-hdr__actions { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; }
.pag-hdr__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}
.pag-hdr__phone:hover { color: var(--pag-gold) !important; }
.pag-hdr__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    border-radius: 4px;
    background: var(--pag-clay);
    color: #fff !important;
    font: 700 13px/1 'Inter', sans-serif;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color .2s ease, transform .2s ease;
}
.pag-hdr__cta:hover, .pag-hdr__cta:focus-visible { background: #b8573d; transform: translateY(-1px); }

.pag-hdr__burger {
    display: none;
    width: 44px; height: 44px;
    padding: 12px 10px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    background: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
}
.pag-hdr__burger span { display: block; height: 2px; background: #fff; border-radius: 1px; transition: transform .2s ease, opacity .2s ease; }
.pag-hdr.is-open .pag-hdr__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pag-hdr.is-open .pag-hdr__burger span:nth-child(2) { opacity: 0; }
.pag-hdr.is-open .pag-hdr__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer (tablet & phone) */
.pag-drawer {
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    background: var(--pag-ink);
    border-top: 1px solid rgba(255,255,255,.08);
}
.pag-drawer[hidden] { display: none; }
.pag-drawer__inner { max-width: 560px; margin: 0 auto; padding: 18px 24px 32px; }
.pag-drawer__primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border: 2px solid var(--pag-gold);
    border-radius: 4px;
    color: var(--pag-gold) !important;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.pag-drawer__label {
    margin: 24px 0 6px;
    color: rgba(255,255,255,.55) !important;
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.pag-drawer__link {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    color: #fff !important;
    font-size: 17px;
}
.pag-drawer__ctas { display: grid; gap: 12px; margin-top: 26px; }
.pag-drawer__ctas .pag-hdr__cta { padding: 17px; font-size: 14px; }
.pag-drawer__call {
    display: block;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 4px;
    color: #fff !important;
    text-align: center;
    font-weight: 600;
}

/* Sticky mobile action bar */
.pag-mobile-cta { display: none; }

/* Hide the old header pieces if any template still prints them */
#page-header.page-header, .spark-mega-menu, .sp-menu-mobile { display: none !important; }

@media (max-width: 1280px) {
    .pag-hdr__bar { gap: 18px; padding-left: 24px; padding-right: 24px; }
    .pag-hdr__link { padding: 10px 9px; font-size: 13px; }
    .pag-hdr__link::after { left: 9px; right: 9px; }
    .pag-hdr__phone span { display: none; }
}
@media (max-width: 1080px) {
    .pag-hdr__nav { display: none; }
    .pag-hdr__actions { margin-left: auto; }
    .pag-hdr__burger { display: inline-flex; }
    .pag-hdr__phone span { display: inline; }
}
@media (max-width: 767px) {
    .pag-hdr__bar { padding: 10px 16px; gap: 10px; }
    .pag-hdr__logo img, .pag-hdr.is-scrolled .pag-hdr__logo img { height: 40px; }
    .pag-hdr__phone { display: none; }
    .pag-hdr__actions .pag-hdr__cta { padding: 11px 14px; font-size: 12px; }

    .pag-mobile-cta {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 9980;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        background: #1b1b1e;
        border-top: 1px solid rgba(255,255,255,.1);
        padding-bottom: env(safe-area-inset-bottom);
        font-family: 'Inter', sans-serif;
    }
    .pag-mobile-cta a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 10px 4px 9px;
        color: #fff !important;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .06em;
        text-transform: uppercase;
        text-decoration: none;
    }
    .pag-mobile-cta a.is-primary { background: #9F4932; }
    body { padding-bottom: 62px; }
    /* Decorative scroll line would cross the hero buttons on phones */
    .cbw-hero .fd-scrolldown { display: none !important; }
}
