/* ===========================================================================
   Video giới thiệu — trang Giới thiệu (theme 1.11.0, mockup desktop / mobile 01/11/2026)
   Bộ đồ họa output/hai-yen-video-artwork-2026-11-01: 26 lớp SVG rời trong thư mục này (bỏ 4 bản ghép sẵn
   "nen-trang-tri-hoan-chinh" và "nut-phat-hoan-chinh" vì trùng chính các lớp đó; ghép rời để khối co giãn theo chữ).
   Thứ tự lớp như hướng dẫn của bộ: nền kem → nét cong / lá / sóng → ảnh bìa → lớp phủ tối → viền khung →
   nút phát → chữ. Khung ảnh bìa giữ đúng tỷ lệ file viền (1600 × 364 máy tính, 900 × 360 điện thoại) nên viền SVG
   khớp góc bo: border-radius tính theo % (rx 16 của khung).
   Chữ riêng máy tính / điện thoại: .hy-video--d / .hy-video--m (theo hai mockup).
   --------------------------------------------------------------------------- */
.hy-video--m { display: none; }

/* ---------- Dải 3 dịch vụ ---------- */
.hy-video-benefits { position: relative; background: #fffcf7; padding: 24px var(--gutter) 30px; }
.hy-video-benefits__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1180px; margin: 0 auto; padding: 0; list-style: none; }
.hy-video-benefits li { display: flex; gap: 20px; align-items: flex-start; min-width: 0; padding: 4px 30px; }
.hy-video-benefits li + li { background: url('hai-yen-video-vach-vang-doc-chia-ba-dich-vu.svg') left center / auto 100% no-repeat; }
.hy-video-benefits img { flex: none; width: 48px; height: 48px; }
.hy-video-benefits h3 { margin: 2px 0 8px; font: 500 clamp(19px, 1.55vw, 22px)/1.2 var(--font-display); color: var(--ink); }
.hy-video-benefits p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }

