/* ==========================================================================
   GoFlyzy — comparatore voli
   Foglio di stile autonomo: non dipende dal tema legacy e non lo modifica.
   Scritto a mano, nessun passaggio di compilazione.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Token
   -------------------------------------------------------------------------- */

.gfc {
    /* Marchio */
    --navy:        #021931;
    --navy-soft:   #0B2B4A;

    /* Interazione */
    --brand:       #1B8EF2;
    --brand-dark:  #0B6FC7;
    --brand-tint:  #E8F3FE;

    /* Segnali */
    --good:        #0FB37E;
    --good-tint:   #E6F7F1;
    --warn:        #E8890C;
    --warn-tint:   #FDF3E4;

    /* Neutri */
    --ink:         #101C2E;
    --ink-2:       #46566E;
    --ink-3:       #74839A;
    --line:        #E3E8EF;
    --line-soft:   #EFF2F7;
    --surface:     #FFFFFF;
    --canvas:      #F5F7FA;

    /* Forma */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;
    --r-xl: 26px;

    --shadow-sm: 0 1px 2px rgba(16, 28, 46, .06), 0 1px 3px rgba(16, 28, 46, .04);
    --shadow-md: 0 4px 12px rgba(16, 28, 46, .07), 0 1px 3px rgba(16, 28, 46, .05);
    --shadow-lg: 0 12px 32px rgba(16, 28, 46, .12), 0 2px 8px rgba(16, 28, 46, .06);
    --shadow-pop: 0 16px 44px rgba(16, 28, 46, .16);

    --ring: 0 0 0 3px rgba(27, 142, 242, .22);

    /* Ritmo */
    --gap: 16px;
    --pad: 20px;

    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv05" 1, "ss01" 1;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

.gfc *,
.gfc *::before,
.gfc *::after { box-sizing: border-box; }

.gfc h1, .gfc h2, .gfc h3, .gfc h4, .gfc p, .gfc figure, .gfc ul {
    margin: 0;
    padding: 0;
}

.gfc ul { list-style: none; }

.gfc :where(a) { color: inherit; text-decoration: none; }

/* :where() azzera la specificità del reset, così le regole dei componenti
   scritte più avanti vincono senza dover rincorrere con selettori più forti.
   Senza questo, "color: inherit" batterebbe il colore dichiarato su .gfc-chip
   o .gfc-cta e il testo erediterebbe il bianco dell'hero. */
.gfc :where(button, input, select, textarea) {
    font: inherit;
    color: inherit;
}

/* Numeri incolonnati: prezzi e orari devono allinearsi fra righe diverse. */
.gfc .tnum { font-variant-numeric: tabular-nums; }

.gfc-page {
    background: var(--canvas);
    min-height: 100vh;
    overflow-x: clip;   /* rete di sicurezza contro traboccamenti orizzontali */
}

.gfc-shell {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: 20px;
}

.gfc-sr {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   3. Barra superiore
   -------------------------------------------------------------------------- */

.gfc-top {
    background: var(--navy);
    color: #fff;
}

.gfc-top__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
    height: 68px;
}

.gfc-top__logo img {
    height: 30px;
    width: auto;
    display: block;
}

.gfc-top__nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gfc-top__nav a {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: .92rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .82);
    transition: background .15s, color .15s;
}

.gfc-top__nav a:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.gfc-top__nav a.is-active {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

/* --------------------------------------------------------------------------
   4. Hero
   -------------------------------------------------------------------------- */

.gfc-hero {
    background: linear-gradient(168deg, var(--navy) 0%, #063560 62%, #0A4B85 100%);
    color: #fff;
    padding: 58px 0 46px;
    position: relative;
    overflow: hidden;
}

/* Alone diffuso: dà profondità senza immagini da caricare. */
.gfc-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -55% 40%;
    height: 420px;
    background: radial-gradient(ellipse at center, rgba(27, 142, 242, .40), transparent 68%);
    pointer-events: none;
}

.gfc-hero__inner { position: relative; z-index: 1; }

.gfc-hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.85rem);
    line-height: 1.14;
    font-weight: 700;
    letter-spacing: -.022em;
    max-width: 17ch;
}

