/* ==========================================================
   LOAN CURE SOLUTIONS — PREMIUM HEADER
   ========================================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(13,23,32,.985);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.09);
    transition:
        box-shadow .25s ease,
        background .25s ease,
        border-color .25s ease;
}

.header.is-scrolled {
    background: rgba(9,18,25,.99);
    border-bottom-color: rgba(201,165,96,.20);
    box-shadow: 0 12px 34px rgba(0,0,0,.18);
}

.premium-nav {
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    color: #fff;
}

.brand .site-logo {
    display: block;
    width: 205px;
    max-width: 205px;
    height: auto;
    max-height: 82px;
    object-fit: contain;
}


/* ==========================================================
   PRIMARY NAVIGATION
   ========================================================== */

.navlinks {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 21px;
    margin-left: auto;
    font-size: 13px;
    font-weight: 500;
}

.navlinks > a,
.nav-dropdown-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 86px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #d7dde0;
    font: inherit;
    white-space: nowrap;
    cursor: pointer;
    transition: color .2s ease;
}

.navlinks > a::after,
.nav-dropdown-toggle::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .22s ease;
}

.navlinks > a:hover,
.navlinks > a:focus-visible,
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible,
.navlinks > a.is-current,
.nav-dropdown-toggle.is-current {
    color: #fff;
}

.navlinks > a:hover::after,
.navlinks > a:focus-visible::after,
.nav-dropdown-toggle:hover::after,
.nav-dropdown-toggle:focus-visible::after,
.navlinks > a.is-current::after,
.nav-dropdown-toggle.is-current::after {
    transform: scaleX(1);
}

.nav-chevron {
    width: 7px;
    height: 7px;
    border-right: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
}

.nav-dropdown.is-open .nav-chevron {
    transform: rotate(225deg) translate(-1px,-1px);
}


/* ==========================================================
   DROPDOWNS
   ========================================================== */

.nav-dropdown {
    position: static;
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 1px);
    left: 50%;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition:
        opacity .2s ease,
        transform .2s ease,
        visibility .2s ease;
}

.nav-dropdown.is-open > .nav-dropdown-panel,
.nav-dropdown:hover > .nav-dropdown-panel,
.nav-dropdown:focus-within > .nav-dropdown-panel {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}


/* ==========================================================
   SERVICES MEGA MENU
   ========================================================== */

.services-mega {
    width: min(940px, calc(100vw - 48px));
    display: grid;
    grid-template-columns: 280px 1fr;
    background: #fff;
    color: #15232b;
    border-top: 2px solid var(--gold);
    box-shadow: 0 24px 55px rgba(0,0,0,.22);
}

.mega-intro {
    padding: 35px 32px;
    background: #f5f0e5;
    border-right: 1px solid #e2ddd2;
}

.mega-eyebrow {
    display: block;
    margin-bottom: 14px;
    color: #a47d37;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 2px;
}

.mega-intro > strong,
.locations-menu-head > strong {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 25px;
    line-height: 1.12;
    font-weight: 500;
    color: #13232b;
}

.mega-intro p {
    margin: 15px 0 22px;
    color: #657077;
    font-size: 13px;
    line-height: 1.7;
}

.mega-all-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #15232b;
    font-size: 12px;
    font-weight: 700;
    border-bottom: 1px solid #c9a560;
    padding-bottom: 5px;
}

.mega-all-link span {
    color: #a47d37;
}

.mega-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 18px;
}

.mega-links > a {
    display: grid;
    grid-template-columns: 31px 1fr;
    gap: 12px;
    padding: 15px 16px;
    color: #15232b;
    border-bottom: 1px solid #ece8df;
    transition:
        background .18s ease,
        transform .18s ease;
}

.mega-links > a:nth-last-child(-n+2) {
    border-bottom: 0;
}

.mega-links > a:hover,
.mega-links > a:focus-visible {
    background: #f8f5ee;
}

