/* HERO AEREOPORTO FIX POSITION basato su larghezza reale finestra */
@media (max-width: 60em) {
  div[data-cms-content-id='139'] .hero__image {
    object-position: 8% center !important;
  }
  div[data-cms-content-id='148'] .hero__image {
    object-position: 4% center !important;
  }
  div[data-cms-content-id='151'] .hero__image {
    object-position: left !important;
  }
  .menubar-button {
    display: block;
  }
}

/* MOBILE */
@media (max-width: 767px) {
  main {
    margin-top: 1em;
  }
  .menu__item,
  .menu__link {
    pointer-events: auto !important;
  }
  .menubar.attribute-fixed .menubar-button__text {
    color: white;
  }
  .c-cms--root.is-header-menu-open .menubar .menubar-button {
    border-bottom-left-radius: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.998);
    border-bottom: 1px solid rgba(255, 255, 255, 0.998);
  }
  .c-cms--root.is-header-menu-open .menubar .menubar-button {
    background-color: crimson;
  }
  .is-header-menu-open .menubar.attribute-fixed .menubar__bar {
    background-color: unset !important;
  }

  .hero--header .hero__images {
    height: 50vh;
  }

  .infobar {
    background-color: #00a4dc;
  }

  .infobar__separator {
    color: white;
  }

  .infobar__link {
    background-color: unset;
    border: none;
    border-radius: none;
    backdrop-filter: none;
    padding: unset;
    min-height: unset;
  }

  .infobar__list {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .infobar__item {
    flex: 1 1 0;
    text-align: center;
  }

  .menubar-button__link,
  .infobar__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.64rem;
    text-decoration: none;
  }

  .infobar__icon img {
    width: 20px; /* icona */
    margin-bottom: 2px;
  }

  .menubar-button__link--open .menubar-button__text:first-child {
    font-size: 1rem;
  }
  .menubar-button__text,
  .infobar__text {
    font-size: 0.7rem;
    white-space: nowrap;
    color: #fff;
    font-weight: normal !important;
  }

  .is-menubar-fixed .menubar-button__link--open .menubar-button__text {
    color: #00a4dc;
    text-shadow: unset;
  }

  .menu--header .menu__text,
  .menu--header .menu__item.a-cms-content-current .menu__text,
  .menu--header .menu__item.is-header-menu-item-active .menu__text,
  .menu--header .menu__link:not(:active):hover .menu__text,
  .menu--header .menu__item.is-header-menu-item-active .menu__text,
  .menu--header .submenu .submenu__item.a-cms-content-current .submenu__text,
  .menu--header .submenu .submenu__text {
    color: white !important;
  }
  .menu--header .menu__item.a-cms-content-current .menu__text {
    font-weight: bolder;
  }
  .c-cms--root:not(.is-header-menu-open) .menubar:not(.attribute-fixed) .menubar-button,
  .c-cms--root.is-header-menu-open .menubar:not(.attribute-fixed) .menubar-button {
    border-bottom-left-radius: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.998);
    border-bottom: 1px solid rgba(255, 255, 255, 0.998);
  }

  .menubar.attribute-fixed .menubar__bar {
    height: 50px;
  }
  .logo--menubar .logo__image {
    font-size: 3rem;
    transition: all 0.2s;
  }
  .c-webcam-cta,
  .newsletter-cta--header,
  .contatti-cta--header,
  .map-cta--header {
    display: none;
  }

  main .article {
    margin-left: 1em;
    margin-right: 1em;
  }

  .c-form.c-form--contacts {
    margin-left: 1em;
    margin-right: 1em;
  }

  article[data-cms-content-id='1238'] .article__body {
    margin-top: 1rem !important;
  }
  .article--cards .article__images .article__images-content {
    gap: 0;
  }
  .article--upright
    .article__body
    .article__main
    .article__content
    .article__text
    .article__text-content
    .article__header {
    margin-bottom: 0.5rem;
  }
  .article--upright .article__title {
    font-size: calc(1.2rem + 2.4vw);
  }
  .article--upright .article__subtitle {
    margin-top: 0.5em;
    font-size: 1.2rem;
  }
  .conditions-list {
    margin: 1rem;
  }

  .article--regular .article__body .article__main .article__content {
    flex-flow: column nowrap !important;
    gap: 1em;
  }

  .asiagoit-embed-webcam__iframe {
    margin-left: unset;
    min-width: 100% !important;
  }

  .all-news-container {
    margin-top: unset;
  }

  /* meteo */
  .meteo-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px;
  }

  .meteo-card .meteo-header .meta {
    display: block;
    font-size: 0.8rem;
  }

  .meteo-card .forecast-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .meteo-card .forecast-list {
    display: flex;
    gap: 6px;
    min-width: max-content; /* evita che si comprimano troppo */
  }

  .meteo-card .forecast-list li {
    flex: 0 0 auto;
    min-width: 70px;
    padding: 6px 4px;
  }

  .meteo-card .f-weekday {
    font-size: 0.8rem;
  }

  .meteo-card .f-temps {
    font-size: 0.8rem;
  }
  .meteo-card .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .meteo-card .meteo-table {
    min-width: 700px; /* o 650/750, vedi cosa rende meglio */
    font-size: 0.8rem;
  }

  .meteo-card .meteo-table th,
  .meteo-card .meteo-table td {
    padding: 4px 4px;
    white-space: wrap;
  }
  .bar {
    flex: 0 0 40px;
  }

  .meteo-card .barwrap span {
    font-size: 0.7rem;
    text-wrap: nowrap;
  }

  /* forms */
  .c-form--hero {
    z-index: unset;
  }
  .c-form--hero.is-form-step-1 .c-form-subgroup__main {
    flex-flow: column !important;
  }
  .c-form--hero.is-form-step-1 .c-form-subgroup__main .a-form-item-type-textbox,
  .c-form--hero.is-form-step-1 .c-form-subgroup__main .a-form-item-type-button {
    width: unset;
  }
  .c-form--hero.is-form-step-1
    .c-form-subgroup__main
    .a-form-item-type-button
    .c-form-input__field {
    color: white;
  }
  #a-form-field-id-52_4 {
    padding: 10px 20px !important;
  }

  /* news */
  .top-news {
    margin-top: -190px !important;
  }
  .article-list--main .article-list__item {
    width: 100%;
  }
  .article-list--main .article-list__list {
    flex-flow: column;
  }
  .all-news-container #article-list-content-events-site .article-list__item {
    width: unset !important;
  }

  /* articoli */
  article[data-cms-content-id='7'] .article__images {
    width: 250px;
  }
  article[data-cms-content-id='1200'] .article__copy::before,
  article[data-cms-content-id='1222'] .article__copy::before,
  article[data-cms-content-id='1236'] .article__copy::before {
    top: 37px;
    height: 4rem;
    transform: rotate(60deg);
    left: 5em;
  }
  article[data-cms-content-id='1200'] .article__copy::after,
  article[data-cms-content-id='1222'] .article__copy::after,
  article[data-cms-content-id='1236'] .article__copy::after {
    top: 9.5em;
    height: 4rem;
    transform: rotate(-60deg);
    left: 6em;
  }
  article[data-cms-content-id='1222'] .article__copy::before,
  article[data-cms-content-id='1222'] .article__copy::after,
  article[data-cms-content-id='1236'] .article__copy::after {
    left: 10em;
  }
  article[data-cms-content-id='1200'] .article__copy .article__title.u-align-content-inline-center {
    font-size: 7vw;
  }
  article[data-cms-content-id='1201'].article--regular.attr-band {
    height: 30em;
    margin-bottom: 2em !important;
  }
  article[data-cms-content-id='1198'] .article__copy::before {
    margin-right: 230px;
    position: absolute;
    top: 1rem;
  }
  article[data-cms-content-id='1198'] .article__copy::after {
    margin-left: -30px;
    position: absolute;
    top: 1rem;
  }
  article[data-cms-content-id='1198'] .article__copy .cms-collapse-btn {
    display: none;
  }
  article[data-cms-content-id='1238'] .buttons.u-align-center {
    text-align: center;
  }
  article[data-cms-content-id='1238'] .buttons .button--primary {
    margin-top: 1rem;
  }
  article[data-cms-content-id='148'] .hero--header.hero__image {
    width: 50%;
  }
  article[data-cms-content-id='1200'] .article__copy::before,
  article[data-cms-content-id='1222'] .article__copy::before,
  article[data-cms-content-id='1236'] .article__copy::before {
    top: -20px;
    height: 4rem;
    transform: rotate(60deg);
    left: 5em;
  }

  article[data-cms-content-id='1200'] .article__copy::after,
  article[data-cms-content-id='1222'] .article__copy::after,
  article[data-cms-content-id='1236'] .article__copy::after {
    top: -3.3em;
    height: 4rem;
    transform: rotate(-60deg);
    left: 36em;
  }

  article[data-cms-content-id='1222'] .article__copy::before,
  article[data-cms-content-id='1236'] .article__copy::after {
    left: 43em;
  }

  article[data-cms-content-id='1200'] .article__copy .article__title.u-align-content-inline-center {
    font-size: 4vw;
  }

  article[data-cms-content-id='1201'].article--regular.attr-band {
    height: 30em;
    margin-bottom: 2em !important;
  }

  article[data-cms-content-id='1198'] .article__copy::before {
    margin-right: 354px;
    position: absolute;
    top: -0.5rem;
  }

  article[data-cms-content-id='1198'] .article__copy::after {
    margin-right: 170px;
    position: absolute;
    top: -0.5rem;
  }

  article[data-cms-content-id='1198'] .article__copy .cms-collapse-btn {
    display: none;
  }

  article[data-cms-content-id='1238'] .buttons.u-align-center {
    text-align: center;
  }

  article[data-cms-content-id='1238'] .buttons .button--primary {
    margin-top: 1rem;
  }

  article[data-cms-content-id='148'] .hero--header.hero__image {
    width: 50%;
  }

  .article--cards
    .article__body
    .article__main
    .article__content
    .article__images
    .article__images-content
    .article__figure
    .article-figure__link
    .article-figure__picture
    .article-figure__image {
    height: unset;
  }

  .social-container {
    flex-direction: column;
    gap: 1em;
    margin-left: 1em;
    margin-right: 2em;
  }
  .social-list {
    flex-direction: column;
  }
  .social-list__link {
    gap: 0;
  }
  .social-list__item span {
    text-wrap: nowrap;
    font-size: 12px;
  }
  .footer-credits {
    margin-bottom: 3em;
  }
}

