@media screen and (min-width: 768px) {
  .order-lg-1 {
    order: 1 !important;
  }

  .order-lg-2 {
    order: 2 !important;
  }
}

code {
  background-color: var(--color-secondary-3);
  padding: var(--space-2xs);
  border-radius: var(--border-radius-xs);
  font-size: var(--fs--2);
  display: block;
  margin-top: 1rem;
}

/* Swiper inside css grid*/
.swiper-outer-container:has(.swiper-blog-home),
.swiper-outer-container:has(.swiper-best-venues) {
  position: relative;

  @media screen and (min-width: 576px) {
    margin: calc(var(--space-s) * -1);
  }
}

.swiper-blog-home {
  padding: var(--space-xs) 8px var(--space-l) 8px;
  width: 80% !important;

  @media screen and (min-width: 1592px) {
    width: 90% !important;
  }
}

.swiper-best-venues {
  padding: var(--space-xs) 8px var(--space-l) 8px;
  width: 100% !important;

  .card__description,
  .card__title > a {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card__title {
    min-height: 100px;

    @media screen and (min-width: 992px) {
      font-size: calc(var(--fs-2) * 0.9);
    }
  }
}

.best-venues-bg {
  align-self: start;
  position: relative;

  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(var(--bs-gutter-x) * 0.5);
    width: calc(100% - var(--bs-gutter-x));
    height: 100%;
    background-color: var(--color-secondary-3);
    z-index: 0;

    @media (min-width: 768px) {
      width: calc(
        100vw - var(--bs-gutter-x) - ((100vw - var(--grid-max-width)) / 2)
      );
    }
  }

  & p {
    position: relative;
    z-index: 1;
  }
}

.ve-swiper-button-container {
  display: flex;
  font-size: var(--fs-3);
  justify-content: space-between;
  line-height: 1;
  position: relative;

  @media screen and (min-width: 768px) {
    font-size: var(--fs-4);
  }
}

.section-strengthen-connections {
  position: relative;
  padding-top: var(--space-l);

  & > .img-cover {
    height: calc(100% - var(--space-xl));
  }

  .section-strengthen-connections__content {
    position: relative;

    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: calc(100% - var(--space-xl));
      height: calc(100% - var(--space-xl));
      background-color: var(--color-secondary-3);
    }

    & > * {
      position: relative;
      z-index: 1;
    }

    &.section-strengthen-connections__content--right {
      @media screen and (max-width: 1200px) {
        padding-left: var(--space-l);
        padding-right: 0;
      }

      &::before {
        left: 0;

        @media screen and (min-width: 1200px) {
          left: auto;
          right: 0;
        }
      }

      .section-strengthen-connections__heading {
        margin-left: 0;

        @media screen and (min-width: 1200px) {
          margin-left: auto;
        }
      }
    }

    .section-strengthen-connections__heading {
      max-width: calc(100% - var(--space-xl) * 2);
    }
  }
}

.section-portfolio-outer {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  position: relative;

  &:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - var(--space-xl) * 2);
    background-color: var(--color-secondary-3);
    z-index: 0;
  }
}

.section-portfolio {
  display: grid;
  gap: var(--space-2xs);
  position: relative;
  z-index: 1;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;

  & > div:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  & > .ve-card:first-of-type {
    grid-column: 1;
    grid-row: 2;
  }

  /*.section-portfolio__cards-group {
    grid-column: 1;
    grid-row: 3;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xs);
  }*/

  /*@media (min-width: 768px) {
    .section-portfolio__cards-group {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto;
    }
  }*/

  @media (min-width: 992px) {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;

    & > div:first-child {
      grid-column: 1 / span 2;
    }

    & > .ve-card:first-of-type {
      grid-column: 2;
      grid-row: 1 / span 2;
    }

    .section-portfolio__cards-group {
      grid-column: 1;
      grid-row: 2;
      grid-template-columns: 1fr 1fr;
      grid-template-rows: auto;
    }
  }

  .ve-card {
    &.card--portfolio {
      aspect-ratio: initial;
      height: 100%;
      min-height: 16rem;
      position: relative;
      .card__media {
        aspect-ratio: initial;
        height: 100%;
        position: relative;
      }
    }
  }
}

.swiper-blog-home__arrows,
.swiper-feeedbacks-home__arrows {
  --diff: var(--grid-max-width-wider);

  left: calc((var(--diff) - 100%) / -2);
  position: absolute;
  transform: translate(0px, -50%);
  top: 21%;
  width: calc(100% + (var(--diff) - 100%));
  z-index: 999;
  padding: 0 30px;

  @media screen and (min-width: 992px) {
    top: 50%;
  }
}