.mega-links > a > span {
    padding-top: 2px;
    color: #b18b47;
    font-family: 'Playfair Display', serif;
    font-size: 12px;
}

.mega-links strong {
    display: block;
    margin-bottom: 4px;
    color: #17262e;
    font-size: 13px;
    font-weight: 700;
}

.mega-links small {
    display: block;
    color: #778188;
    font-size: 11px;
    line-height: 1.45;
}


/* ==========================================================
   LOCATIONS MENU
   ========================================================== */

.locations-menu {
    width: min(650px, calc(100vw - 48px));
    display: grid;
    grid-template-columns: 240px 1fr;
    background: #fff;
    color: #15232b;
    border-top: 2px solid var(--gold);
    box-shadow: 0 24px 55px rgba(0,0,0,.22);
}

.locations-menu-head {
    padding: 30px 28px;
    background: #f5f0e5;
}

.locations-menu-head > strong {
    font-size: 22px;
}

.locations-menu-head > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding-bottom: 5px;
    border-bottom: 1px solid #c9a560;
    color: #15232b;
    font-size: 12px;
    font-weight: 700;
}

.locations-menu-head > a span {
    color: #a47d37;
}

.locations-menu-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 18px 22px;
}

.locations-menu-links > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 10px;
    color: #24343c;
    border-bottom: 1px solid #ece8df;
    font-size: 13px;
    transition:
        color .18s ease,
        padding-left .18s ease;
}

.locations-menu-links > a:hover,
.locations-menu-links > a:focus-visible {
    color: #9d7734;
    padding-left: 14px;
}

.locations-menu-links > a span {
    color: #b18b47;
}


/* ==========================================================
   HEADER ACTIONS
   ========================================================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
}













.header-cta {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 11px 16px;
    white-space: nowrap;
    font-size: 11px;
}

.header-cta span:last-child {
    transition: transform .2s ease;
}

.header-cta:hover span:last-child {
    transform: translateX(3px);
}


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

.menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.14);
    background: transparent;
    cursor: pointer;
}

.menu-btn span {
    display: block;
    width: 100%;
    height: 1px;
    margin: 5px 0;
    background: #fff;
    transition:
        transform .2s ease,
        opacity .2s ease;
}

.menu-btn.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-btn.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-btn.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}


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

@media (max-width: 1240px) {

    .premium-nav {
        gap: 19px;
    }

    .brand .site-logo {
        width: 180px;
        max-width: 180px;
    }

    .navlinks {
        gap: 15px;
        font-size: 12px;
    }

    

    .header-actions {
        gap: 10px;
    }

    .header-cta {
        padding-left: 13px;
        padding-right: 13px;
    }
}


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

@media (max-width: 1050px) {

    .premium-nav {
        min-height: 78px;
        justify-content: space-between;
    }

    .brand .site-logo {
        width: 195px;
        max-width: 195px;
        max-height: 62px;
    }

    .menu-btn {
        display: block;
        order: 3;
    }

    .header-actions {
        margin-left: auto;
    }

    

    .header-cta {
        min-height: 40px;
    }

    .navlinks {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        max-height: calc(100vh - 78px);
        overflow-y: auto;
        margin: 0;
        padding: 12px 24px 28px;
        background: #0d1720;
        border-top: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 22px 35px rgba(0,0,0,.22);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .navlinks.open {
        display: flex;
    }

    .navlinks > a,
    .nav-dropdown-toggle {
        width: 100%;
        min-height: auto;
        justify-content: space-between;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
        color: #eef1f2;
        font-size: 14px;
    }

    .navlinks > a::after,
    .nav-dropdown-toggle::after {
        display: none;
    }

    .navlinks > a.is-current,
    .nav-dropdown-toggle.is-current {
        color: var(--gold);
    }

    .nav-dropdown {
        position: relative;
    }

    .nav-dropdown-panel {
        position: static;
        width: 100%;
        visibility: visible;
        display: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        transition: none;
        box-shadow: none;
        border-top: 0;
    }

    .nav-dropdown:hover > .nav-dropdown-panel,
    .nav-dropdown:focus-within > .nav-dropdown-panel {
        display: none;
    }

    .nav-dropdown.is-open > .nav-dropdown-panel {
        display: grid;
    }

    .services-mega {
        grid-template-columns: 1fr;
        margin: 0 0 10px;
    }

    .mega-intro {
        padding: 24px;
        border-right: 0;
    }

    .mega-intro > strong {
        font-size: 22px;
    }

    .mega-links {
        padding: 8px 15px 15px;
    }

    .locations-menu {
        grid-template-columns: 210px 1fr;
        margin-bottom: 10px;
    }
}


/* ==========================================================
   SMALL TABLET / PHONE
   ========================================================== */