.gfc-hero p {
    margin-top: 12px;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .78);
    max-width: 52ch;
}

/* --------------------------------------------------------------------------
   5. Modulo di ricerca
   -------------------------------------------------------------------------- */

.gfc-search {
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: 14px;
}

.gfc-hero .gfc-search {
    margin-top: 30px;
}

.gfc-search__modes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 2px 12px;
}

.gfc-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: .88rem;
    font-weight: 500;
    color: var(--ink-2);
    cursor: pointer;
    transition: all .15s;
}

.gfc-chip:hover { border-color: #C9D3E0; color: var(--ink); }

.gfc-chip.is-on {
    background: var(--brand-tint);
    border-color: var(--brand);
    color: var(--brand-dark);
}

/* Flex e non griglia: il campo "Ritorno" compare e scompare, e con una
   griglia a colonne fisse ogni comparsa faceva slittare i campi successivi
   nella colonna sbagliata, restringendo i menu passeggeri. */
.gfc-search__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}

.gfc-field { flex: 1 1 176px; }
.gfc-field--date { flex: 0 1 158px; }
.gfc-field--pax  { flex: 1 1 236px; }

.gfc-field {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 9px 14px;
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
    min-width: 0;
}

.gfc-field:focus-within {
    border-color: var(--brand);
    box-shadow: var(--ring);
}

.gfc-field__label {
    display: block;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 1px;
}

.gfc-field input,
.gfc-field select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: .98rem;
    font-weight: 600;
    color: var(--ink);
    padding: 0;
    min-width: 0;
}

.gfc-field input::placeholder {
    color: #A9B4C5;
    font-weight: 500;
}

/* I nomi lunghi ("Rome-Fiumicino Leonardo da Vinci") vengono troncati
   invece di allargare il campo. */
.gfc-field input[type="text"] {
    text-overflow: ellipsis;
}

/* Inversione origine/destinazione */
.gfc-swap {
    position: absolute;
    top: 50%;
    right: -17px;
    transform: translateY(-50%);
    z-index: 3;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--brand);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform .18s, color .15s, border-color .15s, background .15s;
}

.gfc-swap:hover {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
    transform: translateY(-50%) rotate(180deg);
}

.gfc-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 130px;
    padding: 0 26px;
    border: 0;
    border-radius: var(--r-md);
    background: var(--brand);
    color: #fff;
    font-size: 1rem;
    font-weight: 650;
    cursor: pointer;
    transition: background .15s, transform .06s;
}

.gfc-submit:hover  { background: var(--brand-dark); }
.gfc-submit:active { transform: translateY(1px); }

/* --------------------------------------------------------------------------
   6. Suggerimenti aeroporto
   -------------------------------------------------------------------------- */

.gfc-ac {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    left: -1px;
    right: -1px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-pop);
    overflow: hidden;
    display: none;
    max-height: 340px;
    overflow-y: auto;
}

.gfc-ac.is-open { display: block; }

.gfc-ac__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--line-soft);
}

.gfc-ac__item:last-child { border-bottom: 0; }

.gfc-ac__item:hover,
.gfc-ac__item.is-active { background: var(--brand-tint); }

.gfc-ac__code {
    flex: none;
    width: 44px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: var(--navy);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.gfc-ac__text { min-width: 0; }

.gfc-ac__name {
    font-size: .92rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gfc-ac__meta {
    font-size: .78rem;
    color: var(--ink-3);
}

.gfc-ac__empty {
    padding: 14px;
    font-size: .88rem;
    color: var(--ink-3);
    text-align: center;
}

/* --------------------------------------------------------------------------
   7. Rotte suggerite
   -------------------------------------------------------------------------- */

.gfc-routes {
    margin-top: 44px;
    padding-bottom: 64px;
}

.gfc-routes h2 {
    font-size: 1.15rem;
    font-weight: 650;
    margin-bottom: 14px;
}

.gfc-routes__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
}

.gfc-route {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    font-weight: 550;
    transition: border-color .15s, box-shadow .15s, transform .12s;
}

.gfc-route:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.gfc-route__pin {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--brand-tint);
    color: var(--brand-dark);
}

