/* Preview controls and adjustments shared by both menu styles. */
.topbar .container { height:auto; min-height:52px; flex-wrap:wrap; gap:8px 14px; padding-block:8px; }
.design-switches { display:flex; flex-wrap:wrap; align-items:center; gap:6px 24px; margin-right:auto; max-width:100%; }
.design-switches .font-switch { flex-basis:auto; margin:0; }
.menu-switch { display:flex; align-items:center; gap:4px; flex-shrink:0; }
.menu-switch-label { margin-right:8px; color:var(--muted); font-size:12px; }
.menu-switch button { min-height:34px; padding:5px 10px; border:1px solid transparent; border-radius:9px; background:transparent; color:#58616b; font:600 13px/1.5 var(--f-body); white-space:nowrap; }
.menu-switch button:hover { background:var(--bg); }
.menu-switch button[aria-pressed="true"] { border-color:color-mix(in srgb,var(--skola) 30%,white); background:color-mix(in srgb,var(--skola) 10%,white); color:var(--school-red-text); }
.menu [data-menu-trigger] { cursor:pointer; }
#school-navigation .top { font-family:var(--f-head); font-weight:700; }
#school-navigation .sub a { font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; }
#school-navigation .sub { --submenu-link-inset:12px; }
#school-navigation .sub a.sub-child { padding-left:calc(var(--submenu-link-inset) + 24px); font-size:14px; }
#school-navigation .sub a.sub-child:hover { padding-left:calc(var(--submenu-link-inset) + 28px); }
.mobile-navigation #school-navigation .sub { --submenu-link-inset:14px; }
.menu button.top { width:100%; margin:0; border:0; appearance:none; font-family:inherit; line-height:inherit; }
.menu-utilities-top,.menu-utilities-bottom { display:none; }
.mobile-navigation .menu .top { padding-right:18px; }
@media(max-width:720px) {
  .design-switches { flex-basis:100%; gap:6px 18px; margin:0; }
  .menu-switch button { min-height:36px; }
  #school-navigation .top { padding-right:36px; }
  #school-navigation .top::after {
    content:'';
    position:absolute;
    right:16px;
    top:50%;
    width:8px;
    height:8px;
    border-right:1.8px solid currentColor;
    border-bottom:1.8px solid currentColor;
    transform:translateY(-50%) rotate(45deg);
    transition:transform .25s ease;
    pointer-events:none;
  }
  #school-navigation .top:not([data-menu-trigger])::after { transform:translateY(-50%) rotate(-45deg); }
  #school-navigation .top[data-menu-trigger][aria-expanded="true"]::after { transform:translateY(-50%) rotate(225deg); }
}
/* The reference variant affects desktop navigation only. Phones share one modal. */
@media(min-width:721px) {
:root[data-menu-style="reference"] .site-header {background:#fff;padding:24px 0 26px;box-shadow:0 1px 0 var(--line)}
:root[data-menu-style="reference"] .site-header .container {display:flex;align-items:center;gap:40px}
:root[data-menu-style="reference"] .brand {display:flex;align-items:center;gap:20px;text-decoration:none;flex-shrink:0}
:root[data-menu-style="reference"] .logo {width:104px;height:104px;object-fit:contain;flex-shrink:0}
:root[data-menu-style="reference"] .brand-name {font-family:var(--font);font-weight:500;font-size:42px;line-height:1;margin:0;letter-spacing:-.01em}
:root[data-menu-style="reference"] .brand-place {margin:6px 0 0;font-family:var(--font);font-size:28px;font-weight:400;line-height:1;color:#5b6069}
:root[data-menu-style="reference"] .site-header .menu {flex:1;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
:root[data-menu-style="reference"] .mi {position:relative}
:root[data-menu-style="reference"] .menu .top {
  position:relative;overflow:hidden;
  display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 6px 12px;white-space:nowrap;
  background:#fff;border-radius:14px;text-decoration:none;color:var(--text);
  box-shadow:0 1px 3px rgba(0,0,0,.06),0 8px 22px -12px rgba(0,0,0,.22);
  font-weight:700;font-size:13.5px;letter-spacing:.04em;text-transform:uppercase;
  transition:transform .25s,color .25s;
}
:root[data-menu-style="reference"] .menu .top::before {content:"";position:absolute;inset:auto 0 0 0;height:4px;background:var(--c);transition:height .3s}
:root[data-menu-style="reference"] .menu .top>* {position:relative}
:root[data-menu-style="reference"] .menu .ico {display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;border-radius:11px;background:color-mix(in srgb,var(--c) 18%,#fff);color:var(--c);transition:.3s}
:root[data-menu-style="reference"] .menu .ico .i {stroke-width:2.1}
:root[data-menu-style="reference"] .mi:hover .top,
:root[data-menu-style="reference"] .mi:focus-within .top {transform:translateY(-3px);color:#fff}
:root[data-menu-style="reference"] .mi:hover .top::before,
:root[data-menu-style="reference"] .mi:focus-within .top::before {height:100%}
:root[data-menu-style="reference"] .mi:hover .ico,
:root[data-menu-style="reference"] .mi:focus-within .ico {background:rgba(255,255,255,.25);color:#fff}
:root[data-menu-style="reference"] .sub {position:absolute;top:calc(100% + 12px);left:50%;min-width:240px;padding:8px;background:#fff;border-radius:16px;
  border-top:4px solid var(--c);box-shadow:0 22px 44px -16px rgba(0,0,0,.28),0 2px 6px rgba(0,0,0,.05);
  opacity:0;visibility:hidden;transform:translate(-50%,10px);transition:opacity .22s,transform .22s,visibility .22s;z-index:40}
:root[data-menu-style="reference"] .sub::before {content:"";position:absolute;left:0;right:0;top:-18px;height:18px}
:root[data-menu-style="reference"] .mi.is-open .sub {opacity:1;visibility:visible;transform:translate(-50%,0)}
:root[data-menu-style="reference"] .mi:last-child .sub,
:root[data-menu-style="reference"] .mi:nth-last-child(2) .sub {left:auto;right:0;transform:translateY(10px)}
:root[data-menu-style="reference"] .mi:last-child.is-open .sub,
:root[data-menu-style="reference"] .mi:nth-last-child(2).is-open .sub {transform:none}
:root[data-menu-style="reference"] .sub a {display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:10px;text-decoration:none;font-size:16px;color:var(--text);transition:background .15s,padding .15s}
:root[data-menu-style="reference"] .sub a::before {content:"";width:7px;height:7px;border-radius:50%;background:var(--c);opacity:.55;flex-shrink:0;transition:opacity .15s}
:root[data-menu-style="reference"] .sub a:hover {background:color-mix(in srgb,var(--c) 14%,#fff);padding-left:16px}
:root[data-menu-style="reference"] .sub a:hover::before {opacity:1}



:root[data-menu-style="reference"] .site-header .container { flex-wrap:nowrap; }
:root[data-menu-style="reference"] .brand-name { display:block; font-weight:700; }
:root[data-menu-style="reference"] .brand-place { display:block; font-weight:700; }
:root[data-menu-style="reference"] .site-header .logo { width:104px; height:104px; }
:root[data-menu-style="reference"] .site-header .menu { display:grid; flex-basis:auto; font-family:var(--f-head); }
:root[data-menu-style="reference"] .menu .top { min-height:0; flex-direction:row; }
:root[data-menu-style="reference"] .menu .ico .i { width:22px; height:22px; }
:root[data-menu-style="reference"] .mobile-menu-toggle { display:none; }
:root[data-menu-style="reference"] .mi.is-open { grid-column:auto; }
:root[data-menu-style="reference"] .mi .sub { display:block; }
:root[data-menu-style="reference"] .menu .top:focus-visible { outline:2px solid var(--c); outline-offset:4px; }
}
@media(max-width:1100px) and (min-width:721px) {
  :root[data-menu-style="reference"] .site-header { padding:12px 0; }
  :root[data-menu-style="reference"] .site-header .container { flex-direction:column; align-items:stretch; gap:12px; }
  :root[data-menu-style="reference"] .brand { justify-content:center; }
  :root[data-menu-style="reference"] .site-header .logo { width:60px; height:60px; }
  :root[data-menu-style="reference"] .brand-name { font-size:30px; }
  :root[data-menu-style="reference"] .brand-place { font-size:21px; }
  :root[data-menu-style="reference"] .site-header .menu { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
/* Shared mobile home and closing controls. */
@media(max-width:720px) {
  .menu-utilities-top,.menu-utilities-bottom { display:flex; grid-column:1/-1; }
  .menu-utilities-top { justify-content:center; padding-bottom:4px; }
  .menu-utilities-bottom { justify-content:center; padding-top:10px; }
  .menu-home,.menu-bottom-close { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:44px; padding:9px 15px; border:1px solid var(--line); border-radius:999px; background:#fff; color:#58616b; font:600 14px/1.4 var(--f-body); text-decoration:none; }
  .menu-home svg,.menu-bottom-close svg { width:20px; height:20px; flex:none; }
  .menu-home:hover,.menu-bottom-close:hover { background:var(--bg); color:var(--text); }
}

/* Fixed icon and arrow slots keep every title inside the same safe inset. */
#school-navigation .top { padding:12px; white-space:normal; }
#school-navigation .top>span:not(.ico) { min-width:0; overflow-wrap:anywhere; line-height:1.35; }
@media(min-width:721px) {
:root[data-menu-style="reference"] #school-navigation .top {
  display:grid;
  grid-template-columns:30px minmax(0,1fr);
  align-items:center;
  justify-content:initial;
  gap:10px;
  min-height:64px;
  padding:12px;
  text-align:left;
}
:root[data-menu-style="reference"] #school-navigation .ico { width:30px; height:30px; border-radius:9px; }
:root[data-menu-style="reference"] #school-navigation .ico .i { width:20px; height:20px; }
}
@media(min-width:1101px) {
  :root[data-menu-style="reference"] .site-header .container {
    display:grid;
    grid-template-columns:clamp(278px,calc(30vw - 52px),372px) minmax(0,1fr);
    gap:24px;
  }
  :root[data-menu-style="reference"] .site-header .logo {
    width:clamp(76px,calc(9vw - 23px),104px);
    height:clamp(76px,calc(9vw - 23px),104px);
  }
  :root[data-menu-style="reference"] .site-header .brand-name { font-size:clamp(29px,calc(3.6vw - 12px),40px); }
  :root[data-menu-style="reference"] .site-header .brand-place { font-size:clamp(20px,calc(2.1vw - 3px),27px); }
  :root[data-menu-style="reference"] .site-header #school-navigation .top {
    grid-template-columns:26px minmax(0,1fr);
    gap:7px;
    padding-inline:9px;
    font-size:clamp(12px,1vw,13.5px);
  }
  :root[data-menu-style="reference"] .site-header #school-navigation .ico { width:26px; height:26px; }
}
@media(min-width:721px) and (max-width:1100px) {
  :root[data-menu-style="reference"] #school-navigation .top { min-height:52px; padding-block:9px; }
}
@media(max-width:720px) {
  #school-navigation .top { padding-right:36px; }
  .mobile-navigation #school-navigation .top {
    display:grid;
    grid-template-columns:44px minmax(0,1fr);
    gap:16px;
    padding:14px 44px 14px 18px;
    text-align:left;
  }
}

/* Compact the sticky bar while retaining its original space above the content. */
#wrap:has(> .site-header) { overflow-anchor:none; }
:root[data-menu-style="reference"] .site-header {
  margin-bottom:max(0px,calc(var(--school-header-expanded-height, 0px) - var(--school-header-height, 0px)));
}
:root[data-menu-style="reference"] .site-header[data-compact] {
  padding-block:12px;
}
:root[data-menu-style="reference"] .site-header[data-compact] .brand { gap:10px; }
:root[data-menu-style="reference"] .site-header[data-compact] .logo { width:44px; height:44px; }
:root[data-menu-style="reference"] .site-header[data-compact] .brand-name { font-size:24px; }
:root[data-menu-style="reference"] .site-header[data-compact] .brand-place { margin-top:3px; font-size:17px; }
@media(min-width:721px) {
  :root[data-menu-style="reference"] .site-header[data-compact] #school-navigation .top {
    min-height:50px;
    padding-block:10px;
  }
}
@media(max-width:1100px) {
  :root[data-menu-style="reference"] .site-header[data-compact] .logo { width:32px; height:32px; }
  :root[data-menu-style="reference"] .site-header[data-compact] .brand-name { font-size:20px; }
  :root[data-menu-style="reference"] .site-header[data-compact] .brand-place { font-size:15px; }
}
@media(prefers-reduced-motion:no-preference) {
  .site-header { --header-transition:240ms cubic-bezier(.25,.7,.3,1); }
  .site-header[data-measuring] { --header-transition:0ms; }
  :root[data-menu-style="reference"] .site-header { transition:padding-block var(--header-transition); }
  :root[data-menu-style="reference"] .site-header .brand { transition:gap var(--header-transition); }
  :root[data-menu-style="reference"] .site-header .logo {
    transition:width var(--header-transition),height var(--header-transition);
  }
  :root[data-menu-style="reference"] .site-header :is(.brand-name,.brand-place) {
    transition:font-size var(--header-transition),margin-top var(--header-transition);
  }
  :root[data-menu-style="reference"] .site-header #school-navigation .top {
    transition:transform .25s,color .25s,min-height var(--header-transition),padding-block var(--header-transition);
  }
}
