/* ==================================================================
 * HostRomeo — Modern header + page banner
 * Uses tokens/buttons from css/billing.css (loaded before this file).
 * ================================================================== */

/* ---------- Sticky bar ---------- */
.hr-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    transition: box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
}
.hr-header::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: var(--hr-gradient);
}
.hr-header.is-scrolled {
    background: rgba(255, 255, 255, .94);
    border-bottom-color: var(--hr-line);
    box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .35);
}
.hr-header *, .hr-header *::before, .hr-header *::after { box-sizing: border-box; }
.hr-header__inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 1320px;
    height: 78px;
    margin: 0 auto;
    padding: 0 24px;
}
.hr-header__logo { flex: none; display: flex; align-items: center; }
.hr-header__logo img { height: 46px; width: auto; display: block; }

/* ---------- Menu (desktop: inline) ---------- */
.hr-header__menu { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hr-header__primary { flex: 1; min-width: 0; display: flex; justify-content: center; }
.hr-header .hr-nav--secondary { flex: none; }
.hr-nav { list-style: none; margin: 0 !important; padding: 0 !important; display: flex; align-items: center; gap: 2px; }
.hr-nav > li { position: relative; list-style: none; float: none !important; }
.hr-header .hr-nav > li > a {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 12px !important;
    border-radius: 999px;
    color: #334155 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap;
    background: transparent !important;
    transition: background-color .15s ease, color .15s ease;
}
.hr-header .hr-nav > li > a:hover,
.hr-header .hr-nav > li > a:focus-visible,
.hr-header .hr-nav > li.open > a {
    background: #f5f2ff !important;
    color: var(--hr-purple) !important;
    outline: none;
}
.hr-header .hr-nav > li.is-current > a {
    background: #f3edff !important;
    color: var(--hr-purple) !important;
}
.hr-header .hr-nav > li > a > i:first-child { color: inherit; opacity: .8; }
/* Replace Bootstrap caret with a chevron */
.hr-header .hr-nav .caret { display: none !important; }
.hr-header .hr-nav > li.dropdown > a::after {
    border: 0 !important;
    margin: 0 !important;
    vertical-align: middle;
    width: auto; height: auto;
    content: "\f107";
    font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free", "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
    font-size: 11px;
    opacity: .6;
    transition: transform .2s ease;
}
.hr-header .hr-nav > li.dropdown.open > a::after { transform: rotate(180deg); }
.hr-header .hr-nav > li > a .badge {
    background: var(--hr-pink) !important; color: #fff !important; border-radius: 999px; font-size: 10.5px; padding: 2px 6px;
}

/* Account / secondary menu: outlined pill with a user icon */
.hr-header .hr-nav--secondary > li > a {
    border: 1px solid var(--hr-line) !important;
    background: #fff !important;
}
.hr-header .hr-nav--secondary > li:first-child > a::before {
    border: 0 !important;
    content: "\f007";
    font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free", "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
    font-weight: 400;
    font-size: 13px;
    color: var(--hr-purple);
}
.hr-header .hr-nav--secondary > li > a:hover,
.hr-header .hr-nav--secondary > li.open > a { border-color: rgba(138, 63, 252, .4) !important; }

/* Signed in: the account menu becomes a round avatar button (desktop) */
@media (min-width: 1280px) {
    .hr-header--auth .hr-nav--secondary > li:first-child > a {
        width: 42px; height: 42px;
        padding: 0 !important;
        justify-content: center;
        font-size: 0 !important;
        border-radius: 50% !important;
        background: #f3edff !important;
        border-color: #e2d4ff !important;
    }
    .hr-header--auth .hr-nav--secondary > li:first-child > a::before { font-size: 16px; font-weight: 900; }
    .hr-header--auth .hr-nav--secondary > li:first-child > a::after { display: none !important; }
    .hr-header--auth .hr-nav--secondary > li:first-child > a .badge { font-size: 10px !important; }
}

/* Dropdown cards (override the theme's dark dropdowns) */
.hr-header .hr-nav .dropdown-menu {
    position: absolute;
    top: calc(100% + 10px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    min-width: 230px;
    margin: 0 !important;
    padding: 8px !important;
    background: #fff !important;
    border: 1px solid var(--hr-line) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 48px -20px rgba(15, 23, 42, .35) !important;
    animation: hr-drop .16s ease-out;
}
.hr-header .hr-nav--secondary .dropdown-menu { left: auto !important; right: 0 !important; transform: none; }
.hr-header .hr-nav .dropdown-menu::before {
    content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; /* hover bridge */
}
@keyframes hr-drop { from { opacity: 0; } to { opacity: 1; } }
.hr-header .hr-nav .dropdown-menu > li > a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 12px !important;
    border-radius: 10px;
    color: var(--hr-body) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background: transparent !important;
    white-space: nowrap;
}
.hr-header .hr-nav .dropdown-menu > li > a:hover,
.hr-header .hr-nav .dropdown-menu > li > a:focus {
    background: #faf8ff !important;
    color: var(--hr-purple) !important;
    padding-left: 12px !important;
}
.hr-header .hr-nav .dropdown-menu > li > a i { color: var(--hr-faint); width: 16px; text-align: center; }
.hr-header .hr-nav .dropdown-menu > .divider,
.hr-header .hr-nav .dropdown-menu > li.nav-divider { height: 1px; margin: 6px 4px !important; background: var(--hr-line-soft) !important; padding: 0; }
.hr-header .hr-nav .dropdown-menu > li.nav-divider > a { display: none !important; }

/* ---------- Actions ---------- */
.hr-header__actions { flex: none; display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hr-icon-btn {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f4f6fa;
    color: #334155 !important;
    font-size: 16px;
    text-decoration: none !important;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.hr-icon-btn:hover { background: #f3edff; color: var(--hr-purple) !important; transform: translateY(-1px); }
.hr-icon-btn--wa { background: #e7f8ee; color: #16a34a !important; font-size: 19px; }
.hr-icon-btn--wa:hover { background: #16a34a; color: #fff !important; }
.hr-icon-btn__badge {
    position: absolute; top: -3px; right: -3px;
    min-width: 19px; height: 19px; padding: 0 5px;
    border-radius: 999px; border: 2px solid #fff;
    background: var(--hr-pink); color: #fff;
    font-size: 10.5px; font-weight: 800; line-height: 15px; text-align: center;
}
.hr-header__cta { margin-left: 4px; }
.hr-btn.hr-btn--wa { background: #16a34a !important; color: #fff !important; }
.hr-btn.hr-btn--wa:hover { background: #128c4a !important; color: #fff !important; }

.hr-header__menu-cta { display: none; }

/* Hamburger */
.hr-header__toggle {
    display: none;
    width: 44px; height: 44px; padding: 0; margin: 0;
    border: 0; border-radius: 12px;
    background: var(--hr-ink);
    cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.hr-header__toggle span {
    display: block; width: 20px; height: 2px; border-radius: 2px; background: #fff;
    transition: transform .25s ease, opacity .2s ease;
}
.hr-header.is-open .hr-header__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hr-header.is-open .hr-header__toggle span:nth-child(2) { opacity: 0; }
.hr-header.is-open .hr-header__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.hr-header__toggle:focus-visible { outline: none; box-shadow: var(--hr-focus); }

/* ---------- Tablet, small laptop & phone: slide-down menu panel ---------- */
@media (max-width: 1279px) {
    .hr-header__toggle { display: inline-flex; }
    .hr-header__menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: calc(100vh - 78px);
        overflow-y: auto;
        padding: 10px 16px 20px;
        background: #fff;
        border-top: 1px solid var(--hr-line);
        box-shadow: 0 30px 50px -25px rgba(15, 23, 42, .45);
    }
    .hr-header.is-open .hr-header__menu { display: flex; animation: hr-slide .2s ease-out; }
    @keyframes hr-slide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
    body.hr-menu-open { overflow: hidden; }

    .hr-header__primary { display: block; }
    .hr-nav { flex-direction: column; align-items: stretch; gap: 2px; }
    .hr-header .hr-nav > li > a {
        width: 100%;
        height: 50px;
        justify-content: space-between;
        padding: 0 14px !important;
        border-radius: 12px;
        font-size: 16px !important;
    }
    .hr-header .hr-nav--secondary { margin-top: 8px !important; padding-top: 10px !important; border-top: 1px solid var(--hr-line-soft); }
    .hr-header .hr-nav--secondary > li > a { border: 0 !important; background: transparent !important; justify-content: flex-start; }
    .hr-header .hr-nav--secondary > li > a::after { margin-left: auto; }
    .hr-header .hr-nav .dropdown-menu {
        position: relative !important;
        top: auto !important; left: auto !important; right: auto !important;
        transform: none;
        float: none !important;
        width: 100%;
        margin: 2px 0 8px !important;
        padding: 6px !important;
        background: #f8fafc !important;
        border: 0 !important;
        border-radius: 12px !important;
        box-shadow: none !important;
        animation: none;
    }
    .hr-header .hr-nav .dropdown-menu > li > a { padding: 11px 14px !important; font-size: 15px !important; }
    .hr-header__menu-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
    .hr-header__menu-cta .hr-btn { width: 100% !important; display: flex !important; height: 48px; }
}
@media (max-width: 575px) {
    .hr-header__inner { height: 66px; padding: 0 14px; gap: 10px; }
    .hr-header__logo img { height: 38px; }
    .hr-header .hr-header__actions .hr-icon-btn--wa,
    .hr-header .hr-header__actions a.hr-header__cta { display: none !important; }
    .hr-header__menu { max-height: calc(100vh - 66px); }
    .hr-header__menu-cta { grid-template-columns: 1fr; }
}

/* ---------- Page banner ---------- */
.hr-pagehead {
    position: relative;
    overflow: hidden;
    background: #0e1019 url("../assets/images/sub-banner.jpg") right center / cover no-repeat;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}
.hr-pagehead::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, #0e1019 0%, rgba(14, 16, 25, .94) 38%, rgba(14, 16, 25, .45) 72%, rgba(14, 16, 25, .15) 100%);
}
.hr-pagehead::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .15), transparent);
}
.hr-pagehead__glow {
    position: absolute; pointer-events: none;
    width: 520px; height: 520px; left: -180px; top: -300px;
    background: radial-gradient(closest-side, rgba(255, 46, 147, .35), rgba(138, 63, 252, .18) 55%, transparent 75%);
}
.hr-pagehead__inner { position: relative; max-width: 1240px; margin: 0 auto; padding: 48px 24px 46px; }
.hr-pagehead__text { max-width: 640px; }
.hr-pagehead .hr-pagehead__title {
    margin: 10px 0 0 !important;
    color: #fff !important;
    font-size: 40px !important;
    line-height: 1.12 !important;
    font-weight: 800 !important;
    letter-spacing: -.025em;
    font-family: inherit !important;
    text-shadow: none !important;
}
.hr-pagehead .hr-pagehead__desc { margin: 10px 0 0 !important; color: rgba(255, 255, 255, .72) !important; font-size: 16px !important; line-height: 1.6; }

.hr-pagehead .breadcrumb {
    display: inline-flex !important; flex-wrap: wrap; align-items: center; gap: 4px;
    margin: 0 !important; padding: 6px 14px !important;
    background: rgba(255, 255, 255, .07) !important;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 999px !important;
    font-size: 12.5px !important; font-weight: 600 !important;
    list-style: none;
}
.hr-pagehead .breadcrumb > li { display: inline-flex; align-items: center; color: #fff !important; font-size: inherit !important; }
.hr-pagehead .breadcrumb > li + li::before {
    content: "\f105" !important;
    font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free", "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome"; font-weight: 900;
    padding: 0 8px 0 4px !important; color: rgba(255, 255, 255, .4) !important; font-size: 10px;
}
.hr-pagehead .breadcrumb > li > a { color: rgba(255, 255, 255, .7) !important; text-decoration: none !important; }
.hr-pagehead .breadcrumb > li > a:hover { color: #ff9ccb !important; }

/* Space between banner/header and page content */
html body #main-body { padding-top: 36px !important; }
html body.page-login #main-body,
html body.page-password-reset-container #main-body { padding-top: 48px !important; }

@media (max-width: 767px) {
    .hr-pagehead { background-position: 72% center; }
    .hr-pagehead::before { background: linear-gradient(90deg, rgba(14, 16, 25, .96) 0%, rgba(14, 16, 25, .85) 60%, rgba(14, 16, 25, .6) 100%); }
    .hr-pagehead__inner { padding: 30px 16px 28px; }
    .hr-pagehead .hr-pagehead__title { font-size: 28px !important; }
    .hr-pagehead .hr-pagehead__desc { font-size: 14.5px !important; }
    html body #main-body { padding-top: 22px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .hr-header, .hr-header * { transition: none !important; animation: none !important; }
}
