/* ==================================================
   ELITE ORTHO DMV - CUSTOM HEADER
   Refined CSS | Desktop + Mobile
================================================== */

/* ---------- GLOBAL ---------- */

#eod-custom-header,
#eod-custom-header * {
    box-sizing: border-box;
}

#eod-custom-header {
    position: relative;
    z-index: 9999;
    width: 100%;
    background: #fff;
    font-family: 'Satoshittf', Helvetica, Arial, Lucida, sans-serif;
}

#eod-custom-header a {
    text-decoration: none;
}

/* ==================================================
   DESKTOP TOP ROW
================================================== */

#eod-custom-header .eod-topbar {
    width: 100%;
    min-height: 105px;
    position: relative;
    z-index: 10010;
    background: #fff;
}

#eod-custom-header .eod-topbar-inner {
    width: 100%;
    max-width: 1440px;
    min-height: 105px;
    margin: 0 auto;
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* DESKTOP LOGO */

#eod-custom-header .eod-desktop-logo {
    display: flex;
    align-items: center;
    flex: 0 0 245px;
    max-width: 245px;
}

#eod-custom-header .eod-desktop-logo a {
    display: inline-flex;
    align-items: center;
}

#eod-custom-header .eod-desktop-logo img {
    display: block;
    width: 100%;
    max-width: 245px;
    max-height: 88px;
    height: auto;
    object-fit: contain;
}

/* RIGHT SIDE ACTIONS */

#eod-custom-header .eod-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
    gap: 22px;
}

/* SOCIAL IMAGE ICONS */

#eod-custom-header .eod-custom-socials {
    display: flex;
    align-items: center;
    gap: 14px;
}

#eod-custom-header .eod-custom-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

#eod-custom-header .eod-custom-socials img {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* PORTALS DROPDOWN */

#eod-custom-header .eod-portal-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 42px;
}

#eod-custom-header .eod-portal-trigger {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 42px;
    padding: 0 5px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #173b5c;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#eod-custom-header .eod-portal-trigger:hover,
#eod-custom-header .eod-portal-dropdown.is-open .eod-portal-trigger {
    background: transparent;
    color: #0875c9;
}

#eod-custom-header .eod-chevron {
    font-size: 12px;
    transition: transform .2s ease;
}

#eod-custom-header .eod-portal-dropdown.is-open .eod-chevron {
    transform: rotate(180deg);
}

#eod-custom-header .eod-portal-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 235px;
    padding: 7px 0;
    background: #fff;
    border-top: 3px solid #0875c9;
    box-shadow: 0 8px 22px rgba(0,0,0,.16);
    z-index: 10020;
}

#eod-custom-header .eod-portal-dropdown:hover .eod-portal-dropdown-menu,
#eod-custom-header .eod-portal-dropdown:focus-within .eod-portal-dropdown-menu,
#eod-custom-header .eod-portal-dropdown.is-open .eod-portal-dropdown-menu {
    display: block;
}

#eod-custom-header .eod-portal-dropdown-menu a {
    display: block;
    padding: 11px 18px;
    color: #173b5c;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

#eod-custom-header .eod-portal-dropdown-menu a:hover {
    color: #0875c9;
    background: #f3f7fb;
}

/* DESKTOP PHONE BUTTON */

#eod-custom-header .eod-top-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 0 20px;
    border-radius: 3px;
    background: #0875c9;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

#eod-custom-header .eod-top-phone:hover {
    background: #075fa3;
    color: #fff;
}

/* GOOGLE RATING */

#eod-custom-header .eod-rating-link {
    display: grid;
    align-items: center;
    gap: 7px;
    color: #072147;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

#eod-custom-header .eod-rating-link:hover {
    color: #0875c9;
}

#eod-custom-header .eod-rating-link strong {
    color: #f5b900;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 1px;
}

/* ==================================================
   DESKTOP SECOND ROW - NAVIGATION
================================================== */

#eod-custom-header .eod-main-header {
    width: 100%;
    background: #fff;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: none;
}

