/* ===== Khoi 4b: Hinh anh thuc te tu van khach hang (02/12/2026) =====
   Markup: template-parts/trang-chu/tu-van-thuc-te.php  |  JS: assets/js/tu-van-thuc-te.js
   Chi nap o trang chu (functions.php). Dau khoi + dai goi/Zalo dung chung .ztr-dc-dau / .ztr-dc-tv
   (ztravel-them.css), o day chi viet phan rieng .ztr-tv-*.
   Hieu ung nhe: re chuot anh phong 1.04 + hien chu thich; hien dan khi cuon toi do
   hieu-ung-trang-chu.css/js lo chung. Tat het khi nguoi dung chon giam chuyen dong. */

.ztr-tv { padding: 0 0 72px; }

/* --- Luoi bento: may tinh 4 cot x 4 hang (10 o) ---
     [1 1] 2 [3]
     [1 1] 4 [3]      o1 = 2x2 (anh ngang lon)
     [5]  6 7 [8]     o3, o5, o8 = cao 1x2 (anh doc)
     [5]  9 10 [8]    con lai 1x1; o 11+ tu xuong hang 1x1 */
.ztr-tv-luoi {
	list-style: none; margin: 0 0 28px; padding: 0;
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 210px; gap: 16px;
}
.ztr-tv-luoi > .ztr-tv-o { margin: 0; padding: 0; list-style: none; min-width: 0; }
.ztr-tv-luoi > .ztr-tv-o:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.ztr-tv-luoi > .ztr-tv-o:nth-child(3),
.ztr-tv-luoi > .ztr-tv-o:nth-child(5),
.ztr-tv-luoi > .ztr-tv-o:nth-child(8) { grid-row: span 2; }

