/* =================================================
HEADER BASE
================================================= */

header {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0px 10px 20px rgba(105, 63, 63, 0.16);
}

/* =================================================
HEADER DESKTOP
================================================= */

#menuDesktop {
  top: 0;
  background: var(--white-color);
}

#menuDesktop {
  /*position: relative;*/
  display: flex;
}

/* LOGO */

.header-logo {
  position: absolute;
  top: 0;
  left: 0;
  height: 101%;
}

.header-logo img {
  height: 90%;
  position: relative;
  top: 10%;
}

/* BLOCCO SINISTRO */

.header-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* BLOCCO DESTRO */

.header-right {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* FASCIA TOP */

.header-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0.8rem 0;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* language switcher spallato a sinistra */
.header-actions>*:first-child {
  margin-right: auto;
}

/* =================================================
SEARCH BAR
================================================= */
#searchBar input {
  height: 44px;
  font-family: var(--font-2);
  width: 15vw;
  border: 1px solid var(--gray-border-input);
  border-radius: var(--radius-minimo);
  padding: 0 14px;
  font-weight: normal;
  color: var(--black-color);
  font-size: 16px;
}

#searchBar input::placeholder {
  font-family: var(--font-2);
  color: var(--black-color);
  font-size: 15px;
}

#searchBar button i {
  font-size: 20px;
}

#searchBar button {
  height: 44px;
  width: 44px;
  border: none;
  background: var(--black-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  color: var(--white-color);
  border-radius: var(--radius-minimo);
  margin-left: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-actions .header-mobile-search {
  background: transparent;
  border: none;
}

.header-mobile-search i {
  cursor: pointer;
  color: var(--first-color);
  font-size: 2rem;
  padding-right: 0.8rem;
}

/* =========================================
SEARCH MODAL
========================================= */

#searchModal {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
  z-index: 2000;
}

#searchModal.open {
  opacity: 1;
  visibility: visible;
}

/* contenitore */

.search-modal-inner {
  width: 100%;
  max-width: 600px;
  padding: 30px;
  text-align: center;
}

/* titolo */

.search-title {
  color: var(--white-color);
  font-size: clamp(28px, 4vw, 48px);
  font-family: var(--font-2);
  font-weight: 600;
  margin-bottom: 40px;
  letter-spacing: 0.02em;
}

/* form */

.search-form {
  display: flex;
  align-items: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 10px;
}

/* input */

.search-form input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--white-color);
  font-size: 20px;
  padding: 10px 0;
}

/* placeholder */

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* bottone */

.search-form button {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

/* bottone chiusura */

.search-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 34px;
  cursor: pointer;
}

/* =================================================
MENU DESKTOP
================================================= */

.header-menu {
  background: var(--first-color);
  display: flex;
  align-items: center;
}

.menu-desktop li {
  list-style: none;
  display: block;
  position: relative;
}

.menu-desktop a {
  color: var(--white-color);
  font-weight: var(--menu-list-font-weight);
  font-size: var(--menu-items-font-size);
  font-family: var(--font-2);
  text-decoration: none;
  padding: 10px 20px;
  height: 100%;
  width: 100%;
  display: block;
  transition: .2s ease-in-out;
  position: relative;
  z-index: 2;
}

.menu-desktop a::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 0;
  width: calc(100% + 20px);
  height: 100%;
  background: transparent;
  transition: transform 0.3s ease;
  z-index: -1;
}

.menu-desktop li:first-child a:before {
  left: -20px;
}

.menu-desktop li:last-child a:before {
  left: 0;
}

.menu-desktop a:hover {
  color: var(--white-color) !important;
}

.menu-desktop li:hover>a::before {
  background: var(--black-color);
}

.menu-desktop>li:first-child>a {
  padding-left: 0;
}

.menu-desktop>li:last-child>a {
  padding-right: 0;
}

/* ################################################
MENU SUBMENU
################################################ */

.menu-desktop li {
  position: relative;
}

.menu-desktop li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 12px;
}

.menu-desktop>li>a {
  position: relative;
}

/* .menu-desktop>li>a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  border-radius: var(--radius-base);
  background: var(--white-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.menu-desktop>li:hover>a::before {
  transform: scaleX(1);
} */

/* ==========================================
SUBMENU CONTAINER
========================================== */
.menu-desktop .sub-menu {
  position: absolute;
  top: 100%;
  left: -10px;
  background: var(--white-color);
  width: 350px;
  border-radius: var(--radius-base);
  padding: 0.5rem;
  list-style: none;
  box-shadow: 0px 10px 20px #693F3F29;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1000;
}

/* apertura */
.menu-desktop li:hover>.sub-menu {
  opacity: 1;
  visibility: visible;
  /* transform: translateX(-50%) translateY(0) scale(1); */
}

