/* "Trang chủ v3" home sections. Only on the v3 home, where the old theme CSS is dequeued (home-v2.php), so the base reset is safe.
   Tokens (--k-*) come from chrome.css. Sizes follow the studied layout at 1440px: hero card 501px tall, 1280px content, 32px cards. */
* { box-sizing: border-box; }
body { margin: 0; font: 400 14px/20px var(--k-font); color: var(--k-ink); background: #fff; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.k3-wrap { width: 100%; max-width: 1340px; margin: 0 auto; padding: 0 30px; }
/* Spacing scale (8pt): 40px above/below a section on desktop, 24px on phones; 24px/16px from a heading to its content */
.k3-section { padding-top: 40px; padding-bottom: 40px; }
.k3-title { font-size: 28px; line-height: 40px; font-weight: 700; letter-spacing: -.01em; }
.k3-title-sm { font-size: 24px; line-height: 32px; font-weight: 600; }
.k3-sub { margin-top: 4px; font-size: 18px; line-height: 24px; color: var(--k-slate); }

/* Header on the home: no rule and no ✈ button until the hero's search bar has scrolled away (main.js sets .k3-past) */
.k3-home .xh-header { border-bottom-color: transparent; }
.k3-home .xh-header .xh-plane { transition: opacity .2s, visibility .2s; }
.k3-home:not(.k3-past) .xh-header .xh-plane { opacity: 0; visibility: hidden; }
.k3-past .xh-header { border-bottom-color: var(--k-line); }

/* Hero */
.k3-hero { position: relative; margin: 0 16px; border-radius: 12px; background: var(--k-mist); }
.k3-hero-body { position: relative; z-index: 1; padding: 30px 32px 30px 40px; }
.k3-hero.has-collage .k3-hero-body { padding-right: 440px; }
.k3-hero-title { max-width: 920px; font-size: 38px; line-height: 56px; font-weight: 700; letter-spacing: -.02em; animation: k3-rise .8s cubic-bezier(.12, 0, 0, 1) both; } /* no fade: an opacity:0 start keeps it from being the LCP */
.k3-dot { color: var(--primary-color); }

.k3-tabs { display: flex; gap: 4px; margin-top: 36px; }
.k3-tab { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 96px; padding: 0; border: 0; background: none; font-size: 14px; line-height: 20px; text-align: center; }
.k3-tab-icon { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--k-line); border-radius: 8px; background: #fff; box-shadow: var(--k-shadow); transition: transform .2s; }
.k3-tab-icon .material-symbols-outlined { font-size: 26px; }
.k3-tab:hover .k3-tab-icon { transform: translateY(-2px); }
.k3-tab.is-active .k3-tab-icon { border-color: transparent; background: var(--k-grad); color: #fff; }
.k3-tab.is-active .material-symbols-outlined { transform: rotate(45deg); animation: k3-pop .25s ease-in-out both; }
.k3-tab:focus-visible { outline: none; }
.k3-tab:focus-visible .k3-tab-icon { outline: 2px solid var(--primary-color); outline-offset: 2px; }

/* The real flight form (iframe, main.js). The box keeps the form's own height; the iframe grows over the page below while a
   picker is open, or fills the screen (.is-full) for the phone's full-screen pickers. */
.k3-form { position: relative; z-index: 5; height: 208px; margin: 0 -26px; /* the iframe's page pads the form for its shadow */ animation: k3-fade .8s .25s cubic-bezier(.12, 0, 0, 1) both; }
.k3-form iframe { position: absolute; top: 0; left: 0; display: block; width: 100%; height: 100%; border: 0; background: transparent; color-scheme: normal; }
.k3-form.is-full { animation: none; }
.k3-form.is-full iframe { position: fixed; inset: 0; z-index: 100000; height: 100dvh !important; background: #fff; }
.k3-locked { overflow: hidden; }
.k3-locked .k3-hero-body { z-index: 100000; } /* its stacking context would keep the full-screen form under the sticky header (and the admin bar) */

/* Collage: two columns of post photos scrolling forever in opposite directions, faded at the top/bottom edge. Transform-only
   CSS animation (runs on the compositor, no JS, no layout); paused on hover, off under reduced motion (rule at the end). */
.k3-collage-clip { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.k3-collage { position: absolute; top: 0; bottom: 0; right: 24px; display: flex; gap: 16px; width: 396px; pointer-events: auto;
    -webkit-mask: linear-gradient(transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
.k3-collage-col { flex: 1; min-width: 0; }
.k3-collage-track { display: flex; flex-direction: column; gap: 16px; animation: k3-loop 40s linear infinite; will-change: transform; }
.k3-collage-col + .k3-collage-col .k3-collage-track { animation-direction: reverse; }
.k3-collage:hover .k3-collage-track { animation-play-state: paused; }
.k3-collage-ph { position: relative; flex: none; margin: 0; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; background: var(--k-line); }
.k3-collage-ph picture { display: contents; }
.k3-collage-ph img { width: 100%; height: 100%; object-fit: cover; }
.k3-collage-ph figcaption { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .92); font-size: 13px; line-height: 18px; font-weight: 600; }

/* Trust cards */
.k3-trust { display: flex; gap: 8px; padding-top: 32px; padding-bottom: 40px; } /* closer to the hero it backs up */
.k3-trust-card { flex: 1; min-width: 0; padding: 32px; border: 1px solid var(--k-line); border-radius: 32px; background: #fff; animation: k3-climb .75s var(--d, 0s) ease-in-out both; }
.k3-trust-deco { display: flex; align-items: center; height: 46px; }
.k3-bubble { display: grid; place-items: center; width: 46px; height: 46px; margin-right: -8px; border: 1px solid var(--k-line); border-radius: 50%; background: var(--k-mist); animation: k3-pop .25s ease-in-out both; }
.k3-bubble:nth-child(2) { animation-delay: 80ms; }
.k3-bubble:nth-child(3) { animation-delay: 160ms; }
.k3-bubble:nth-child(4) { animation-delay: 240ms; }
.k3-bubble:nth-child(5) { animation-delay: 320ms; }
.k3-bubble img { width: 33px; height: 28px; object-fit: contain; }
.k3-bubble.is-icon { border: 2px solid #fff; background: var(--k-grad); color: #fff; }
.k3-bubble.is-icon .material-symbols-outlined { font-size: 22px; }
.k3-stars { display: flex; fill: var(--warning-color, #ffb700); }
.k3-stars svg { width: 24px; height: 24px; animation: k3-pop .25s ease-in-out both; }
.k3-stars svg:nth-child(2) { animation-delay: 150ms; }
.k3-stars svg:nth-child(3) { animation-delay: 300ms; }
.k3-stars svg:nth-child(4) { animation-delay: 450ms; }
.k3-stars svg:nth-child(5) { animation-delay: 600ms; }
.k3-trust-title { margin-top: 24px; font-size: 22px; line-height: 32px; font-weight: 600; }
.k3-trust-text { margin-top: 4px; }

/* Deals band + carousels. Track/arrow classes are v2's (.xh-carousel*), driven by v2's main.js; a "hidden" arrow shows dimmed. */
.k3-band { padding: 40px 0; background: var(--k-snow); }
.k3-head { display: flex; align-items: center; gap: 16px; }
.k3-head > .k3-title { margin-right: auto; }
.k3-more { display: flex; flex: none; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border-radius: 8px; font-size: 15px; font-weight: 600; }
.k3-more:hover { background: var(--k-mist); }
.k3-more .material-symbols-outlined { font-size: 18px; }
/* With the ‹ › arrows beside it, "Xem tất cả" drops its own → (two look-alike arrows, different jobs) and a hairline splits link from controls */
@media (min-width: 768px) { /* phones have no arrows */
    .k3-head:has(.xh-carousel-btn:not([hidden])) .k3-more .material-symbols-outlined { display: none; }
    .k3-head:has(.xh-carousel-btn:not([hidden])) .k3-arrows { padding-left: 16px; border-left: 1px solid var(--k-line); }
}
/* Track: 8px above/below = room for the card shadow and hover lift (counts toward the heading gap) */
.k3-carousel .xh-carousel-track { display: flex; gap: 16px; margin-top: 16px; padding: 8px 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.k3-carousel .xh-carousel-track::-webkit-scrollbar { display: none; }
.k3-carousel .xh-carousel-track > * { flex: 0 0 calc((100% - 48px) / 4); scroll-snap-align: start; }
/* Arrows sit in the heading row; gone when every card already fits (both arrows hidden) */
.k3-arrows { display: flex; gap: 8px; }
.k3-arrows:has(.is-prev[hidden]):has(.is-next[hidden]) { display: none; }
.k3-arrows .xh-carousel-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 2px solid var(--k-line); border-radius: 50%; background: var(--k-mist); transition: opacity .2s; }
.k3-arrows .xh-carousel-btn .material-symbols-outlined { font-size: 18px; }
.k3-arrows .xh-carousel-btn[hidden] { opacity: .4; pointer-events: none; }

.k3-deal { display: flex; flex-direction: column; min-height: 320px; padding: 8px 8px 24px; border-radius: 32px; background: #fff; box-shadow: 0 1px 4px rgb(25 32 36 / .08); transition: transform .2s; }
.k3-deal:hover { transform: translateY(-4px); }
.k3-deal-media { flex: none; height: 167px; overflow: hidden; border-radius: 24px; background: var(--k-mist); }
.k3-deal-media img { width: 100%; height: 100%; object-fit: cover; }
.k3-deal-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 16px 16px 0; min-height: 0; }
.k3-deal-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-size: 18px; line-height: 26px; font-weight: 600; }
.k3-deal-desc { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: var(--k-slate); }
.k3-deal-price { margin-top: auto; font-size: 22px; line-height: 32px; font-weight: 600; }

/* Tool cards: title + text, then a big tinted icon (one hue step per card) */
.k3-tool { display: flex; flex-direction: column; min-height: 300px; padding: 28px; border-radius: 32px; background: #fff; box-shadow: 0 1px 6px rgb(25 32 36 / .12); transition: transform .2s; }
.k3-tool:hover { transform: translateY(-4px); }
.k3-tool-title { font-size: 26px; line-height: 32px; font-weight: 600; }
.k3-tool-desc { margin: 4px 0 20px; font-size: 16px; line-height: 24px; color: var(--k-slate); }
.k3-tool-art { --c: color-mix(in oklch, var(--primary-color), hsl(calc(var(--n, 0) * 70deg + 20deg) 85% 55%) calc(var(--n, 0) * 22%));
    display: grid; place-items: center; width: 136px; height: 136px; margin: auto auto 0; border-radius: 50%; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--c) 18%, #fff), color-mix(in srgb, var(--c) 32%, #fff)); color: var(--c); }
.k3-tool-art .material-symbols-outlined { font-size: 68px; transition: transform .3s cubic-bezier(.2, 0, 0, 1); }
.k3-tool:hover .k3-tool-art .material-symbols-outlined { transform: scale(1.08) rotate(-6deg); }

/* Destinations: 3 columns of <details> */
.k3-routes-cols { display: flex; gap: 40px; margin-top: 24px; }
.k3-routes-col { flex: 1; min-width: 0; }
.k3-city { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--k-line); }
.k3-city summary, .k3-faq summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; list-style: none; cursor: pointer; }
:is(.k3-city, .k3-faq) summary::-webkit-details-marker { display: none; }
.k3-city-name { display: block; font-size: 14px; line-height: 20px; font-weight: 600; color: #000; }
.k3-city-links { display: block; margin-top: 10px; font-size: 12px; line-height: 18px; font-weight: 600; text-transform: uppercase; color: color-mix(in srgb, var(--primary-color) 75%, #000); }
.k3-city-links a:hover, .k3-city ul a:hover, .k3-faq p a:hover { text-decoration: underline; }
.k3-city-chev { flex: none; font-size: 20px; margin-top: 2px; transform: rotate(90deg); transition: transform .25s; }
details[open] > summary .k3-city-chev { transform: rotate(-90deg); }
.k3-city ul { margin-top: 8px; }
.k3-city ul a { display: block; overflow: hidden; padding: 0 4px; font-size: 13px; line-height: 26px; color: var(--k-slate); white-space: nowrap; text-overflow: ellipsis; }
details[open] > ul { animation: k3-fade .25s cubic-bezier(.12, 0, 0, 1); }

/* FAQ */
.k3-faq-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; margin-top: 16px; }
.k3-faq-list li { border-bottom: 1px solid var(--k-line); }
.k3-faq summary { align-items: center; padding: 12px 0; }
.k3-faq h3 { font-size: 14px; line-height: 20px; font-weight: 600; }
.k3-faq p { padding-bottom: 12px; }
.k3-faq p a { color: color-mix(in srgb, var(--primary-color) 75%, #000); font-weight: 600; }
.k3-seo { margin-top: 40px; color: var(--k-slate); }

@keyframes k3-fade { from { opacity: 0; transform: translateY(16px); } }
@keyframes k3-rise { from { transform: translateY(16px); } }
@keyframes k3-climb { from { opacity: 0; transform: translateY(24px); } }
@keyframes k3-pop { 0% { opacity: 0; transform: scale(.4); } 70% { transform: scale(1.15); } }
@keyframes k3-loop { to { transform: translateY(calc(-50% - 8px)); } } /* one set = half the track + half a 16px gap */

@media (max-width: 1279px) {
    .k3-hero.has-collage .k3-hero-body { padding-right: 32px; }
    .k3-collage { display: none; }
    .k3-carousel .xh-carousel-track > * { flex-basis: calc((100% - 32px) / 3); }
}
@media (max-width: 1023px) {
    .k3-hero-body, .k3-hero.has-collage .k3-hero-body { padding-left: 32px; } /* width for the form's fields */
    .k3-carousel .xh-carousel-track > * { flex-basis: calc((100% - 16px) / 2); }
    .k3-routes-cols { gap: 24px; }
}
/* Phones/tablets: full-width hero, the form stacks its fields (its own CSS), cards scroll sideways */
@media (max-width: 767px) {
    .k3-wrap { padding: 0 16px; }
    .k3-section, .k3-band { padding-top: 24px; padding-bottom: 5px; }
    .k3-trust { padding-top: 20px; padding-bottom: 24px; }
    .k3-title { font-size: 18px; line-height: 32px; }
    .k3-hero { margin: 0; border-radius: 0; }
    .k3-hero-body, .k3-hero.has-collage .k3-hero-body { padding: 24px 16px 32px; }
    .k3-hero-title { font-size: 26px; line-height: 36px; }
    .k3-tabs { gap: 8px; margin: 24px -16px 0; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
    .k3-tab { flex: none; width: 84px; font-size: 13px; line-height: 18px; }
    .k3-form { height: 311px; margin: 0 -16px -16px; }
    .k3-trust { margin: 0; padding-left: 16px; padding-right: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .k3-trust-card { flex: 0 0 85%; padding: 24px; scroll-snap-align: start; }
    .k3-trust-title { margin-top: 16px; font-size: 20px; line-height: 28px; }
    .k3-carousel .xh-carousel-track { margin: 8px -16px 0; padding: 8px 16px; scroll-padding: 0 16px; }
    .k3-tool { min-height: 0; padding: 24px; }
    .k3-tool-title { font-size: 20px; line-height: 28px; }
    .k3-tool-art { width: 104px; height: 104px; }
    .k3-tool-art .material-symbols-outlined { font-size: 52px; }
    .k3-sub { font-size: 16px; }
    .k3-routes-cols { margin-top: 16px; }
    .k3-carousel .xh-carousel-track > * { flex-basis: 274px; }
    .k3-arrows { display: none; }
    .k3-routes-cols { flex-direction: column; gap: 0; }
    .k3-faq-list { grid-template-columns: 1fr; }
    .k3-seo { margin-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .k3-hero *, .k3-trust *, .k3-trust-card, .k3-hero-title, .k3-form, details[open] > ul { animation: none !important; transition: none !important; }
}