@media (max-width: 700px) {

    .premium-nav {
        min-height: 72px;
        gap: 12px;
    }

    .brand .site-logo {
        width: 170px;
        max-width: 170px;
    }

    .header-actions {
        display: none;
    }

    .navlinks {
        max-height: calc(100vh - 72px);
        padding-left: 20px;
        padding-right: 20px;
    }

    .mega-intro {
        padding: 21px;
    }

    .mega-intro p {
        font-size: 12px;
    }

    .mega-links {
        grid-template-columns: 1fr;
    }

    .mega-links > a {
        border-bottom: 1px solid #ece8df !important;
    }

    .mega-links > a:last-child {
        border-bottom: 0 !important;
    }

    .locations-menu {
        grid-template-columns: 1fr;
    }

    .locations-menu-head {
        padding: 22px;
    }

    .locations-menu-links {
        padding: 10px 18px 18px;
    }
}


/* ==========================================================
   NARROW PHONE
   ========================================================== */

@media (max-width: 420px) {

    .brand .site-logo {
        width: 155px;
        max-width: 155px;
    }

    .menu-btn {
        width: 41px;
        height: 41px;
    }

    .locations-menu-links {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   PREMIUM HEADER V2 — BALANCED THREE-ZONE DESKTOP LAYOUT
   Logo | Center Navigation | Consultation
   ========================================================== */

@media (min-width: 1051px) {

    .premium-nav {
        display: grid;
        grid-template-columns:
            minmax(185px, 1fr)
            auto
            minmax(185px, 1fr);
        align-items: center;
        gap: 28px;
    }

    .premium-nav > .brand {
        grid-column: 1;
        justify-self: start;
        margin: 0;
    }

    .premium-nav > .navlinks {
        grid-column: 2;
        justify-self: center;
        margin: 0;
        gap: 20px;
    }

    .premium-nav > .header-actions {
        grid-column: 3;
        justify-self: end;
        margin: 0;
    }

    .header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
}


/* Slight compression only where desktop width needs it */

@media (min-width: 1051px) and (max-width: 1280px) {

    .premium-nav {
        grid-template-columns:
            minmax(170px, 1fr)
            auto
            minmax(170px, 1fr);
        gap: 20px;
    }

    .premium-nav > .navlinks {
        gap: 14px;
        font-size: 12px;
    }

    .brand .site-logo {
        width: 175px;
        max-width: 175px;
    }

    .header-cta {
        padding-left: 12px;
        padding-right: 12px;
        font-size: 10px;
    }
}

/* ==========================================================
   PREMIUM HEADER — MENU TYPOGRAPHY
   ========================================================== */

@media (min-width: 1051px) {
    .premium-nav > .navlinks {
        font-size: 15px;
    }

    .navlinks > a,
    .nav-dropdown-toggle {
        font-size: 15px;
    }
}

@media (max-width: 1050px) {
    .navlinks > a,
    .nav-dropdown-toggle {
        font-size: 15px;
    }
}

/* ==========================================================
   HEADER ACTIVE STATE — NO FIXED UNDERLINE
   Underline appears only on hover / keyboard focus
   ========================================================== */

.navlinks > a.is-current::after,
.nav-dropdown-toggle.is-current::after {
    transform: scaleX(0);
}

.navlinks > a.is-current:hover::after,
.navlinks > a.is-current:focus-visible::after,
.nav-dropdown-toggle.is-current:hover::after,
.nav-dropdown-toggle.is-current:focus-visible::after {
    transform: scaleX(1);
}


/* ==========================================================
   HEADER — MOBILE VIEWPORT DRAWER
   Fixes blank area + non-scrollable expanded submenu
   Desktop >= 1051px untouched
   ========================================================== */

@media (max-width: 1050px) {

    /*
     * The navigation itself becomes the viewport drawer.
     * Do not let an expanding mega-menu determine its height.
     */
    #primaryNavigation.navlinks {
        position: fixed;

        top: 78px;
        left: 0;
        right: 0;
        bottom: 0;

        width: 100%;
        height: auto;
        max-height: none;

        margin: 0;
        padding: 12px 24px 28px;

        box-sizing: border-box;

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

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

        z-index: 9998;
    }

    #primaryNavigation.navlinks:not(.open) {
        display: none;
    }

    #primaryNavigation.navlinks.open {
        display: flex;
        flex-direction: column;
        align-items: stretch;

        min-height: 0;
    }


    /*
     * Every top-level item must remain a normal flex child.
     */
    #primaryNavigation.navlinks > a,
    #primaryNavigation.navlinks > .nav-dropdown {
        flex: 0 0 auto;
    }

    #primaryNavigation .nav-dropdown {
        position: relative;
        width: 100%;
        min-width: 0;
    }

    #primaryNavigation .nav-dropdown-toggle {
        width: 100%;
        min-height: auto;

        padding: 15px 0;

        justify-content: space-between;
    }


    /*
     * Mobile submenu participates in normal flow.
     */
    #primaryNavigation .nav-dropdown-panel {
        position: static;

        top: auto;
        left: auto;
        right: auto;

        width: 100%;
        min-width: 0;
        max-width: 100%;

        margin: 0;

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

        transform: none;
        transition: none;

        display: none;
    }

    #primaryNavigation .nav-dropdown:hover > .nav-dropdown-panel,
    #primaryNavigation .nav-dropdown:focus-within > .nav-dropdown-panel {
        display: none;
    }

    #primaryNavigation .nav-dropdown.is-open > .nav-dropdown-panel,
    #primaryNavigation .nav-dropdown.is-open:hover > .nav-dropdown-panel,
    #primaryNavigation .nav-dropdown.is-open:focus-within > .nav-dropdown-panel {
        display: block;
    }


    /* ======================================================
       SERVICES
       ====================================================== */

    #primaryNavigation .services-mega {
        width: 100%;
        max-width: 100%;

        margin: 0 0 8px;

        grid-template-columns: 1fr;

        box-shadow: none;

        overflow: visible;
    }

    #primaryNavigation .services-mega .mega-intro {
        display: none;
    }

    #primaryNavigation .services-mega .mega-links {
        display: block;

        width: 100%;

        margin: 0;
        padding: 5px 12px;

        box-sizing: border-box;
    }

    #primaryNavigation .services-mega .mega-links > a {
        width: 100%;

        display: grid;
        grid-template-columns: 27px minmax(0, 1fr);
        align-items: center;

        gap: 9px;

        padding: 10px 5px;

        box-sizing: border-box;

        border-bottom: 1px solid #ece8df;
    }

    #primaryNavigation .services-mega .mega-links > a:nth-last-child(-n+2) {
        border-bottom: 1px solid #ece8df;
    }

    #primaryNavigation .services-mega .mega-links > a:last-child {
        border-bottom: 0;
    }

    #primaryNavigation .services-mega .mega-links > a > span {
        padding-top: 0;
        font-size: 11px;
    }

    #primaryNavigation .services-mega .mega-links strong {
        margin-bottom: 0;

        font-size: 14px;
        line-height: 1.35;
    }

    #primaryNavigation .services-mega .mega-links small {
        display: none;
    }


    /* ======================================================
       LOCATIONS
       ====================================================== */

    #primaryNavigation .locations-menu {
        width: 100%;
        max-width: 100%;

        margin: 0 0 8px;

        grid-template-columns: 1fr;

        box-shadow: none;

        overflow: visible;
    }

    #primaryNavigation .locations-menu-head {
        padding: 11px 16px;
    }

    #primaryNavigation .locations-menu-head .mega-eyebrow,
    #primaryNavigation .locations-menu-head > strong {
        display: none;
    }

    #primaryNavigation .locations-menu-head > a {
        width: 100%;

        margin: 0;
        padding: 0;

        display: flex;
        justify-content: space-between;

        border-bottom: 0;

        font-size: 13px;
    }

    #primaryNavigation .locations-menu-links {
        width: 100%;

        display: grid;
        grid-template-columns: 1fr;

        margin: 0;
        padding: 4px 12px 7px;

        box-sizing: border-box;
    }

    #primaryNavigation .locations-menu-links > a {
        width: 100%;

        padding: 9px 5px;

        box-sizing: border-box;

        font-size: 14px;
    }

    #primaryNavigation .locations-menu-links > a:hover,
    #primaryNavigation .locations-menu-links > a:focus-visible {
        padding-left: 5px;
    }
}