/* --------------------------------------------------------------------------
   8. Intestazione dei risultati
   -------------------------------------------------------------------------- */

.gfc-rehead {
    background: var(--navy);
    padding-bottom: 22px;
}

.gfc-rehead .gfc-search {
    padding: 12px;
    box-shadow: var(--shadow-md);
}

.gfc-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    padding: 22px 0 14px;
    min-width: 0;
}

.gfc-summary h1 {
    font-size: 1.3rem;
    font-weight: 680;
    letter-spacing: -.01em;
}

.gfc-summary__meta {
    font-size: .9rem;
    color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   9. Impaginazione dei risultati
   -------------------------------------------------------------------------- */

.gfc-layout {
    display: grid;
    grid-template-columns: 258px 1fr;
    gap: 24px;
    align-items: start;
    padding-bottom: 64px;
}

/* --------------------------------------------------------------------------
   10. Filtri
   -------------------------------------------------------------------------- */

.gfc-filters {
    position: sticky;
    top: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.gfc-filters__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px var(--pad);
    border-bottom: 1px solid var(--line-soft);
}

.gfc-filters__head h2 {
    font-size: .95rem;
    font-weight: 650;
}

.gfc-reset {
    border: 0;
    background: none;
    color: var(--brand);
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.gfc-reset:hover { text-decoration: underline; }

.gfc-fgroup {
    padding: 16px var(--pad);
    border-bottom: 1px solid var(--line-soft);
}

.gfc-fgroup:last-child { border-bottom: 0; }

.gfc-fgroup__title {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 11px;
}

.gfc-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    cursor: pointer;
    font-size: .92rem;
}

.gfc-check input {
    appearance: none;
    flex: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid #C6D0DD;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: background .12s, border-color .12s;
}

.gfc-check input:checked {
    background: var(--brand);
    border-color: var(--brand);
}

.gfc-check input:checked::after {
    content: "";
    position: absolute;
    left: 5px; top: 1.5px;
    width: 5px; height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.gfc-check input:focus-visible { box-shadow: var(--ring); outline: 0; }

.gfc-check__count {
    margin-left: auto;
    font-size: .8rem;
    color: var(--ink-3);
}

.gfc-range { padding-top: 2px; }

.gfc-range input[type="range"] {
    width: 100%;
    accent-color: var(--brand);
    cursor: pointer;
}

.gfc-range__out {
    display: flex;
    justify-content: space-between;
    font-size: .84rem;
    color: var(--ink-2);
    margin-top: 4px;
    font-weight: 550;
}

/* --------------------------------------------------------------------------
   11. Ordinamento
   -------------------------------------------------------------------------- */

.gfc-sort {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 14px;
}

.gfc-sort__tab {
    border: 0;
    background: none;
    padding: 12px 10px;
    cursor: pointer;
    text-align: center;
    border-right: 1px solid var(--line-soft);
    transition: background .14s;
}

.gfc-sort__tab:last-child { border-right: 0; }
.gfc-sort__tab:hover { background: var(--line-soft); }

.gfc-sort__tab.is-on {
    background: var(--brand-tint);
    box-shadow: inset 0 -2.5px 0 var(--brand);
}

.gfc-sort__k {
    display: block;
    font-size: .9rem;
    font-weight: 650;
    color: var(--ink);
}

.gfc-sort__v {
    display: block;
    font-size: .8rem;
    color: var(--ink-3);
    margin-top: 1px;
}

.gfc-sort__tab.is-on .gfc-sort__k { color: var(--brand-dark); }

/* --------------------------------------------------------------------------
   12. Scheda offerta
   -------------------------------------------------------------------------- */

.gfc-offer {
    display: grid;
    grid-template-columns: 1fr 208px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}

.gfc-offer:hover {
    border-color: #C9D8EA;
    box-shadow: var(--shadow-md);
}

.gfc-offer.is-hidden { display: none; }

.gfc-offer__body { padding: var(--pad); }

/* Una riga per direzione: andata e, se c'è, ritorno */
.gfc-leg {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 16px;
    align-items: center;
    padding: 11px 0;
}

.gfc-leg + .gfc-leg { border-top: 1px dashed var(--line); }

.gfc-carrier {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.gfc-carrier__mark {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--canvas);
    border: 1px solid var(--line);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--navy);
}

.gfc-carrier__name {
    font-size: .8rem;
    color: var(--ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gfc-times {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
}

.gfc-time { text-align: center; }

.gfc-time__h {
    font-size: 1.32rem;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.16;
}

.gfc-time__a {
    font-size: .8rem;
    color: var(--ink-3);
    font-weight: 550;
}

/* La data del volo: piccola, ma sempre visibile — fra le offerte possono
   comparire giorni diversi da quello cercato. */
.gfc-time__d {
    font-size: .72rem;
    color: var(--ink-3);
    font-weight: 500;
    margin-top: 1px;
    white-space: nowrap;
}

/* Il tratto fra partenza e arrivo, con i pallini degli scali */
.gfc-path { text-align: center; min-width: 96px; }

.gfc-path__d {
    font-size: .78rem;
    color: var(--ink-3);
    margin-bottom: 3px;
}

.gfc-path__line {
    position: relative;
    height: 2px;
    background: var(--line);
    border-radius: 2px;
}

.gfc-path__line::before,
.gfc-path__line::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ink-3);
    transform: translateY(-50%);
}

.gfc-path__line::before { left: 0; }
.gfc-path__line::after  { right: 0; }

.gfc-path__stop {
    position: absolute;
    top: 50%;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--warn);
    border: 1.5px solid var(--surface);
    transform: translate(-50%, -50%);
}

