/**
 * MRMC Elements — Header widget.
 *
 * Navy top bar, frosted main bar, a wide services panel and a slide-in drawer,
 * in the palette of the Home and Footer widgets. Scoped under `.mhd`.
 *
 * @package MRMC\Elements
 * @since   1.5.0
 */

.mhd{
  --navy:#16203d; --navy-2:#22305a; --ink:#161a2b; --paper:#ffffff; --ivory:#fbf7f2;
  --mint-soft:#edf5f3; --muted:#5d6273; --line:rgba(22,32,61,.1);
  --gold:#fcbc3e; --flame:#fb512b;
  --grad:linear-gradient(120deg,var(--gold) 0%,var(--flame) 100%);
  --bar:rgba(255,255,255,.88);
  --serif:"Cormorant Garamond","Times New Roman",serif;
  --sans:"Jost",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  --ease:cubic-bezier(.22,.61,.36,1);
  --mhd-logo:168px; --mhd-h:88px; --mhd-top-offset:0px;
  position:relative; z-index:999;
  font-family:var(--sans); font-size:15px; line-height:1.5; color:var(--ink);
  -webkit-font-smoothing:antialiased;
}
.mhd *,.mhd *::before,.mhd *::after{box-sizing:border-box}
.mhd :where(ul){list-style:none;margin:0;padding:0}
.mhd :where(li){margin:0;padding:0}
.mhd li::before,.mhd li::marker{content:none}
.mhd :where(a){color:inherit;text-decoration:none;transition:color .3s var(--ease)}
.mhd :where(img){display:block;max-width:100%;height:auto;border:0}
.mhd :where(p){margin:0}
.mhd svg{display:block;flex-shrink:0}
.mhd :where(button){font:inherit;color:inherit;background:none;border:0;margin:0;padding:0;cursor:pointer;box-shadow:none;text-transform:none;letter-spacing:normal;line-height:1}
.mhd a:focus-visible,.mhd button:focus-visible{outline:2px solid var(--flame);outline-offset:3px;border-radius:10px}
.mhd .screen-reader-text{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.mhd-wrap{max-width:1320px;margin:0 auto;padding:0 clamp(20px,3vw,40px)}

/* ---------- full bleed ----------
 * Theme header/footer layouts sit the widget inside an Elementor column whose
 * gap adds padding on every side, so the header stopped short of the window edges.
 * Strip that padding from the column holding this widget only — nothing else
 * on the page is touched. Browsers without :has() get matching negative
 * margins per gap size instead.
 */
.elementor-widget-wrap:has(>.elementor-widget-mrmc-header),
.e-con:has(>.elementor-widget-mrmc-header),
.e-con-inner:has(>.elementor-widget-mrmc-header){padding:0!important;--padding-top:0px;--padding-right:0px;--padding-bottom:0px;--padding-left:0px}
.elementor-widget-mrmc-header{width:100%;max-width:none}
@supports not selector(:has(*)){
  .elementor-column-gap-narrow .elementor-widget-mrmc-header{margin:-5px -5px}
  .elementor-column-gap-default .elementor-widget-mrmc-header{margin:-10px -10px}
  .elementor-column-gap-extended .elementor-widget-mrmc-header{margin:-15px -15px}
  .elementor-column-gap-wide .elementor-widget-mrmc-header{margin:-20px -20px}
  .elementor-column-gap-wider .elementor-widget-mrmc-header{margin:-30px -30px}
}

/* ---------- top bar ---------- */
.mhd-top{background:var(--navy);color:rgba(255,255,255,.82);font-size:13px;letter-spacing:.02em}
.mhd-top__in{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:42px}
.mhd-top__contact{display:flex;align-items:center;gap:28px}
.mhd-top__contact a{display:inline-flex;align-items:center;gap:9px}
.mhd-top__contact a:hover{color:var(--gold)}
.mhd-top__contact svg{width:15px;height:15px;color:var(--gold)}
.mhd-top__social{display:flex;gap:6px}
.mhd-top__social a,.mhd-drawer__social a{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;color:rgba(255,255,255,.85);transition:background .3s var(--ease),color .3s var(--ease)}
.mhd-top__social a:hover{background:var(--grad);color:var(--navy)}
.mhd-top__social svg{width:14px;height:14px}

/* ---------- main bar ---------- */
.mhd-bar{position:relative;background:var(--bar);border-bottom:1px solid var(--line);backdrop-filter:blur(18px) saturate(1.4);-webkit-backdrop-filter:blur(18px) saturate(1.4);transition:box-shadow .4s var(--ease),background .4s var(--ease)}
.mhd-bar__in{display:flex;align-items:center;gap:clamp(18px,2.4vw,40px);height:var(--mhd-h);transition:height .4s var(--ease)}
.mhd-logo{display:inline-flex;align-items:center;flex-shrink:0}
.mhd-logo img{width:var(--mhd-logo);transition:width .4s var(--ease)}
.mhd-logo__text{font-family:var(--serif);font-size:26px;font-weight:600;color:var(--navy)}

/* stuck */
.mhd.is-stuck .mhd-bar{position:fixed;left:0;right:0;top:var(--mhd-top-offset);z-index:999;box-shadow:0 16px 40px -24px rgba(22,32,61,.45);animation:mhdDrop .45s var(--ease)}
.mhd.is-stuck{--mhd-h:72px}
.mhd.is-stuck .mhd-logo img{width:calc(var(--mhd-logo) * .86)}
@keyframes mhdDrop{from{transform:translateY(-100%)}to{transform:none}}

/* ---------- desktop menu ---------- */
.mhd-nav{flex:1;display:flex;justify-content:center}
.mhd-menu{display:flex;align-items:center;gap:clamp(4px,1vw,14px)}
.mhd-item{position:relative;display:flex;align-items:center}
.mhd-link{position:relative;display:inline-flex;align-items:center;padding:10px 12px;font-size:15px;font-weight:500;letter-spacing:.01em;color:var(--ink);white-space:nowrap}
.mhd-link::after{content:"";position:absolute;left:12px;right:12px;bottom:4px;height:2px;border-radius:2px;background:var(--grad);transform:scaleX(0);transition:transform .35s var(--ease)}
.mhd-item:hover>.mhd-link,.mhd-link.is-current{color:var(--navy)}
.mhd-item:hover>.mhd-link::after,.mhd-link.is-current::after{transform:scaleX(1)}
.mhd-item--has>.mhd-link{padding-right:4px}
.mhd-item--has>.mhd-link::after{right:4px}
.mhd-caret{width:22px;height:22px;display:grid;place-items:center;border-radius:50%;color:var(--muted);transition:transform .35s var(--ease),color .3s var(--ease)}
.mhd-caret svg{width:14px;height:14px}
.mhd-item--has:hover .mhd-caret,.mhd-item--has.is-open .mhd-caret{transform:rotate(180deg);color:var(--flame)}

/* dropdown */
.mhd-dd{position:absolute;top:calc(100% + 14px);left:50%;min-width:280px;padding:12px;border-radius:22px;background:var(--paper);border:1px solid var(--line);box-shadow:0 40px 80px -36px rgba(22,32,61,.45);opacity:0;visibility:hidden;transform:translate(-50%,10px);transition:opacity .3s var(--ease),transform .35s var(--ease),visibility 0s linear .35s}
.mhd-dd::before{content:"";position:absolute;left:0;right:0;top:-16px;height:16px}
.mhd-item--has:hover>.mhd-dd,.mhd-item--has:focus-within>.mhd-dd,.mhd-item--has.is-open>.mhd-dd{opacity:1;visibility:visible;transform:translate(-50%,0);transition-delay:0s}
.mhd-item--wide .mhd-dd{width:min(560px,90vw)}
.mhd-item--wide .mhd-dd--promo{width:min(820px,94vw);display:grid;grid-template-columns:1.45fr 1fr;gap:12px}
.mhd-dd__list{display:grid;gap:2px}
.mhd-item--wide .mhd-dd__list{grid-template-columns:1fr 1fr;align-content:start}
.mhd-dd__link{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;font-size:14.5px;font-weight:500;color:var(--ink);line-height:1.3;transition:background .3s var(--ease),color .3s var(--ease)}
.mhd-dd__link:hover,.mhd-dd__link.is-current{background:var(--ivory);color:var(--navy)}
.mhd-dd__ic{flex:0 0 38px;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--mint-soft);color:var(--navy);transition:background .3s var(--ease),transform .3s var(--ease)}
.mhd-dd__ic svg{width:18px;height:18px}
.mhd-dd__link:hover .mhd-dd__ic{background:var(--grad);transform:rotate(-6deg)}
.mhd-promo{position:relative;display:flex;flex-direction:column;justify-content:flex-end;gap:10px;padding:26px;border-radius:16px;background:linear-gradient(150deg,var(--navy) 0%,var(--navy-2) 100%);color:var(--paper);overflow:hidden;isolation:isolate}
.mhd-promo::before{content:"";position:absolute;width:260px;height:260px;right:-90px;top:-110px;border-radius:50%;background:rgba(251,81,43,.45);filter:blur(60px);z-index:-1}
.mhd-promo b{font-family:var(--serif);font-size:30px;font-weight:500;line-height:1.05}
.mhd-promo p{font-family:var(--serif);font-style:italic;font-size:18px;color:rgba(255,255,255,.75);margin-bottom:8px}