#eod-custom-header .eod-header-inner {
    width: 100%;
    max-width: 1440px;
    min-height: 62px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
}

/* Hide mobile logo on desktop */

#eod-custom-header .eod-header-logo {
    display: none;
}

/* DESKTOP NAVIGATION */

#eod-custom-header .eod-desktop-navigation {
    display: block;
    position: relative;
    z-index: 9999;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

#eod-custom-header .eod-main-menu,
#eod-custom-header .eod-main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#eod-custom-header .eod-main-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 27px;
}

#eod-custom-header .eod-main-menu > li {
    position: relative;
    margin: 0;
    padding: 0;
}

#eod-custom-header .eod-main-menu > li > a {
    display: block;
    padding: 20px 0;
    color: #173b5c;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    transition: color .2s ease;
}

#eod-custom-header .eod-main-menu > li > a:hover {
    color: #0875c9;
}

/* ==================================================
   DESKTOP MULTI-LEVEL DROPDOWNS
================================================== */

@media (min-width: 981px) {

    #eod-custom-header,
    #eod-custom-header .eod-main-header,
    #eod-custom-header .eod-header-inner,
    #eod-custom-header .eod-desktop-navigation,
    #eod-custom-header .eod-main-menu,
    #eod-custom-header .eod-main-menu li {
        overflow: visible !important;
    }

    #eod-custom-header .eod-main-menu li > ul.sub-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: max-content;
        min-width: 250px;
        max-width: 320px;
        max-height: none;
        overflow: visible;
        margin: 0;
        padding: 8px 0;
        background: #fff;
        border-top: 3px solid #0875c9;
        border-radius: 0;
        box-shadow: 0 8px 25px rgba(0,0,0,.16);
        z-index: 10000;
    }

    #eod-custom-header .eod-main-menu li:hover > ul.sub-menu,
    #eod-custom-header .eod-main-menu li:focus-within > ul.sub-menu {
        display: block;
    }

    #eod-custom-header .eod-main-menu ul.sub-menu li {
        position: relative;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    #eod-custom-header .eod-main-menu ul.sub-menu li > ul.sub-menu {
        top: 0;
        left: 100%;
        min-width: 260px;
        margin: 0;
        z-index: 10001;
    }

    #eod-custom-header .eod-main-menu ul.sub-menu li > a {
        display: block;
        width: 100%;
        padding: 11px 16px;
        color: #173b5c;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.4;
        white-space: normal;
    }

    #eod-custom-header .eod-main-menu ul.sub-menu li > a:hover {
        color: #0875c9;
        background: #f5f8fb;
    }

    /* Nested dropdown arrows */

    #eod-custom-header .eod-main-menu ul.sub-menu li.menu-item-has-children > a {
        position: relative;
        padding-right: 30px;
    }

    #eod-custom-header .eod-main-menu ul.sub-menu li.menu-item-has-children > a::after {
        content: "›";
        position: absolute;
        top: 50%;
        right: 12px;
        font-size: 19px;
        transform: translateY(-50%);
    }

    /* Main menu dropdown arrows */

    #eod-custom-header .eod-main-menu > li.menu-item-has-children > a {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    #eod-custom-header .eod-main-menu > li.menu-item-has-children > a::after {
        content: "";
        display: inline-block;
        width: 4px;
        height: 4px;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(45deg);
        margin-top: -4px;
        flex-shrink: 0;
        transition: transform .2s ease;
    }

    #eod-custom-header .eod-main-menu > li.menu-item-has-children:hover > a::after {
        transform: rotate(225deg);
        margin-top: 4px;
    }
}

/* Hide mobile controls on desktop */

#eod-custom-header .eod-header-actions,
#eod-custom-header .eod-mobile-navigation {
    display: none;
}

/* ==================================================
   TABLET / SMALL DESKTOP
================================================== */

