/* header.css - Flattened */

header {
  position: relative;
  z-index: 2;
}

header nav {
  display: flex;
  flex-direction: column; /* Default for mobile */
}

header nav > :is(:first-child, :last-child) {
  justify-self: center;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
}

header nav li {
  display: flex;
  list-style: none;
  margin: 0 1.5rem;
  align-items: center;
}

header nav li a,
header nav li div {
  color: white;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 600;
}

header nav li a:hover,
header nav li div:hover {
  color: var(--color-primary-3);
}

.vertical-divider {
  border-left: 1px solid var(--color-secondary-3);
  padding: 0;
  max-width: 1px;
  margin: 0.8rem 3.3rem;
}

.navbar-list {
  height: 43px;
  align-items: center;
}

.bg-dark-grey {
  background-color: #353535;
}

.topbar {
  display: flex;
  gap: 3rem;
  align-items: center;
  justify-content: flex-end;
  padding: 0.2rem 0;
}

.topbar a {
  color: white;
  text-decoration: none;
}

.topbar svg {
  width: 0.8rem;
  height: 0.8rem;
  padding-top: 2px;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-item:hover svg,
.topbar-item:hover a {
  filter: brightness(0) saturate(100%) invert(51%) sepia(95%) saturate(587%)
    hue-rotate(355deg) brightness(93%) contrast(102%);
  cursor: pointer;
}

.header-logo {
  display: flex;
  height: 80px;
  align-items: center;
  padding: 0 20px;
}

.header-logo img {
  width: 100%;
  max-width: 200px;
  object-fit: contain;
}

@media screen and (min-width: 575px) {
  .header-logo {
    height: 100px;
  }
  .header-logo img {
    max-width: 300px;
  }
}

/* Burger menu */

#menu_checkbox {
  display: none;
}

.header-logo label {
  display: block;
  width: 30px;
  height: 29px;
  cursor: pointer;
}

.header-logo label div {
  position: relative;
  top: 0;
  height: 3px;
  background-color: var(--color-primary-3);
  margin-bottom: 8px;
  transition: 0.3s ease transform, 0.3s ease top, 0.3s ease width,
    0.3s ease right;
  border-radius: 2px;
}

.header-logo label div:first-child {
  transform-origin: 0;
}

.header-logo label div:last-child {
  margin-bottom: 0;
  transform-origin: 30px;
}

.header-logo label div:nth-child(2) {
  right: 0;
  width: 30px;
}

#menu_checkbox:checked + label div:first-child {
  transform: rotateZ(45deg);
}

#menu_checkbox:checked + label div:last-child {
  top: 2px;
  left: -6px;
  transform: rotateZ(45deg);
}

#menu_checkbox:checked + label div:nth-child(2) {
  width: 35px;
  right: 5px;
  top: 1px;
  transform: rotateZ(-45deg);
}

/* Dropdown menu */

.dropdown-menu {
  display: none;
  position: absolute;
  top: 43px;
  z-index: 99999;
  border: none;
  border-top: 1px solid var(--color-primary-3);
  border-radius: 0;
}

.dropdown-menu ul {
  padding-left: 0;
  margin: 0;
}

.dropdown-menu li {
  margin: 0 0 var(--space-2xs) 0;
  list-style: none;
}

.dropdown-menu a {
  color: white;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}

li.dropdown-hover_ {
  height: 100%;
}

.dropdown-toggle:hover {
  cursor: pointer;
}

.dropdown-toggle::after {
  display: none;
}

.dropdown-hover:hover .dropdown-menu {
  display: block;
}

.dropdown-xl {
  left: 0;
  width: 100%;
  padding: 50px 200px;
}

@media screen and (min-width: 1200px) {
  .dropdown-xl {
    padding: 50px;
  }
}

.dropdown-phone {
  width: 100%;
  left: 0;
  top: 80px;
  padding: 40px 10px;
}

.dropdown-phone .submenu {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 35px 15px;
  margin-bottom: 20px;
  border: 1px solid var(--color-primary-3);
}

.submenu-divider {
  border-top: 1px solid var(--color-primary-3);
  height: 1px;
  width: 30%;
}

.dropdown-sm {
  width: auto;
  padding: 20px 40px;
  text-align: center;
  line-height: 2;
}

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

.dropdown {
  position: relative;
}

.dropdown-category-title-mobile {
  text-align: center;
  padding: 10px 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
}

.dropdown-title-mobile {
  text-align: center;
  margin: 10px 0 15px;
  font-size: 1.5rem;
  font-weight: 500;
  color: white;
}

.dropdown-category-title {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  width: 150px;
}

.header-venues-title {
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.4rem;
}

.header-venues-subtitle {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.1;
}

.nav-venue-list {
  margin: 0 auto;
}

@media screen and (min-width: 1200px) {
  .nav-venue-list {
    margin: 0;
  }
}

.submenu {
  padding-left: 20px;
}

.dropdown-toggle-mobile {
  cursor: pointer;
}

.header-mobile {
  position: absolute; /* cambiato da relative a absolute */
  background: var(--text-color);
  max-height: 3000px; /* partiamo da 0 invece che 1000px */
  overflow: hidden;
  transition: max-height 0.5s ease-out;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  width: 100%; /* assicuriamoci che occupi tutta la larghezza */
  top: 100%; /* lo posiziona subito sotto l'header principale */
  left: 0;
  z-index: 999;
}

.header-mobile.active {
  position: absolute; /* cambiato da fixed a absolute */
  max-height: calc(
    100vh - 100px
  ); /* sottraiamo l'altezza dell'header principale */
  border-top: 1px solid var(--color-primary-3);
}

.header-mobile.animation-completed {
  overflow-y: auto; /* permette lo scroll se il contenuto è troppo lungo */
}

body.menu-open {
  overflow: hidden; /* previene lo scroll del body quando il menu è aperto */
}

.navbar-list-mobile {
  max-height: 0;
  transition: max-height 0.3s ease-out;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar-list-mobile ul {
  margin: 0;
  list-style: none;
}

.navbar-list-mobile.active {
  max-height: 3000px;
  transition: max-height 0.5s ease-in;
  margin-bottom: var(--space-3xl);
  margin-top: var(--space-s);
}

.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding-left: 20px;
}

.submenu.active {
  max-height: 3000px;
  transition: max-height 0.4s ease-in;
}

.dropdown-toggle-mobile {
  cursor: pointer;
  display: block;
  position: relative;
}

/* Indicatore per i menu dropdown */
.dropdown-toggle-mobile::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: translateY(-1px) rotate(45deg);
  margin-left: 10px;
  position: relative;
  top: -3px;
  transition: transform 0.3s ease;
}

.dropdown-toggle-mobile.active::after {
  transform: rotate(-135deg);
}

.menu-item {
  padding: var(--space-3xs) 20px;
}

.menu-item span,
.menu-item li,
.menu-item a {
  color: var(--white);
  font-weight: 600;
}

.menu-item a,
.dropdown-toggle-mobile {
  color: var(--white);
  text-decoration: none;
  display: block;
  padding: 8px 0;
}

.menu-item ul {
  padding-left: var(--space-s);
}

.burger-menu-title {
  font-size: var(--fs-2);
  font-weight: 700;
}

.burger-menu-subtitle {
  font-size: var(--fs-2);
  font-weight: 700;
}

.burger-menu-text {
  font-size: var(--fs-1);
  font-weight: 400 !important;
}

.burger-menu-block {
  margin-bottom: var(--space-s);
  margin-top: var(--space-s);
}