.gfc-path__s {
    font-size: .78rem;
    margin-top: 4px;
    font-weight: 600;
}

.gfc-path__s.is-direct { color: var(--good); }
.gfc-path__s.is-stops  { color: var(--warn); }

.gfc-offer__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
}

.gfc-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: .76rem;
    font-weight: 600;
    background: var(--canvas);
    color: var(--ink-2);
}

.gfc-tag--bag  { background: var(--good-tint); color: #0A7D58; }
.gfc-tag--nobag{ background: var(--canvas);    color: var(--ink-3); }
.gfc-tag--flex { background: var(--brand-tint);color: var(--brand-dark); }
.gfc-tag--few  { background: var(--warn-tint); color: #9A5A05; }

/* Colonna del prezzo */
.gfc-offer__buy {
    border-left: 1px solid var(--line-soft);
    padding: var(--pad);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 9px;
    background: #FCFDFE;
}

.gfc-price {
    text-align: right;
    line-height: 1.1;
}

.gfc-price__v {
    font-size: 1.62rem;
    font-weight: 750;
    letter-spacing: -.028em;
}

.gfc-price__c {
    font-size: .78rem;
    color: var(--ink-3);
    margin-top: 2px;
}

.gfc-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 16px;
    border: 0;
    border-radius: var(--r-sm);
    font-size: .93rem;
    font-weight: 650;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    width: 100%;
}

.gfc-cta--own {
    background: var(--brand);
    color: #fff;
}

.gfc-cta--own:hover { background: var(--brand-dark); }

.gfc-cta--out {
    background: var(--surface);
    border: 1.5px solid var(--line);
    color: var(--ink);
}

.gfc-cta--out:hover { border-color: var(--brand); color: var(--brand-dark); }

.gfc-source {
    font-size: .74rem;
    color: var(--ink-3);
    text-align: center;
}

/* Etichetta d'angolo per la migliore offerta */
.gfc-offer__flag {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px var(--pad);
    background: var(--good-tint);
    color: #0A7D58;
    font-size: .8rem;
    font-weight: 650;
}

/* --------------------------------------------------------------------------
   13. Stati
   -------------------------------------------------------------------------- */

.gfc-empty {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 56px 28px;
    text-align: center;
}

.gfc-empty h2 {
    font-size: 1.12rem;
    font-weight: 650;
    margin-bottom: 6px;
}

.gfc-empty p {
    color: var(--ink-3);
    max-width: 46ch;
    margin-inline: auto;
}

.gfc-note {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--r-md);
    background: var(--warn-tint);
    color: #7A4805;
    font-size: .88rem;
    margin-bottom: 14px;
}

