/* Base header layout */
.iw-header {
  position: relative;
  width: 100%;
}

.iw-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 18px;
  padding-right: 18px;
}

.iw-header__left {
  width: 100%;
}

.iw-logo {
  display: block;
  max-width: 100%;
}

.iw-logo img {
  max-height: 42px;
  width: auto;
  display: block;
  max-width: 100%;
}

.iw-logo--text {
  font-weight: 700;
  text-decoration: none;
}

.iw-header__center {
  display: flex;
  align-items: center;
  gap: 22px;
}

/* Rimuove marker */
.iw-header ul,
.iw-header li {
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.iw-header li::marker {
  content: none !important;
}

.iw-topnav {
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  gap: 18px;
}

.iw-topnav li {
  margin: 0;
  padding: 0;
}

.iw-topnav a {
  text-decoration: none;
  display: inline-block;
  padding: 8px 6px;
  color: #fff;
  font-family: 'Helvetica Now Display - Bold', Helvetica, Arial, Lucida, sans-serif;
  font-size: 16px;
}

.iw-topnav--solutions {
  border-radius: 0.5em;
  background-color: #e2e419;
}

.iw-topnav--solutions li a {
  padding: 8px 12px !important;
  color: #2d2d2d;
}

.iw-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.iw-lang {
  display: flex;
  align-items: center;
}

.iw-mobile-solutions {
  display: none;
  border: 0;
  background: #e2e419;
  color: #2d2d2d;
  padding: 10px 12px;
  border-radius: 0.5em;
  font-family: 'Helvetica Now Display - Bold', Helvetica, Arial, Lucida, sans-serif;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.iw-burger {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: inherit;
}

.iw-burger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: currentColor;
}

/* Overlay base */
.iw-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9999999 !important;
}

.iw-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.iw-overlay__top {
  display: flex;
  justify-content: flex-end;
  padding: 18px;
}

.iw-overlay__close {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: #e2e419;
  color: #2d2d2d;
  padding: 10px 14px;
  border-radius: 0.5em;
  cursor: pointer;
  font-size: 16px;
}

.iw-x {
  font-size: 25px;
  line-height: 1;
}

.iw-overlay__body {
  height: calc(95vh - 74px);
  display: block;
  padding: 0 18px 18px;
  background: rgba(0, 0, 0, 0.75);
}

.iw-overlay__body--two-cols {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  min-height: 0;
}

.iw-col {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.iw-col__title {
  margin: 0;
  padding: 16px 16px 12px;
  font-size: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.iw-primary-left,
.iw-primary-right {
  padding: 10px 10px 16px;
  overflow: auto;
  flex: 1;
}

/* Left column */
.iw-leftlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.iw-leftlist a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #2d2d2d;
  font-family: 'Helvetica Now Display - Bold', Helvetica, Arial, Lucida, sans-serif;
  font-size: 20px;
  transition: color 0.3s ease, background 0.3s ease;
}

.iw-leftlist a:hover {
  background: #2d2d2d;
  color: #fff;
}

.iw-leftlist a.is-active {
  background: #2d2d2d;
  color: #fff;
}

.iw-col--left,
.iw-col--right,
.iw-step {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

/* Right column submenu */
.iw-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.iw-sublist a {
  display: block;
  padding: 10px 10px;
  text-decoration: none;
  border-radius: 10px;
}

.iw-sublist a:hover {
  background: rgba(0, 0, 0, 0.05);
}

.iw-sublist-go {
  display: inline-block;
  padding: 14px 16px;
  border-radius: 10px;
  background: #2d2d2d;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

/* PRIMARY RIGHT grid */
.iw-primary-right .iw-sublist {
  height: 100%;
  display: grid;
  gap: 18px;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  grid-auto-flow: dense;
}

.iw-primary-right .iw-sublist > li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.iw-primary-right .iw-sublist > li::marker {
  content: none !important;
}

.iw-primary-right .iw-sublist > li > a {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-height: 220px;
  height: 100%;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 18px;
  color: #fff;
  z-index: 1;
  font-size: 45px !important;
}

.iw-primary-right .iw-sublist > li > a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.70), rgba(0,0,0,.05));
  z-index: -1;
}

.iw-primary-right .iw-sublist > li > a > span,
.iw-primary-right .iw-sublist > li > a {
  font-weight: 700;
  font-size: 28px;
  line-height: 1.1;
}

.iw-primary-right .iw-sublist > li > a.iw-no-bg {
  background: #111;
}

.iw-primary-right .iw-sublist.iw-count-1 {
  grid-template-columns: 1fr;
}

