/* ==========================================================================
   Header mega menu — modelled on the dipanshutech.com "Services" panel (owner,
   25 Oct 2026), in YourHeal's own tokens. Markup: layouts/_mega-nav.blade.php.
   Desktop ≥992px: absolute panels, hover/keyboard. Below: accordion in the drawer.
   ========================================================================== */

.hv-mm__panel { display: none; }
.hv-mm__item.is-open > .hv-mm__panel { display: block; }

/* links inside panels must not inherit the theme's tall nav-link styles */
.hv-header .main-nav.hv-mm .hv-mm__panel a { line-height: 1.35; padding: 0; font-size: 13px; color: var(--hv-ink); text-transform: none; white-space: normal; }
.hv-header .main-nav.hv-mm .hv-mm__panel ul { list-style: none; margin: 0; padding: 0; }

.hv-mm__head { font-size: 13px; font-weight: 700; color: var(--hv-navy); margin: 0 0 12px; padding-left: 9px; border-left: 3px solid var(--mm, var(--hv-blue)); line-height: 1.3; }
.hv-header .main-nav.hv-mm .hv-mm__panel a.hv-mm__link { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 10px; text-decoration: none; }
.hv-header .main-nav.hv-mm .hv-mm__panel a.hv-mm__link:hover,
.hv-header .main-nav.hv-mm .hv-mm__panel a.hv-mm__link:focus-visible { background: #f4f7fc; outline: none; }
.hv-header .main-nav.hv-mm .hv-mm__panel a.hv-mm__link:focus-visible { box-shadow: 0 0 0 2px var(--mm, var(--hv-blue)); }
.hv-mm__tile { width: 36px; height: 36px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; background: var(--mm-bg, var(--hv-blue-50)); color: var(--mm, var(--hv-blue)); }
.hv-mm__txt { display: flex; flex-direction: column; min-width: 0; }
.hv-mm__txt b { font-size: 13px; font-weight: 600; color: var(--hv-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hv-mm__txt small { font-size: 11px; color: #5d6d84; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.hv-header .main-nav.hv-mm .hv-mm__panel a.hv-mm__link:hover .hv-mm__txt b { color: var(--mm, var(--hv-blue)); }
.hv-header .main-nav.hv-mm .hv-mm__panel a.hv-mm__link--compact { display: block; padding: 5px 8px; font-size: 12.5px; color: var(--hv-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hv-header .main-nav.hv-mm .hv-mm__panel a.hv-mm__link--compact:hover { color: var(--mm, var(--hv-blue)); }
.hv-header .main-nav.hv-mm .hv-mm__panel a.hv-mm__all { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hv-line); font-size: 12.5px; font-weight: 600; color: var(--mm, var(--hv-blue)); text-decoration: none; width: 100%; }
.hv-header .main-nav.hv-mm .hv-mm__panel a.hv-mm__all:hover { text-decoration: underline; }
.hv-mm__none { display: block; font-size: 12px; color: var(--hv-muted); padding: 6px 8px; }

@media (min-width: 992px) {
    .hv-header .main-nav.hv-mm > .hv-mm__item { position: relative; }
    .hv-header .main-nav.hv-mm > .hv-mm__item--mega { position: static; }
    .hv-header .main-nav.hv-mm .hv-mm__trigger::after { content: "\f107"; font-family: "Font Awesome 5 Free", "Font Awesome 6 Free"; font-weight: 900; font-size: 10px; margin-left: 5px; display: inline-block; transition: transform .15s; }
    .hv-header .main-nav.hv-mm .hv-mm__item.is-open > .hv-mm__trigger { color: var(--hv-blue); }
    .hv-header .main-nav.hv-mm .hv-mm__item.is-open > .hv-mm__trigger::after { transform: rotate(180deg); }

    .hv-mm__panel { position: absolute; top: 100%; left: 0; z-index: 1050; background: #fff; border: 1px solid #e4eaf2; border-radius: 16px; box-shadow: 0 16px 48px -16px rgba(0, 36, 91, .24); padding: 24px 10px; max-height: calc(100vh - 130px); overflow-y: auto; text-align: left; }
    .hv-mm__panel--wide { left: 50%; transform: translateX(-50%); width: min(1200px, calc(100vw - 32px)); }
    .hv-mm__panel--2 { width: 620px; }
    .hv-mm__panel--1 { width: 340px; }

    .hv-mm__cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
    .hv-mm__panel--wide .hv-mm__cols { grid-template-columns: 1.3fr 1.1fr 1fr 1fr; }
    .hv-mm__col { padding: 0 18px; display: flex; flex-direction: column; min-width: 0; }
    .hv-mm__col + .hv-mm__col { border-left: 1px solid #edf1f7; }
    .hv-mm__col > ul { flex: 1; }
}

/* narrow desktops: the wide panel trims its type a little */
@media (min-width: 992px) and (max-width: 1199px) {
    .hv-mm__panel { padding: 18px 4px; }
    .hv-mm__col { padding: 0 12px; }
    .hv-mm__tile { width: 30px; height: 30px; font-size: 12px; }
}

/* ---- mobile drawer: accordion, white cards on the theme's blue drawer */
@media (max-width: 991px) {
    .hv-header .main-nav.hv-mm .hv-mm__trigger { display: flex !important; justify-content: space-between; align-items: center; }
    .hv-header .main-nav.hv-mm .hv-mm__trigger::after { content: "\f107"; font-family: "Font Awesome 5 Free", "Font Awesome 6 Free"; font-weight: 900; font-size: 12px; transition: transform .15s; }
    .hv-header .main-nav.hv-mm .hv-mm__item.is-open > .hv-mm__trigger::after { transform: rotate(180deg); }
    .hv-mm__item.is-open > .hv-mm__panel { margin: 4px 12px 10px; padding: 10px 6px; background: #fff; border-radius: 10px; }
    .hv-mm__cols { display: block; }
    .hv-mm__col + .hv-mm__col { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hv-line); }
    .hv-mm__col { padding: 0 6px; }
    .hv-mm__tile { width: 28px; height: 28px; font-size: 12px; border-radius: 8px; }
    .hv-mm__head { font-size: 12px; margin-bottom: 6px; }
    /* the theme's drawer hides nested lists and draws borders on every li */
    .hv-header .main-nav.hv-mm .hv-mm__panel ul { display: block !important; position: static; visibility: visible; opacity: 1; box-shadow: none; background: none; min-width: 0; }
    .hv-header .main-nav.hv-mm .hv-mm__panel li { border: 0 !important; margin: 0; }
}
