/* Stili di intestazione, scritti a mano.
   Vanno inseriti nel corpo della pagina, non nell'head: e' l'ordine
   che avevano su WordPress, e da cui dipende quali regole vincono. */
/* ============================ TOKEN ============================ */
.athena-hd {
  --hd-blue: #2B53A0;
  --hd-blue-dark: #22417f;
  --hd-navy: #112140;
  --hd-navy-deep: #0B1730;
  --hd-gold: #ffd98a;
  --hd-ink: #0a2540;
  --hd-slate: #3a4b63;
  --hd-slate-soft: #8a97ab;
  --hd-line: #e3e9f3;
  --hd-bg-soft: #f4f8ff;
  --hd-font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hd-h: 96px;

  font-family: var(--hd-font);
  position: relative;
  z-index: 900;
}
.athena-hd *, .athena-hd *::before, .athena-hd *::after { box-sizing: border-box; }

/* ============================================================
   RESET DIFENSIVO — leggere prima di modificare
   Il template header di Elementor (post-2105.css, 40 KB) contiene
   regole a specificita' altissima che colpiscono QUALUNQUE <a> e
   <button> al suo interno, e pseudo-elementi ::before/::after per
   gli effetti "pointer" del menu (la sottolineatura/evidenziazione
   colorata che si vedeva al passaggio del mouse).
   Qui li neutralizziamo tutti dentro .athena-hd, poi riapplichiamo
   i nostri colori con !important dove serve.
   ============================================================ */
.athena-hd a,
.athena-hd a:link,
.athena-hd a:visited,
.athena-hd a:hover,
.athena-hd a:focus,
.athena-hd a:active,
.athena-hd button {
  text-decoration: none !important;
  box-shadow: none !important;
  background-image: none !important;
  text-shadow: none !important;
  outline: none;
}
/* via gli effetti pointer di Elementor (underline, framed, background...) */
.athena-hd a::before, .athena-hd a::after,
.athena-hd button::before, .athena-hd button::after,
.athena-hd li::before, .athena-hd li::after {
  content: none !important;
  background: none !important;
  border: 0 !important;
  display: none !important;
}
/* nessun bottone del blocco deve prendere sfondi dal tema (era il rosa
   che compariva su hamburger e chiusura) */
.athena-hd button,
.athena-hd button:hover,
.athena-hd button:focus,
.athena-hd button:active,
.athena-hd button:focus-visible {
  background-color: transparent !important;
  border-color: var(--hd-line);
}
.athena-hd .athena-hd__cta,
.athena-hd .athena-hd__cta:hover,
.athena-hd .athena-hd__cta:focus { background-color: var(--hd-blue) !important; }
.athena-hd .athena-hd__cta:hover { background-color: var(--hd-blue-dark) !important; }

/* il widget e la colonna che contengono il blocco non devono aggiungere spazi */
.elementor-location-header .elementor-widget-html:has(.athena-hd),
.elementor-location-header .elementor-widget-container:has(> .athena-hd) {
  margin: 0 !important; padding: 0 !important;
}
.elementor-location-header .elementor-widget-wrap:has(.athena-hd),
.elementor-location-header .elementor-column:has(.athena-hd),
.elementor-location-header .elementor-container:has(.athena-hd),
.elementor-location-header .elementor-section:has(.athena-hd) {
  padding: 0 !important; margin: 0 !important; max-width: none !important;
}





/* ============================================================
   BARRA SEMPRE IN CIMA
   position:sticky qui non puo' funzionare: si "appende" solo
   dentro il proprio contenitore, e il contenitore dell'header
   finisce subito dopo l'header, quindi non ha spazio per
   scorrere. Si usa position:fixed piu' un distanziatore che
   occupa l'altezza sottratta al flusso.
   ============================================================ */
.athena-hd { --hd-top: 45px; }
.athena-hd__topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 901;
}
.athena-hd__bar {
  position: fixed; top: var(--hd-top); left: 0; right: 0; z-index: 900;
  background: #fff;
}
/* distanziatore: tiene il posto delle due barre tolte dal flusso */
.athena-hd::after {
  content: ""; display: block;
  height: calc(var(--hd-top) + var(--hd-h));
}
/* niente antenati che ritagliano o creano contenitori */
.elementor-location-header:has(.athena-hd),
.elementor-location-header:has(.athena-hd) .elementor-section,
.elementor-location-header:has(.athena-hd) .elementor-container,
.elementor-location-header:has(.athena-hd) .elementor-column,
.elementor-location-header:has(.athena-hd) .elementor-widget-wrap,
.elementor-location-header:has(.athena-hd) .elementor-widget-html,
.elementor-location-header:has(.athena-hd) .elementor-widget-container {
  overflow: visible !important;
  transform: none !important;
  filter: none !important;
}

