/*
  IAS — responsive alignment, Italian release candidate 1
  Load after site.css on every Italian and English page:
  <link rel="stylesheet" href="assets/mobile.css?v=20260924-it-mobile-rc1">

  This layer is intentionally additive: desktop styles from site.css are left intact.
*/

@media (max-width: 900px) {
  /* Keep the mobile header usable when the menu contains longer translated labels. */
  .mobile-nav:not([hidden]) {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .service-portholes {
    max-width: 680px;
  }

  .porthole-card {
    min-width: 0;
  }

  .porthole-caption {
    padding-inline: 18px;
  }

  .company-archive {
    max-width: 460px;
  }

  /* site.css defines the legal base rules after its first tablet block.
     Repeat the single-column layout here so the sidebar can never compress
     the policy copy on tablet or phone widths. */
  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .legal-aside,
  .legal-copy {
    min-width: 0;
  }

  .legal-aside {
    position: static;
  }

  .services-nav a,
  .detail-row,
  .detail-copy,
  .history-list li,
  .contact-grid > * {
    min-width: 0;
  }

  .history-storyline {
    top: 76px;
  }

  .leadership-people {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .leadership-people img,
  .leadership-people .leadership-team img {
    height: auto;
    object-fit: contain;
  }

  .company-founders .founder-daniela img {
    height: auto;
    object-fit: contain;
  }

  /* V7 Origini: keep both founder portraits in their complete native formats.
     This only applies after the desktop layout has already recomposed. */
  .company-origins-final-people {
    width: 100%;
    max-width: 460px;
  }

  .company-origins-final-people .founder-daniela img {
    height: auto;
    object-fit: contain;
  }

  .services-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .services-nav a {
    min-height: 72px;
  }

  /* With three airlines, keep the final card centred below the first pair. */
  .partner-wordmarks li:nth-child(3):last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 6px);
  }
}

