/*
 * Home
 * The home page: hero slider, highlights, reviews carousel, popular routes and the airports strip.
 */

/* ---------- Hero slider ---------- */
.hero { position: relative; background: var(--color-surface); padding-bottom: 150px; margin-bottom: 40px; }
.hero-slides { position: relative; height: 480px; overflow: hidden; background: var(--black); }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; }
.hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slide-default { background: var(--gradient-brand); }
.hero-image { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 13, 16, .72), rgba(11, 13, 16, .35) 60%, rgba(11, 13, 16, .55)); }
.hero-content { position: absolute; inset: 0 0 auto 0; padding-top: 56px; color: var(--color-on-dark); }
.hero-title { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; max-width: 16ch; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.hero-subtitle { margin: 1rem 0 0; font-size: clamp(1rem, 2vw, 1.35rem); max-width: 48ch; }
.hero-cta { margin-top: 1.5rem; }
.hero-arrow { position: absolute; top: 200px; z-index: 3; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius-round); background: rgba(255, 255, 255, .18); color: var(--color-on-dark); transition: background-color .15s; }
.hero-arrow:hover { background: rgba(255, 255, 255, .34); }
.hero-arrow-prev { left: 18px; }
.hero-arrow-next { right: 18px; }
.hero-dots { position: absolute; left: 0; right: 0; top: 440px; z-index: 3; display: flex; justify-content: center; gap: .5rem; }
.hero-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: var(--radius-round); background: rgba(255, 255, 255, .45); }
.hero-dot.is-active { background: var(--color-surface); width: 26px; border-radius: var(--radius); }

.hero-search { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: center; }

/* ---------- Hero: small screens ---------- */
@media (max-width: 767px) {
    .hero { padding-bottom: 0; margin-bottom: 0; }
    .hero-slides { height: 300px; }
    .hero-content { padding-top: 28px; }
    .hero-arrow { top: 120px; }
    .hero-dots { top: 262px; }
    .hero-search { position: relative; margin-top: -24px; padding: 0 12px 24px; background: transparent; }
}

/* ---------- Home highlights ---------- */
.highlights { padding: 3.5rem 0 1rem; }
.highlights-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2.5rem 2rem; }
.highlight { text-align: center; }
.highlight-image { width: 100%; max-width: 250px; height: 200px; margin: 0 auto 1.5rem; object-fit: contain; }
.highlight-title { margin-bottom: .9rem; font-size: 1.1rem; font-weight: 800; color: var(--black); }
.highlight-text { margin: 0 auto; max-width: 30ch; color: var(--gray-700); font-size: .95rem; }

/* ---------- Home reviews carousel ---------- */
.testimonials { padding: 3rem 0 1rem; }
.testimonials-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.testimonials-head h2 { font-size: 1.6rem; font-weight: 800; color: var(--black); }
.testimonials-nav { display: flex; gap: .5rem; }
.carousel-arrow { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1.5px solid var(--gray-300); border-radius: var(--radius-round); background: var(--color-surface); color: var(--black); }
.carousel-arrow:hover { border-color: var(--black); }
.testimonials-track { display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .25rem .25rem 1rem; scrollbar-width: none; }
.testimonials-track::-webkit-scrollbar { display: none; }
.testimonial { flex: 0 0 calc((100% - 2.5rem) / 3); scroll-snap-align: start; display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: 0 1px 6px rgba(11, 13, 16, .06); }
.testimonial-stars { display: flex; gap: .15rem; color: var(--gray-300); }
.testimonial-stars .is-filled { color: var(--color-star); fill: var(--color-star); }
.testimonial-text { margin: 0; flex: 1; color: var(--color-text); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.testimonial-author { display: flex; align-items: center; gap: .75rem; }
.testimonial-avatar { width: 42px; height: 42px; border-radius: var(--radius-round); object-fit: cover; flex: 0 0 auto; }
.testimonial-initial { display: inline-flex; align-items: center; justify-content: center; background: var(--black); color: var(--color-on-dark); font-weight: 700; }
.testimonial-name { font-weight: 700; color: var(--black); }
a.testimonial-name:hover { color: var(--blue); }
.testimonial-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .8rem; color: var(--color-text-muted); }
.testimonial-source { padding: .05rem .5rem; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--blue) 10%, var(--white)); color: var(--blue); font-weight: 700; font-size: .7rem; }

/* The card that slides into view settles in: a short rise and fade. */
.testimonial.is-entering { animation: testimonial-settle .55s cubic-bezier(.22, 1, .36, 1); }
@keyframes testimonial-settle {
    from { opacity: .35; transform: translateY(14px) scale(.96); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .testimonial.is-entering { animation: none; } }

@media (max-width: 991px) { .testimonial { flex-basis: calc((100% - 1.25rem) / 2); } }
@media (max-width: 767px) { .testimonial { flex-basis: 88%; } }

/* ---------- Popular routes ---------- */
.presets { padding: 3.5rem 0 1rem; }
.presets-head { margin-bottom: 1.75rem; }
.presets-head h2 { font-size: 1.6rem; font-weight: 800; color: var(--black); }
.presets-head p { margin: .35rem 0 0; color: var(--color-text-muted); }
.presets-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }

