* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #17a43b;
  color: #ffffff;
}

.logo {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

/* Bottone Toggle con icona animata */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #128530;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  padding: 6px 12px;
  /*font-size: 1rem;*/
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
  margin-top: 6px
 
}

.menu-toggle:hover,
.menu-toggle:active {
  background: #0f6e27;
}

.hamburger {
  position: relative;
  width: 20px;
  height: 14px;
  display: inline-block;
  right: 0 !important
}

.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 6px;
}

.hamburger span:nth-child(3) {
  top: 12px;
}

/* Stato aperto del bottone toggle (trasforma in X) */
.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

/* Pannello di navigazione (Cellulare e Tablet) */
.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #17a43b;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  max-height: 85vh;
  overflow-y: auto;
}

.main-nav.is-open {
  display: block;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a,
.submenu-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  color: #ffffff;
  text-decoration: none;
  /*background: transparent;*/
  background: #34b054;
  background: #17a43b;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  /*font-size: 1rem;*/
  text-align: left;
  cursor: pointer;
}

.main-nav a:hover,
.submenu-toggle:hover,
.main-nav a:active,
.submenu-toggle:active {
  background: rgba(0, 0, 0, 0.12);
  background: #128530;
 
}

/* Livello 2 */
.level-2 {
  display: none;
  background: #138a31;
  background: #47b763
}

.level-2.is-open {
  display: block;
}

.level-2 > li > a,
.level-2 > li > .submenu-toggle {
  padding-left: 34px;
}

/* Livello 3 */
.level-3 {
  display: none;
  background: #0f6e27;
 
}

.level-3.is-open {
  display: block;
}

.level-3 > li > a {
  padding-left: 50px;
  /*font-size: 0.95rem;*/
  color: #ffffff;
   background: #47b763
}




/* Ottimizzazione larghezza pannello su Tablet */
@media (min-width: 768px)
{
	.menu-toggle
	{	
		float: right !important
	}


	.main-nav 
	{
		left: auto;
		right: 16px;
		width: 340px;
		border-radius: 0 0 10px 10px;
		border: 1px solid rgba(255, 255, 255, 0.25);
		border-top: none;
	}
}



@media (min-width: 1200px)
{
  .main-nav, .menu-toggle {
    display: none !important;
  }
}


@media (max-width: 767px)
{
	.menu-toggle
	{	
		margin-left: 10px !important
	}
}