@media (max-width: 600px) {
  /* Comfortable 20 px gutters at common handset widths, including 360 px. */
  .wrap {
    width: min(calc(100% - 40px), 460px);
  }

  .header-inner {
    min-height: 72px;
    padding-bottom: 10px;
  }

  .brand {
    padding: 10px 0;
  }

  .brand img {
    width: 160px;
  }

  .menu-button {
    min-width: 44px;
    min-height: 44px;
  }

  .header .takeoff-button {
    width: 100%;
    min-height: 48px;
    padding-block: 8px;
  }

  .takeoff-title {
    font-size: 10px;
  }

  .takeoff-contact {
    font-size: 14px;
  }

  .mobile-nav:not([hidden]) {
    padding: 8px 20px 18px;
    max-height: calc(100svh - 134px);
  }

  .mobile-nav a {
    padding-block: 12px;
  }

  .hero {
    min-height: 470px;
    height: calc(100svh - 134px);
  }

  .hero-content {
    align-items: center;
    padding-block: 38px 54px;
    text-align: center;
  }

  .hero-copy {
    max-width: 340px;
  }

  .hero-anniversary {
    justify-content: center;
  }

  .hero-image {
    inset: 360px 0 auto;
    height: calc(100% - 360px);
    object-position: 68% center;
  }

  .hero {
    background: #102d47;
  }

  .hero::after {
    background: linear-gradient(to bottom, #102d47 0 360px, transparent 360px);
  }

  .hero-copy h1,
  .hero-copy p,
  .hero-anniversary,
  .hero .eyebrow {
    text-shadow: 0 2px 14px rgba(0, 0, 0, .72);
  }

  .hero-anniversary {
    gap: 8px;
    max-width: 100%;
    white-space: nowrap;
  }

  .hero-anniversary strong {
    white-space: nowrap;
  }

  h1,
  .page-head h1,
  .services-opening h1 {
    font-size: clamp(34px, 10.25vw, 40px);
    line-height: 1.04;
    letter-spacing: -.045em;
  }

  .hero p,
  .page-head p,
  .services-opening p {
    font-size: 16px;
  }

  .section,
  .partner-network {
    padding-block: 48px;
  }

  .section-head {
    margin-bottom: 26px;
  }

  h2 {
    font-size: clamp(29px, 8.2vw, 34px);
  }

  .service-views {
    padding-block: 30px 38px;
  }

  .service-views-head {
    gap: 14px;
  }

  .service-portholes {
    gap: 22px;
    max-width: 252px;
  }

  .porthole-card {
    max-width: 100%;
  }

  .porthole-media {
    border-width: 6px;
  }

  .porthole-caption {
    padding: 48px 16px 22px;
  }

  .porthole-caption strong {
    font-size: 22px;
  }

  .porthole-caption small {
    font-size: 12px;
  }

  .porthole-action {
    min-height: 30px;
    margin-top: 8px;
  }

  .reason-grid {
    gap: 26px;
  }

  .reason-grid article {
    padding-top: 16px;
  }

  .company-origins {
    gap: 24px;
  }

  .company-archive {
    gap: 12px;
  }

  .company-family-photo {
    padding-top: 28px;
  }

  .company-archive figcaption {
    margin-top: 8px;
    font-size: 10px;
  }

  .company-archive figcaption strong {
    font-size: 13px;
  }

  .company-founders {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: none;
  }

  .company-founders .founder-daniela {
    padding-top: 0;
  }

  .company-founders .founder-daniela img {
    height: auto;
    object-fit: contain;
  }

  .company-origins-final-people {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: none;
  }

  /* Keep the current leadership portraits in their intended formats.
     The desktop crop is too aggressive once the photos share a narrow viewport. */
  .leadership-current {
    padding-bottom: 48px;
  }

  .leadership-current-grid {
    gap: 28px;
    padding: 28px 20px;
  }

  .history-storyline {
    top: auto;
    margin: 24px 0 18px;
    padding: 14px 16px 12px;
  }

  .storyline-head {
    align-items: flex-start;
    gap: 8px;
    line-height: 1.35;
  }

  .storyline-head strong {
    max-width: 150px;
    text-align: right;
  }

  .storyline-track {
    margin-inline: 10px;
  }

  .storyline-plane {
    width: 46px;
    height: 35px;
  }

  .storyline-plane-icon {
    width: 24px;
    height: 24px;
  }

  .history-list li {
    gap: 8px;
    padding-block: 24px;
  }

  .history-list--route {
    margin-left: 18px;
  }

  .history-list--route li {
    gap: 10px;
    padding: 0 0 40px 38px;
  }

  .history-list--route li:last-child {
    padding-bottom: 0;
  }

  .history-list time,
  .history-date {
    font-size: 18px;
  }

  .history-list h3 {
    font-size: 20px;
  }

  .services-navigation {
    padding-bottom: 24px;
  }

  .services-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .services-nav a {
    min-height: 78px;
    padding: 10px;
    overflow-wrap: anywhere;
  }

  .service-route {
    padding-block: 42px 48px;
  }

  .service-route .detail-row {
    margin-left: 16px;
    padding-left: 32px;
    padding-bottom: 38px;
  }

  .service-route .detail-row::before {
    left: -18px;
  }

  .service-route .detail-row h2 {
    font-size: clamp(25px, 7.7vw, 29px);
    overflow-wrap: anywhere;
  }

  .service-route .detail-copy {
    padding-bottom: 28px;
  }

  .service-route .process {
    margin-block: 18px;
    padding-left: 22px;
  }

  .text-link {
    gap: 12px;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .contact-grid {
    gap: 30px;
  }

  .contact-method a {
    font-size: clamp(19px, 6vw, 22px);
  }

  .contact .button {
    max-width: 100%;
    text-align: center;
  }

  .partner-side {
    padding: 22px;
  }

  .partner-wordmarks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .partner-wordmarks li {
    min-height: 78px;
    padding: 15px 16px;
  }

  .legal-content {
    padding: 40px 0 56px;
  }

  .legal-aside {
    grid-template-columns: 1fr;
    gap: 0;
    padding-block: 12px;
  }

  .legal-aside a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding-block: 8px;
  }

  .legal-copy section + section {
    margin-top: 36px;
    padding-top: 36px;
  }

  .legal-intro {
    padding: 18px 0 18px 18px;
    font-size: 17px;
  }

  .legal-table-wrap {
    margin-block: 18px;
  }

  .cookie-banner {
    right: 16px;
    bottom: 16px;
    width: calc(100% - 32px);
    padding: 20px;
  }

  .footer img {
    width: 188px;
  }

  .footer p {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 360px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .brand img {
    width: 150px;
  }

  .hero {
    min-height: 450px;
  }

  .hero-anniversary {
    max-width: 100%;
  }

  .service-portholes {
    max-width: 240px;
  }

  .company-archive {
    gap: 10px;
  }

  .services-nav a {
    min-height: 74px;
    font-size: 13px;
  }

  .storyline-head strong {
    max-width: 132px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .history-list li,
  .storyline-plane {
    transition: none;
  }
}