/* ---------- Khu video ---------- */
.hy-video { position: relative; isolation: isolate; padding: 36px max(4.4vw, var(--gutter)) 40px; background: #fcf8f1 url('hai-yen-video-nen-kem-desktop.svg') center / cover no-repeat; }
/* Sóng kem thấp nối dải dịch vụ sang video (đè lên mép dưới dải dịch vụ). */
.hy-video::before { content: ''; position: absolute; left: 0; right: 0; top: -17px; height: 35px; background: url('hai-yen-video-song-chuyen-dich-vu-sang-video-desktop.svg') top / 100% 100% no-repeat; z-index: -1; pointer-events: none; }
.hy-video__curves, .hy-video__leaf { position: absolute; z-index: -1; pointer-events: none; }
.hy-video__curves { left: 0; top: 0; width: clamp(210px, 20vw, 300px); }
.hy-video__leaf { right: 0; top: 6px; width: clamp(170px, 17vw, 250px); }

.hy-video__head { max-width: 1080px; margin: 0 auto 20px; text-align: center; }
.hy-video__eyebrow { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0 0 12px; color: #a96f17; font: 600 12px/1.4 var(--font-body); letter-spacing: .22em; text-transform: uppercase; }
.hy-video__eyebrow::before, .hy-video__eyebrow::after { content: ''; flex: none; width: 48px; height: 8px; background: url('hai-yen-video-duong-ke-vang-mo-hai-dau-tieu-de.svg') center / 100% 100% no-repeat; }
.hy-video__eyebrow::after { transform: scaleX(-1); }
.hy-video__badge { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.hy-video__badge img { display: none; flex: none; width: 17px; height: 17px; }
.hy-video__title { margin: 0 0 12px; font: italic 400 clamp(32px, 3.25vw, 47px)/1.18 var(--font-display); color: #bd8528; letter-spacing: -.02em; }
.hy-video__title em { font: inherit; }
.hy-video__text { max-width: 700px; margin: 0 auto; font-size: 13.5px; line-height: 1.7; letter-spacing: .04em; color: var(--text); }
/* Khối sau video (Câu chuyện Hải Yến) nối liền nền kem: bớt khoảng trên như mockup. */
.hy-video-dialog + .section { padding-top: clamp(22px, 2.6vw, 38px); }

/* Ảnh bìa: ảnh → lớp phủ tối (::before) → nút phát (link phủ cả khung) → chữ → viền khung (::after). */
.hy-video__poster { position: relative; isolation: isolate; max-width: 1600px; margin: 0 auto; aspect-ratio: 1600 / 364; border-radius: 1% / 4.4%; overflow: hidden; background: #39372e; }
.hy-video__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.hy-video__poster::before, .hy-video__poster::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: center / 100% 100% no-repeat; }
.hy-video__poster::before { z-index: 1; background-image: url('hai-yen-video-lop-phu-toi-chan-video-desktop.svg'); }
.hy-video__poster::after { z-index: 4; background-image: url('hai-yen-video-khung-video-bo-goc-desktop.svg'); }
.hy-video__play { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.hy-video__play:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.hy-video__button { position: absolute; left: 50%; top: 44%; width: clamp(58px, 5.8vw, 84px); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); transition: transform .25s ease, filter .25s ease; }
.hy-video__button img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
/* Tam giác đặt đúng chỗ như bản ghép nut-phat-hoan-chinh (khung 96: tâm 50,5 / 46, rộng 24). */
.hy-video__button .hy-video__tri { inset: auto; left: 27.6%; top: 26.9%; width: 45.4%; height: 43.1%; }
.hy-video__play:hover .hy-video__button, .hy-video__play:focus-visible .hy-video__button { transform: translate(-50%, -50%) scale(1.06); filter: brightness(1.06); }
.hy-video__caption { position: absolute; z-index: 2; left: 18%; right: 18%; bottom: 22px; margin: 0; text-align: center; color: #fffdf8; text-shadow: 0 1px 6px rgba(29, 27, 21, .55); pointer-events: none; }
.hy-video__caption strong { display: block; font: italic 400 clamp(24px, 2.25vw, 34px)/1.25 var(--font-display); }
.hy-video__caption span { display: block; margin-top: 6px; font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase; }
.hy-video__time { position: absolute; z-index: 2; right: 16px; bottom: 14px; display: flex; align-items: center; justify-content: center; gap: 7px; width: 83px; height: 34px; color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; background: url('hai-yen-video-khung-thoi-luong-vien-trang-desktop.svg') center / 100% 100% no-repeat; pointer-events: none; }
.hy-video__time img { width: 16px; height: 16px; }
/* Nhãn "Ảnh minh họa" khi ảnh bìa không phải ảnh chụp thực tế (tích trong Thư viện Media, theme 1.11.1):
   góc phải dưới đã có thời lượng nên đưa lên góc phải trên, nổi trên viền khung. */
.hy-video__poster .tag-ai { top: 12px; right: 14px; bottom: auto; z-index: 5; }

/* ---------- Hộp thoại phát video (YouTube chỉ tải khi bấm phát) ---------- */
.hy-video-dialog { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 8, 7, .94); }
.hy-video-dialog[open] { display: grid; place-items: center; }
.hy-video-dialog::backdrop { background: rgba(8, 8, 7, .9); }
.hy-video-dialog__frame { width: min(1200px, calc(100vw - 32px), calc((100vh - 120px) * 16 / 9)); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: #000; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
.hy-video-dialog__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.hy-video-dialog__close { position: fixed; top: 14px; right: 16px; width: 48px; height: 48px; border: 0; background: transparent; color: var(--ivory); font-size: 40px; line-height: 1; cursor: pointer; }
.hy-video-dialog__close:hover { color: #fff; }

/* ---------- Máy tính bảng ---------- */
@media (min-width: 761px) and (max-width: 1100px) {
 .hy-video-benefits li { gap: 12px; padding: 4px 18px; }
 .hy-video-benefits img { width: 40px; height: 40px; }
 .hy-video-benefits p { font-size: 12.5px; }
 .hy-video__leaf { opacity: .75; }
 .hy-video__caption { bottom: 12px; }
 .hy-video__caption span { margin-top: 3px; font-size: 9.5px; }
}
@media (min-width: 761px) and (max-width: 1000px) {
 /* Cột hẹp: icon nằm trên chữ như bản điện thoại, vẫn dùng chữ bản máy tính. */
 .hy-video-benefits li { display: block; padding: 2px 16px; text-align: center; }
 .hy-video-benefits img { margin: 0 auto 10px; }
}
@media (min-width: 761px) and (max-width: 900px) {
 .hy-video__caption span { display: none; }
}

/* ---------- Điện thoại ---------- */
@media (max-width: 760px) {
 .hy-video--d { display: none; }
 .hy-video--m { display: block; }
 span.hy-video--m { display: inline; }

 .hy-video-benefits { padding: 22px 8px 30px; background: #fcf8f1; }
 /* Sóng kem ở đầu dải (đè lên mép dưới ảnh đầu trang). */
 .hy-video-benefits::before { content: ''; position: absolute; left: 0; right: 0; top: -20px; height: 30px; background: url('hai-yen-video-song-kem-dau-dai-dich-vu-mobile.svg') top / 100% 100% no-repeat; pointer-events: none; }
 .hy-video-benefits li { display: block; padding: 0 5px; text-align: center; }
 .hy-video-benefits img { width: 34px; height: 34px; margin: 0 auto 8px; }
 .hy-video-benefits h3 { margin: 0 0 5px; font-size: clamp(13.5px, 3.7vw, 15px); line-height: 1.25; letter-spacing: -.01em; }
 .hy-video-benefits p { font-size: 11px; line-height: 1.45; }

 .hy-video { padding: 32px 12px 40px; background-image: url('hai-yen-video-nen-kem-mobile.svg'); }
 .hy-video::before { top: -22px; height: 46px; background-image: url('hai-yen-video-song-doi-vang-chan-dich-vu-mobile.svg'); }
 /* Sóng ngà nổi nhẹ nối sang khối tiếp theo. */
 .hy-video::after { content: ''; position: absolute; left: 0; right: 0; bottom: -18px; height: 40px; z-index: 1; background: url('hai-yen-video-song-nga-noi-video-phong-nghi-mobile.svg') center / 100% 100% no-repeat; pointer-events: none; }
 .hy-video__curves, .hy-video__leaf { display: none; }
 .hy-video__head { margin-bottom: 14px; }
 .hy-video__eyebrow { gap: 10px; margin-bottom: 12px; font-size: 10.5px; letter-spacing: .15em; }
 .hy-video__eyebrow::before, .hy-video__eyebrow::after { width: 42px; }
 /* Khung viên thuốc 300 × 50: giữ đúng tỷ lệ 6 : 1 để viền SVG không méo. */
 .hy-video__badge { width: 186px; height: 31px; background: url('hai-yen-video-khung-nhan-video-vien-champagne-mobile.svg') center / 100% 100% no-repeat; }
 .hy-video__badge img { display: block; }
 /* Như mockup: một dòng khi đủ chỗ; máy hẹp thì xuống dòng trọn cụm "qua từng khoảnh khắc". */
 .hy-video__title { margin-bottom: 10px; font: 400 clamp(21px, 6vw, 27px)/1.2 var(--font-display); color: var(--ink); letter-spacing: -.01em; }
 .hy-video__title em { font-style: italic; color: #b77c23; white-space: nowrap; }
 .hy-video__text { padding: 0 6px; font-size: 13px; line-height: 1.55; letter-spacing: 0; }

 .hy-video__poster { aspect-ratio: 900 / 360; border-radius: 1.78% / 4.44%; }
 .hy-video__poster::before { background-image: url('hai-yen-video-lop-phu-toi-chan-video-mobile.svg'); }
 .hy-video__poster::after { background-image: url('hai-yen-video-khung-video-bo-goc-mobile.svg'); }
 /* Đĩa nâu trong: làm mờ phần ảnh phía sau bằng backdrop-filter như hướng dẫn của bộ. */
 .hy-video__button { top: 47%; width: 52px; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
 .hy-video__meta { position: absolute; z-index: 2; left: 12px; right: 10px; bottom: 9px; display: flex; align-items: center; gap: 7px; margin: 0; color: #fff; font-size: clamp(11px, 3.3vw, 14px); line-height: 1.2; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); pointer-events: none; }
 .hy-video__meta img { flex: none; width: 14px; height: 14px; }
 .hy-video__meta strong { min-width: 0; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
 .hy-video__meta .hy-video__sep { width: 5px; height: 16px; }
 .hy-video__meta span { flex: none; font-variant-numeric: tabular-nums; }
 .hy-video__poster .tag-ai { top: 8px; right: 9px; padding: 1px 8px; font-size: 10.5px; }

 .hy-video-dialog__frame { width: calc(100vw - 16px); }
}

@media (prefers-reduced-motion: reduce) {
 .hy-video__button { transition: none; }
}
