/**
 * PAGE: HOME — CSS riêng của màn Home (enqueue có điều kiện trong functions.php).
 *
 * Nguồn chuẩn: docs/design-previews/home.html (bản Figma đã review 2 điểm neo 1024/1920).
 * Tách khỏi assets/css/sjourney.css để giữ file global gọn — chỉ nạp trên Page template Home.
 * Token (--sp-*, --fs-*, --sj-*) khai báo ở :root trong sjourney.css (nạp trước).
 *
 * Các khối dùng CHUNG không nằm ở đây:
 *  - Destinations & Journey = shortcode [tour_slider] (CSS/JS inline trong plugin).
 *  - Testimonials = component chung template-parts/global/testimonials.php (sjourney.css §M-S7).
 *  - Lightbox = component chung (sjourney.css §M-C12).
 */

/* =================  HELPERS (chỉ trong <main class="sj-page--home">) ================= */
.sj-page--home .sj-label {
	display: inline-block;
	font-size: var(--fs-16);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -.1px;
	text-transform: uppercase;
	color: var(--sj-muted);
}
.sj-page--home .sj-label--red { color: var(--sj-red); }
.sj-page--home .sj-hr {
	border: 0;
	height: 1px;
	background: var(--sj-n4-nw);
	margin: 0;
}
.sj-page--home .sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =================  HERO (section-hero.php) ================= */
/* Chốt review: hero cao đúng 1 màn hình nhưng KHÔNG vượt 1080px. */
.sj-hero {
	position: relative; height: 100dvh; max-height: 1080px; min-height: 480px; overflow: hidden;
	background-size: cover; background-position: center; background-repeat: no-repeat;
	background-color: #401816;
	display: flex; flex-direction: column; justify-content: flex-end;
	color: #fff;
}
/* Overlay tối để chữ trắng luôn đọc được trên ảnh nền thật. */
.sj-hero::before {
	content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background:
		radial-gradient(ellipse 120% 90% at 15% 10%, rgba(255,151,155,.28), transparent 55%),
		linear-gradient(180deg, rgba(90,20,20,.20) 0%, rgba(40,10,14,.50) 55%, rgba(20,6,10,.80) 100%);
}
.sj-hero__inner { padding: 0 var(--sp-48) var(--sp-48); position: relative; z-index: 1; text-align: center; }
.sj-hero__title { margin: 0 0 var(--sp-24); }
.sj-hero__title img { display: block; margin: 0 auto; width: min(623px, 80vw); height: auto; }
.sj-hero__desc { max-width: 46ch; margin: 0 auto; font-size: var(--fs-24); font-weight: 500; line-height: 1.5; }
.sj-hero__desc p { margin: 0; } /* đoạn văn do TinyMCE bọc (wpautop) không thêm lề */
.sj-hero__desc b { font-weight: 500; color: #fff; }
.sj-hero__desc span { color: rgba(255,255,255,.75); font-weight: 500; }
.sj-hero__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-16); padding: var(--sp-48); position: relative; z-index: 1; }
.sj-hero__logo { flex: none; display: flex; align-items: center; justify-content: center; }
.sj-hero__logo img { display: block; width: auto; height: 56px; }
.sj-hero__scroll { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff; font-size: var(--fs-20); text-transform: uppercase; font-weight: 500; background: none; border: 0; cursor: pointer; }
.sj-hero__scroll svg { width: 16px; height: auto; animation: sj-scroll-bounce 1.8s ease-in-out infinite; }
@keyframes sj-scroll-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .sj-hero__scroll svg { animation: none; } }
.sj-hero__clock { text-align: right; text-transform: uppercase; }
.sj-hero__city { display: block; font-size: 14px; color: var(--sj-n4-nw); margin-bottom: 2px; }
.sj-hero__time { display: block; font-size: var(--fs-20); color: #fff; font-variant-numeric: tabular-nums; }

/* =================  HERITAGE / PHILOSOPHY (section-philosophy.php) ================= */
/* pt 160@1920 → 80@1024 (Figma: pt riêng, không đối xứng pb). */
.sj-philosophy { background: var(--sj-cream); padding: clamp(80px, calc(8.929vw - 11.43px), 160px) 0 calc(var(--sp-80) * 1.3); text-align: center; }
.sj-philosophy__title { font-size: var(--fs-72); font-weight: 700; text-transform: uppercase; line-height: 1.15; margin: var(--sp-8) 0 var(--sp-48); color: var(--sj-dark); }
.sj-philosophy__title b { font-weight: 700; color: var(--sj-red); }
/* Chốt review: đúng 2 ảnh 420×660, khe 48px (tổng 888). */
.sj-philosophy__photos { display: flex; justify-content: center; gap: 48px; max-width: 888px; margin: 0 auto var(--sp-48); }
.sj-philosophy__photos figure { flex: 0 1 420px; width: 420px; aspect-ratio: 420/660; margin: 0; overflow: hidden; }
.sj-philosophy__photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 760px) { .sj-philosophy__photos { gap: var(--sp-24); } }
/* Chốt review: tổng bề rộng (dấu nháy + chữ) = 888px, khe giữa dấu và chữ = 10px. */
.sj-philosophy__quote { max-width: 888px; margin: 0 auto var(--sp-48); display: flex; gap: 10px; align-items: flex-start; text-align: left; }
.sj-philosophy__quote .mark { flex: 0 0 auto; width: clamp(28px, 2.917vw, 56px); height: auto; color: var(--sj-red); }
.sj-philosophy__quote .mark--end { align-self: flex-end; }
.sj-philosophy__quote .mark svg { display: block; width: 100%; height: auto; }
/* Dùng chung quotes.svg cho 2 đầu — lật dấu mở để đối xứng dấu đóng. */
.sj-philosophy__quote .mark:first-child svg { transform: rotate(180deg); }
.sj-philosophy__quote > div { flex: 1 1 auto; min-width: 0; }
.sj-philosophy__quote p { font-size: var(--fs-24); font-weight: 300; color: var(--sj-gray); line-height: 1.25; text-align: justify; margin: 0 0 var(--sp-24); }
.sj-philosophy__quote p:last-child { margin-bottom: 0; }
.sj-philosophy__heritage { justify-content: center; margin-top: clamp(48px, calc(3.571vw + 11.43px), 80px); color: var(--sj-muted); }