.iw-primary-right .iw-sublist.iw-count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.iw-primary-right .iw-sublist.iw-count-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.iw-primary-right .iw-sublist.iw-count-3 > li:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.iw-primary-right .iw-sublist.iw-count-3 > li:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.iw-primary-right .iw-sublist.iw-count-3 > li:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.iw-primary-right .iw-sublist.iw-count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.iw-primary-right .iw-sublist.iw-count-many {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Solutions desktop: multi-colonna */
.iw-steps {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.iw-step {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.iw-steplist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.iw-steplist a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #2d2d2d;
  font-family: 'Helvetica Now Display - Bold', Helvetica, Arial, Lucida, sans-serif;
  font-size: 20px;
  transition: color 0.3s ease, background 0.3s ease;
}

.iw-steplist a:hover {
  background: #2d2d2d !important;
  color: #fff !important;
}

.iw-step__head {
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.iw-step__title {
  font-size: 14px;
  margin: 0;
}

.iw-back {
  border: 0;
  background: #2d2d2d;
  padding: 8px 12px;
  border-radius: 0.5em;
  cursor: pointer;
  color: #e2e419;
  font-family: 'Helvetica Now Display - Bold', Helvetica, Arial, Lucida, sans-serif;
  font-size: 15px;
}

.iw-step__body {
  padding: 10px;
  overflow: auto;
  flex: 1;
}

.iw-caret {
  opacity: 1;
  font-size: 30px;
  line-height: 1;
}

.iw-step__label {
  display: inline-block;
  min-width: 0;
}

/* Tablet / mobile */
@media screen and (max-width: 980px) {
  .iw-header__inner {
    gap: 10px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .iw-header__left {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }

  .iw-logo img {
    max-height: 25px;
  }

  .iw-header__center {
    display: none;
  }

  .iw-header__right {
    flex: 0 0 auto;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .iw-lang {
    flex: 0 0 auto;
  }

  .iw-mobile-solutions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 10px 10px;
    font-size: 13px;
  }

  .iw-burger {
    display: inline-block;
    color: #e2e419 !important;
    flex: 0 0 auto;
    vertical-align: middle;
  }

  .iw-burger span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px 0;
  }
}

@media screen and (max-width: 640px) {
  .iw-lang {
    display: none;
  }
}

/* Mobile overlays */
@media (max-width: 980px) {
  .iw-overlay {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.92);
    overflow: hidden;
    z-index: 9999999 !important;
  }

  .iw-overlay__top {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.92);
    padding: 16px 18px;
    flex-shrink: 0;
  }

  .iw-overlay__body {
    height: auto;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0 18px 24px;
    background: rgba(0, 0, 0, 0.92);
  }

  .iw-overlay__body--two-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 0;
  }

  .iw-col {
    height: auto;
    min-height: auto;
    overflow: visible;
    border-radius: 14px;
  }

  .iw-primary-left,
  .iw-primary-right,
  .iw-step__body {
    overflow: visible;
    flex: initial;
    max-height: none;
    padding-bottom: 12px;
  }

  .iw-leftlist a,
  .iw-steplist a {
    font-size: 18px;
    padding: 14px 12px;
  }

  .iw-primary-right .iw-sublist,
  .iw-primary-right .iw-sublist.iw-count-1,
  .iw-primary-right .iw-sublist.iw-count-2,
  .iw-primary-right .iw-sublist.iw-count-3,
  .iw-primary-right .iw-sublist.iw-count-4,
  .iw-primary-right .iw-sublist.iw-count-many {
    display: block;
    height: auto;
    grid-template-columns: none;
    grid-template-rows: none;
  }

  .iw-primary-right .iw-sublist > li,
  .iw-primary-right .iw-sublist.iw-count-3 > li:nth-child(1),
  .iw-primary-right .iw-sublist.iw-count-3 > li:nth-child(2),
  .iw-primary-right .iw-sublist.iw-count-3 > li:nth-child(3) {
    grid-column: auto !important;
    grid-row: auto !important;
    margin-bottom: 12px !important;
  }

  .iw-primary-right .iw-sublist > li:last-child {
    margin-bottom: 0 !important;
  }

  .iw-primary-right .iw-sublist > li > a {
    min-height: 160px;
    height: auto;
    width: 100%;
    font-size: 22px !important;
    padding: 16px;
  }

  .iw-primary-right .iw-sublist > li > a > span,
  .iw-primary-right .iw-sublist > li > a {
    font-size: 22px !important;
    line-height: 1.15;
  }

  /* Solutions mobile: un solo step */
  .iw-steps {
    display: block;
    height: auto;
  }

  .iw-step {
    height: auto;
    min-height: auto;
  }

  .iw-step.is-entering {
    animation: iwStepFade 0.18s ease;
  }

  @keyframes iwStepFade {
    from {
      opacity: 0;
      transform: translateX(10px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .iw-col--left,
  .iw-col--right,
  .iw-step {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  }

  .iw-overlay__body::after {
    content: "";
    display: block;
    height: 28px;
  }
}