/* Phone header is 72px */
@media (max-width: 600px) {

    #primaryNavigation.navlinks {
        top: 72px;

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


/* ==========================================================
   HEADER — MOBILE DRAWER EXPANDED SCROLL FIX
   Allows complete scrolling after submenu expansion
   ========================================================== */

@media (max-width: 1050px) {

    #primaryNavigation.navlinks.open {
        overflow-y: auto;
        overflow-x: hidden;

        /* space after final Contact item */
        padding-bottom: max(40px, env(safe-area-inset-bottom));
    }

    /*
     * Expanded dropdown must contribute its complete height
     * to the drawer's scrollable content.
     */
    #primaryNavigation.navlinks > .nav-dropdown,
    #primaryNavigation.navlinks > a {
        flex-shrink: 0;
    }

    #primaryNavigation .nav-dropdown.is-open {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    #primaryNavigation .nav-dropdown.is-open > .nav-dropdown-panel {
        position: static;
        height: auto;
        max-height: none;

        overflow: visible;

        flex: none;
    }

    #primaryNavigation .services-mega .mega-links,
    #primaryNavigation .locations-menu-links {
        height: auto;
        max-height: none;

        overflow: visible;
    }

    /*
     * Contact remains a normal final menu item and creates
     * a clear bottom edge after all expanded content.
     */
    #primaryNavigation > .nav-contact-link {
        flex: 0 0 auto;
        margin-bottom: 12px;
    }
}