.preset-card {
    position: relative; display: flex; flex-direction: column; gap: 1rem; padding: 1.15rem 1.25rem 1rem; text-align: left; overflow: hidden;
    background: linear-gradient(165deg, var(--white) 60%, color-mix(in srgb, var(--green) 7%, var(--white)));
    border: 1px solid var(--color-border); border-radius: var(--radius-xl); box-shadow: 0 1px 2px rgba(11, 13, 16, .04);
    transition: transform .22s cubic-bezier(.22, 1, .36, 1), box-shadow .22s ease, border-color .22s ease;
}
.preset-card::after { content: ""; position: absolute; right: -32px; bottom: -32px; width: 96px; height: 96px; border-radius: var(--radius-round); background: color-mix(in srgb, var(--green) 9%, transparent); transition: transform .35s ease; pointer-events: none; }
.preset-card:hover, .preset-card:focus-visible { transform: translateY(-4px); border-color: color-mix(in srgb, var(--green) 45%, var(--color-border)); box-shadow: 0 14px 30px rgba(11, 13, 16, .12); outline: none; }
.preset-card:hover::after { transform: scale(1.6); }

/* From/to as a small timeline: ring, dotted line, dot. */
.preset-route { position: relative; z-index: 1; display: grid; gap: .85rem; min-width: 0; padding-left: 1.4rem; }
.preset-route::before { content: ""; position: absolute; left: 4px; top: .75rem; bottom: .75rem; border-left: 2px dotted var(--gray-300); }
.preset-stop { position: relative; display: block; font-size: .92rem; line-height: 1.3; }
/* The line clamp sits on an inner span: overflow hidden on the stop itself would clip its timeline dot. */
.preset-name { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.preset-stop::before { content: ""; position: absolute; left: -1.4rem; top: .28em; width: 10px; height: 10px; border-radius: var(--radius-round); background: var(--color-surface); }
.preset-from { font-weight: 700; color: var(--black); }
.preset-from::before { border: 2.5px solid var(--green); }
.preset-to { color: var(--gray-700); }
.preset-to::before { background: var(--blue); }

.preset-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .8rem; border-top: 1px solid var(--gray-100); }
.preset-price { display: flex; align-items: baseline; gap: .45rem; min-width: 0; }
.preset-price small { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--color-text-muted); }
.preset-price strong { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; color: var(--green-dark); white-space: nowrap; }
.preset-go { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-round); border: 1.5px solid var(--gray-300); color: var(--gray-700); transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease; }
.preset-card:hover .preset-go, .preset-card:focus-visible .preset-go { background: var(--green); border-color: var(--green); color: var(--color-on-dark); transform: translateX(3px); }

.preset-modal[hidden] { display: none; }
.preset-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.preset-modal-backdrop { position: absolute; inset: 0; background: rgba(11, 13, 16, .6); backdrop-filter: blur(2px); }
.preset-modal-card { position: relative; width: 100%; max-width: 440px; padding: 1.75rem; background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: .9rem; animation: preset-in .25s cubic-bezier(.22, 1, .36, 1); }
@keyframes preset-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.preset-modal-x { position: absolute; top: .75rem; right: .75rem; display: inline-flex; padding: .35rem; border: 0; background: none; color: var(--color-text-muted); border-radius: var(--radius-round); }
.preset-modal-x:hover { background: var(--gray-100); color: var(--black); }
.preset-modal-title { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding-right: 2rem; font-size: 1.05rem; line-height: 1.3; }
.preset-modal-title .icon { color: var(--green); }
.preset-modal-hint { margin: -.4rem 0 0; color: var(--color-text-muted); font-size: .9rem; }
.preset-modal .field { border: 1px solid var(--gray-300); }
.preset-modal-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.preset-modal .passengers-trigger { color: var(--color-text); border-color: var(--gray-300); }
.preset-modal .passengers-trigger:hover { background: var(--color-surface-alt); }
.preset-modal .passengers-popover { width: min(360px, 78vw); border: 1px solid var(--color-border); }

@media (max-width: 1199px) { .presets-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991px) { .presets-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .presets-grid { grid-template-columns: 1fr; } }

/* ---------- Home airports section ---------- */
.airports-section { padding: 3.5rem 0 1rem; }
.airports-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.airports-section-head h2 { font-size: 1.6rem; font-weight: 800; color: var(--black); }
.airports-section-head p { margin: .35rem 0 0; color: var(--color-text-muted); }
.airports-all { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; color: var(--blue); }
.airports-all:hover { color: var(--blue-dark); }
