/* The same Joomla menu moves into a native modal on small screens. */
html.boreal-menu-open { overflow:hidden; }
.mobile-menu-dialog:not([open]) { display:none; }
.mobile-menu-dialog {
  position:fixed; inset:0; width:100%; max-width:none; height:100%; height:100dvh;
  max-height:none; margin:0; padding:0; border:0; overflow:auto; overscroll-behavior:contain;
  background:var(--paper); color:var(--ink); opacity:0; transform:translateY(-12px);
  transition:opacity .24s ease,transform .24s cubic-bezier(.2,.7,.2,1);
}
.mobile-menu-dialog::backdrop { background:var(--ink); }
.mobile-menu-dialog.is-open { opacity:1; transform:none; }
.mobile-menu-shell {
  width:min(640px,calc(100% - 64px)); min-height:100%; margin:auto;
  display:flex; flex-direction:column; padding-bottom:max(32px,env(safe-area-inset-bottom));
}
.mobile-menu-head { display:flex; justify-content:space-between; align-items:center; gap:24px; min-height:96px; border-bottom:1px solid var(--link); }
.mobile-menu-brand { display:block; flex:none; }
.mobile-menu-brand img { display:block; width:160px; height:64px; object-fit:contain; }
.mobile-menu-close {
  position:relative; flex:none; width:46px; height:46px; padding:0;
  border:1px solid #b9a16a80; border-radius:50%; background:transparent; color:var(--ink);
  cursor:pointer; transition:background .18s ease,border-color .18s ease;
}
.mobile-menu-close span::before,.mobile-menu-close span::after {
  content:""; position:absolute; width:20px; height:1px; left:50%; top:50%; background:currentColor;
  transform:translate(-50%,-50%) rotate(45deg);
}
.mobile-menu-close span::after { transform:translate(-50%,-50%) rotate(-45deg); }
.mobile-menu-close:hover { background:#e9d28830; border-color:var(--gold); }
.mobile-menu-body { padding:40px 0; margin:auto 0; }
.mobile-menu-label { margin:0 0 20px; color:var(--muted); font:400 11px/1.5 var(--font-body); letter-spacing:.18em; text-transform:uppercase; }
.mobile-menu-dialog #main-navigation { display:block; position:static; inset:auto; padding:0; background:transparent; border:0; }
.mobile-menu-dialog .boreal-menu { display:flex; flex-direction:column; gap:0; }
.mobile-menu-dialog .boreal-menu li { border-bottom:1px solid #b9a16a66; opacity:0; transform:translateY(12px); transition:opacity .28s ease,transform .28s ease; }
.mobile-menu-dialog .boreal-menu a {
  display:block; padding:15px 0 19px; font-family:var(--font-heading); font-size:clamp(30px,5.6vw,46px);
  line-height:1.2; font-weight:var(--weight-heading); color:var(--ink); white-space:normal;
  text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:8px;
  text-decoration-color:transparent; transition:color .18s ease,text-decoration-color .18s ease;
}
.mobile-menu-dialog .boreal-menu a:hover,.mobile-menu-dialog .boreal-menu a[aria-current="page"] { color:var(--link); text-decoration-color:currentColor; }
.mobile-menu-dialog.is-open .boreal-menu li { opacity:1; transform:none; }
.mobile-menu-dialog.is-open .boreal-menu li:nth-child(2) { transition-delay:25ms; }
.mobile-menu-dialog.is-open .boreal-menu li:nth-child(3) { transition-delay:50ms; }
.mobile-menu-dialog.is-open .boreal-menu li:nth-child(4) { transition-delay:75ms; }
.mobile-menu-dialog.is-open .boreal-menu li:nth-child(5) { transition-delay:100ms; }
.mobile-menu-foot { padding-top:16px; }
.mobile-menu-foot > span { display:block; width:32px; height:3px; margin-bottom:16px; background:var(--link); }
.mobile-menu-foot p { margin:0; max-width:270px; font:400 14px/1.7 var(--font-body); color:var(--muted); }
.mobile-menu-dialog a:focus-visible,.mobile-menu-dialog button:focus-visible { outline:2px solid var(--link); outline-offset:5px; }
@media(max-width:991px) {
  .nav-toggle { min-height:46px; padding:10px 0 10px 12px; gap:12px; font-size:14px; }
  .hamburger { width:26px; height:16px; border:0; }
  .hamburger::before,.hamburger::after { content:""; position:absolute; left:0; width:26px; height:1px; border:0; background:currentColor; }
  .hamburger::before { top:4px; }
  .hamburger::after { top:12px; width:18px; left:8px; transition:width .18s ease,left .18s ease; }
  .nav-toggle:hover .hamburger::after,.nav-toggle:focus-visible .hamburger::after { width:26px; left:0; }
}
@media(max-width:575px) {
  .mobile-menu-shell { width:calc(100% - 40px); }
  .mobile-menu-head { min-height:88px; }
  .mobile-menu-brand img { width:146px; height:58px; }
  .mobile-menu-body { padding:32px 0; }
}
@media(max-height:620px) {
  .mobile-menu-body { padding:22px 0; }
  .mobile-menu-label { margin-bottom:10px; }
  .mobile-menu-dialog .boreal-menu a { padding:11px 0 14px; }
}
body:not(.motion-enabled) .mobile-menu-dialog,body:not(.motion-enabled) .mobile-menu-dialog * { transition:none!important; }
@media(prefers-reduced-motion:reduce) {
  .mobile-menu-dialog,.mobile-menu-dialog *,.hamburger::after { transition:none!important; transform:none!important; }
  .mobile-menu-close span::before { transform:translate(-50%,-50%) rotate(45deg)!important; }
  .mobile-menu-close span::after { transform:translate(-50%,-50%) rotate(-45deg)!important; }
}