@media (max-width: 600px) {

    #primaryNavigation.navlinks.open {
        padding-bottom: max(34px, env(safe-area-inset-bottom));
    }
}


/* ==========================================================
   HEADER — MOBILE SUBMENU VISUAL POLISH V18
   Keeps V17 drawer/scroll architecture unchanged
   ========================================================== */

@media (max-width: 1050px) {

    /* Services submenu blends into mobile drawer */
    #primaryNavigation .services-mega {
        background: transparent;
        border-top: 0;
        box-shadow: none;
    }

    #primaryNavigation .services-mega .mega-links {
        padding: 2px 0 10px;
        background: transparent;
    }

    #primaryNavigation .services-mega .mega-links > a {
        min-height: 48px;
        padding: 12px 4px 12px 20px;

        grid-template-columns: 32px minmax(0, 1fr);
        gap: 10px;

        background: transparent;
        color: #eef1f2;

        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    #primaryNavigation .services-mega .mega-links > a:hover,
    #primaryNavigation .services-mega .mega-links > a:focus-visible {
        background: rgba(255,255,255,.035);
        transform: none;
    }

    #primaryNavigation .services-mega .mega-links > a > span {
        color: #c9a560;
        font-size: 11px;
        line-height: 1;
    }

    #primaryNavigation .services-mega .mega-links strong {
        color: #eef1f2;
        font-size: 14px;
        line-height: 1.35;
        font-weight: 600;
    }


    /* Locations follows the same mobile visual language */
    #primaryNavigation .locations-menu {
        background: transparent;
        border-top: 0;
        box-shadow: none;
    }

    #primaryNavigation .locations-menu-head {
        padding: 10px 4px 10px 20px;
        background: transparent;

        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    #primaryNavigation .locations-menu-head > a {
        color: #c9a560;
    }

    #primaryNavigation .locations-menu-links {
        padding: 0 0 10px;
        background: transparent;
    }

    #primaryNavigation .locations-menu-links > a {
        min-height: 44px;
        padding: 11px 4px 11px 20px;

        color: #eef1f2;

        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    #primaryNavigation .locations-menu-links > a:hover,
    #primaryNavigation .locations-menu-links > a:focus-visible {
        color: #eef1f2;
        padding-left: 20px;
        background: rgba(255,255,255,.035);
    }

    #primaryNavigation .locations-menu-links > a span {
        color: #c9a560;
    }
}