/* ---------- actions ---------- */
.mhd-actions{display:flex;align-items:center;gap:clamp(10px,1.4vw,20px);margin-left:auto;flex-shrink:0}
.mhd-call{display:inline-flex;align-items:center;gap:12px}
.mhd-call__ic{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:var(--mint-soft);color:var(--navy);transition:background .35s var(--ease),transform .35s var(--ease)}
.mhd-call__ic svg{width:18px;height:18px}
.mhd-call:hover .mhd-call__ic{background:var(--grad);transform:rotate(-10deg)}
.mhd-call__txt small{display:block;font-size:11px;font-weight:500;letter-spacing:.18em;text-transform:uppercase;color:var(--flame);line-height:1.2}
.mhd-call__txt b{display:block;font-size:16px;font-weight:600;color:var(--navy);white-space:nowrap}
.mhd-btn{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 6px 6px 22px;border-radius:999px;background:var(--navy);color:var(--paper)!important;font-size:14.5px;font-weight:500;letter-spacing:.02em;line-height:1;white-space:nowrap;transition:transform .4s var(--ease),box-shadow .4s var(--ease)}
.mhd-btn__ic{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--grad);color:var(--navy);transition:transform .45s var(--ease)}
.mhd-btn__ic svg{width:16px;height:16px}
.mhd-btn:hover{transform:translateY(-2px);box-shadow:0 18px 36px -16px rgba(251,81,43,.6)}
.mhd-btn:hover .mhd-btn__ic{transform:rotate(-45deg)}
.mhd-btn--light{background:var(--paper);color:var(--navy)!important;align-self:flex-start}
.mhd-btn--block{width:100%;padding:8px 8px 8px 24px;font-size:15.5px}
.mhd-btn--block .mhd-btn__ic{width:44px;height:44px}

