/* Nai House – CSS riêng (ngoài Tailwind). Màu lấy từ biến --nh-* (Customizer). */
body { font-family: var(--nh-font, "Be Vietnam Pro"), system-ui, sans-serif; background: rgb(var(--nh-dark)); color: rgb(var(--nh-muted)); }
h1, h2, h3, h4 { color: #fff; }
html { scroll-padding-top: 90px; }
:focus-visible { outline: 3px solid rgb(var(--nh-yellow)); outline-offset: 3px; border-radius: 6px; }
.admin-bar #top.sticky { top: 32px; }
@media (max-width: 782px) { .admin-bar #top.sticky { top: 46px; } }
@media (max-width: 600px) { .admin-bar #top.sticky { top: 0; } }

/* Logo */
.nh-logo-img { height: calc(var(--nh-logo-h, 56px) * .8); }
@media (min-width: 768px) { .nh-logo-img { height: var(--nh-logo-h, 56px); } }
.logo-fallback { display: none; }
.logo-broken + .logo-fallback { display: inline-flex; }

/* Hero: ánh đèn sân khấu */
.stage-lights::before, .stage-lights::after {
	content: ""; position: absolute; top: -10%; width: 55%; height: 120%; pointer-events: none;
	background: conic-gradient(from 180deg at 50% 0%, transparent 42%, rgb(var(--nh-yellow) / .16) 50%, transparent 58%);
	filter: blur(6px); transform-origin: 50% 0%;
	animation: sway 9s ease-in-out infinite alternate;
}
.stage-lights::before { left: -5%; transform: rotate(-18deg); }
.stage-lights::after { right: -5%; transform: rotate(18deg); animation-delay: -4.5s; animation-name: sway2;
	background: conic-gradient(from 180deg at 50% 0%, transparent 43%, rgb(var(--nh-red-400) / .13) 50%, transparent 57%); }
@keyframes sway { from { transform: rotate(-22deg); } to { transform: rotate(-8deg); } }
@keyframes sway2 { from { transform: rotate(22deg); } to { transform: rotate(8deg); } }

/* Hiện dần khi cuộn */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Card hover glow */
.svc-card { transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.svc-card:hover, .svc-card:focus-within { transform: translateY(-4px); box-shadow: 0 0 0 1px rgb(var(--nh-yellow) / .7), 0 18px 50px -12px rgb(var(--nh-yellow) / .35); }

/* Ảnh lỗi */
img.img-fallback { visibility: hidden; }
.img-wrap { background: linear-gradient(135deg, rgb(var(--nh-dark-3)), #27272a); }

/* FAQ */
.faq-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq-panel > div { overflow: hidden; }
.faq-panel p + p { margin-top: .75rem; }
.faq-item.open .faq-panel { grid-template-rows: 1fr; }
.faq-item.open .faq-icon { transform: rotate(180deg); }

/* Bẫy spam */
.nh-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*:not(.motion-ok), *:not(.motion-ok)::before, *:not(.motion-ok)::after { animation: none !important; transition: none !important; }
	.reveal { opacity: 1; transform: none; }
}

/* ===== TRANSITION MENU (tinh tế, nhanh – dứt khoát) ===== */
.nav-list { position: relative; }
.nav-indicator {
	position: absolute; bottom: -8px; left: 0; height: 2px; width: 0; border-radius: 2px;
	background: rgb(var(--nh-yellow)); box-shadow: 0 0 10px rgb(var(--nh-yellow) / .7); opacity: 0;
	transition: transform .3s cubic-bezier(.2,.8,.2,1), width .3s cubic-bezier(.2,.8,.2,1), opacity .2s;
}
.nav-link.is-active { color: #fff !important; }

.spot-host { position: relative; }
.spot-host.spot-sweep::after {
	content: ""; position: absolute; top: -10%; bottom: -10%; left: 0; width: 35%; pointer-events: none; z-index: 2;
	background: linear-gradient(90deg, rgb(var(--nh-yellow) / 0), rgb(var(--nh-yellow) / .55) 50%, rgb(var(--nh-yellow) / 0));
	filter: blur(8px); transform: translateX(-120%) skewX(-18deg);
	animation: spotSweep .75s cubic-bezier(.25,.7,.3,1) forwards;
}
.spot-host.spot-sweep::before {
	content: ""; position: absolute; left: 0; bottom: -12px; height: 3px; width: min(100%, 220px); border-radius: 3px; pointer-events: none;
	background: rgb(var(--nh-yellow)); box-shadow: 0 0 14px rgb(var(--nh-yellow) / .9); transform-origin: left;
	animation: spotLine 1.4s cubic-bezier(.25,.7,.3,1) forwards;
}
.text-center > .spot-host.spot-sweep::before, h2.text-center.spot-sweep::before { left: 50%; transform-origin: center; translate: -50% 0; }
@keyframes spotSweep { 0% { transform: translateX(-120%) skewX(-18deg); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(320%) skewX(-18deg); opacity: 0; } }
@keyframes spotLine { 0% { transform: scaleX(0); opacity: 1; } 30% { transform: scaleX(1); opacity: 1; } 70% { opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }

#mobileMenu { display: grid; grid-template-rows: 0fr; visibility: hidden;
	transition: grid-template-rows .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s; }
#mobileMenu > div { min-height: 0; overflow: hidden; }
@media (min-width: 1024px) { #mobileMenu { display: none; } }
#mobileMenu.open { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
#mobileMenu li { opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .2s ease; }
#mobileMenu.open li { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 40ms + 60ms); }

.burger { position: relative; width: 24px; height: 18px; display: block; }
.burger span { position: absolute; left: 0; width: 100%; height: 2.5px; border-radius: 2px; background: currentColor;
	transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .15s, top .25s cubic-bezier(.2,.8,.2,1); }
.burger span:nth-child(1) { top: 0; } .burger span:nth-child(2) { top: 7.75px; } .burger span:nth-child(3) { top: 15.5px; }
[aria-expanded="true"] .burger span:nth-child(1) { top: 7.75px; transform: rotate(45deg); }
[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .burger span:nth-child(3) { top: 7.75px; transform: rotate(-45deg); }

[data-count] { font-variant-numeric: tabular-nums; }

/* Rèm sân khấu */
.curtain { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: flex; visibility: hidden; }
.curtain.active { visibility: visible; pointer-events: auto; }
.curtain__panel { flex: 1; transform: translateX(-101%);
	background:
		repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 6px, rgba(255,255,255,.04) 6px 14px, rgba(0,0,0,.18) 14px 26px),
		linear-gradient(180deg, rgb(var(--nh-red-700)), #7F1D1D 70%, #450a0a);
	box-shadow: inset -18px 0 30px rgba(0,0,0,.45);
	transition: transform .38s cubic-bezier(.7,0,.3,1); }
.curtain__panel--right { transform: translateX(101%); box-shadow: inset 18px 0 30px rgba(0,0,0,.45); }
.curtain.closed .curtain__panel { transform: translateX(0); }
.curtain__seam { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%);
	background: linear-gradient(rgb(var(--nh-yellow)), transparent); opacity: 0; transition: opacity .2s; }
.curtain.closed .curtain__seam { opacity: .9; transition-delay: .3s; }
.curtain__valance { position: absolute; top: 0; left: 0; right: 0; height: 28px; transform: translateY(-100%);
	background: linear-gradient(#450a0a, #7F1D1D); border-bottom: 2px solid rgb(var(--nh-yellow)); transition: transform .25s ease; }
.curtain.closed .curtain__valance { transform: none; }
.curtain.reduced .curtain__panel, .curtain.reduced .curtain__valance { transform: none !important; }
.curtain.reduced { opacity: 0; transition: opacity .18s ease; }
.curtain.reduced.closed { opacity: 1; }

/* ===== Nội dung bài viết / khối WordPress ===== */
.nh-prose { --tw-prose-invert-body: rgb(var(--nh-muted)); --tw-prose-invert-links: rgb(var(--nh-yellow)); --tw-prose-invert-bullets: rgb(var(--nh-yellow)); --tw-prose-invert-quote-borders: rgb(var(--nh-yellow)); }
.nh-prose img, .nh-prose figure img { border-radius: 1rem; }
.nh-prose .wp-block-button__link { background: rgb(var(--nh-red)); color: #fff; border-radius: 999px; padding: .85rem 1.75rem; font-weight: 700; text-decoration: none; }
.nh-prose .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; border: 2px solid rgb(var(--nh-yellow)); color: rgb(var(--nh-yellow)); }
.nh-prose .wp-block-columns { gap: 2rem; }
.nh-prose figcaption, .wp-caption-text { font-size: .875rem; text-align: center; color: rgb(var(--nh-muted) / .8); }
.alignwide { max-width: 80rem; margin-left: auto; margin-right: auto; }
.alignfull { max-width: none; }
.aligncenter { margin-left: auto; margin-right: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* Phân trang */
.nh-pagination .page-numbers { min-width: 44px; height: 44px; padding: 0 .9rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid rgb(255 255 255 / .2); color: #fff; font-weight: 700; }
.nh-pagination .page-numbers:hover { border-color: rgb(var(--nh-yellow)); }
.nh-pagination .page-numbers.current { background: rgb(var(--nh-yellow)); border-color: rgb(var(--nh-yellow)); color: #000; }

/* Thẻ bài viết & điều hướng */
.nh-tags a { padding: .35rem .9rem; border-radius: 999px; border: 1px solid rgb(255 255 255 / .2); font-size: .85rem; }
.nh-tags a:hover { border-color: rgb(var(--nh-yellow)); color: rgb(var(--nh-yellow)); }
.post-navigation .nav-links { display: grid; gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .post-navigation .nav-links { grid-template-columns: 1fr 1fr; } .post-navigation .nav-next { text-align: right; } }
.post-navigation a { display: block; padding: 1.25rem; border-radius: 1rem; background: rgb(var(--nh-dark-3)); border: 1px solid rgb(255 255 255 / .1); color: #fff; font-weight: 700; }
.post-navigation a:hover { border-color: rgb(var(--nh-yellow) / .6); }

/* Bình luận */
.nh-comments .comment-body { background: rgb(var(--nh-dark-3)); border: 1px solid rgb(255 255 255 / .1); border-radius: 1rem; padding: 1.25rem; }
.nh-comments .children { margin: 1rem 0 0 1.5rem; display: grid; gap: 1rem; }
.nh-comments .comment-author { display: flex; align-items: center; gap: .75rem; color: #fff; font-weight: 700; }
.nh-comments .avatar { border-radius: 999px; }
.nh-comments .comment-metadata { font-size: .75rem; margin: .25rem 0 .75rem; }
.nh-comments .reply a { color: rgb(var(--nh-yellow)); font-weight: 700; font-size: .875rem; }
.nh-comments input[type=text], .nh-comments input[type=email], .nh-comments input[type=url], .nh-comments textarea { width: 100%; background: rgb(var(--nh-dark)); border: 1px solid rgb(255 255 255 / .2); border-radius: .75rem; padding: .75rem 1rem; color: #fff; margin-top: .35rem; }
.nh-comments .comment-form p { margin-top: 1rem; }
.nh-comments label { color: #fff; font-weight: 600; font-size: .875rem; }

/* ===== Form Báo Giá: Tự động điền (Auto-Populate - Bước 5) ===== */
.border-brand-yellow\/60 { border-color: rgb(var(--nh-yellow) / .6) !important; }
[data-auto-filled="true"] { border-color: rgb(var(--nh-yellow) / .6) !important; background-color: rgb(var(--nh-yellow) / .03); }
.nh-prefill-tag { animation: nhPrefillFadeIn 0.3s ease-in-out; }
@keyframes nhPrefillFadeIn { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Thư viện ảnh sự kiện di chuyển (nh-migrated-gallery) ===== */
.nh-migrated-gallery { margin: 2rem 0 !important; }
.nh-migrated-gallery figure { margin: 0 !important; }
.nh-migrated-gallery figure img { margin: 0 !important; width: 100%; height: 220px; object-fit: cover; border-radius: 0.75rem; display: block; }
@media (max-width: 640px) {
	.nh-migrated-gallery figure img { height: 180px; }
}

/* ===== Trình xem ảnh toàn màn hình & Phóng to sâu (Lightbox & Deep Zoom) ===== */
body.nh-lb-active {
	overflow: hidden !important;
	touch-action: none;
}

.nh-lb-zoomable {
	cursor: zoom-in !important;
}

.nh-lb-fig-zoomable {
	position: relative;
	cursor: zoom-in;
}

.nh-lb-fig-zoomable::after {
	content: "";
	position: absolute;
	right: 12px;
	bottom: 12px;
	width: 34px;
	height: 34px;
	border-radius: 9999px;
	background: rgba(15, 15, 15, 0.8) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E") center / 16px no-repeat;
	border: 1px solid rgba(245, 158, 11, 0.45);
	opacity: 0;
	transform: scale(0.85);
	transition: opacity 0.25s ease, transform 0.25s ease;
	pointer-events: none;
	z-index: 2;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.nh-lb-fig-zoomable:hover::after {
	opacity: 1;
	transform: scale(1);
}

@media (max-width: 768px) {
	.nh-lb-fig-zoomable::after {
		opacity: 0.9;
		transform: scale(0.9);
		right: 8px;
		bottom: 8px;
		width: 28px;
		height: 28px;
		background-size: 14px;
	}
}

.nh-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	user-select: none;
	-webkit-user-select: none;
}

.nh-lightbox.active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.nh-lb-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 8, 8, 0.94);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	z-index: 1;
}

.nh-lb-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 64px;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 10;
	pointer-events: auto;
}

.nh-lb-counter {
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
	background: rgba(255, 255, 255, 0.08);
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	letter-spacing: 0.5px;
}

.nh-lb-counter .nh-lb-cur {
	color: rgb(var(--nh-yellow));
}

.nh-lb-tools {
	display: flex;
	align-items: center;
	gap: 10px;
}

.nh-lb-btn {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: #fff;
	width: 42px;
	height: 42px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	outline: none;
	touch-action: manipulation;
}

.nh-lb-btn:hover {
	background: rgb(var(--nh-yellow));
	color: #000;
	border-color: rgb(var(--nh-yellow));
	transform: scale(1.08);
}

.nh-lb-btn.nh-lb-close:hover {
	background: #ef4444;
	color: #fff;
	border-color: #ef4444;
}

.nh-lb-viewport {
	position: relative;
	z-index: 5;
	flex: 1;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 64px 0 54px 0;
	touch-action: none;
}

.nh-lb-stage {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: none;
}

.nh-lb-img-wrap {
	position: relative;
	max-width: 90vw;
	max-height: 82vh;
	display: flex;
	align-items: center;
	justify-content: center;
	transform-origin: center center;
	will-change: transform;
}

.nh-lb-img {
	max-width: 90vw;
	max-height: 82vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
	pointer-events: none;
	transition: opacity 0.2s ease;
	display: block;
}

.nh-lb-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 12;
	width: 52px;
	height: 52px;
	border-radius: 999px;
	background: rgba(20, 20, 20, 0.75);
	border: 1px solid rgba(255, 255, 255, 0.22);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	outline: none;
	touch-action: manipulation;
}

.nh-lb-nav.nh-lb-prev {
	left: 20px;
}

.nh-lb-nav.nh-lb-next {
	right: 20px;
}

.nh-lb-nav:hover {
	background: rgb(var(--nh-yellow));
	color: #000;
	border-color: rgb(var(--nh-yellow));
	transform: translateY(-50%) scale(1.1);
}

.nh-lb-footer {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 10px 20px 16px;
	text-align: center;
	z-index: 10;
	pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}

.nh-lb-caption {
	color: #fff;
	font-size: 0.95rem;
	font-weight: 500;
	margin-bottom: 4px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nh-lb-hint {
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.75rem;
	letter-spacing: 0.3px;
}

.nh-lb-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	margin-left: -22px;
	border: 3px solid rgba(255, 255, 255, 0.15);
	border-top-color: rgb(var(--nh-yellow));
	border-radius: 50%;
	animation: nhLbSpin 0.75s linear infinite;
	pointer-events: none;
	z-index: 3;
}

@keyframes nhLbSpin {
	to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
	.nh-lb-header {
		height: 56px;
		padding: 0 12px;
	}
	.nh-lb-btn {
		width: 38px;
		height: 38px;
	}
	.nh-lb-viewport {
		padding: 56px 0 46px 0;
	}
	.nh-lb-nav {
		width: 42px;
		height: 42px;
	}
	.nh-lb-nav.nh-lb-prev {
		left: 8px;
	}
	.nh-lb-nav.nh-lb-next {
		right: 8px;
	}
	.nh-lb-hint {
		font-size: 0.7rem;
	}
}


