/* CenterTour — modern responsive stylesheet (single codebase for all devices/orientations) */
:root {
	--brand-orange: #fea100;
	--brand-orange-dark: #d98a00;
	--brand-teal: #06876e;
	--brand-blue: #1a56c4;
	--text-dark: #1f2933;
	--text-muted: #6b7280;
	--bg-page: #f6f7f9;
	--bg-card: #ffffff;
	--border-light: #e2e5ea;
	--radius: 12px;
	--shadow-sm: 0 1px 3px rgba(0,0,0,.08);
	--shadow-md: 0 6px 18px rgba(0,0,0,.10);
	--container-max: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: "Noto Sans Thai", "Noto Sans", system-ui, -apple-system, sans-serif;
	background: var(--bg-page);
	color: var(--text-dark);
	line-height: 1.5;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 16px; }

/* Site cover banner (static top image, matches production) — natural ratio, never cropped.
   Desktop and mobile use production's own separate source images (different native crops). */
.site-cover {
	width: 100%;
	overflow: hidden;
	background: #111;
	line-height: 0;
}
.site-cover img { width: 100%; height: auto; display: block; }
.site-cover img.cover-mobile { display: none; }
@media (max-width: 767px) {
	.site-cover img.cover-desktop { display: none; }
	.site-cover img.cover-mobile { display: block; }
}

/* Header */
.site-header {
	background: #fff;
	border-bottom: 1px solid var(--border-light);
	position: sticky;
	top: 0;
	z-index: 100;
}
.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	max-width: var(--container-max);
	margin: 0 auto;
	position: relative;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: var(--brand-blue); }
.brand img { height: 40px; width: auto; }
.nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px; height: 42px;
	border: 1px solid var(--border-light);
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	font-size: 1.2rem;
}
/* Mobile: nav is a dropdown panel, opened via .open toggled by JS */
.site-nav {
	display: none;
	flex-direction: column;
	gap: 0;
	position: absolute;
	top: 100%;
	left: 16px;
	right: 16px;
	background: #fff;
	border: 1px solid var(--border-light);
	border-radius: 10px;
	box-shadow: var(--shadow-md);
	padding: 6px 14px;
	z-index: 200;
}
.site-nav.open { display: flex; }
.site-nav a {
	font-size: .95rem;
	font-weight: 600;
	color: var(--text-dark);
	padding: 12px 2px;
	border-bottom: 1px solid var(--border-light);
}
.site-nav a:last-child { border-bottom: none; }
.site-nav a:hover { color: var(--brand-blue); }
@media (min-width: 900px) {
	.site-nav {
		display: flex !important;
		flex-direction: row;
		flex-wrap: wrap;
		position: static;
		border: none;
		box-shadow: none;
		padding: 0;
		background: none;
		gap: 16px;
		margin-left: auto;
		margin-right: 16px;
	}
	.site-nav a { padding: 0; border-bottom: none; font-size: .85rem; }
	.nav-toggle { display: none; }
}

/* Hero slider */
.hero {
	position: relative;
	width: 100%;
	aspect-ratio: 2 / 1;
	max-height: 480px;
	overflow: hidden;
	background: #eee;
}
.hero img { width: 100%; height: 100%; object-fit: cover; }

/* Search card */
.search-card {
	background: var(--bg-card);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	padding: 16px;
	margin: -32px auto 24px;
	max-width: 900px;
	position: relative;
	z-index: 5;
}
.search-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
}
@media (min-width: 640px) {
	.search-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 900px) {
	.search-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; align-items: end; }
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: .8rem; color: var(--text-muted); }
.field input, .field select {
	height: 44px;
	border: 1px solid var(--border-light);
	border-radius: 8px;
	padding: 0 12px;
	font-size: .95rem;
	background: #fff;
	min-width: 0;
	width: 100%;
}
.field input:focus, .field select:focus {
	outline: none;
	border-color: var(--brand-orange);
	box-shadow: 0 0 0 3px rgba(254,161,0,.15);
}
.btn-search {
	height: 44px;
	border: none;
	border-radius: 8px;
	background: var(--brand-orange);
	color: #1a1a1a;
	font-weight: 700;
	cursor: pointer;
	padding: 0 20px;
	transition: background .2s ease;
}
.btn-search:hover { background: var(--brand-teal); color: #fff; }

/* Section heading */
.section { padding: 28px 0; }
.section-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}
.section-title h2 { font-size: 1.3rem; margin: 0; color: var(--text-dark); }
.section-title a { color: var(--brand-blue); font-size: .9rem; font-weight: 600; }

