/* Navigazione pubblica EnergiAmo: gerarchia più chiara e comportamento fluido. */
.site-header {
  min-height: 94px;
  gap: clamp(16px, 2vw, 30px);
  padding: 11px clamp(22px, 3vw, 54px);
  background: rgba(247, 251, 255, .94);
  border-bottom: 1px solid rgba(0, 59, 143, .11);
  box-shadow: 0 10px 34px rgba(0, 59, 143, .065);
}

.site-header .header-brand-logo {
  flex: 0 0 clamp(174px, 14vw, 214px);
  width: clamp(174px, 14vw, 214px) !important;
  height: 70px !important;
}

.site-header .header-brand-logo img {
  width: 100% !important;
  height: 100% !important;
}

.site-header .main-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(0, 59, 143, .09);
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
}

.site-header .main-nav > a,
.site-header .nav-dropdown > summary {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  padding: 9px clamp(10px, .85vw, 16px);
  color: #073b83;
  font: 750 clamp(.74rem, .77vw, .86rem) Manrope, sans-serif;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.site-header .main-nav > a:hover,
.site-header .main-nav > a:focus-visible,
.site-header .nav-dropdown > summary:hover,
.site-header .nav-dropdown > summary:focus-visible,
.site-header .nav-dropdown[open] > summary {
  background: #eaf4ff;
  color: #0058ac;
  transform: translateY(-1px);
}

.nav-dropdown { position: relative; }
.nav-dropdown > summary { list-style: none; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary span { color: #ff6b00; font-size: .9rem; }
.nav-dropdown-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 12px);
  left: 50%;
  display: grid;
  width: 310px;
  gap: 4px;
  padding: 10px;
  border: 1px solid #dce8f7;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 65px rgba(7, 44, 96, .19);
  transform: translateX(-50%);
}
.nav-dropdown-panel::before {
  content: "";
  position: absolute;
  top: -7px;
  left: calc(50% - 7px);
  width: 14px;
  height: 14px;
  border-top: 1px solid #dce8f7;
  border-left: 1px solid #dce8f7;
  background: #fff;
  transform: rotate(45deg);
}
.site-header .nav-dropdown-panel a {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  min-height: 0;
  padding: 12px 14px;
  border-radius: 13px;
  color: #071a39;
  text-decoration: none;
}
.site-header .nav-dropdown-panel a:hover { background: #f1f7ff; color: #0058ac; }
.nav-dropdown-panel span { font: 800 .88rem Manrope, sans-serif; }
.nav-dropdown-panel small { color: #60738d; font-size: .72rem; line-height: 1.35; }
.nav-dropdown-panel-compact { width: 285px; }

.header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.header-bill-cta,
.site-header .header-cta {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 17px;
  font: 800 .82rem Manrope, sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
.header-bill-cta {
  background: linear-gradient(135deg, #ff6b00, #ff941c);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 107, 0, .2);
}
.site-header .header-cta { background: #003b8f; color: #fff; }
.header-bill-cta:hover,
.site-header .header-cta:hover { color: #fff; transform: translateY(-1px); }

.mobile-nav { position: relative; display: none; margin-left: auto; }
.mobile-nav > summary {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  border: 1px solid #cdddef;
  border-radius: 999px;
  padding: 9px 14px;
  background: #fff;
  color: #073b83;
  font: 800 .8rem Manrope, sans-serif;
  list-style: none;
  cursor: pointer;
}
.mobile-nav > summary::-webkit-details-marker { display: none; }
.mobile-nav-icon { display: grid; width: 18px; gap: 3px; }
.mobile-nav-icon i { display: block; width: 100%; height: 2px; border-radius: 2px; background: currentColor; }
.mobile-nav nav {
  position: absolute;
  z-index: 90;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  width: min(330px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid #dce8f7;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 65px rgba(7, 44, 96, .22);
}
.mobile-nav nav a { padding: 11px 13px; border-radius: 11px; color: #173d5c; font-weight: 750; text-decoration: none; }
.mobile-nav nav a:hover { background: #eef6ff; color: #0058ac; }
.mobile-nav nav .mobile-bill-link { margin-top: 5px; background: #fff0e5; color: #d95300; }

@media (max-width: 1260px) {
  .site-header .main-nav { display: none; }
  .mobile-nav { display: block; }
  .site-header { gap: 12px; }
}

@media (max-width: 760px) {
  .site-header { min-height: 78px; padding: 8px 14px; }
  .site-header .header-brand-logo { flex-basis: 150px; width: 150px !important; height: 56px !important; }
  .header-bill-cta { display: none; }
  .mobile-nav > summary { width: 44px; height: 44px; min-height: 44px; justify-content: center; padding: 0; }
  .mobile-nav > summary > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mobile-nav nav {
    position: fixed;
    top: 78px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 94px);
    overflow-y: auto;
  }
  .site-header .header-cta { min-height: 44px; padding: 9px 12px; font-size: .78rem; }
}

@media (max-width: 430px) {
  .site-header .header-brand-logo { flex-basis: 158px; width: 158px !important; height: 54px !important; }
  .site-header .header-cta { padding: 9px 10px; }
  .site-header .header-cta-arrow { display: none; }
}