/* ==========================================
VOCI SUBMENU
========================================== */

.menu-desktop .sub-menu a {
  display: block;
  padding: 9px 15px;
  border-radius: var(--radius-base);
  text-decoration: none;
  color: var(--second-color);
  font-size: 16px;
  transition: all 0.2s ease;
  font-weight: normal;
  line-height: 20px;
}

.menu-desktop .sub-menu a:before {
  display: none;
}

/* hover */

.menu-desktop .sub-menu a:hover {
  background: var(--first-color-3);
  color: var(--black-color) !important;
}

.menu-item-has-children>a::after {
  content: " \f078";
  display: inline-block;
  color: var(--white-color);
  cursor: pointer;
  font-family: FontAwesome;
  font-size: 12px;
  font-weight: lighter !important;
  padding-left: 5px;
  transition: 0.3s ease-in-out;
  position: relative;
  top: 0px;
  height: 10px;
}

.menu-desktop .sub-menu li {
  transform: translateY(5px);
  opacity: 0;
  transition: all 0.25s ease;
}

.menu-desktop li:hover .sub-menu li {
  transform: translateY(0);
  opacity: 1;
}

.menu-desktop .sub-menu li:last-child {
  border-top: 1px solid #f2f2f2;
  margin-top: 0.8rem;
  padding-top: 8px;
  font-weight: 600;
}

/* freccia */

.menu-desktop .sub-menu li:last-child a::after {
  content: "\f054";
  font-family: FontAwesome;
  position: absolute;
  right: 0;
  top: 26%;
  font-size: 12px;
  padding-right: 30px;
  /* transform: translateY(-50%); */
}

/* allineo prima e ultima voce alla grafica 
.menu-desktop > li:first-child > a {
    padding-left: 0;
}
.menu-desktop > li:last-child > a {
    padding-right: 0;
}
/* versione 1: purtroppo effetto mouseover  */

/* =================================================
HAMBURGER
================================================= */

.hamburger {
  width: 22px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

.hamburger__line {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--white-color);
  border-radius: var(--radius-minimo);
  transition: all 0.3s ease;
}

/* trasformazione X */

.hamburger.active .hamburger__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =================================================
MENU HAMBURGER DESKTOP
================================================= */

#desktopHamburgerNavigation {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  background: white;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.77, 0, 0.18, 1);
  z-index: 1200;
  padding: 104px 72px 24px;
  box-sizing: border-box;
  overflow-x: hidden;
  box-shadow: -4px 0px 8px rgba(0, 0, 0, 0.1);
}

#desktopHamburgerNavigation.open {
  transform: translateX(0);
}

.hamburger-menu-extra {
  width: 44px;
  height: 44px;
  display: flex;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-minimo);
}

/* menu interno */

.desktop-hamburger-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.desktop-hamburger-menu li a {
  font-size: 20px;
  font-weight: 400;
  font-family: var(--font-2);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--second-color);
}

.desktop-hamburger-menu li a:hover {
  color: var(--first-color-1);
}

/* pulsante chiusura */

.hamburger-close {
  position: absolute;
  top: 60px;
  right: 60px;
}

.hamburger-close .hamburger__line {
  background: var(--second-color);
}

/* =================================================
MENU MOBILE
================================================= */

#menuMobile {
  width: 100%;
  background: var(--white-color);
  position: fixed;
  z-index: 1000;
}

#menuMobile .container-extended {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* logo mobile */

.header-mobile-logo img {
  margin-left: 0.8rem;
  padding-top: 0.15rem;
  width: clamp(95px, 6vw, 110px);
  display: block;
}

/* hamburger mobile */

.header-hamburger {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* mobile menu panel */

#mobileNavigation {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 600px;
  height: 100vh;
  height: 100dvh;
  background: white;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.77, 0, 0.18, 1);
  z-index: 999;
  padding: 120px 40px 40px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

#mobileNavigation.open {
  transform: translateX(0);
}

/* mobile menu */

.mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 10vh;
}

.mobile-menu li a {
  display: block;
  padding: 0.8rem 0;
  font-size: 18px;
  font-family: var(--font-2);
  text-decoration: none;
  color: var(--second-color);
  border-bottom: 0;
}

.mobile-menu li a:hover {
  color: var(--first-color);
}

/* submenu nascosto */

.mobile-menu .sub-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;

  list-style: none;
  margin: 0;
  padding: 120px 40px 40px;
  box-sizing: border-box;

  transform: translateX(100%);
  transition: transform 0.35s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

/* submenu aperto */

.mobile-menu .sub-menu.open {
  transform: translateX(0);
}

/* freccia destra */