/* TABLET */
@media (min-width: 768px) and (max-width: 60em) {
  .logo--header {
    display: none !important;
  }
  main .article {
    margin-left: 10em;
    margin-right: 10em;
    overflow: hidden;
  }

  .infobar {
    position: fixed;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 20;
  }
  .infobar__icon img {
    width: 25px; /* icona */
    margin-bottom: 2px;
  }

  .is-menubar-fixed .menu--header .menu__text {
    text-shadow: none;
  }
  .menu__item,
  .menu__link {
    pointer-events: auto !important;
  }
  .menubar.attribute-fixed .menubar-button__text {
    color: white;
  }
  .is-menubar-fixed .menubar-button__link--open .menubar-button__text {
    color: #00a4dc;
    text-shadow: unset;
  }
  .c-cms--root.is-header-menu-open .menubar .menubar-button {
    border-bottom-left-radius: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.998);
    border-bottom: 1px solid rgba(255, 255, 255, 0.998);
  }
  .c-cms--root.is-header-menu-open .menubar .menubar-button {
    background-color: crimson;
  }
  .is-header-menu-open .menubar.attribute-fixed .menubar__bar {
    background-color: unset !important;
  }

  .infobar {
    padding: 8px 0;
    background-color: #00a4dc;
  }

  .infobar__separator {
    color: white;
  }

  .is-menubar-fixed .infobar .infobar__text {
    color: white !important;
    text-shadow: none;
    font-weight: bolder;
  }

  .is-menubar-fixed .infobar .infobar__icon {
    text-shadow: none;
  }

  .is-menubar-fixed .infobar .infobar__separator {
    color: white;
  }
  .is-menubar-fixed .infobar {
    background-color: #00a4dc;
  }

  .infobar__link {
    background-color: unset;
    border: none;
    border-radius: none;
    backdrop-filter: none;
    padding: unset;
    min-height: unset;
  }

  .infobar__list {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .infobar__item {
    flex: 1 1 0;
    text-align: center;
  }

  .menubar-button__link,
  .infobar__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.2rem;
    text-decoration: none;
  }

  .infobar__icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px #000;
  }

  .menubar-button__text,
  .infobar__text {
    font-size: 0.6rem;
    white-space: nowrap;
    color: #fff;
    font-weight: normal;
  }

  .menubar-button__link {
    padding: 1rem;
  }

  .menu--header .menu__text,
  .menu--header .menu__item.a-cms-content-current .menu__text,
  .menu--header .menu__item.is-header-menu-item-active .menu__text,
  .menu--header .menu__link:not(:active):hover .menu__text,
  .menu--header .menu__item.is-header-menu-item-active .menu__text,
  .menu--header .submenu .submenu__item.a-cms-content-current .submenu__text,
  .menu--header .submenu .submenu__text {
    color: white !important;
  }

  .menu--header .menu__item.a-cms-content-current .menu__text {
    font-weight: bolder;
  }

  .c-cms--root:not(.is-header-menu-open) .menubar:not(.attribute-fixed) .menubar-button,
  .c-cms--root.is-header-menu-open .menubar:not(.attribute-fixed) .menubar-button {
    border-bottom-left-radius: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.998);
    border-bottom: 1px solid rgba(255, 255, 255, 0.998);
  }

  .menubar.attribute-fixed .menubar__bar {
    height: 50px;
    box-shadow: none;
  }

  .logo--menubar .logo__image {
    font-size: 3rem;
    transition: all 0.2s;
  }

  .c-webcam-cta,
  .newsletter-cta--header,
  .contatti-cta--header,
  .map-cta--header {
    display: none;
  }

  main .article {
    margin-left: 1em;
    margin-right: 1em;
  }

  .c-form.c-form--contacts {
    margin-left: 1em;
    margin-right: 1em;
  }

  .article--cards
    .article__body
    .article__main
    .article__content
    .article__images
    .article__images-content
    .article__figure
    .article-figure__link
    .article-figure__picture
    .article-figure__image {
    height: unset;
  }

  .conditions-list {
    margin: 1rem;
  }

  .asiagoit-embed-webcam__iframe {
    margin-left: unset;
    min-width: 100% !important;
  }

  .meteo-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px;
  }

  .meteo-card .meteo-header .meta {
    display: block;
    font-size: 0.8rem;
  }

  .meteo-card .forecast-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .meteo-card .forecast-list {
    display: flex;
    gap: 6px;
    min-width: max-content;
  }

  .meteo-card .forecast-list li {
    flex: 0 0 auto;
    min-width: 70px;
    padding: 6px 4px;
  }

  .meteo-card .f-weekday {
    font-size: 0.8rem;
  }

  .meteo-card .f-temps {
    font-size: 0.8rem;
  }

  .meteo-card .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .meteo-card .meteo-table {
    min-width: 700px;
    font-size: 0.8rem;
  }

  .meteo-card .meteo-table th,
  .meteo-card .meteo-table td {
    padding: 4px 4px;
    white-space: wrap;
  }

  .bar {
    flex: 0 0 40px;
  }

  .meteo-card .barwrap span {
    font-size: 0.7rem;
    text-wrap: nowrap;
  }

  /* forms */
  .c-form--hero {
    z-index: unset;
  }

  .c-form--hero.is-form-step-1 .c-form-subgroup__main .a-form-item-type-textbox,
  .c-form--hero.is-form-step-1 .c-form-subgroup__main .a-form-item-type-button {
    width: unset;
  }

  .c-form--hero.is-form-step-1
    .c-form-subgroup__main
    .a-form-item-type-button
    .c-form-input__field {
    color: white;
  }

  #a-form-field-id-52_4 {
    padding: 10px 20px !important;
  }

  .top-news {
    margin-top: -220px !important;
  }

  .article-list--main .article-list__list {
    flex-flow: row wrap;
  }

  .article-list--main .article-list__item {
    width: 50%;
  }

  .all-news-container #article-list-content-events-site .article-list__item {
    width: unset !important;
  }

  /* footer */
  footer .social-container {
    gap: 1em;
    margin-left: 1em;
    margin-right: 2em;
  }

  footer .social-list__link {
    gap: 0;
  }

  .social-list__item span {
    text-wrap: nowrap;
    font-size: 12px;
  }
  .footer-credits {
    margin-bottom: 5em;
  }
}