/* ==========================================================
   HEADER — MOBILE SERVICES CLEAN ROWS V19
   Remove separators only from Services submenu
   ========================================================== */

@media (max-width: 1050px) {

    #primaryNavigation .services-mega .mega-links > a,
    #primaryNavigation .services-mega .mega-links > a:nth-last-child(-n+2),
    #primaryNavigation .services-mega .mega-links > a:last-child {
        border-bottom: 0;
    }
}


/* ==========================================================
   HEADER — PHONE SUBMENU SEPARATOR FIX V20
   Phone only. Tablet/Desktop unchanged.
   ========================================================== */

@media (max-width: 600px) {

    /* Services: no internal horizontal lines */
    #primaryNavigation .services-mega .mega-links > a,
    #primaryNavigation .services-mega .mega-links > a:nth-child(n),
    #primaryNavigation .services-mega .mega-links > a:nth-last-child(-n+2),
    #primaryNavigation .services-mega .mega-links > a:last-child {
        border-top: 0;
        border-bottom: 0;
        box-shadow: none;
    }

    /* Locations: no internal horizontal lines */
    #primaryNavigation .locations-menu-head,
    #primaryNavigation .locations-menu-links > a,
    #primaryNavigation .locations-menu-links > a:nth-child(n),
    #primaryNavigation .locations-menu-links > a:last-child {
        border-top: 0;
        border-bottom: 0;
        box-shadow: none;
    }
}


/* ==========================================================
   HEADER — PHONE FINAL SUBMENU FIX V21
   Overrides original !important separator rule.
   Phone only — tablet and desktop untouched.
   ========================================================== */

@media (max-width: 600px) {

    /* SERVICES — remove original !important separators */
    #primaryNavigation .services-mega .mega-links > a,
    #primaryNavigation .services-mega .mega-links > a:nth-child(n),
    #primaryNavigation .services-mega .mega-links > a:nth-last-child(-n+2),
    #primaryNavigation .services-mega .mega-links > a:last-child {
        border-top: 0 !important;
        border-bottom: 0 !important;
        box-shadow: none !important;
    }

    /* Prevent sticky touch-hover background on phones */
    #primaryNavigation .services-mega .mega-links > a:hover,
    #primaryNavigation .services-mega .mega-links > a:focus,
    #primaryNavigation .services-mega .mega-links > a:focus-visible,
    #primaryNavigation .services-mega .mega-links > a:active {
        background: transparent !important;
    }


    /* LOCATIONS — clean internal rows on phone */
    #primaryNavigation .locations-menu-head,
    #primaryNavigation .locations-menu-links > a,
    #primaryNavigation .locations-menu-links > a:nth-child(n),
    #primaryNavigation .locations-menu-links > a:last-child {
        border-top: 0 !important;
        border-bottom: 0 !important;
        box-shadow: none !important;
    }

    #primaryNavigation .locations-menu-links > a:hover,
    #primaryNavigation .locations-menu-links > a:focus,
    #primaryNavigation .locations-menu-links > a:focus-visible,
    #primaryNavigation .locations-menu-links > a:active {
        background: transparent !important;
    }
}