.gfc-note--info { background: var(--brand-tint); color: var(--brand-dark); }

/* --------------------------------------------------------------------------
   14. Adattamento a schermi stretti
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
    .gfc-field, .gfc-field--date, .gfc-field--pax { flex: 1 1 calc(50% - 8px); }
    .gfc-submit { flex: 1 1 100%; padding: 13px 26px; }
    .gfc-swap { display: none; }
}

@media (max-width: 900px) {
    .gfc-layout { grid-template-columns: 1fr; }

    /* La navigazione a piu' voci non si comprime e, in un contenitore flex,
       impone la sua larghezza all'intera pagina: senza questo il documento
       scorre in orizzontale su telefono. Qui scorre solo lei. */
    .gfc-top__bar {
        height: auto;
        padding-block: 12px;
        gap: 12px;
    }

    .gfc-top__nav {
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .gfc-top__nav::-webkit-scrollbar { display: none; }
    .gfc-top__nav a { white-space: nowrap; }
    .gfc-top__logo { flex: none; }

    .gfc-filters {
        position: static;
        margin-bottom: 6px;
    }

    .gfc-offer { grid-template-columns: 1fr; }

    .gfc-offer__buy {
        border-left: 0;
        border-top: 1px solid var(--line-soft);
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .gfc-price { text-align: left; }
    .gfc-cta { width: auto; min-width: 150px; }
    .gfc-source { display: none; }
}

@media (max-width: 620px) {
    .gfc { font-size: 14.5px; }

    .gfc-hero { padding: 36px 0 40px; }
    .gfc-field, .gfc-field--date, .gfc-field--pax { flex: 1 1 100%; }

    .gfc-leg {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .gfc-times { gap: 10px; }
    .gfc-time__h { font-size: 1.18rem; }
    .gfc-sort { grid-template-columns: 1fr; }
    .gfc-sort__tab { border-right: 0; border-bottom: 1px solid var(--line-soft); }
    .gfc-routes { margin-top: 36px; }
}

/* Chi preferisce meno animazioni non le subisce. */
@media (prefers-reduced-motion: reduce) {
    .gfc *,
    .gfc *::before,
    .gfc *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* ==========================================================================
   Calendario prezzi, mete raggiungibili, aeroporti alternativi
   Le tre funzioni che tolgono alla ricerca il carattere di scommessa: quando
   conviene partire, dove si puo' andare, da quale altro scalo.
   ========================================================================== */

/* --- Calendario: il prezzo piu' basso giorno per giorno --- */

.gfc-cal {
    margin: 18px 0 22px;
    padding: 18px 20px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.gfc-cal__titolo { font-size: 1.02rem; font-weight: 650; color: var(--ink); }
.gfc-cal__sub    { margin-top: 3px; font-size: .86rem; color: var(--ink-3); }

/* Scorrimento orizzontale: un mese non entra mai in larghezza, e comprimerlo
   renderebbe le barre illeggibili proprio dove serve il confronto. */
.gfc-cal__strip {
    display: flex;
    gap: 4px;
    margin-top: 14px;
    padding-bottom: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.gfc-cal__g {
    flex: 0 0 auto;
    width: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 2px 8px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: background .14s, border-color .14s;
}

.gfc-cal__g:hover { background: var(--canvas); border-color: var(--line); }

.gfc-cal__gg { font-size: .68rem; color: var(--ink-3); text-transform: capitalize; }
.gfc-cal__nn { font-size: .84rem; font-weight: 650; color: var(--ink-2); }

/* La barra rende il confronto immediato: l'occhio vede la forma del mese
   prima di leggere una sola cifra. */
.gfc-cal__barra {
    width: 8px;
    border-radius: 4px;
    background: #C9D9EC;
    transition: background .14s;
}

.gfc-cal__p { font-size: .74rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }

.gfc-cal__g.is-buono .gfc-cal__barra { background: var(--good); }
.gfc-cal__g.is-buono .gfc-cal__p     { color: var(--good); }

.gfc-cal__g.is-active {
    background: var(--brand-tint);
    border-color: var(--brand);
}

.gfc-cal__g.is-active .gfc-cal__nn,
.gfc-cal__g.is-active .gfc-cal__p { color: var(--brand-dark); }

/* --- Aeroporti alternativi, mostrati quando la ricerca non trova nulla --- */

.gfc-alt {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 20px 0 40px;
}

.gfc-alt__gruppo {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
}

.gfc-alt__gruppo h3 { font-size: .95rem; font-weight: 650; color: var(--ink); }

.gfc-alt__lista { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }

.gfc-alt__lista a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-sm);
    font-size: .9rem;
    color: var(--ink-2);
    text-decoration: none;
    transition: border-color .14s, background .14s;
}

.gfc-alt__lista a:hover { border-color: var(--brand); background: var(--brand-tint); }
.gfc-alt__lista b       { color: var(--brand-dark); font-weight: 700; letter-spacing: .04em; }
.gfc-alt__lista span    { margin-left: auto; font-size: .8rem; color: var(--ink-3); }

/* --- Cerca ovunque --- */

.gfc-hero--stretto { padding: 40px 0 34px; }

.gfc-ovunque__form {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-top: 22px;
    padding: 12px;
    max-width: 620px;
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
}

.gfc-ovunque__form .gfc-field { flex: 1 1 auto; }

.gfc-ovunque       { padding-bottom: 60px; }
.gfc-ovunque__conta{ margin: 26px 0 14px; font-size: .92rem; color: var(--ink-2); }
.gfc-ovunque__vuoto{ margin: 40px 0; color: var(--ink-3); }
.gfc-ovunque__nota { margin-top: 22px; font-size: .82rem; color: var(--ink-3); }

.gfc-mete {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 12px;
}

.gfc-meta {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    text-decoration: none;
    overflow: hidden;
    transition: transform .16s cubic-bezier(.22,.61,.36,1), box-shadow .16s, border-color .16s;
}

.gfc-meta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand);
}

.gfc-meta__foto {
    flex: none;
    width: 54px; height: 54px;
    border-radius: var(--r-sm);
    background-size: cover;
    background-position: center;
}

.gfc-meta__corpo  { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gfc-meta__citta  { font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gfc-meta__meta   { font-size: .8rem; color: var(--ink-3); }

.gfc-meta__prezzo {
    margin-left: auto;
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--good);
    white-space: nowrap;
}

@media (max-width: 620px) {
    .gfc-ovunque__form { flex-direction: column; }
    .gfc-cal__g        { width: 46px; }
}

/* Invito a "cerca ovunque" dentro il modulo di ricerca. */
.gfc-ovunque__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--brand-dark);
    text-decoration: none;
    transition: background .14s;
}

.gfc-ovunque__link:hover { background: var(--brand-tint); }

@media (max-width: 620px) {
    .gfc-ovunque__link { margin-left: 0; }
}