/* =================  CTA BAND ================= */
.sj-cta-band {
	position: relative; padding: calc(var(--sp-80) * 1.3) 0; min-height: 624px; display: flex; align-items: flex-end;
	background-size: cover; background-position: center; background-color: #1a0f0e; color: #fff;
}
.sj-cta-band::before {
	content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background: linear-gradient(90deg, rgba(15,8,8,.82) 25%, rgba(15,8,8,.25) 70%);
}
.sj-cta-band .sj-container { position: relative; z-index: 1; }
.sj-cta-band__inner { max-width: 770px; }
.sj-cta-band__title { font-size: var(--fs-72); font-weight: 700; text-transform: uppercase; line-height: 1.1; margin: 0 0 var(--sp-16); color: var(--sj-cream); }
.sj-cta-band__desc { font-size: var(--fs-24); font-weight: 300; line-height: 1.25; color: var(--sj-n3-nw); margin: 0 0 var(--sp-24); max-width: 750px; }
.sj-cta-band__desc p { margin: 0; } /* đoạn văn TinyMCE (wpautop) không thêm lề */
.sj-cta-band__emblem { position: absolute; top: var(--sp-48); right: var(--sp-48); display: flex; z-index: 1; }
.sj-cta-band__emblem img { display: block; width: auto; height: 56px; }