.ztr-tv-the {
	position: relative; display: block; height: 100%; overflow: hidden; isolation: isolate;
	border-radius: 14px; background: #eef2f7; color: #fff; text-decoration: none;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 6px 18px rgba(16, 24, 40, .08);
	transition: box-shadow .35s ease;
	-webkit-tap-highlight-color: transparent;
}
.ztr-tv-the:hover, .ztr-tv-the:focus { color: #fff; text-decoration: none; }
.ztr-tv-the:hover { box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 14px 32px rgba(4, 69, 161, .16); }
.ztr-tv-the:focus { outline: none; }
.ztr-tv-the:focus-visible { outline: 3px solid var(--orange-color, #FA5636); outline-offset: 3px; }

.ztr-tv .ztr-tv-anh {
	display: block; width: 100%; height: 100%; max-width: none;
	object-fit: cover; object-position: var(--tv-vt, 50% 50%);
	transition: transform .7s cubic-bezier(.2, .6, .2, 1);
}
.ztr-tv-the:hover .ztr-tv-anh, .ztr-tv-the:focus-visible .ztr-tv-anh { transform: scale(1.04); }

/* Chu thich: an, re chuot / tab toi thi hien len tu duoi */
.ztr-tv-chu {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
	padding: 40px 16px 14px;
	background: linear-gradient(to top, rgba(8, 26, 56, .80) 0%, rgba(8, 26, 56, .38) 55%, rgba(8, 26, 56, 0) 100%);
	font-size: 14px; font-weight: 600; line-height: 1.4; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
	opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease;
	pointer-events: none;
}
.ztr-tv-chu::before {
	content: ""; display: block; width: 24px; height: 3px; margin-bottom: 8px; border-radius: 2px;
	background: var(--orange-color, #FA5636);
}
.ztr-tv-luoi > .ztr-tv-o:nth-child(1) .ztr-tv-chu { padding: 56px 22px 20px; font-size: 17px; }
.ztr-tv-the:hover .ztr-tv-chu, .ztr-tv-the:focus-visible .ztr-tv-chu { opacity: 1; transform: none; }

/* Nut "phong to" goc tren */
.ztr-tv-phong {
	position: absolute; top: 12px; right: 12px; z-index: 1;
	display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
	background: rgba(255, 255, 255, .94); color: var(--main-color, #0445A1);
	box-shadow: 0 2px 8px rgba(16, 24, 40, .18);
	opacity: 0; transform: scale(.85); transition: opacity .3s ease, transform .3s ease;
}
.ztr-tv-the:hover .ztr-tv-phong, .ztr-tv-the:focus-visible .ztr-tv-phong { opacity: 1; transform: none; }

/* May cam ung (khong re chuot duoc): chu thich luon hien, bo nut phong to */
@media (hover: none) {
	.ztr-tv-chu { opacity: 1; transform: none; }
	.ztr-tv-phong { display: none; }
}

/* O cho (chua co anh that): nen nhat mau thuong hieu + bieu tuong may anh, khong bam duoc */
.ztr-tv-cho {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	padding: 16px; box-sizing: border-box; text-align: center;
	background: linear-gradient(145deg, #f3f7fd 0%, #e6eef9 100%);
	border: 1px dashed #c5d4ea; box-shadow: none;
	color: var(--main-color, #0445A1);
}
.ztr-tv-cho span { font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--grey-color, #5E6D77); }
.ztr-tv-cho:hover { box-shadow: none; }

.ztr-tv-goi-y { display: none; }
.ztr-tv-cta { margin-top: 0; }

/* --- 768-991px: 2 cot --- */
@media (max-width: 991px) {
	.ztr-tv-luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; gap: 14px; }
}

/* --- Dien thoai: 1 hang vuot ngang, keo tran 2 mep man hinh --- */
@media (max-width: 767px) {
	.ztr-tv { padding-bottom: 44px; }
	.ztr-tv-luoi {
		display: flex; gap: 12px; margin: 0 -15px 6px; padding: 4px 15px 14px;
		overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory; scroll-padding: 0 15px;
		-webkit-overflow-scrolling: touch; scrollbar-width: none;
	}
	.ztr-tv-luoi::-webkit-scrollbar { display: none; }
	.ztr-tv-luoi > .ztr-tv-o { flex: 0 0 84%; scroll-snap-align: start; }
	.ztr-tv-the { height: auto; aspect-ratio: 4 / 3; border-radius: 12px; }
	.ztr-tv-chu,
	.ztr-tv-luoi > .ztr-tv-o:nth-child(1) .ztr-tv-chu { opacity: 1; transform: none; padding: 36px 14px 12px; font-size: 14px; }
	.ztr-tv-phong { display: none; }
	.ztr-tv-goi-y {
		display: flex; align-items: center; justify-content: center; gap: 6px;
		margin: 0 0 20px; font-size: 13px; color: var(--grey-color, #5E6D77);
	}
	/* So dien thoai khong bi xuong 2 dong tren man 360-375px: nut goi rong hon nut Zalo */
	.ztr-tv-cta .ztr-dc-tv-nut a { white-space: nowrap; gap: 6px; padding: 0 10px; }
	.ztr-tv-cta .ztr-dc-tv-nut .ztr-dc-goi { flex: 1.35 1 0; }
	.ztr-tv-cta .ztr-dc-tv-nut .ztr-dc-zalo { flex: 1 1 0; }
}

/* Hien dan khi cuon toi: do assets/css/hieu-ung-trang-chu.css + js lo chung cho ca trang chu. */

/* --- Hop xem anh lon (<dialog> do JS tao) --- */
html.ztr-tv-khoa { overflow: hidden; }
.ztr-tv-hop {
	box-sizing: border-box; width: 100%; height: 100%; max-width: none; max-height: none;
	margin: 0; padding: 64px 80px 56px; border: 0; background: transparent; color: #fff; overflow: hidden;
}
.ztr-tv-hop[open] { display: flex; align-items: center; justify-content: center; }
.ztr-tv-hop::backdrop { background: rgba(6, 14, 30, .9); }
.ztr-tv-hop-khung {
	margin: 0; max-width: min(1120px, 100%); max-height: 100%;
	display: flex; flex-direction: column; align-items: center; gap: 14px;
	animation: ztrTvMo .3s ease both;
}
.ztr-tv-hop-anh {
	display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 170px);
	border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); background: #1b2437;
	transition: opacity .25s ease;
}
.ztr-tv-hop-anh.dang-tai { opacity: .35; }
.ztr-tv-hop-chu { margin: 0; font-size: 15px; line-height: 1.5; text-align: center; color: rgba(255, 255, 255, .92); }
.ztr-tv-hop-dem { position: absolute; top: 24px; left: 24px; font-size: 14px; letter-spacing: .04em; color: rgba(255, 255, 255, .75); }
.ztr-tv-hop .ztr-tv-hop-nut {
	position: absolute; display: flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; transition: background .2s ease;
}
.ztr-tv-hop .ztr-tv-hop-nut:hover { background: rgba(255, 255, 255, .24); }
.ztr-tv-hop .ztr-tv-hop-nut:focus { outline: none; }
.ztr-tv-hop .ztr-tv-hop-nut:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ztr-tv-hop-dong { top: 14px; right: 14px; }
.ztr-tv-hop-truoc { left: 16px; top: 50%; margin-top: -24px; }
.ztr-tv-hop-sau { right: 16px; top: 50%; margin-top: -24px; }
@keyframes ztrTvMo { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 767px) {
	.ztr-tv-hop { padding: 60px 12px 84px; }
	.ztr-tv-hop-anh { max-height: calc(100vh - 210px); border-radius: 8px; }
	.ztr-tv-hop-chu { font-size: 14px; padding: 0 8px; }
	.ztr-tv-hop-dem { top: 26px; left: 16px; }
	.ztr-tv-hop-dong { top: 10px; right: 10px; }
	.ztr-tv-hop-truoc, .ztr-tv-hop-sau { top: auto; bottom: 20px; margin-top: 0; }
	.ztr-tv-hop-truoc { left: calc(50% - 60px); }
	.ztr-tv-hop-sau { right: calc(50% - 60px); }
}

/* --- Nguoi dung chon giam chuyen dong: tat het hieu ung --- */
@media (prefers-reduced-motion: reduce) {
	.ztr-tv-the, .ztr-tv .ztr-tv-anh, .ztr-tv-chu, .ztr-tv-phong, .ztr-tv-hop-anh { transition: none !important; }
	.ztr-tv-the:hover .ztr-tv-anh, .ztr-tv-the:focus-visible .ztr-tv-anh { transform: none; }
	.ztr-tv-hop-khung { animation: none; }
}
