/* Supporto locale per lo stesso menu degli altri articoli. */
body.menu-open { overflow: hidden; }

.site-header a {
  color: inherit;
  text-decoration: none;
}

.site-header a:focus-visible,
.site-header button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -3px;
}

.site-header .brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-header .menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.site-header .menu-icon,
.site-header .menu-icon::before,
.site-header .menu-icon::after {
  display: block;
  background: currentColor;
  content: '';
}

.site-header .menu-icon { position: relative; }
.site-header .menu-icon::before { position: absolute; top: -7px; }
.site-header .menu-icon::after { position: absolute; top: 7px; }

.site-header .menu-link[aria-current] { color: #9bbd39; }

@media (min-width: 981px) {
  html { scroll-padding-top: max(95px, calc(4.334vw + 40px)); }
}

@media (max-width: 980px) {
  .site-header .menu-link[aria-current] { color: var(--navy); font-weight: 700; }
}

/* Header interno: geometria e tendine del template WordPress pubblico. */
.site-header:not(.is-home) { position: sticky; z-index: 1000; top: 0; background: #1a3366; }
.site-header:not(.is-home) .header-inner {
  width: 100%; min-height: max(95px,calc(4.334vw + 40px)); display: grid;
  grid-template-columns: 15% 70% 15%; gap: 0;
  margin: 0; padding: 0 20px; background: #1a3366;
}
.site-header:not(.is-home) .brand {
  width: 4.334vw; height: auto; min-width: 55px; aspect-ratio: 1;
  justify-self: start; align-self: center;
}
.brand-mobile { display: none; }
.site-header:not(.is-home) .internal-nav {
  width: max-content; justify-self: center; align-self: center;
  margin: 0; color: #fff; font: 600 clamp(10px, .85vw, 14px)/1 Roboto, sans-serif;
  letter-spacing: 0; transform: translateX(-7px);
}
.menu-list,.submenu { margin: 0; padding: 0; list-style: none; }
.menu-list { display: flex; align-items: center; }
.menu-item { position: relative; }
.menu-link-row { position: relative; display: flex; }
.menu-link { min-height: 41px; display: flex; align-items: center; padding: 15px; white-space: nowrap; }
.has-submenu > .menu-link-row > .menu-link { padding-right: 33.75px; }
.submenu-toggle { position: absolute; z-index: 2; top: 0; right: 9px; width: 20px; height: 41px; border: 0; padding: 0; color: inherit; background: transparent; cursor: pointer; }
.submenu-toggle span::before { display: block; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; content: ''; transform: translate(4px,-2px) rotate(45deg); }
.menu-item:hover > .menu-link-row,.menu-item.is-expanded > .menu-link-row { color: #9bbd39; }
.submenu { position: absolute; z-index: 9999; top: 100%; left: 0; width: 307px; background: #9bbd39; opacity: 0; visibility: hidden; transition: opacity .15s ease,visibility .15s ease; }
.menu-item:hover > .submenu,.menu-item.is-expanded > .submenu { opacity: 1; visibility: visible; }
.submenu li:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,.32); }
.site-header .submenu a { min-height: 41px; display: flex; align-items: center; padding: 15px 15px 15px 35px; color: var(--navy); font: 600 clamp(10px, .85vw, 14px)/1 Roboto, sans-serif; white-space: nowrap; }
.site-header .submenu a:hover,.site-header .submenu a:focus-visible { color: var(--navy); background: #b6ce64; }
.language-item > .menu-link-row > .menu-link { width: 56px; padding: 15px; }
.language-item > .menu-link-row > .submenu-toggle { right: 2px; }
.language-submenu {
  left: 15px; width: 18px;
  background: transparent;
}
.language-submenu li { border: 0 !important; background: transparent; }
.language-submenu a {
  width: 18px; min-height: 12px;
  padding: 0;
  background: transparent;
}
.language-submenu a:hover,.language-submenu a:focus-visible { background: transparent; }
.language-flag { width: 18px; height: 12px; display: inline-block; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.flag-it { background: linear-gradient(90deg,#169b62 0 33.333%,#fff 33.333% 66.666%,#ff4338 66.666%); }
.flag-en {
  position: relative; overflow: hidden;
  background: #21468b url("bandiera-en.png") center/100% 100% no-repeat;
}
.flag-en::before,.flag-en::after { position: absolute; background: #fff; content: ''; }
.flag-en::before,.flag-en::after { display: none; }
.current-language .flag-en { box-shadow: inset 0 0 0 1px #21468b; }
.site-header:not(.is-home) .internal-dm-logo {
  width: 9.283vw; min-width: 119px; height: auto; justify-self: end; align-self: center; margin: 0;
}

@media (max-width: 980px) {
  .site-header:not(.is-home) { position: relative; }
  .site-header:not(.is-home) .header-inner {
    position: relative; width: 100%; min-height: 64px; display: flex;
    margin: 0; padding: 0 10px;
  }
  .site-header:not(.is-home) .brand { position: absolute; z-index: 2; top: 8px; left: 50%; width: 104px; height: 47px; display: grid; place-items: center; transform: translateX(-50%); }
  .site-header:not(.is-home) .brand-desktop { display: none; }
  .site-header:not(.is-home) .brand-mobile { display: flex; flex-direction: column; align-items: center; color: #fff; font: 800 11px/.82 Roboto,sans-serif; letter-spacing: -.04em; text-align: center; }
  .site-header:not(.is-home) .brand-mobile b { font: inherit; }
  .site-header:not(.is-home) .brand-mobile em { margin-top: 3px; color: #9bbd39; font: 700 6px/1 Roboto,sans-serif; letter-spacing: .05em; }
  .site-header:not(.is-home) .menu-toggle { position: relative; z-index: 3; width: 36px; height: 38px; display: grid; place-items: center; margin: 0; padding: 0; color: #fff; }
  .site-header:not(.is-home) .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .site-header:not(.is-home) .menu-icon,.site-header:not(.is-home) .menu-icon::before,.site-header:not(.is-home) .menu-icon::after { width: 19px; height: 2px; }
  .site-header:not(.is-home) .menu-toggle[aria-expanded="true"] { border: 2px solid #9bbd39; border-radius: 3px; }
  .site-header:not(.is-home) .menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
  .site-header:not(.is-home) .menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
  .site-header:not(.is-home) .menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }
  .site-header:not(.is-home) .internal-nav { position: absolute; z-index: 100; inset: 64px 0 auto; width: 100%; height: auto; max-height: calc(100svh - 64px); display: none; margin: 0; padding: 0; color: #fff; background: #9bbd39; overflow-y: auto; transform: none; }
  .site-header:not(.is-home) .internal-nav.is-open { display: block; }
  .site-header:not(.is-home) .menu-list { display: flex; flex-direction: column; align-items: stretch; }
  .site-header:not(.is-home) .menu-item { width: 100%; border-bottom: 1px solid rgba(255,255,255,.32); }
  .site-header:not(.is-home) .menu-link { width: 100%; min-height: 43px; padding: 13px 28px; color: var(--navy); font: 400 16px/1 Roboto,sans-serif; }
  .site-header:not(.is-home) .has-submenu > .menu-link-row > .menu-link { padding-right: 55px; }
  .site-header:not(.is-home) .submenu-toggle { right: auto; left: max(88px,calc(100% - 55px)); width: 42px; height: 43px; }
  .site-header:not(.is-home) .language-item > .menu-link-row > .menu-link { width: 100%; padding: 13px 28px; }
  .site-header:not(.is-home) .language-item > .menu-link-row > .submenu-toggle { right: auto; left: 49px; }
  .site-header:not(.is-home) .menu-item:hover > .menu-link-row { color: #fff; }
  .site-header:not(.is-home) .submenu { position: static; width: 100%; display: none; background: #b6ce64; opacity: 1; visibility: visible; }
  .site-header:not(.is-home) .menu-item:hover > .submenu { display: none; }
  .site-header:not(.is-home) .menu-item.is-expanded > .submenu { display: block; }
  .site-header:not(.is-home) .site-header .submenu a { min-height: 43px; padding: 13px 45px; font: 500 14px/1.15 Roboto,sans-serif; }
  .site-header:not(.is-home) .language-submenu {
    width: 18px; margin-left: 28px;
    background: transparent;
  }
  .site-header:not(.is-home) .language-submenu a { width: 18px; min-height: 12px; padding: 0; }
  .site-header:not(.is-home) .internal-dm-logo { display: none; }
}

@media (min-width: 981px) and (max-width: 1100px) {
  .site-header .menu-link {
    padding-inline: 11px;
  }

  .site-header .has-submenu > .menu-link-row > .menu-link {
    padding-right: 30px;
  }
}