/* ============================ TOPBAR ============================ */
.athena-hd__topbar {
  background: var(--hd-navy) !important;
  color: #fff !important;
  font-size: .86rem;
  text-align: center;
  padding: 13px 16px;
  line-height: 1.4;
}
.athena-hd__topbar a {
  color: #fff !important; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.athena-hd__topbar a:hover { color: var(--hd-gold) !important; }
.athena-hd__topbar svg { width: 14px; height: 14px; flex: none; }

/* ============================ BARRA ============================ */
.athena-hd__bar {
  background: #fff;
  border-bottom: 1px solid var(--hd-line);
  z-index: 900;
}
.athena-hd__inner {
  max-width: none; margin: 0; padding: 0 clamp(20px, 3vw, 56px);
  min-height: var(--hd-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.athena-hd__logo { flex: none; display: block; line-height: 0; }
.athena-hd__logo img { height: 58px; width: auto; max-width: none; display: block; }

.athena-hd__cta {
  flex: none; white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--hd-blue) !important; color: #fff !important;
  font-size: .95rem; font-weight: 500; line-height: 1;
  padding: .95em 1.5em; border-radius: 6px;
  transition: background-color .18s ease, transform .18s ease;
}
.athena-hd__cta:hover { background: var(--hd-blue-dark) !important; color: #fff !important; transform: translateY(-1px); }

/* ============================ NAV DESKTOP ============================ */
.athena-hd__nav { flex: 1 1 auto; display: flex; justify-content: center; }
.athena-hd__nav > ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 22px;
}
.athena-hd__nav li { position: relative; }

.athena-hd__nav a,
.athena-hd__parent {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--hd-font); font-size: .82rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--hd-slate) !important; text-decoration: none; white-space: nowrap;
  padding: 10px 0 !important; border: 0; border-bottom: 2px solid transparent !important;
  background: none !important; cursor: pointer;
}
.athena-hd__nav > ul > li > a:hover,
.athena-hd__nav > ul > li > .athena-hd__parent:hover,
.athena-hd__nav > ul > li:hover > .athena-hd__parent,
.athena-hd__nav a[aria-current="page"] {
  color: var(--hd-blue) !important; border-bottom-color: var(--hd-blue) !important;
}
.athena-hd__parent svg { width: 11px; height: 11px; transition: transform .18s ease; }
.athena-hd__nav li:hover > .athena-hd__parent svg { transform: rotate(180deg); }

.athena-hd__sub {
  position: absolute; top: 100%; left: -16px;
  min-width: 300px; max-height: 78vh; overflow-y: auto;
  list-style: none; margin: 0; padding: 12px;
  background: #fff !important; border: 1px solid var(--hd-line); border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(10,37,64,.10), 0 8px 10px -6px rgba(10,37,64,.05);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  z-index: 950;
}
.athena-hd__nav li:hover > .athena-hd__sub,
.athena-hd__nav li:focus-within > .athena-hd__sub {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.athena-hd__sub a {
  display: block; width: 100%;
  text-transform: none; letter-spacing: 0; white-space: normal;
  font-size: .95rem; font-weight: 400; line-height: 1.35;
  color: var(--hd-slate) !important; padding: 9px 12px !important; border-radius: 6px; border-bottom: 0;
}
.athena-hd__sub a:hover { background: var(--hd-bg-soft) !important; color: var(--hd-blue) !important; }
.athena-hd__group {
  display: block; padding: 12px 12px 6px;
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--hd-slate-soft);
}

/* ============================ HAMBURGER ============================ */
/* ATTENZIONE: il "display" va SOLO qui, mai negli stati :hover/:focus.
   Se finisce anche li', su mobile il tocco attiva :hover, che ha
   specificita' maggiore della media query: l'icona sparisce mentre
   la tocchi e il menu non si apre mai. */
.athena-hd__burger { display: none; }
.athena-hd__burger,
.athena-hd__burger:hover,
.athena-hd__burger:focus,
.athena-hd__burger:active {
  flex: none;
  width: 46px; height: 46px; padding: 0 !important;
  align-items: center; justify-content: center;
  background: transparent !important;
  border: 1px solid var(--hd-line) !important; border-radius: 8px !important;
  color: var(--hd-ink) !important; cursor: pointer;
}
.athena-hd__burger:hover { border-color: var(--hd-blue) !important; color: var(--hd-blue) !important; }
.athena-hd__burger:focus-visible,
.athena-hd__close:focus-visible { outline: 2px solid var(--hd-blue); outline-offset: 2px; }
.athena-hd__burger svg { width: 22px; height: 22px; }
.athena-hd__burger .ico-close { display: none; }