/* burger */
.mhd .mhd-burger{display:none;width:48px;height:48px;border-radius:50%;background:var(--navy);flex-direction:column;align-items:center;justify-content:center;gap:5px}
.mhd-burger i{display:block;width:18px;height:2px;border-radius:2px;background:var(--paper);transition:transform .3s var(--ease),width .3s var(--ease)}
.mhd-burger i:nth-child(3){width:12px;margin-left:6px}
.mhd-burger:hover i:nth-child(3){width:18px;margin-left:0}

/* ---------- drawer ---------- */
.mhd-scrim{position:fixed;inset:0;z-index:1000;background:rgba(22,32,61,.5);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);opacity:0;transition:opacity .35s var(--ease)}
.mhd-drawer{position:fixed;top:0;right:0;bottom:0;z-index:1001;width:min(420px,100%);display:flex;flex-direction:column;background:var(--ivory);box-shadow:-30px 0 80px -30px rgba(22,32,61,.5);transform:translateX(100%);transition:transform .45s var(--ease);overflow-y:auto;overscroll-behavior:contain}
.mhd.is-drawer .mhd-scrim{opacity:1}
.mhd.is-drawer .mhd-drawer{transform:none}
.mhd-drawer__head{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--line);background:var(--paper)}
.mhd-drawer__head .mhd-logo img{width:140px}
.mhd .mhd-close{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:var(--ivory);color:var(--navy);transition:background .3s var(--ease),transform .3s var(--ease)}
.mhd .mhd-close:hover{background:var(--grad);transform:rotate(90deg)}
.mhd-close svg{width:18px;height:18px}
.mhd-drawer__nav{padding:12px 24px;flex:1}
.mhd-drawer__nav>ul>li{border-bottom:1px solid var(--line)}
.mhd-drawer__row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.mhd-drawer__row>a{flex:1;padding:16px 0;font-family:var(--serif);font-size:26px;font-weight:500;line-height:1.15;color:var(--navy)}
.mhd-drawer__row>a.is-current{color:var(--flame)}
.mhd .mhd-drawer__toggle{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--paper);border:1px solid var(--line);color:var(--navy);transition:transform .35s var(--ease),background .3s var(--ease)}
.mhd-drawer__toggle svg{width:16px;height:16px}
.mhd .mhd-drawer__toggle[aria-expanded="true"]{transform:rotate(180deg);background:var(--grad);border-color:transparent}
.mhd-drawer__sub{padding:0 0 14px 2px}
.mhd-drawer__sub a{display:block;padding:9px 0 9px 16px;border-left:2px solid var(--line);font-size:15.5px;color:var(--muted)}
.mhd-drawer__sub a:hover,.mhd-drawer__sub a.is-current{color:var(--navy);border-left-color:var(--flame)}
.mhd-drawer__foot{display:grid;gap:12px;padding:22px 24px 30px;background:var(--paper);border-top:1px solid var(--line)}
.mhd-drawer__contact{display:flex;align-items:center;gap:12px;font-size:15.5px;color:var(--navy)}
.mhd-drawer__contact svg{width:18px;height:18px;color:var(--flame)}
.mhd-drawer__social{display:flex;gap:8px;margin-top:4px}
.mhd-drawer__social a{width:40px;height:40px;background:var(--navy);color:var(--paper)}
.mhd-drawer__social a:hover{background:var(--grad);color:var(--navy)}
.mhd-drawer__social svg{width:16px;height:16px}

/* WordPress admin bar */
.admin-bar .mhd{--mhd-top-offset:32px}
.admin-bar .mhd-drawer{top:32px}
@media (max-width:782px){
  .admin-bar .mhd{--mhd-top-offset:46px}
  .admin-bar .mhd-drawer{top:46px}
}
@media (max-width:600px){
  .admin-bar .mhd.is-stuck .mhd-bar{top:0}
}

/* ---------- responsive ---------- */
@media (max-width:1280px){
  .mhd-call__txt{display:none}
}
@media (max-width:1100px){
  .mhd-nav{display:none}
  .mhd .mhd-burger{display:inline-flex}
  .mhd{--mhd-h:76px}
  .mhd.is-stuck{--mhd-h:66px}
}
@media (max-width:767px){
  .mhd-top{display:none}
  .mhd-actions>.mhd-btn{display:none}
  .mhd{--mhd-logo:140px}
}
@media (prefers-reduced-motion:reduce){
  .mhd *,.mhd *::before,.mhd *::after{animation:none!important;transition:none!important}
}