.swiper-blog-home__arrows {
  padding: 0 30px;
  top: 100%;
  transform: translate(0px, 0px);

  @media screen and (min-width: 992px) {
    top: 50%;
    transform: translate(0px, -50%);
  }
}

.swiper-feeedbacks-home__arrows {
  --diff: var(--grid-max-width);
}

.detail-card-grid {
  display: grid;
  grid-template-columns: 1fr; /* default 2 colonne sotto i 992px */
  gap: var(--space-m);

  @media (min-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media (min-width: 992px) {
    grid-template-columns: repeat(3, 1fr);
  }

  @media (min-width: 1200px) {
    grid-template-columns: repeat(4, 1fr); /* 4 colonne sopra i 1200px */
  }

  &.team-grid {
    grid-template-columns: repeat(2, 1fr);

    @media (min-width: 992px) {
      grid-template-columns: repeat(3, 1fr);
    }

    @media (min-width: 1200px) {
      grid-template-columns: repeat(4, 1fr); /* 4 colonne sopra i 1200px */
    }
  }
}

.portfolio-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: var(--space-s);
  row-gap: var(--space-m);

  @media (min-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media (min-width: 1200px) {
    grid-template-columns: repeat(3, 1fr); /* 3 colonne sopra i 1200px */
  }
}

.hero-home {
  position: relative;
}

.img-cover {
  height: 30%;
  object-position: top center;

  @media screen and (min-width: 390px) {
    height: 40%;
  }

  @media screen and (min-width: 480px) {
    height: 50%;
  }

  @media screen and (min-width: 768px) {
    height: 60%;
  }
}

.hero-home__content {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  margin: 0 auto;
  min-height: 80dvh;
  padding-top: var(--space-xl);
  position: relative;

  @media screen and (min-width: 768px) {
    max-width: 70%;
    padding-top: var(--space-3xl);
  }

  @media screen and (min-width: 1200px) {
    max-width: 50%;
  }

  .hero-home__title {
    font-size: var(--fs-1);
    padding-bottom: var(--space-xl);

    @media screen and (min-width: 768px) {
      font-size: var(--fs-3);
      padding-bottom: var(--space-3xl);
    }
  }

  .hero-home__bottom {
    background-color: var(--white);
    border-top-left-radius: 9999px;
    border-top-right-radius: 9999px;
    padding: var(--space-m) var(--space-s) 0;

    @media screen and (min-width: 768px) {
      padding: var(--space-xl) var(--space-l) 0;
    }

    @media screen and (min-width: 1200px) {
      padding: var(--space-xl) var(--space-3xl) 0;
    }
  }

  .hero-home__bottom-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2xs);
    margin-top: var(--space-s);
    padding: var(--space-s);

    @media screen and (min-width: 576px) {
      padding: var(--space-s) var(--space-xl);
    }
    @media screen and (min-width: 1200px) {
      padding: 0;
    }
    @media screen and (min-width: 1400px) {
      margin-left: auto;
      margin-right: auto;
      max-width: 75%;
    }
    .hero-home__bottom-badges-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: var(--space-2xs);
    }

    .badge-home {
      background-color: var(--text-color);
      border-color: var(--text-color);
      color: var(--white);
      font-size: var(--fs--2);
      font-weight: 600;
      padding: var(--space-4xs) var(--space-2xs) var(--space-3xs);

      transition: all 0.3s ease;

      &:hover {
        background-color: var(--color-primary-3);
        border-color: var(--color-primary-3);
        text-decoration: none;
      }
    }
  }
}

.map-wrapper {
  max-width: 100%;
  svg {
    max-width: 100%;
  }

  .cls-6 {
    fill: var(--color-secondary-3);
  }

  g:has(.cls-6) {
    cursor: pointer;

    &:hover .cls-6 {
      fill: var(--color-primary-3);
    }
  }

  .pop-up-area {
    cursor: pointer;
    opacity: 0;
    visibility: hidden;

    &.color-inverted {
      path {
        fill: var(--text-color);
      }

      text {
        fill: var(--white);
      }
    }
  }

  .pop-up-area {
    transform-origin: center;
    transition: transform 0.3s ease;
    transform: scale(0.7); /* Dimensione base per mobile */
  }

  /* Responsive scaling */
  @media screen and (min-width: 480px) {
    .pop-up-area {
      transform: scale(1);
    }
  }

  @media screen and (min-width: 768px) {
    .pop-up-area {
      transform: scale(1.1);
    }
  }

  @media screen and (min-width: 1024px) {
    .pop-up-area {
      transform: scale(1.2);
    }
  }

  #popup-area-malpensa {
    transform-origin: 34% 0px;
  }

  #popup-area-linate {
    transform-origin: center right;
  }
}

