@media (min-width: 1025px) {
  .header-container {
    z-index: 3;
    width: 100%;
    position: relative;

    header {
      display: flex;
    }

    .header-bar {
      display: none;
    }

    .header-menu-wrapper {
      display: flex;
      flex-direction: column;
      position: fixed;
      width: 100%;

      .menu-principal {
        z-index: 3;
        top: 0;
        left: 0;
        height: 40px;
        width: 100%;

        .region-primary-menu {
          background-color: var(--color-red);
          display: flex;
          justify-content: flex-end;
          overflow-y: visible;
          height: 40px;

          nav {
            &.menu--mini-nav-header {
              display: flex;
              align-items: center;
              position: absolute;
              right: 70px;
              background-color: var(--color-red);

              .menu {
                display: flex;
                justify-content: flex-end;
                align-items: center;
                width: 100%;
                margin: 0;
                list-style: none;
                padding-left: 0;

                .menu-item {
                  color: var(--color-white);
                  position: relative;
                  font-size: 14px;
                  font-weight: 500;
                  letter-spacing: 1px;
                  line-height: 16px;
                  text-transform: uppercase;
                  display: flex;

                  a {
                    color: var(--color-white);
                    text-decoration: none;
                    text-align: center;
                    white-space: nowrap;
                    padding: 12px 24px;
                    &:hover {
                      background-color: #aa1b17;
                    }
                  }

                  .is-active {
                    color: var(--color-white);
                    font-weight: 500;
                    text-decoration: none;
                  }

                  &::before {
                    background-color: var(--color-white);
                    content: "";
                    display: block !important;
                    height: calc(100% - 10px);
                    left: 0;
                    opacity: 0.4;
                    position: absolute;
                    top: 5px;
                    width: 1px;
                  }
                }
              }
            }

            &.menu--mini-nav-principal {
              width: 100%;
              display: flex;
              align-items: center;

              .menu {
                display: flex;
                justify-content: start;
                align-items: center;
                padding: 0;
                margin: 0;
                list-style: none;

                .menu-item {
                  color: var(--color-white);

                  position: relative;
                  font-size: 14px;
                  font-weight: 500;
                  letter-spacing: 1px;
                  line-height: 16px;
                  text-transform: uppercase;
                  text-decoration: none;

                  a {
                    color: var(--color-white);
                    text-decoration: none;
                    white-space: nowrap;
                    padding: 11px 24px;

                    &:hover {
                      background-color: #aa1b17;
                    }
                  }

                  &.menu-item--active-trail {
                    a {
                      background-color: #aa1b17;
                    }
                  }
                }
              }
            }
          }

          .block-dropdown-language {
            .language-select {
              display: flex;
              flex-direction: row;
              align-items: center;
              position: relative;
              overflow: visible;
              cursor: pointer;
            }

            .dropbutton-wrapper {
              display: flex;
              overflow-y: visible;
              height: 40px;

              .dropbutton-widget {
                background: transparent;
                border: none;
                padding-right: 0;

                .dropdown-language-item {
                  display: block;
                  font-size: 14px;
                  font-weight: 500;
                  letter-spacing: 1px;
                  line-height: 16px;
                  margin: 0;
                  min-width: auto;
                  text-align: left;
                  text-transform: uppercase;
                  color: var(--color-white);
                  background-color: var(--color-red);

                  .dropbutton-action {
                    padding: 12px 24px;
                    border: none;

                    .language-link {
                      padding: 0;
                    }

                    &:hover {
                      background-color: #aa1b17;
                    }

                    &.secondary-action {
                      padding: 0;

                      a {
                        padding: 12px 24px;
                        color: var(--color-white);
                        text-align: center;
                        margin: 0;
                      }
                    }
                  }

                  .dropbutton-toggle {
                    button {
                      display: none;
                    }
                  }

                  .js .dropbutton-multiple .dropbutton-widget {
                    padding-right: unset;
                  }

                  &:before {
                    background-color: var(--color-white);
                    content: "";
                    display: block !important;
                    height: calc(100% - 10px);
                    left: 0;
                    opacity: 0.4;
                    position: absolute;
                    top: 5px;
                    width: 1px;
                  }
                }
              }
            }
          }

          .block-dropdown-language {
            .dropbutton-toggle:has(button > .dropbutton-arrow) {
              display: none;
            }

            .dropdown-language-item .hidden {
              display: none;
            }

            .dropdown-language-item.open .secondary-action {
              display: block;
            }

            .arrow-up-down-arrow {
              transition: transform 0.25s ease;
            }

            .arrow-up-down {
              position: absolute;
              right: 0;
              top: 1.25rem;
              transform: translateY(-50%);
              pointer-events: auto;
            }

            .arrow-up-down-arrow {
              transition: transform 0.25s ease;
            }

            .arrow-rotated {
              transform: rotate(180deg);
            }
          }
        }
      }

      .menu-secundario {
        width: 100%;
        position: relative;

        .region-secondary-menu {
          display: flex;
          align-items: center;
          backdrop-filter: blur(10px);
          background-color: rgba(32, 37, 43, 0.63);
          box-shadow: none;
          position: relative;
          z-index: 2;
          padding: 0;
          width: 100%;
          height: 72px;
          font-weight: bold;
          color: var(--color-white);

          a {
            width: fit-content;

            .white-logo {
              width: 170px;
              height: 24px;
              display: block;
            }
          }

          .lion-logo {
            display: none;
          }

          &:hover {
            background-color: var(--color-white);
            box-shadow: inset 0 -1px 0 0 var(--color-gray);

            .logo-header {
              .white-logo {
                display: none;
              }

              .color-logo {
                width: 170px;
                height: 24px;
                display: block;
                opacity: 1;
              }
            }

            .menu-link--icon::before {
              background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23C21B17'%3E%3Cpath d='m23.64 21.16-5.91-5.92.2-.28c1-1.57 1.52-3.37 1.52-5.22C19.45 4.37 15.09 0 9.73 0 4.36 0 0 4.37 0 9.74s4.36 9.74 9.72 9.74c1.88 0 3.71-.54 5.29-1.57l.26-.18 5.9 5.91c.24.24.56.36.88.36.32 0 .64-.12.89-.37l.7-.72c.48-.48.48-1.27 0-1.75ZM16.97 9.73c0 1.93-.75 3.75-2.12 5.12a7.177 7.177 0 0 1-5.12 2.12c-1.93 0-3.75-.75-5.12-2.12A7.268 7.268 0 0 1 2.5 9.73c0-1.93.75-3.75 2.12-5.12a7.218 7.218 0 0 1 5.12-2.12c1.93 0 3.75.75 5.12 2.12a7.184 7.184 0 0 1 2.11 5.12Z'/%3E%3C/svg%3E") !important;
            }

            li,
            a {
              color: var(--color-black);
            }

            nav.menu--main {
              .menu {
                .menu-item {
                  .menu-link {
                    color: var(--color-gray-darker3);
                  }
                }
              }
            }

            .menu-arrow {
              &:after {
                color: #333333;
              }
            }

            .block-search {
              .icon--search:before {
                color: #c21b17;
              }
            }
          }

          nav.menu--main {
            display: flex;
            justify-content: flex-start;
            width: calc(80% - 72px);
            height: 72px;

            .menu {
              display: flex;
              width: -webkit-fill-available;
              list-style: none;
              margin-left: 200px;
              margin-right: 32px;
              margin: 0;
              overflow-y: hidden;
              padding: 0 16px;
              align-items: center;
              scrollbar-width: none;
              height: 100%;

              .submenu-toggle {
                display: none;
              }

              .menu-item--icon {
                margin-left: auto;
                height: 100%;
                display: flex;
                align-items: center;

                .menu-link--icon {
                  padding: 0 16px;
                  height: 72px;
                  display: flex;
                  align-items: center;
                  justify-content: center;

                  &::before {
                    content: "";
                    display: block;
                    width: 24px;
                    height: 24px;
                    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23FFF'%3E%3Cpath d='m23.64 21.16-5.91-5.92.2-.28c1-1.57 1.52-3.37 1.52-5.22C19.45 4.37 15.09 0 9.73 0 4.36 0 0 4.37 0 9.74s4.36 9.74 9.72 9.74c1.88 0 3.71-.54 5.29-1.57l.26-.18 5.9 5.91c.24.24.56.36.88.36.32 0 .64-.12.89-.37l.7-.72c.48-.48.48-1.27 0-1.75ZM16.97 9.73c0 1.93-.75 3.75-2.12 5.12a7.177 7.177 0 0 1-5.12 2.12c-1.93 0-3.75-.75-5.12-2.12A7.268 7.268 0 0 1 2.5 9.73c0-1.93.75-3.75 2.12-5.12a7.218 7.218 0 0 1 5.12-2.12c1.93 0 3.75.75 5.12 2.12a7.184 7.184 0 0 1 2.11 5.12Z'/%3E%3C/svg%3E");
                    background-repeat: no-repeat;
                    background-size: contain;
                  }
                }
              }

              .menu-item {
                position: relative;
                height: 100%;
                display: flex;

                .menu-link {
                  padding: 16px;
                  color: var(--color-white);
                  text-decoration: none;
                  text-transform: uppercase;
                  display: flex;
                  align-items: center;
                  letter-spacing: 1px;
                  white-space: nowrap;
                }

                a.menu-link:not([href]) {
                  cursor: default;
                }

                .submenu .submenu-item {
                  &.hidden_dropdown_Item,
                  &.hidden_dropdown,
                  &.hidden_dropdown_link {
                    display: none;
                  }
                }

                .submenu--lvl2 {
                  display: none;
                  position: fixed;
                  top: 72px;
                  left: 0;
                  width: -webkit-fill-available;
                  background-color: var(--color-white);
                  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
                  height: 550px;
                  overflow-y: hidden;
                  padding: 40px calc(50% - 35rem) 60px;
                  z-index: 3200;

                  &::before {
                    content: "";
                    position: absolute;
                    top: 45px;
                    bottom: 60px;
                    left: calc(50% - 35rem + 350px);
                    width: 1px;
                    background-color: #ccc;
                  }

                  .submenu-item {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    width: 350px;
                    font-size: 13px;
                    color: var(--color-body);
                    cursor: pointer;

                    &:has(> ul) > .menu-link {
                      position: relative;
                      padding-left: 30px;

                      &::after {
                        display: inline-block;
                        height: 20px;
                        background-size: contain;
                        background-repeat: no-repeat;
                        vertical-align: middle;
                        font-family: "GeneraliIcons";
                        content: "\e910";
                        font-size: 1.5rem;
                        color: #c21b17;
                        font-weight: 300;
                        line-height: 20px;
                      }
                    }

                    .menu-link {
                      text-decoration: none;
                      flex-grow: 1;
                      display: flex;
                      justify-content: space-between;
                      align-items: center;
                      color: var(--color-gray-darker);
                      font-size: 14px;
                      font-weight: 700;
                      height: auto;
                      letter-spacing: 1px;
                      margin: 0;
                      padding: 12px 16px 12px 30px;
                      line-height: 20px;
                      width: auto;
                      white-space: normal;

                      &:hover {
                        color: var(--color-red);
                      }
                    }

                    &:hover {
                      .submenu--lvl3 {
                        display: block;
                      }
                    }

                    .submenu--lvl3 {
                      display: none;
                      left: 0;
                      margin-bottom: 60px;
                      margin-left: calc(50% - 35rem + 350px);
                      margin-top: 45px;
                      height: calc(100% - 105px);
                      position: absolute;
                      top: 0;
                      width: 351px;
                      padding: 0;
                      z-index: 140;
                      border-left: 1px solid var(--color-gray);
                      border-right: 1px solid var(--color-gray);
                      box-shadow: none;

                      .submenu-item {
                        position: unset;
                        top: 45px;
                        width: 348px;
                        max-height: 550px;
                        background: var(--color-white);
                        padding: 0;

                        .menu-link {
                          border-right: 0;
                          color: var(--color-gray-darker3);
                          font-size: 16px;
                          font-weight: 500;
                          letter-spacing: 0;
                          padding: 12px 16px 12px 30px;
                          text-transform: none;
                          width: auto;
                          white-space: normal;

                          &:hover {
                            color: var(--color-red);
                          }
                        }

                        &:hover {
                          display: block;
                        }

                        .submenu--lvl4 {
                          display: none;
                        }

                        &:hover {
                          .submenu--lvl4 {
                            display: block;
                            position: absolute;
                            top: 0;
                            left: 0;
                            width: 351px;
                            height: 100%;
                            margin-top: 0;
                            margin-left: calc(50% - 35rem + 735px);
                            background: var(--color-white);
                            border-left: 1px solid var(--color-gray);
                            border-right: 1px solid var(--color-gray);
                            z-index: 130;
                            padding: 0;
                            box-shadow: none;
                          }
                        }
                      }
                    }
                  }
                }

                &:hover {
                  &::before {
                    content: "";
                    background-color: var(--color-red);
                    bottom: 0;
                    display: block;
                    height: 4px;
                    left: 0;
                    position: absolute;
                    width: 100%;
                  }

                  .submenu--lvl2 {
                    display: block;
                    overflow-y: auto;
                    scrollbar-width: none;
                  }
                }
              }
            }
          }

          .block-search {
            width: 32px;
            height: 72px;
            display: flex;
            justify-content: center;
            align-items: center;
            position: absolute;
            margin: 0 16px;
            right: 23px;
            cursor: pointer;
            z-index: 1;
            right: 0;

            .icon--search:before {
              color: #fff;
            }

            &:hover {
              right: 0px;

              &::before {
                content: "";
                background-color: var(--color-red);
                bottom: 0;
                display: block;
                height: 4px;
                left: 0;
                position: absolute;
                width: 100%;
              }
            }
          }
        }
      }
    }
  }
}