/* 961px–60em: niente barra bianca, header “mobile” */
@media (max-width: 60em) {
  .header__text {
    height: 0;
  }

  .menu--header .submenu .submenu__link {
    background-color: #333;
  }

  .menubar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2;
  }

  .menubar.attribute-fixed .menubar__bar {
    box-shadow: none;
  }
}

@media (max-width: 1200px) {
  .article--cards
    .article__body
    .article__main
    .article__content
    .article__images
    .article__images-content
    .article__figure
    .article-figure__link
    .article-figure__text
    .article-figure__title:not(:empty) {
    font-size: 1.2rem;
  }
  article[data-cms-content-id='1200'] .article__copy::before,
  article[data-cms-content-id='1200'] .article__copy::after {
    display: none;
  }
}

/* @media (min-width: 1420px) {
  main .article {
    margin-left: 12vw;
    margin-right: 12vw;
    overflow: hidden;
  }
} */

.c-webcam-cta__container {
  padding: 0.2rem 0.4rem !important;
}
.c-webcam-cta {
  bottom: 0.5em !important;
  width: 220px !important;
}
.newsletter-cta--header {
  bottom: 3.5em !important;
  width: 190px !important;
}
.contatti-cta--header {
  bottom: 6.5em !important;
  width: 160px !important;
}
.map-cta--header {
  bottom: 9.5em !important;
  width: 130px !important;
}
.c-webcam-cta,
.newsletter-cta--header,
.contatti-cta--header,
.map-cta--header {
  padding-top: 0em !important;
  padding-bottom: 0em !important;
}
.c-webcam-cta__link {
  padding: 0 0.9rem 0 0 !important;
}
@media (min-width: 60.0625em) and (max-width: 1300px) {
  .logo--header {
    left: 3% !important;
  }

  .menu--header .menu__link {
    padding: 1em 0.5em;
  }

  .article--cards .article__images .article__images-content {
    gap: 0;
  }
  .c-form.c-form--hero.is-visible {
    transform: translateY(35px);
  }
  article[data-cms-content-id='37'] .article__body,
  article[data-cms-content-id='38'] .article__body,
  article[data-cms-content-id='152'] .article__body {
    margin-top: 5rem;
  }
}

/* LARGE DESKTOP */
@media (min-width: 1300px) {
  .menu--header .menu__link {
    padding: 1em;
  }
}

@media (min-width: 1600px) {
  .menu--header .menu__text {
    font-size: 1.3rem;
  }
  .menubar.attribute-fixed .logo--menubar .logo__image {
    font-size: 6rem;
  }

  .menu--header .menu__list {
    display: flex;
    justify-content: center;
    gap: 1em;
  }

  .menu--header .menu__link {
    padding: 1em;
  }
}

/* ===== FIX HERO FLICKITY su mobile (celle a 100% viewport) ===== */
@media (max-width: 960px) {
  /* assicura che l’area del carosello sia piena */
  .hero--header .hero__images.flickity-enabled,
  .hero--header .hero__images.flickity-enabled .flickity-viewport,
  .hero--header .hero__images.flickity-enabled .flickity-slider {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* FIX: evita shrink-to-fit degli IMG assoluti */
  .hero--header .hero__images.flickity-enabled .flickity-slider > img.hero__image {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;

    right: auto !important;
    bottom: auto !important;

    display: block !important;
    object-fit: cover !important;
  }
}
