.box-station{
  display:flex;
  position: relative;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background-color: #e2e2e2;
  padding: 0 1.5rem; 
}

.box-start{
  display: flex;
  flex: left;
}

.textBlock{
  display: flex;
  flex-direction: column;
  justify-content: center;
}


.textBlock h1{
  color: #252525;
  margin-bottom: 0;

}

.textBlock h1 > a{
  color: #252525;
  text-decoration: none;
}

.textBlock h1>a:hover{
  color: #989898;
}

.textBlock p{
  color: #252525;
  margin-top: 0;
  font-weight: 100;
  font-size: 20px;
  white-space: pre;
}

.box-start img{
  margin: 1.2rem 1rem 1.2rem 0;
  width: 80px;
  height: 80px;
  border-radius: 40px;
}



/* destra */
.box-end {
  flex: right;
  display: flex;
  list-style: none;
	align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.box-end a {
  color: #252525;
  text-decoration: none;
  font-weight: 500;
}

.box-end > li > a {
  height: 100%;
  text-decoration: none;
  color: #252525;
  font-weight: 500;
  transition: color 0.2s ease;
}


.box-end > li > a:hover {
  color: #989898;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  text-align: center;
  display: none;
  top: 100%;
  left: -50%;
  background-color: #e2e2e2; 
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  border-radius: 8px;
  min-width: 150px;
  z-index: 1000;
}

.dropdown-menu li a {
  display: block;
  padding: 0.5rem 1rem;
  color: #252525;
}

.dropdown-menu li a:hover {
    background-color: #cbcbcb;
}

/* Trigger dell'hover */
.dropdown:hover > .dropdown-menu {
  display: block;
}

/* ---------- HAMBURGER MENU ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #222;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}



/* MOBILE */
@media screen and (max-width: 475px) {
  .box-station{
    flex-direction: column;
    padding-left: 0.4rem;
    align-items: center;
    padding-bottom: 1rem;
  }

  .box-start img{
    margin-left: 0;
    width: 60px;
    height: 60px;
  }

  .hamburger {
    padding-left: 3px;
    position: inherit;
    display: flex;
    align-items: center;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }


  .box-end {
    position: absolute;
    text-align: center;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #e2e2e2;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    display: none;
    z-index: 9999;
  }

  .box-end li {
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid #303030;
  }

  .box-end li a {
    width: 100%;
    display: block;
    margin-left: -2px;
    margin-top: 0.4rem;
  }


  .box-end.show {
    display: flex;
  }


  
  .dropdown-menu {
    display: none;
    position: static; 
    background-color: #c8c8c8;
    flex-direction: column;
    width: 100%;
    margin-bottom: -1rem;
  }

  .dropdown-menu.show {
    display: flex;
  }

  .dropdown-toggle{
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
  }

  .dropdown-toggle:focus,
  .dropdown-toggle:active {
    outline: none;
    background: none;
  }
  
  .dropdown-toggle {
    -webkit-tap-highlight-color: transparent;
  }

  .dropdown-menu li {
    border-bottom: 1px solid rgba(69, 69, 69, 0.2);
    padding-top: 0.5rem;
  }

  .dropdown-menu li a {
    text-decoration: none;
    display: block;
    margin-left: -1.25rem;

  }

  .dropdown-menu li:last-child {
    border-bottom: none;
  }
}



@media (prefers-color-scheme: dark) {
  :root {
      --bg-color: #222;
      --text-color: #fff;
  }

  .hamburger span{
    background-color: white;
  }

  .box-station{
    background-color: #474747;
    color: #dfe1e6
  }

  .box-station h1{
    color: #dfe1e6;
  
  }
  
  .box-station h1 > a{
    color: #dfe1e6;
  }

  .box-station p{
    color: #dfe1e6;
  }

  .box-station li a{
    color: #dfe1e6;
  }

  .box-end{
    background-color: #474747;
  }

  .dropdown-menu{
    background-color: #353535;
  }

  .dropdown-menu li {
    border-bottom: 1px solid rgba(230, 230, 230, 0.2);
  }

  .dropdown-menu li a:hover {
    background-color: #171717;
  }

}
