/* Mobile header layout — logo, hamburger, Resident Portal, and nav (max-width: 766px only). */

@media (max-width: 766px) {
    .rh_header > .top_bar .rh_header__wrap {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 8px 10px !important;
    }

    .rh_header > .top_bar .top_bar_left {
        display: block !important;
        width: 100%;
        margin: 0 !important;
        text-align: left;
    }

    .rh_header > .top_bar .top_bar_right {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 0 !important;
    }

    .rh_header .top_bar_address {
        display: flex;
        align-items: center;
        min-height: 24px;
        background-position: 8px center;
        background-size: 14px auto;
        padding: 2px 0;
        text-align: left;
    }

    .rh_header .top_bar_address span {
        display: block;
        margin-left: 26px;
        margin-right: 0;
        white-space: nowrap;
        font-size: clamp(11px, 3.15vw, 13px);
        line-height: 1.2;
    }

    .rh_header > .rh_header__wrap {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px 10px;
        gap: 0;
    }

    .rh_header_advance.rh_header,
    .rh_header.rh_header--shadow {
        height: auto !important;
        min-height: 0;
    }

    .rh_header > .rh_header__wrap > .rh_logo {
        display: flex !important;
        flex: 1 1 auto;
        align-items: center;
        justify-content: flex-start;
        min-width: 0;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        order: 1;
    }

    .rh_header > .rh_header__wrap > .rh_logo .rh_logo_inner {
        text-align: left;
    }

    .rh_header > .rh_header__wrap > .rh_logo img,
    .rh_header:has(+ .rh_banner:not(.rh_banner__default_hide)) > .rh_header__wrap > .rh_logo img {
        display: block;
        width: auto;
        max-width: min(72vw, calc(100vw - 56px));
        max-height: 69px;
        height: auto;
    }

    .rh_header > .rh_header__wrap > .rh_menu {
        display: contents;
    }

    .rh_header_advance .rh_menu .main-menu,
    .rh_header > .rh_header__wrap .main-menu {
        position: static !important;
        right: auto !important;
        margin-top: 0 !important;
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        order: 2;
    }

    .rh_header .rh_menu__hamburger {
        display: flex;
        align-items: center;
        align-self: center;
        padding: 0.4rem 0 0.4rem 0.8rem;
        height: auto;
    }

    .rh_header > .rh_header__wrap .rh_menu__user {
        display: flex;
        flex: 0 0 100%;
        width: 100%;
        order: 3;
        justify-content: center;
        align-items: center;
        margin: 8px 0 0 !important;
        margin-right: 0 !important;
        background: transparent;
        position: relative;
        z-index: 2;
    }

    .rh_header_advance .user_menu_wrapper,
    .rh_header > .rh_header__wrap .user_menu_wrapper {
        position: static !important;
        margin-top: 0 !important;
        margin-left: 0 !important;
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .rh_header .rh_menu__user a {
        display: inline-block;
        font-size: 16px;
        padding: 10px 14px 10px 36px;
    }

    .rh_header .rh_menu__user_submit {
        display: none;
    }
}

@media (max-width: 359px) {
    .rh_header > .rh_header__wrap {
        padding: 6px 10px 8px;
    }

    .rh_header > .rh_header__wrap > .rh_logo img {
        max-width: min(68vw, calc(100vw - 52px));
        max-height: 62px;
    }

    .rh_header .rh_menu__user {
        margin-top: 6px !important;
    }

    .rh_header .rh_menu__user a {
        font-size: 14px;
        padding: 8px 12px 8px 32px;
    }
}