@media (max-width: 1024px) {
  .header-container {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100svw;

    .header-menu-wrapper {
      display: none;
    }

    .header-buttons {
      display: flex;
      gap: 20px;
      padding-right: 16px;

      .search-link {
        background: transparent;
        border: none;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }

    #block-generali-homepagelink {
      display: none;
    }

    .logo-header {
      width: fit-content;
      margin: 0;

      .color-logo {
        display: block;
        opacity: 1;
      }
    }

    .header-bar {
      max-height: 56px;
      background-color: var(--color-white);
      display: flex;
      justify-content: space-between;
      padding: 16px;
      border-bottom: 1px solid var(--color-gray);

      .burger-btn {
        background: transparent;
        border: none;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .burger-icon {
        width: 24px;
        height: 24px;
        color: var(--color-red);
      }
    }

    &.menu-active {
      .header-menu-wrapper {
        display: flex;
        flex-direction: column-reverse;
        justify-content: flex-end;
        min-height: calc(100svh - 56px);
        background-color: var(--color-white-dark);

        .menu-principal {
          height: 49vh;

          .block-dropdown-language {
            display: none;
          }
        }

        .menu-secundario {
          height: auto;
          max-height: 42vh;
          overflow-y: auto;
          margin-top: 2vh;

          .block-search {
            display: none;
          }
        }
      }

      .menu {
        width: 100%;
        padding: 0;
        margin-bottom: 0;

        .menu-item,
        .submenu-item {
          background-color: var(--color-white);
          color: var(--color-gray-dark);
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          position: relative;
          list-style: none;

          .submenu-toggle {
            position: absolute;
            right: 0;
            top: 0;
            width: 53px;
            height: 53px;
            padding: 0;
            background-size: contain;
            border: none;
            cursor: pointer;
            transition: transform 0.3s ease;
            background: transparent;

            &::after {
              display: inline-block;
              background-size: contain;
              background-repeat: no-repeat;
              vertical-align: middle;
              font-family: "GeneraliIcons";
              content: "\e910";
              font-size: 1.5rem;
              color: #c21b17;
              font-weight: 300;
            }
          }

          &.open {
            border-bottom: 0px;

            > .submenu-toggle {
              transform: rotate(90deg);
            }

            > .submenu--lvl2,
            > .submenu--lvl3,
            > .submenu--lvl4 {
              max-height: 1000px;
              opacity: 1;
              pointer-events: auto;
              padding-left: 0;
            }

            > a.menu-link {
              border-bottom: 1px solid var(--color-gray);
            }
          }

          .submenu--lvl2,
          .submenu--lvl3,
          .submenu--lvl4 {
            display: block;
            width: 100%;
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            pointer-events: none;
            transition:
              max-height 0.3s ease,
              opacity 0.3s ease;

            .submenu-item {
              font-size: 14px;
              font-weight: 400;
              text-transform: none;
              list-style: none;
              position: relative;

              .submenu-toggle {
                position: absolute;
                right: 16px;
                top: 18px;
                width: 16px;
                height: 16px;
                background-size: contain;
                background-repeat: no-repeat;
                border: none;
                cursor: pointer;
                transition: transform 0.3s ease;
              }

              &.open {
                > .submenu-toggle {
                  transform: rotate(90deg);
                }

                > .submenu--lvl4 {
                  max-height: 1000px;
                  opacity: 1;
                  pointer-events: auto;
                }
              }

              .submenu--lvl4 {
                display: block;
                width: 100%;
                max-height: 0;
                overflow: hidden;
                opacity: 0;
                pointer-events: none;
                transition:
                  max-height 0.3s ease,
                  opacity 0.3s ease;

                .submenu-item {
                  padding: 12px 32px;
                  font-size: 14px;
                  font-weight: 400;
                  text-transform: none;

                  a {
                    color: var(--color-gray-dark);
                    text-decoration: none;

                    &:hover {
                      color: var(--color-red);
                    }

                    &::marker {
                      display: none;
                    }
                  }
                }
              }

              a {
                color: var(--color-gray-dark);
                text-decoration: none;
                height: 53px;

                &:hover {
                  color: var(--color-red);
                }
              }
            }
          }

          .submenu--lvl2 {
            .submenu-item {
              a {
                padding: 18px 16px 18px 32px;
                border-bottom: 1px solid var(--color-gray);
                background: var(--color-white-dark);
              }
            }
          }

          .submenu--lvl3 {
            .submenu-item {
              a {
                padding: 18px 16px 18px 48px;
                border-bottom: 1px solid var(--color-gray);
                background: var(--color-white);
              }

              .submenu--lvl4 {
                .submenu-item {
                  padding: 0;
                }
              }
            }
          }

          .submenu--lvl4 {
            .submenu-item {
              a {
                padding: 18px 16px 18px 48px;
                border-bottom: 1px solid var(--color-gray);
                background: var(--color-white);
              }
            }
          }
        }

        .menu-item {
          border-bottom: 1px solid var(--color-gray);

          &.menu-item--icon {
            display: none;
          }
        }

        .menu-item .menu-item--icon {
          display: none;
        }

        a {
          letter-spacing: 1px;
          line-height: 16px;
          text-decoration: none;
          color: var(--color-gray-dark);
          text-transform: uppercase;
          font-weight: 500;
          font-size: 14px;
          padding: 18px 16px;
        }
      }

      .burger-btn {
        &::before {
          background-image: url("data:image/svg+xml,%3Csvg width='24' height='16' viewBox='0 0 24 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='24' height='2' fill='%23C21B17'/%3E%3Crect y='7' width='24' height='2' fill='%23C21B17'/%3E%3Crect y='14' width='24' height='2' fill='%23C21B17'/%3E%3C/svg%3E");
        }
      }
    }

    .block-dropdown-language {
      display: flex;
      align-items: center;

      .language-select {
        display: flex;
        flex-direction: row;
        align-items: center;
        position: relative;
        overflow: visible;
      }

      .dropbutton-wrapper {
        .dropbutton-widget {
          padding-right: 0;
          .dropdown-language-item {
            .dropbutton-action {
              .language-link {
                color: var(--color-red);
              }
            }
          }
        }
      }
    }
  }
}

/* SELECTOR MOBILE AND DESKTOP*/
.block-dropdown-language {
  display: flex;
  align-items: center;

  .language-select {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    overflow: visible;
  }

  .dropbutton-wrapper {
    display: flex;
    overflow-y: visible;
    height: 40px;

    .dropbutton-widget {
      background: transparent;
      border: none;
      padding-right: 0;

      .dropdown-language-item {
        background-color: transparent;

        .dropbutton-action {
          padding: 12px 24px;
          border: none;

          .language-link {
            padding: 0;
            color: var(--color-white);
          }

          &.secondary-action {
            padding: 0;

            a {
              padding: 12px 24px;
              color: var(--color-red);
              text-align: center;
              margin: 0;
            }
          }
        }

        .dropbutton-toggle {
          button {
            display: none;
          }
        }

        .js .dropbutton-multiple .dropbutton-widget {
          padding-right: unset;
        }
      }
    }
  }
}

.block-dropdown-language {
  display: flex;
  align-items: center;

  .dropbutton-toggle:has(button > .dropbutton-arrow) {
    display: none;
  }

  .dropdown-language-item .hidden {
    display: none;
  }

  .dropdown-language-item.open .secondary-action {
    display: block;
  }

  .arrow-up-down-arrow {
    transition: transform 0.25s ease;
  }

  .arrow-up-down {
    position: absolute;
    right: 0;
    top: 1.5rem;
    transform: translateY(-50%);
    pointer-events: auto;
  }

  .arrow-up-down-arrow {
    transition: transform 0.25s ease;
  }

  .arrow-rotated {
    transform: rotate(180deg);
  }

  .arrow-up-down-mobile {
    display: none;
  }
}

@media screen and (max-width: 985px) {
  .arrow-up-down-mobile {
    display: flex !important;
  }

  .dropdown-language-item {
    color: #c22016 !important;
    background-color: #ffff !important;
  }
}

.main-menu-scroll {
  width: 100%;
  /* max-width: 80%; */
  display: flex;
  /* max-width: 1450px; */

  .menu {
    position: relative;
  }
}

.menu-arrow {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  position: relative;
  background: unset;
  border: none;
  cursor: pointer;

  &:before {
    color: #333333;
  }

  &:after {
    color: #fff;
  }
}

.menu-arrow.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.header-buttons {
  .block-search {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 1;

    .icon--search:before {
      color: #c21b17;
    }
  }
}

@media (max-width: 1024px) {
  .main-menu-scroll {
    .menu-arrow,
    .block-search {
      display: none;
    }
  }
}