@media (min-width: 981px) and (max-width: 1200px) {

    #eod-custom-header .eod-topbar-inner {
        padding-left: 22px;
        padding-right: 22px;
        gap: 15px;
    }

    #eod-custom-header .eod-desktop-logo {
        flex-basis: 190px;
        max-width: 190px;
    }

    #eod-custom-header .eod-desktop-logo img {
        max-width: 190px;
    }

    #eod-custom-header .eod-topbar-right {
        gap: 13px;
    }

    #eod-custom-header .eod-custom-socials {
        gap: 10px;
    }

    #eod-custom-header .eod-header-inner {
        padding-left: 22px;
        padding-right: 22px;
    }

    #eod-custom-header .eod-main-menu {
        gap: 16px;
    }

    #eod-custom-header .eod-main-menu > li > a {
        font-size: 12px;
    }
}

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

@media (max-width: 980px) {

    /* Hide desktop elements */

    #eod-custom-header .eod-topbar,
    #eod-custom-header .eod-desktop-navigation {
        display: none;
    }

    #eod-custom-header .eod-main-header {
        border-top: 0;
    }

    /* Mobile header row */

    #eod-custom-header .eod-header-inner {
        min-height: 76px;
        padding: 10px 20px;
        gap: 12px;
        justify-content: space-between;
    }

    #eod-custom-header .eod-header-logo {
        display: block;
        flex: 1;
        max-width: 210px;
    }

    #eod-custom-header .eod-header-logo img {
        display: block;
        width: 100%;
        max-width: 190px;
        max-height: 58px;
        height: auto;
        object-fit: contain;
    }

    #eod-custom-header .eod-header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 18px;
    }

    /* Small mobile Call button */

    #eod-custom-header .eod-mobile-call-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 85px;
        padding: 11px 18px;
        border-radius: 4px;
        background: #0b4a88;
        color: #fff;
        font-size: 14px;
        font-weight: 700;
    }

    /* Hamburger */

    #eod-custom-header .eod-menu-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 35px;
        height: 35px;
        padding: 5px;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    #eod-custom-header .eod-menu-toggle span {
        display: block;
        width: 26px;
        height: 2px;
        border-radius: 2px;
        background: #173b5c;
    }

    /* FULL SCREEN MOBILE MENU */

    #eod-custom-header .eod-mobile-navigation {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        padding: 65px 25px 30px;
        background: #fff;
        z-index: 100000;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .3s ease, visibility .3s ease;
    }

    #eod-custom-header.mobile-menu-open .eod-mobile-navigation {
        transform: translateX(0);
        visibility: visible;
    }

    /* Close button */

    #eod-custom-header .eod-menu-close {
        position: absolute;
        top: 14px;
        right: 22px;
        width: 42px;
        height: 42px;
        border: 0;
        background: transparent;
        color: #173b5c;
        font-size: 38px;
        line-height: 1;
        cursor: pointer;
    }

    /* Mobile menu reset */

    #eod-custom-header .eod-mobile-menu,
    #eod-custom-header .eod-mobile-menu ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    #eod-custom-header .eod-mobile-menu li {
        position: relative;
        overflow: visible !important;
    }

    #eod-custom-header .eod-mobile-menu > li {
        margin: 0;
        border-bottom: 1px solid #e9edf1;
    }

    #eod-custom-header .eod-mobile-menu a {
        display: block;
        padding: 12px 38px 12px 0;
        color: #173b5c;
        font-size: 16px;
        font-weight: 600;
    }

    /* All submenu levels */

    #eod-custom-header .eod-mobile-menu li > ul.sub-menu {
        display: none !important;
        position: static !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 0 8px 17px !important;
        box-shadow: none !important;
    }

    #eod-custom-header .eod-mobile-menu li.submenu-open > ul.sub-menu {
        display: block !important;
    }

    #eod-custom-header .eod-mobile-menu .sub-menu a {
        padding: 9px 38px 9px 0;
        font-size: 14px;
        font-weight: 500;
    }

    /* Submenu toggle buttons */

    #eod-custom-header .eod-mobile-menu .eod-submenu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 3px;
        right: 0;
        z-index: 10;
        width: 35px;
        height: 42px;
        border: 0;
        background: transparent;
        color: #173b5c;
        font-size: 20px;
        cursor: pointer;
    }

    /* MOBILE PORTALS */

    #eod-custom-header .eod-mobile-portals {
        margin-top: 28px;
    }

    #eod-custom-header .eod-mobile-portals > p {
        margin: 0 0 14px;
        color: #173b5c;
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 1.5px;
    }

    #eod-custom-header .eod-mobile-portal-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    #eod-custom-header .eod-mobile-portal-buttons a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px 17px;
        border: 1px solid #0875c9;
        border-radius: 30px;
        color: #0875c9;
        font-size: 14px;
        font-weight: 600;
    }

    #eod-custom-header .eod-mobile-portal-buttons a:hover {
        background: #0875c9;
        color: #fff;
    }

    /* MOBILE NUMBER CTA WITH PHONE ICON */

    #eod-custom-header .eod-mobile-call {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        width: 100%;
        margin-top: 25px;
        padding: 16px 20px;
        border-radius: 30px;
        background: #0b4a88;
        color: #fff;
        text-align: center;
        font-size: 17px;
        font-weight: 700;
        text-decoration: none;
    }

    #eod-custom-header .eod-mobile-call svg {
        display: block;
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex-shrink: 0;
    }

    /* MOBILE SOCIAL IMAGE ICONS */

    #eod-custom-header .eod-mobile-socials {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
        margin-top: 25px;
    }

    #eod-custom-header .eod-mobile-socials a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
    }

    #eod-custom-header .eod-mobile-socials img {
        display: block;
        width: 26px;
        height: 26px;
        object-fit: contain;
    }

    /* Hide desktop social icons on mobile */

    #eod-custom-header .eod-custom-socials {
        display: none;
    }
}

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