#tooltip {
  display: none;
  width: max-content;
  position: absolute;
  top: 0;
  left: 0;
  background: var(--white);
  color: var(--text-color);
  font-weight: bold;
  padding: var(--space-2xs) var(--space-xs);
  border-radius: calc(var(--border-radius-xs) * 2);
  text-align: center;
  box-shadow: var(--depth-5);

  .tooltip-content {
    h6 {
      font-size: var(--fs--1);
    }
    span {
      font-size: var(--fs--2);
    }
  }
}

#arrow {
  position: absolute;
  background: var(--white);
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
}

.mobile-tooltip-alternative {
  display: none;
}

@media (min-width: 768px) {
  .mobile-only-slider .swiper-wrapper {
    display: block;
  }

  .mobile-only-slider .swiper-slide {
    width: 100% !important;
    margin-right: 0 !important;
  }

  .mobile-only-slider .ve-swiper-button-container {
    display: none;
  }
}

.filters {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-2xs);
  overflow-x: auto;
  padding-bottom: var(--space-2xs);

  @media screen and (min-width: 992px) {
    flex-wrap: wrap;
    overflow-x: initial;
  }

  & > a {
    flex-shrink: 0;
  }
}

.not-allowed {
  cursor: not-allowed;

  &:hover {
    cursor: not-allowed;
    text-decoration: none;
  }
}

/*** Fix Febbraio 2025 ***/

.referenza-content {
  h4 {
    border-bottom: 1px solid var(--color-primary-3);
    font-size: var(--fs-3);
    margin-bottom: var(--space-2xs);
    padding-bottom: var(--space-2xs);
  }

  h6 {
    font-family: var(--body-font-family);
    font-size: var(--fs-1);
    font-weight: 400;
    color: var(--color-primary-3);
    margin-bottom: var(--space-2xs);
    padding-top: var(--space-m);
  }
}

/*** Olimpics ***/

.swiper-blog-home .swiper-slide {
  height: auto;
}

.swiper-blog-home .swiper-slide .ve-card {
  height: 100%;
}

.swiper-blog-home .swiper-slide .ve-card .card__footer {
  margin-top: auto;
}

.olimpics-content section {
  padding: var(--space-xs) 0;
}

.olimpics-content .ve-card.card--horizontal .card__title {
  font-family: var(--heading-font-family);
  line-height: 1.35;
}

.olimpics-content .ve-card.card--horizontal .card__title::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin: var(--space-xs) 0 var(--space-s);
  background: var(--color-primary-3);
}

.olimpics-content .ve-card.card--horizontal .card__description {
  -webkit-line-clamp: initial;
  overflow: initial;
  text-overflow: initial;
}

.olimpics-content .ve-card.card--horizontal .card-inner {
  flex-direction: column;
}

.olimpics-content .ve-card.card--horizontal .card-inner .card__media {
  flex: 1 0 auto;
}

.olimpics-content .ve-card.card--horizontal .card-inner .card__content {
  flex: 1 0 auto;
}

@media screen and (min-width: 768px) {
  .olimpics-content .ve-card.card--horizontal .card-inner {
    flex-direction: row;
  }

  .olimpics-content .ve-card.card--horizontal .card-inner .card__media {
    flex: 1 0 33%;
  }

  .olimpics-content .ve-card.card--horizontal .card-inner .card__content {
    flex: 1 0 66%;
  }
}

.olimpics-content .faq-list details {
  border-top: 1px solid var(--color-primary-3);

  transition: all 0.3s ease-in-out;
}

.olimpics-content .faq-list details:hover {
  background-color: #e0e0e0;
  cursor: pointer;
}

.olimpics-content .faq-list details summary {
  align-items: center;
  display: flex;
  justify-content: space-between;

  transition: all 0.3s ease-in-out;
}

.olimpics-content .faq-list details summary span.arrow-icon {
  background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMyAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNSAxMEwwLjg3MDgzNSAwLjI1TDEyLjEyOTIgMC4yNDk5OTlMNi41IDEwWiIgZmlsbD0iIzM1MzUzNSIvPgo8L3N2Zz4K");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 13px;
  height: 10px;
  transition: all 0.3s ease-in-out;
}

.olimpics-content .faq-list details[open] summary span.arrow-icon {
  transform: rotate(180deg);
}

.olimpics-content .faq-list details summary::marker {
  display: none;
}

.olimpics-content .faq-list details[open] summary::marker {
  display: none;
}

.olimpics-content .faq-item > div {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s, opacity 0.4s;
}

.olimpics-content .faq-item.open > div {
  opacity: 1;
  max-height: 500px;
}

/*** Button added style ***/

button.button.button-small,
.button.button-small {
  font-size: var(--fs--1);
  padding: var(--space-2xs) var(--space-xs) var(--space-2xs);
}

