/* Chế độ Giáng sinh (ETA_Noel). Chỉ được nạp khi bật trong Tours → Giáng sinh. Mọi thứ nằm dưới body.noel-on; tắt công tắc là web trở lại như cũ. */

body:not(.noel-on) .noel-el { display: none !important; }
.noel-el { pointer-events: none; }
.noel-el svg { display: block; width: 100%; height: auto; }

/* ---------- Chuyển động: chỉ dùng transform/opacity trên phần tử ngoài (card đồ hoạ lo), chi tiết bên trong hình thì nhảy theo nấc ---------- */
.noel-tw { animation: noel-twinkle 2.7s steps(3, jump-none) infinite alternate; }
.noel-tw-1 { animation-delay: -.9s; }
.noel-tw-2 { animation-delay: -1.8s; }
.noel-wave-hand { transform-box: fill-box; transform-origin: 10% 90%; animation: noel-wave .7s steps(2, jump-none) infinite alternate; }
.noel-wave-arm { transform-box: fill-box; transform-origin: 0 100%; animation: noel-wave 1s steps(2, jump-none) infinite alternate; }
.noel-eye { transform-box: fill-box; transform-origin: center; }
.noel-blink .noel-eye { transform: scaleY(.1); }
.noel-leg-a, .noel-leg-b { transform-box: fill-box; transform-origin: 50% 0; animation: noel-leg .36s steps(2, jump-none) infinite alternate; }
.noel-leg-b { animation-direction: alternate-reverse; }
.noel-hero-gifts, .noel-prop-gifts, .noel-corner-gifts, .noel-pop-gifts { transform-origin: 50% 100%; animation: noel-wiggle 1.9s ease-in-out infinite alternate; }
/* Ngoài màn hình thì đứng yên. */
.noel-idle, .noel-idle * { animation-play-state: paused !important; }
@keyframes noel-twinkle { from { opacity: 1; } to { opacity: .2; } }
@keyframes noel-wiggle { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes noel-wave { from { transform: rotate(-14deg); } to { transform: rotate(16deg); } }
@keyframes noel-leg { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }

/* ---------- Tuyết rơi ---------- */
.noel-snow { position: fixed; inset: 0; overflow: hidden; z-index: 55; contain: strict; }
.noel-snow i { position: absolute; top: -12px; border-radius: 50%; background: #fff; will-change: transform; animation: noel-fall0 14s linear infinite; }
.noel-snow i.noel-f1 { animation-name: noel-fall1; }
.noel-snow i.noel-f2 { animation-name: noel-fall2; }
@keyframes noel-fall0 { to { transform: translate3d(-40px, 112vh, 0); } }
@keyframes noel-fall1 { to { transform: translate3d(30px, 112vh, 0); } }
@keyframes noel-fall2 { to { transform: translate3d(70px, 112vh, 0); } }

/* ---------- Dây đèn + đồ treo dưới thanh menu ---------- */
.noel-lights { position: absolute; left: 44px; right: 44px; top: calc(100% - 7px); height: 58px; z-index: -1; }
.noel-lights svg { height: 100%; overflow: visible; }
/* Khi thanh menu dính theo lúc cuộn thì cất dây đèn để không che chữ bên dưới. */
.eta-header.is-stuck .noel-lights { display: none; }
.noel-wire { fill: none; stroke: #0d1f14; stroke-width: 1.6; stroke-linecap: round; opacity: .9; }
.noel-hang { position: absolute; width: 36px; transform-origin: 44.5% 0; animation: noel-swing 3.2s ease-in-out infinite alternate; will-change: transform; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35)); }
.noel-hang:nth-of-type(odd) { animation-duration: 2.5s; }
@keyframes noel-swing { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }

/* ---------- Tuyết đọng trên thanh menu ---------- */
.noel-cap { position: absolute; left: 40px; right: 40px; top: -11px; height: 14px; z-index: 2; overflow: hidden; border-radius: 12px 12px 0 0; filter: drop-shadow(0 1px 1px rgba(10, 40, 60, .25)); }
.noel-cap svg { height: 100%; }
/* Thanh menu dạng dải ngang (trang trong) nằm sát mép trên nên không cần tuyết đọng. */
.eta-header:not(.is-overlay):not(.is-stuck) .noel-cap { display: none; }
.noel-cap.is-bar { left: 12px; right: 12px; top: -12px; }

/* ---------- Mũ ông già Noel trên logo ---------- */
.noel-on #masthead .eta-logo { position: relative; }
.noel-hat { position: absolute; left: -10px; top: -16px; width: 40px; transform: rotate(-16deg); z-index: 3; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }

/* ---------- Màn đầu trang chủ: ruy băng lời chúc ---------- */
.noel-on .eta-hv-center { position: relative; }
.noel-greet { position: absolute; left: 0; right: 0; bottom: calc(100% + 2px); display: flex; justify-content: center; align-items: flex-end; gap: 34px; margin: 0; }
.noel-greet-tree { flex: none; width: 48px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }
.noel-ribbon { position: relative; display: block; margin-bottom: 10px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.noel-ribbon b { position: relative; z-index: 1; display: block; padding: 10px 38px 2px; background: linear-gradient(#e3323c, #b81c26); color: #fff; font: 400 50px/1 "Mrs Saint Delafield", cursive; white-space: nowrap; border-radius: 3px; }
.noel-ribbon i { position: absolute; top: 10px; bottom: -10px; width: 42px; background: #8f141c; }
.noel-ribbon i.is-l { left: -27px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 34% 50%); }
.noel-ribbon i.is-r { right: -27px; clip-path: polygon(0 0, 100% 0, 66% 50%, 100% 100%, 0 100%); }

/* ---------- Màn đầu: xe tuần lộc bay ngang ---------- */
.noel-sky { position: absolute; inset: 0; overflow: hidden; z-index: 4; contain: strict; }
.noel-sleigh { position: absolute; left: 0; top: 0; width: 400px; will-change: transform; animation: noel-fly 26s linear infinite; animation-delay: -3s; }
.noel-sleigh svg { animation: noel-bob2 .8s ease-in-out infinite alternate; }
@keyframes noel-fly {
	0% { transform: translate(-440px, 46vh) rotate(-7deg); }
	55% { transform: translate(calc(100vw + 60px), 16vh) rotate(-7deg); }
	100% { transform: translate(calc(100vw + 60px), 16vh) rotate(-7deg); }
}
@keyframes noel-bob2 { from { transform: translateY(0); } to { transform: translateY(-5px); } }

/* ---------- Màn đầu: cây thông hai bên + đụn tuyết ---------- */
.noel-hero-tree { position: absolute; bottom: 236px; width: 152px; z-index: 12; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .45)); display: none; }
.noel-hero-tree.is-left { left: 4.5%; }
.noel-hero-tree.is-right { right: 4.5%; transform: scaleX(-1); }
.noel-hero-gifts { position: absolute; left: 62%; bottom: 2px; width: 90px; }
@media (min-width: 1280px) and (min-height: 740px) { .noel-hero-tree { display: block; } }
.noel-drift { position: absolute; left: 0; right: 0; bottom: -1px; height: 84px; z-index: 10; }
.noel-drift svg { height: 100%; }

/* ---------- Thêm sắc đỏ ---------- */
.noel-on .eta-hsearch-btn { background: #c8202b !important; }
.noel-on .eta-intro-cta { background: linear-gradient(#dd2f39, #b81c26); box-shadow: 0 10px 22px rgba(184, 28, 38, .32); }
.noel-on .eta-intro-h1 em { color: #c8202b; background-image: repeating-linear-gradient(135deg, #e23b3b 0 7px, #fff 7px 14px); background-size: 100% 9px; background-position: 0 100%; background-repeat: no-repeat; padding-bottom: 6px; }
.noel-on .eta-best .eta-home-kicker { color: #b3202a; }
.noel-on .eta-best h2 em { color: #c8202b; }
.noel-on .eta-best-rank { background: #c8202b; border-color: rgba(255, 255, 255, .55); }

/* ---------- Cành ô rô thay chấm xanh ở tiêu đề khối ---------- */
.noel-on .eta-home-kicker .eta-pulse { width: 34px; height: 25px; background: none; box-shadow: none; border-radius: 0; animation: none; display: inline-flex; vertical-align: -6px; }
.noel-on .eta-home-kicker::before, .noel-on .eta-home-kicker .eta-pulse::before, .noel-on .eta-home-kicker .eta-pulse::after { display: none; }
.noel-holly { width: 34px; }

/* ---------- Ông già Noel ---------- */
.noel-santa { position: absolute; overflow: hidden; z-index: 3; }
.noel-on .eta-intro { position: relative; }
.noel-santa.is-intro { right: 11%; bottom: 0; width: 122px; height: 96px; }
.noel-santa.is-intro svg { animation: noel-peek 7s ease-in-out infinite; }
@keyframes noel-peek { 0%, 6% { transform: translateY(72%); } 16%, 84% { transform: translateY(0); } 94%, 100% { transform: translateY(72%); } }
/* Trang tour: ông già Noel vẫy tay nằm gọn trong khung đặt chỗ (không bị thanh mục lục che), ô rô cài góc. */
.noel-on .eta-book { position: relative; }
.noel-santa-badge { position: absolute; right: 12px; top: 10px; width: 78px; z-index: 1; transform-origin: 50% 90%; animation: noel-wiggle 2.6s ease-in-out infinite alternate; }
.noel-holly-corner { position: absolute; top: -20px; left: 20px; width: 64px; transform: rotate(-12deg); transform-origin: 50% 90%; animation: noel-holly 2.6s ease-in-out infinite alternate; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .18)); }
@keyframes noel-holly { from { transform: rotate(-17deg); } to { transform: rotate(-7deg); } }

/* ---------- Cây thông nhỏ ở góc màn hình ---------- */
.noel-corner { position: fixed; right: 12px; bottom: -4px; width: 104px; z-index: 54; opacity: 0; transform: translateY(30px); transition: opacity .4s, transform .4s; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.noel-corner.is-in { opacity: 1; transform: none; }
.noel-corner-gifts { position: absolute; left: -46px; bottom: 6px; width: 72px; }
@media (max-width: 1399px) { .noel-corner { display: none; } }

/* ---------- Cảnh mùa đông ở đầu chân trang ---------- */
.noel-on #colophon { padding-top: 272px; }
.noel-scene { position: absolute; left: 0; right: 0; top: 0; height: 272px; overflow: hidden; contain: layout paint; }
.noel-scene::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: repeating-linear-gradient(135deg, #dd2f39 0 12px, #fff 12px 24px); }
.noel-scene-greet { position: absolute; left: 0; right: 0; top: 24px; margin: 0; text-align: center; font-family: "Mrs Saint Delafield", cursive; font-size: 54px; line-height: 1; color: #fbd067; white-space: nowrap; }
.noel-pines { position: absolute; left: 0; right: 0; bottom: 30px; height: 90px; }
.noel-pines svg { position: absolute; bottom: 0; }
.noel-prop { position: absolute; }
.noel-prop-tree { bottom: 22px; width: 122px; }
.noel-prop-tree.is-left { left: 5%; }
.noel-prop-tree.is-right { right: 6%; }
.noel-prop-gifts { bottom: 22px; width: 90px; }
.noel-prop-gifts.is-left { left: calc(5% + 100px); }
.noel-prop-gifts.is-right { right: calc(6% + 102px); }
.noel-prop-snowman { bottom: 20px; left: 72%; width: 70px; }
.noel-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; }
.noel-ground svg { height: 100%; }
.noel-jeep { position: absolute; left: 0; bottom: 8px; width: 214px; will-change: transform; animation: noel-drive 38s linear infinite; animation-delay: -9s; }
.noel-jeep svg { overflow: visible; animation: noel-bob .5s ease-in-out infinite alternate; }
.noel-wheel { transform-box: fill-box; transform-origin: center; animation: noel-spin 1.1s steps(8) infinite; }
@keyframes noel-drive { from { transform: translateX(-260px); } to { transform: translateX(calc(100vw + 60px)); } }
@keyframes noel-bob { from { transform: translateY(0); } to { transform: translateY(-1.5px); } }
@keyframes noel-spin { to { transform: rotate(360deg); } }

/* ---------- Popup ưu đãi Giáng sinh ---------- */
.noel-pop { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 96px 20px 20px; box-sizing: border-box; overflow: hidden; }
.noel-pop-dim { position: absolute; inset: 0; background: rgba(6, 20, 12, .64); opacity: 0; transition: opacity .35s; }
.noel-pop.is-open .noel-pop-dim { opacity: 1; }
.noel-pop-run { position: absolute; left: 0; bottom: 15vh; width: 600px; transform: translateX(-660px); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .4)); }
.noel-pop.is-open .noel-pop-run { animation: noel-run 2.7s cubic-bezier(.35, .1, .5, 1) .15s forwards; }
@keyframes noel-run { from { transform: translateX(-660px); } to { transform: translateX(calc(100vw + 80px)); } }
.noel-pop-drop { position: absolute; bottom: 20vh; width: 46px; opacity: 0; }
.noel-pop.is-open .noel-pop-drop { animation-name: noel-drop; animation-duration: 1.5s; animation-timing-function: cubic-bezier(.45, 0, .85, .6); animation-fill-mode: forwards; }
@keyframes noel-drop { 0% { opacity: 0; transform: translateY(0) rotate(0); } 12% { opacity: 1; } 100% { opacity: 1; transform: translateY(26vh) rotate(220deg); } }
.noel-pop-card { position: relative; width: min(100%, 430px); box-sizing: border-box; padding: 0 28px 22px; border-radius: 28px; background: #fff; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(40px) scale(.8); }
.noel-pop.is-open .noel-pop-card { animation: noel-pop-in .6s cubic-bezier(.2, 1.4, .4, 1) 1.9s forwards; }
@keyframes noel-pop-in { to { opacity: 1; transform: none; } }
.noel-pop-santa { position: absolute; left: 50%; bottom: calc(100% - 2px); width: 126px; height: 99px; margin-left: -63px; overflow: hidden; }
.noel-pop.is-open .noel-pop-santa svg { animation: noel-peek-up .7s cubic-bezier(.2, 1.3, .4, 1) 2.35s both; }
@keyframes noel-peek-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.noel-pop-art { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 8px; height: 132px; margin: 0 -28px; padding-bottom: 6px; box-sizing: border-box; border-radius: 28px 28px 0 0; background: linear-gradient(#e3323c, #b81c26); overflow: hidden; }
.noel-pop-art::after { content: ""; position: absolute; left: -12%; right: -12%; bottom: -40px; height: 62px; border-radius: 50%; background: #fff; }
.noel-pop-tree { position: relative; z-index: 1; width: 62px; }
.noel-pop-tree.is-r { transform: scaleX(-1); }
.noel-pop-gifts { position: relative; z-index: 1; width: 112px; margin-bottom: 2px; }
.noel-pop-kicker { margin: 16px 0 6px; font: 800 13px/1.2 "Urbanist", system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #b81c26; }
.noel-pop h2 { margin: 0; font: 900 32px/1.1 "Urbanist", system-ui, sans-serif; letter-spacing: -.01em; color: #0b2315; }
.noel-pop h2 b { font-size: 1.3em; color: #d12a34; }
.noel-pop-text { margin: 12px 0 20px; font: 500 16px/1.5 "Quicksand", system-ui, sans-serif; color: #2c3a32; }
.noel-pop a.noel-pop-cta { display: flex; align-items: center; justify-content: center; min-height: 56px; border-radius: 999px; background: linear-gradient(#e3323c, #b81c26); color: #fff; font: 800 18px/1 "Urbanist", system-ui, sans-serif; text-decoration: none; box-shadow: 0 10px 22px rgba(184, 28, 38, .35); }
.noel-pop a.noel-pop-cta:hover, .noel-pop a.noel-pop-cta:focus-visible { background: linear-gradient(#ec3d47, #c2212b); color: #fff; }
.noel-pop button.noel-pop-later { margin-top: 6px; min-height: 44px; padding: 0 16px; border: 0; background: none; color: #4f5d55; font: 700 15px/1 "Urbanist", system-ui, sans-serif; text-decoration: underline; cursor: pointer; }
.noel-pop button.noel-pop-x { position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); color: #0b2315; cursor: pointer; }
.noel-pop button.noel-pop-x svg { width: 20px; height: 20px; }
.noel-pop a:focus-visible, .noel-pop button:focus-visible { outline: 3px solid #fbd067; outline-offset: 3px; }

/* ---------- Bảng điều khiển (chỉ hiện ở bản xem thử trên máy) ---------- */
.noel-demo { position: fixed; left: 14px; bottom: 80px; z-index: 9999; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px; background: #17201b; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); font-family: "Urbanist", system-ui, sans-serif; }
.noel-demo button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: #fff; color: #17201b; font: 800 13px/1 "Urbanist", system-ui, sans-serif; cursor: pointer; }
.noel-demo button.noel-demo-pop { background: #e3323c; color: #fff; }
.noel-demo small { color: #cfd9d2; font-size: 11px; text-align: center; }

@media (max-width: 767px) {
	.noel-lights { left: 26px; right: 26px; height: 44px; }
	.noel-cap { left: 22px; right: 22px; }
	.noel-hat { left: -8px; top: -13px; width: 33px; }
	.noel-greet { gap: 30px; bottom: calc(100% + 0px); }
	.noel-greet-tree { width: 36px; }
	.noel-ribbon b { font-size: 40px; padding: 8px 24px 1px; }
	.noel-ribbon i { width: 34px; }
	.noel-ribbon i.is-l { left: -22px; }
	.noel-ribbon i.is-r { right: -22px; }
	.noel-sleigh { width: 250px; animation-duration: 15s; }
	.noel-drift { height: 48px; }
	.noel-on .eta-intro { padding-bottom: 92px; }
	.noel-santa.is-intro { right: 7%; width: 100px; height: 79px; }
	.noel-santa-badge { width: 64px; }
	.noel-on #colophon { padding-top: 262px; }
	.noel-scene { height: 262px; }
	.noel-scene-greet { font-size: 40px; line-height: .95; top: 26px; white-space: normal; padding: 0 16px; }
	.noel-prop-tree { width: 86px; }
	.noel-prop-tree.is-left { left: 2%; }
	.noel-prop-tree.is-right, .noel-prop-gifts.is-right { display: none; }
	.noel-prop-gifts.is-left { left: calc(2% + 68px); width: 62px; }
	.noel-prop-snowman { left: auto; right: 5%; width: 50px; }
	.noel-jeep { width: 152px; animation-duration: 20s; animation-delay: -6s; }
	.noel-pop { padding: 92px 14px 14px; }
	.noel-pop-run { width: 400px; bottom: 9vh; transform: translateX(-440px); }
	@keyframes noel-run { from { transform: translateX(-440px); } to { transform: translateX(calc(100vw + 60px)); } }
	.noel-pop-card { padding: 0 20px 16px; }
	.noel-pop-art { margin: 0 -20px; height: 112px; }
	.noel-pop-tree { width: 52px; }
	.noel-pop-gifts { width: 96px; }
	.noel-pop h2 { font-size: 27px; }
	.noel-pop-text { font-size: 15px; margin-bottom: 16px; }
	.noel-demo { left: 8px; bottom: 96px; padding: 8px; }
	.noel-demo button { min-height: 32px; padding: 0 10px; font-size: 12px; }
}

/* Máy yếu, tiết kiệm dữ liệu hoặc người dùng tắt chuyển động (JS gắn lớp noel-lite): chỉ giữ hình tĩnh. */
.noel-lite .noel-tw, .noel-lite .noel-wheel, .noel-lite .noel-jeep svg, .noel-lite .noel-hang, .noel-lite .noel-wave-hand, .noel-lite .noel-wave-arm, .noel-lite .noel-leg-a, .noel-lite .noel-leg-b,
.noel-lite .noel-santa.is-intro svg, .noel-lite .noel-santa-badge, .noel-lite .noel-holly-corner, .noel-lite .noel-hero-gifts, .noel-lite .noel-prop-gifts, .noel-lite .noel-corner-gifts, .noel-lite .noel-pop-gifts { animation: none; }
.noel-lite .noel-jeep { animation: none; transform: translateX(12vw); }
.noel-lite .noel-pop.is-open .noel-pop-card { animation: none; opacity: 1; transform: none; }
.noel-lite .noel-pop.is-open .noel-pop-santa svg { animation: none; }