@media (max-width: 480px) {

    #eod-custom-header .eod-header-inner {
        padding-left: 15px;
        padding-right: 15px;
    }

    #eod-custom-header .eod-header-logo {
        max-width: 165px;
    }

    #eod-custom-header .eod-header-logo img {
        max-width: 160px;
    }

    #eod-custom-header .eod-header-actions {
        gap: 12px;
    }

    #eod-custom-header .eod-mobile-call-button {
        min-width: 75px;
        padding: 10px 14px;
    }

    #eod-custom-header .eod-mobile-navigation {
        padding-left: 20px;
        padding-right: 20px;
    }
}
/* Mobile Header Call Button */
.eod-mobile-call-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.eod-mobile-call-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ==========================================
   PHONE NUMBER BUTTON - DESKTOP + MOBILE
========================================== */

/* Desktop Top Row */
@media (min-width: 981px) {
    #eod-custom-header .eod-topbar .eod-mobile-call {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: row !important;
        gap: 9px !important;
        width: auto !important;
        min-height: 43px;
        margin: 0 !important;
        padding: 12px 20px !important;
        border-radius: 30px !important;
        background: #0b4a88 !important;
        color: #fff !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        text-decoration: none !important;
    }

    #eod-custom-header .eod-topbar .eod-mobile-call svg {
        display: block !important;
        width: 18px !important;
        height: 18px !important;
        fill: none !important;
        stroke: currentColor !important;
        stroke-width: 2 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
        flex-shrink: 0 !important;
    }

    #eod-custom-header .eod-topbar .eod-mobile-call:hover {
        background: #075fa3 !important;
        color: #fff !important;
    }
}

/* Mobile Full-Screen Menu */
@media (max-width: 980px) {
    #eod-custom-header .eod-mobile-navigation .eod-mobile-call {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: row !important;
        gap: 9px !important;
        width: 100% !important;
        margin-top: 25px !important;
        padding: 16px 20px !important;
        border-radius: 30px !important;
        background: #0b4a88 !important;
        color: #fff !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        text-align: center !important;
        text-decoration: none !important;
    }

    #eod-custom-header .eod-mobile-navigation .eod-mobile-call svg {
        display: block !important;
        width: 18px !important;
        height: 18px !important;
        fill: none !important;
        stroke: currentColor !important;
        stroke-width: 2 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
        flex-shrink: 0 !important;
    }
}