.mobile-menu li.menu-item-has-children>a {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-menu li.menu-item-has-children>a {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.submenu-toggle {
  margin-left: auto;
  color: var(--first-color);
  font-size: 14px;
}

#mobileNavigation .mobile-menu .sub-menu li a {
  display: block;
  padding: 0.5rem 0;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  font-family: var(--font-2);
  border-bottom: 0;
}

#mobileNavigation .sub-menu li:last-child a {
  margin-top: 1.5rem;
  border-bottom: 0;
  padding-top: 0.8rem;
  font-weight: 500;
  border-top: 1px solid var(--gray-border);
}

/* freccia */

#mobileNavigation .sub-menu li:last-child a::after {
  content: "\f054";
  font-family: FontAwesome;
  position: relative;
  right: 0;
  font-size: 15px;
  padding-left: 200px;
}

/* bottone back */

.submenu-back {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--first-color);
  font-size: 16px;
  font-family: var(--font-2);
  font-weight: 600;
  margin-bottom: 20px;
  cursor: pointer;
  border-bottom: 0;
  padding-bottom: 10px;
}

.submenu-back i {
  color: var(--first-color);
  font-size: 16px;
}

/* ############################################### */
/* media query */
/* ############################################### */

@media (min-width: 850.01px) {
  #menuDesktop {
    display: block;
  }

  #menuMobile {
    display: none;
  }

  main {
    padding-top: clamp(6rem, 8vw, 7rem);
  }
}

@media screen and (min-width: 850.01px) and (max-width: 1400px) {

  .menu-desktop .sub-menu {
    left: 0%;
  }

  .menu-desktop {
    flex-wrap: wrap;
    align-items: end !important;
    justify-content: flex-end !important;
    row-gap: 6px;
    padding-right: 3%;
  }

  main {
    padding-top: 7rem;
  }

  .header-logo img {
    height: 70%;
    position: relative;
    top: 30%;
  }

  .menu-desktop>li {
    width: auto;
  }

}

/* ======================================
OVERLAY
====================================== */

#menuOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
  z-index: 998;
}

#menuOverlay.open {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 850px) {
  #menuDesktop {
    display: none;
  }

  #menuMobile {
    display: block;
  }

  main {
    padding-top: clamp(2rem, 1vw, 3rem);
  }

  #mobile-bar-icons {
    display: block;
  }
}

/* ############################################################################ */
/* MOBILE BAR */
/* ############################################################################ */

#mobile-bar-icons {
  position: fixed;
  width: 100%;
  display: none;
  bottom: 0px;
  z-index: 1000;
}

.mobile-bar-box {
  display: flex;
  align-items: center;
  background: var(--white-color);
  justify-content: flex-end;
  padding: 12px 24px;
  border-radius: var(--radius-base);
  /* ← effetto pill */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.mobile-icons {
  display: flex;
  gap: 0.35rem;
}

.mobile-icons a {
  color: var(--first-color);
  font-size: 20px;
  text-decoration: none;
}

.mobile-cta {
  white-space: nowrap;
  font-family: var(--font-2);
  letter-spacing: 0em;
  font-weight: 500;
  font-size: 14px !important;
  padding: 0.5rem 0.6rem;
  text-transform: uppercase;
}

/* ############################################################################ */
/* DESKTOP FLOATING ICONS */
/* ############################################################################ */

#desktop-floating-icons {
  position: fixed;
  right: 20px;
  bottom: 30px;
  z-index: 1000;
}

.desktop-icons {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* singolo bottone */

.desktop-icons a {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--white-color);
  color: var(--first-color);

  border-radius: var(--radius-base);

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);

  text-decoration: none;
  font-size: 18px;

  transition: all 0.25s ease;
}

/* hover */

.desktop-icons a:hover {
  transform: translateX(-4px);
}

/* CTA info */

.desktop-cta {
  background: var(--first-color) !important;
  color: var(--white-color) !important;
}

.desktop-cta i {
  color: var(--white-color);
}

@media (max-width: 850px) {
  #mobile-bar-icons {
    display: block;
  }

  #desktop-floating-icons {
    display: none;
  }
}


/* selettore lingue */

.lang-switcher {
  display: inline-flex;
  align-items: center;
}

.lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: default;
  padding: 4px 0px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  color: inherit;
  line-height: 1;
}

.lang-switcher__flag {
  display: block;
  border-radius: 50%;
  object-fit: cover;
  width: 20px;
  height: 20px;
}

.lang-switcher__label {
  letter-spacing: 0.05em;
}

.lang-switcher__chevron {
  display: block;
  transition: transform 0.2s ease;
}

.lang-switcher__btn[aria-expanded="true"] .lang-switcher__chevron {
  transform: rotate(180deg);
}