/* ============================ PANNELLO MOBILE ============================ */
.athena-hd__backdrop {
  position: fixed; inset: 0; background: rgba(11,23,48,.55);
  opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s;
  z-index: 980;
}
/* apertura pilotata dalla checkbox: nessun JavaScript coinvolto */
.athena-hd__toggle { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.athena-hd__toggle:checked ~ .athena-hd__backdrop { opacity: 1; visibility: visible; }
.athena-hd__toggle:checked ~ .athena-hd__drawer { transform: translateX(0); }
.athena-hd__toggle:checked ~ .athena-hd__bar .ico-open { display: none; }
.athena-hd__toggle:checked ~ .athena-hd__bar .ico-close { display: block; }

.athena-hd__drawer {
  background: #fff !important;
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(400px, 88vw);
  background: #fff;
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.4,0,.2,1);
  z-index: 990;
  display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(10,37,64,.18);
}


.athena-hd__drawer-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--hd-line); flex: none;
}
.athena-hd__drawer-top img { height: 42px; width: auto; }
.athena-hd__close,
.athena-hd__close:hover,
.athena-hd__close:focus,
.athena-hd__close:active {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: transparent !important;
  border: 1px solid var(--hd-line) !important; border-radius: 8px !important;
  color: var(--hd-ink) !important; cursor: pointer; flex: none; padding: 0 !important;
}
.athena-hd__close:hover { border-color: var(--hd-blue) !important; color: var(--hd-blue) !important; }
.athena-hd__close svg { width: 20px; height: 20px; }

.athena-hd__drawer-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 0 24px; }
.athena-hd__drawer-body ul { list-style: none; margin: 0; padding: 0; }

.athena-hd__m-link,
.athena-hd__m-parent {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left;
  font-family: var(--hd-font); font-size: 1.02rem; font-weight: 500;
  color: var(--hd-ink) !important; text-decoration: none;
  padding: 15px 20px !important; background: none !important; border: 0; border-bottom: 1px solid var(--hd-line) !important;
  cursor: pointer;
}
.athena-hd__m-link:hover, .athena-hd__m-parent:hover { background: var(--hd-bg-soft) !important; color: var(--hd-blue) !important; }
.athena-hd__m-parent svg { width: 18px; height: 18px; flex: none; color: var(--hd-blue); transition: transform .2s ease; }



.athena-hd__m-sub { background: #fbfcfe; border-bottom: 1px solid var(--hd-line); }
.athena-hd__acc { border: 0; }
.athena-hd__acc > summary { list-style: none; }
.athena-hd__acc > summary::-webkit-details-marker { display: none; }
.athena-hd__acc[open] > summary { color: var(--hd-blue) !important; background: var(--hd-bg-soft) !important; }
.athena-hd__acc[open] > summary svg { transform: rotate(180deg); }
.athena-hd__m-sub a {
  display: block; font-size: .95rem; font-weight: 400; line-height: 1.35;
  color: var(--hd-slate) !important; text-decoration: none;
  padding: 12px 20px 12px 34px !important; border-bottom: 1px solid rgba(227,233,243,.7) !important;
}
.athena-hd__m-sub a:last-child { border-bottom: 0; }
.athena-hd__m-sub a:hover { color: var(--hd-blue) !important; background: var(--hd-bg-soft) !important; }
.athena-hd__m-group {
  display: block; padding: 14px 20px 6px 34px;
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--hd-slate-soft);
}

.athena-hd__drawer-foot { flex: none; padding: 18px 20px; border-top: 1px solid var(--hd-line); display: grid; gap: 10px; }
.athena-hd__drawer-foot .athena-hd__cta { width: 100%; }
.athena-hd__drawer-foot a.tel {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: .9rem; color: var(--hd-slate); text-decoration: none;
  padding: 12px; border: 1px solid var(--hd-line); border-radius: 6px;
}
.athena-hd__drawer-foot a.tel:hover { border-color: var(--hd-blue); color: var(--hd-blue); }
.athena-hd__drawer-foot svg { width: 16px; height: 16px; }

/* ============================ BREAKPOINT ============================ */
@media (max-width: 1200px) {
  .athena-hd__nav, .athena-hd__inner > .athena-hd__cta { display: none; }
  .athena-hd__burger { display: inline-flex; }
  .athena-hd__inner { justify-content: space-between; min-height: 66px; padding: 0 16px; }
  .athena-hd__logo img { height: 42px; }
  /* la topbar sparisce: il numero verde e' gia' in fondo al pannello,
     e su schermo piccolo ogni pixel in alto conta */
  .athena-hd__topbar { display: none; }
  .athena-hd { --hd-top: 0px; --hd-h: 66px; }
}
@media (min-width: 1201px) { .athena-hd__drawer, .athena-hd__backdrop { display: none; } }

/* blocca lo scorrimento della pagina quando il pannello e' aperto, senza JS */
body:has(.athena-hd__toggle:checked) { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .athena-hd__drawer, .athena-hd__backdrop, .athena-hd__sub { transition: none; }
}