/* Tour grid — responsive across all orientations */
.tour-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}
@media (min-width: 560px) {
	.tour-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
	.tour-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
	.tour-grid { grid-template-columns: repeat(5, 1fr); }
}
.tour-card {
	background: var(--bg-card);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: transform .15s ease, box-shadow .15s ease;
	display: flex;
	flex-direction: column;
}
.tour-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tour-card-img { aspect-ratio: 1/1; overflow: hidden; background: #eee; }
.tour-card-img img { width: 100%; height: 100%; object-fit: cover; }
.tour-card-body { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.tour-card-title { font-size: .9rem; font-weight: 600; line-height: 1.3; }
.tour-card-code { font-size: .75rem; color: var(--text-muted); }
.tour-card-price { margin-top: auto; font-size: 1.05rem; font-weight: 800; color: var(--brand-orange-dark); }
.tour-card-price small { font-weight: 500; color: var(--text-muted); font-size: .75rem; }

/* Group chips */
.group-scroll {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	padding-bottom: 6px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.group-chip {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 1px solid var(--border-light);
	border-radius: 999px;
	padding: 8px 14px;
	font-size: .85rem;
	white-space: nowrap;
}
.group-chip img { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; }

/* Footer */
.site-footer {
	background: #1f2933;
	color: #cbd2d9;
	padding: 32px 0;
	margin-top: 32px;
	font-size: .85rem;
}
.site-footer a { color: #fff; }

/* Breadcrumb */
.breadcrumb {
	display: flex;
	gap: 8px;
	align-items: center;
	font-size: .85rem;
	color: var(--text-muted);
	padding: 14px 0 0;
	flex-wrap: wrap;
}
.breadcrumb a { color: var(--brand-blue); }

/* Pagination */
.pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 24px;
	font-size: .9rem;
}
.page-link {
	color: #fff;
	background: var(--brand-blue);
	padding: 8px 16px;
	border-radius: 8px;
	font-weight: 600;
}
.page-current { color: var(--text-muted); }
.empty-state { color: var(--text-muted); padding: 24px 0; }

/* Tour detail */
.tour-detail {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	padding: 20px 0;
}
@media (min-width: 800px) {
	.tour-detail { grid-template-columns: 420px 1fr; align-items: start; }
}
.tour-detail-media {
	aspect-ratio: 1/1;
	border-radius: var(--radius);
	overflow: hidden;
	background: #eee;
	box-shadow: var(--shadow-sm);
}
.tour-detail-media img { width: 100%; height: 100%; object-fit: cover; }
.tour-detail-info h1 { font-size: 1.4rem; margin: 0 0 10px; color: var(--text-dark); }
.tour-detail-code, .tour-detail-air, .tour-detail-period { font-size: .9rem; color: var(--text-muted); margin-bottom: 4px; }
.tour-detail-price { margin: 16px 0; font-size: 1.8rem; font-weight: 800; color: var(--brand-orange-dark); display: flex; align-items: baseline; gap: 10px; }
.tour-detail-price small { font-size: .85rem; font-weight: 500; color: var(--text-muted); }
.price-old { font-size: 1.1rem; font-weight: 500; color: var(--text-muted); text-decoration: line-through; }
.price-now { color: var(--brand-orange-dark); }
.tour-highlights { margin: 16px 0; padding-left: 20px; color: var(--text-dark); font-size: .95rem; line-height: 1.7; }
.btn-book { display: inline-block; text-align: center; text-decoration: none; margin-top: 10px; }

/* Price table + itinerary (legacy rich-text content) — force responsive */
.price-table-wrap { overflow-x: auto; background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 12px; }
.price-table-wrap table { border-collapse: collapse; max-width: 100%; }
.itinerary { display: flex; flex-direction: column; gap: 16px; }
.itinerary-day { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; overflow-x: auto; }
.itinerary-day img { max-width: 100%; height: auto; border-radius: 8px; }
.itinerary-day table { max-width: 100%; }

/* Article grid + detail */
.article-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}
@media (min-width: 640px) { .article-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .article-grid { grid-template-columns: repeat(4, 1fr); } }
.article-card {
	background: var(--bg-card);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: transform .15s ease, box-shadow .15s ease;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-card-img { aspect-ratio: 16/10; background: #eee; overflow: hidden; }
.article-card-img img { width: 100%; height: 100%; object-fit: cover; }
.article-card-title { padding: 10px 12px; font-size: .9rem; font-weight: 600; line-height: 1.4; }
.article-detail { padding: 20px 0 40px; max-width: 900px; margin: 0 auto; }
.article-detail h1 { font-size: 1.5rem; color: var(--text-dark); }
.article-detail-media { border-radius: var(--radius); overflow: hidden; background: #eee; margin: 16px 0; box-shadow: var(--shadow-sm); }
.article-detail-media img { width: 100%; height: auto; object-fit: cover; }
.article-detail-body { font-size: 1rem; line-height: 1.8; color: var(--text-dark); overflow-x: auto; }
.article-detail-body img { max-width: 100%; height: auto; border-radius: 8px; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 10px 0 40px; }
@media (min-width: 800px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }
.contact-card h2 { margin-top: 0; font-size: 1.15rem; color: var(--text-dark); }
.contact-list { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; font-size: .95rem; }
.contact-list a { color: var(--brand-blue); font-weight: 600; }
.contact-form { display: flex; flex-direction: column; gap: 12px; }
.contact-form textarea { border: 1px solid var(--border-light); border-radius: 8px; padding: 10px 12px; font-family: inherit; font-size: .95rem; resize: vertical; }

/* Group overview grid (โปรแกรมทัวร์ทั้งหมด) */
.group-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}
@media (min-width: 640px) { .group-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .group-grid { grid-template-columns: repeat(4, 1fr); } }
.group-card {
	background: var(--bg-card);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	padding: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
	transition: transform .15s ease, box-shadow .15s ease;
}
.group-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.group-card img { width: 48px; height: 36px; object-fit: cover; border-radius: 4px; }
.group-card-name { font-weight: 700; font-size: .95rem; color: var(--text-dark); }
.group-card-count { font-size: .8rem; color: var(--text-muted); }

/* Customer review gallery */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-photo { aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden; background: #eee; box-shadow: var(--shadow-sm); }
.gallery-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Page layout with sidebar (matches production: home=sidebar left, listing/detail=sidebar right) */
.page-with-sidebar {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	padding: 20px 0 40px;
}
@media (min-width: 900px) {
	.page-with-sidebar { grid-template-columns: 1fr 300px; align-items: start; }
	.page-with-sidebar.sidebar-left { grid-template-columns: 300px 1fr; }
	.page-with-sidebar.sidebar-left .page-main { order: 2; }
	.page-with-sidebar.sidebar-left .page-sidebar { order: 1; }
}
.page-sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-widget {
	background: var(--bg-card);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	padding: 16px;
}
.sidebar-widget h3 { margin: 0 0 12px; font-size: 1rem; color: var(--text-dark); }
.sidebar-search .field { margin-bottom: 10px; }
.sidebar-contact { text-align: center; }
.sidebar-contact .phone { font-size: 1.3rem; font-weight: 800; color: var(--brand-orange-dark); margin: 6px 0; }
.sidebar-contact a.btn-line {
	display: block;
	background: #06c755;
	color: #fff;
	font-weight: 700;
	border-radius: 8px;
	padding: 10px;
	margin-top: 10px;
}
.sidebar-groups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sidebar-groups li { border-bottom: 1px solid var(--border-light); }
.sidebar-groups li:last-child { border-bottom: none; }
.sidebar-groups a { display: block; padding: 9px 2px; font-size: .9rem; color: var(--text-dark); }
.sidebar-groups a:hover { color: var(--brand-blue); }

/* Landscape phone: keep cards from getting cramped */
@media screen and (orientation: landscape) and (max-height: 500px) {
	.hero { aspect-ratio: 3 / 1; max-height: 260px; }
	.search-card { margin-top: -20px; }
	.tour-grid { grid-template-columns: repeat(4, 1fr); }
}