/* =================  LIFESTYLE — pinned horizontal pan ================= */
.sj-lifestyle { --sj-u: calc(100dvh / 1080); position: relative; background: var(--sj-cream); }
.sj-lifestyle__sticky {
	position: sticky; top: 0; height: 100dvh; overflow: hidden; display: flex; align-items: stretch;
	padding-block: var(--sp-48);
	padding-inline: max(var(--sp-48), calc((100vw - 3040px) / 2));
}
.sj-lifestyle__viewport { width: 100%; overflow: hidden; }
.sj-lifestyle__sticky::before, .sj-lifestyle__sticky::after {
	content: ''; position: absolute; left: 0; right: 0; height: 1px; background: var(--sj-n4-nw); z-index: 1;
}
.sj-lifestyle__sticky::before { top: var(--sp-48); }
.sj-lifestyle__sticky::after { bottom: var(--sp-48); }
.sj-lifestyle__track { display: flex; gap: 0; width: max-content; height: 100%; will-change: transform; }
.sj-lifestyle__col {
	/* 464 @1024 (2 cột) · 608 @1920 (3 cột) — 2 điểm neo thật. */
	--sj-col-w: clamp(464px, calc(16.0714vw + 299.43px), 608px);
	position: relative; flex: 0 0 auto; width: var(--sj-col-w); height: 100%; min-height: 0;
	display: flex; flex-direction: column; padding: var(--sp-48);
}
.sj-lifestyle__col + .sj-lifestyle__col::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: rgba(124,124,124,.35); }
.sj-lifestyle__col--1 { gap: calc(48 * var(--sj-u)); }
.sj-lifestyle__col--2 { gap: calc(80 * var(--sj-u)); }
.sj-lifestyle__col--3 { justify-content: flex-end; }
.sj-lifestyle__col--4 { justify-content: center; gap: calc(80 * var(--sj-u)); }
.sj-lifestyle__col--5 { gap: calc(80 * var(--sj-u)); }
.sj-lifestyle__img { margin: 0; flex: 0 1 auto; min-height: 0; display: flex; overflow: hidden; }
.sj-lifestyle__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sj-lifestyle__img--square { width: min(calc(543 * var(--sj-u)), 100%); height: calc(543 * var(--sj-u)); }
.sj-lifestyle__img--tall { width: min(calc(544 * var(--sj-u)), 100%); height: calc(1000 * var(--sj-u)); margin-top: auto; }
.sj-lifestyle__img--portrait { width: min(calc(320 * var(--sj-u)), 100%); height: calc(480 * var(--sj-u)); }
.sj-lifestyle__img--left { margin-right: auto; }
.sj-lifestyle__img--left img { object-position: left center; }
.sj-lifestyle__img--right { margin-left: auto; }
.sj-lifestyle__img--right img { object-position: right center; }
.sj-lifestyle__text { font-size: max(14px, calc(24 * var(--sj-u))); line-height: 1.5; color: var(--sj-gray); text-align: justify; flex: 0 1 auto; min-height: 0; }
.sj-lifestyle__text p { margin: 0 0 calc(16 * var(--sj-u)); }
.sj-lifestyle__text p:last-child { margin-bottom: 0; }
.sj-lifestyle__text--1 { padding-left: calc(80 * var(--sj-u)); }
.sj-lifestyle__group { display: flex; flex-direction: column; gap: calc(24 * var(--sj-u)); flex: 0 1 auto; min-height: 0; }
.sj-lifestyle__heading { display: flex; flex-direction: column; gap: calc(8 * var(--sj-u)); margin-top: auto; padding-top: calc(80 * var(--sj-u)); flex: 0 0 auto; }
.sj-lifestyle__label { font-size: max(12px, calc(20 * var(--sj-u))); font-weight: 400; line-height: 24px; letter-spacing: -.1px; text-transform: uppercase; color: var(--sj-muted-nw); }
.sj-lifestyle__title { margin: 0; font-size: max(26px, calc(72 * var(--sj-u))); line-height: 1.1; font-weight: 700; text-transform: uppercase; color: var(--sj-dark); }
.sj-lifestyle__title b { font-weight: 700; color: var(--sj-red2-nw); }
.sj-lifestyle__heritage { flex: 0 0 auto; color: var(--sj-muted); }
.sj-lifestyle__subtitle { margin: 0; font-size: max(20px, calc(48 * var(--sj-u))); line-height: 1.15; font-weight: 500; text-transform: uppercase; color: var(--sj-dark); flex: 0 0 auto; }
.sj-lifestyle__logo-box { margin: auto 0 0 auto; width: calc(189 * var(--sj-u)); height: calc(196 * var(--sj-u)); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.sj-lifestyle__logo { width: calc(93 * var(--sj-u)); height: auto; display: block; }

/* Ngưỡng 1023px: dưới 1024 tắt pinned-pan, xếp dọc. */
@media (max-width: 1023px) {
	.sj-lifestyle { height: auto !important; }
	.sj-lifestyle__sticky { position: static; height: auto; padding: var(--sp-48); }
	.sj-lifestyle__viewport { overflow: visible; }
	.sj-lifestyle__img, .sj-lifestyle__img--square, .sj-lifestyle__img--tall, .sj-lifestyle__img--portrait { width: 100%; height: 280px; margin-top: 0; }
	.sj-lifestyle__col + .sj-lifestyle__col::before { display: none; }
	.sj-lifestyle__col--3, .sj-lifestyle__col--4 { justify-content: flex-start; }
	.sj-lifestyle__track { flex-direction: column; width: 100%; transform: none !important; gap: var(--sp-48); }
	.sj-lifestyle__col, .sj-lifestyle__col--1, .sj-lifestyle__col--5 { width: 100%; height: auto; padding: 0; }
	.sj-lifestyle__title { margin-right: 0; }
	.sj-lifestyle__text--1 { padding-left: 0; }
}

/* =================  GALLERY "A Closer View" — marquee full-width ================= */
.sj-gallery { background: var(--sj-cream); padding: var(--sp-80) 0 calc(var(--sp-80) * 0.7); text-align: center; overflow: hidden; }
.sj-gallery__heading { font-size: var(--fs-72); font-weight: 700; text-transform: uppercase; margin: var(--sp-8) 0 var(--sp-48); color: var(--sj-dark); }
.sj-gallery__heading b { font-weight: 700; color: var(--sj-red2-nw); }
.sj-gallery__viewport { width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; }
.sj-gallery__viewport:hover .sj-gallery__track { animation-play-state: paused; }
.sj-gallery__track { display: flex; gap: 4px; width: max-content; animation: sj-gallery-scroll 40s linear infinite; }
/* Ảnh Gallery cao CỐ ĐỊNH 544px; width tự theo tỉ lệ ảnh. */
.sj-gallery__item { flex: none; height: 544px; width: auto; display: block; }
.sj-gallery__item img { height: 544px; width: auto; object-fit: cover; display: block; }
@keyframes sj-gallery-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .sj-gallery__track { animation: none; overflow-x: auto; } }
.sj-gallery__more { display: inline-block; margin-top: var(--sp-48); }