/* ==========================================================
   LOAN CURE SOLUTIONS — AVIF HEADER LOGO SIZE v22
   Header only. Footer remains unchanged.
   ========================================================== */

@media (min-width: 1051px) {
    .premium-header .brand .site-logo {
        width: 220px;
        max-width: 220px;
        max-height: 68px;
        height: auto;
        object-fit: contain;
    }
}

@media (max-width: 1050px) {
    .premium-header .brand .site-logo {
        width: 195px;
        max-width: 195px;
        max-height: 62px;
        height: auto;
        object-fit: contain;
    }
}

@media (max-width: 700px) {
    .premium-header .brand .site-logo {
        width: 185px;
        max-width: 185px;
    }
}

@media (max-width: 420px) {
    .premium-header .brand .site-logo {
        width: 175px;
        max-width: 175px;
    }
}

/* ==========================================================
   LOAN CURE SOLUTIONS — HEADER LOGO v23
   Remove AVIF height constraint; footer untouched.
   ========================================================== */

@media (min-width: 1051px) {
    .premium-header .brand .site-logo {
        width: 230px;
        max-width: 230px;
        height: auto;
        max-height: none;
        object-fit: contain;
    }
}

@media (max-width: 1050px) {
    .premium-header .brand .site-logo {
        width: 205px;
        max-width: 205px;
        height: auto;
        max-height: none;
    }
}

@media (max-width: 700px) {
    .premium-header .brand .site-logo {
        width: 185px;
        max-width: 185px;
    }
}

@media (max-width: 420px) {
    .premium-header .brand .site-logo {
        width: 170px;
        max-width: 170px;
    }
}

/* ==========================================================
   LOAN CURE SOLUTIONS — HEADER LOGO FINAL SIZE v24
   Match footer logo visual height allowance.
   ========================================================== */

@media (min-width: 1051px) {
    .premium-header .brand .site-logo {
        width: auto;
        max-width: 260px;
        height: auto;
        max-height: 105px;
        object-fit: contain;
    }
}

/* ==========================================================
   LOAN CURE SOLUTIONS — HEADER LOGO FORCE HEIGHT v25
   Desktop only. Footer untouched.
   ========================================================== */

@media (min-width: 1051px) {
    .premium-header .brand .site-logo {
        width: auto !important;
        max-width: 300px !important;
        height: 105px !important;
        max-height: 105px !important;
        object-fit: contain !important;
    }
}

/* ==========================================================
   LOAN CURE SOLUTIONS — FINAL RESPONSIVE HEADER LOGO v26
   Footer is intentionally unaffected.
   ========================================================== */

/* Desktop */
@media (min-width: 1051px) {
    .premium-header .brand .site-logo {
        width: auto !important;
        height: 82px !important;
        max-width: 280px !important;
        max-height: 82px !important;
        object-fit: contain !important;
    }
}

/* Tablet */
@media (min-width: 701px) and (max-width: 1050px) {
    .premium-header .brand .site-logo {
        width: auto !important;
        height: 72px !important;
        max-width: 240px !important;
        max-height: 72px !important;
        object-fit: contain !important;
    }
}

/* Mobile */
@media (min-width: 421px) and (max-width: 700px) {
    .premium-header .brand .site-logo {
        width: auto !important;
        height: 62px !important;
        max-width: 205px !important;
        max-height: 62px !important;
        object-fit: contain !important;
    }
}

/* Small phone */
@media (max-width: 420px) {
    .premium-header .brand .site-logo {
        width: auto !important;
        height: 56px !important;
        max-width: 185px !important;
        max-height: 56px !important;
        object-fit: contain !important;
    }
}
