/* หน้าติดต่อเรา (contact.php) — โหลดเฉพาะหน้านี้ (_header.php) */
.contact-page {
	--ct-blue: #1B96CF;
	--ct-blue-light: #39C0FF;
	--ct-blue-dark: #0B5E86;
	--ct-ink: #1d2733;
	--ct-muted: #5d6b78;
	--ct-line: #06C755;
	padding: 50px 0 80px;
	background: linear-gradient(180deg, #f3fafe 0%, #FFF 420px);
}

/* ---------- ส่วนบน: สรุปบริการ + QR ---------- */
.contact-hero {
	display: flex;
	align-items: center;
	gap: 40px;
	padding: 36px 40px;
	margin-bottom: 50px;
	border-radius: 24px;
	background: #FFF;
	border: 1px solid #d9eef8;
	box-shadow: 0 16px 40px rgba(16, 90, 130, .08);
}

.contact-hero-text { flex: 1; min-width: 0; }

.contact-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	margin-bottom: 14px;
	border-radius: 999px;
	background: #e6f5fc;
	color: var(--ct-blue-dark);
	font-size: 14px;
	font-weight: 600;
}

.contact-hero h2 {
	font-size: 32px;
	line-height: 44px;
	font-weight: 700;
	color: var(--ct-ink);
	margin-bottom: 12px;
}

.contact-hero p {
	font-size: 16px;
	line-height: 1.8;
	color: var(--ct-muted);
	margin-bottom: 18px;
}

.contact-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 0;
	margin: 0 0 10px;
	list-style: none;
}

.contact-facts li {
	display: flex;
	flex-direction: column;
	min-width: 130px;
	padding: 12px 18px;
	border-radius: 16px;
	background: linear-gradient(135deg, #f0f9fe 0%, #e3f3fb 100%);
	border: 1px solid #d3ecf8;
}

.contact-facts span { font-size: 13px; color: var(--ct-muted); }
.contact-facts strong { font-size: 22px; line-height: 1.3; color: var(--ct-blue-dark); }

.contact-hero .contact-note {
	font-size: 13px;
	margin-bottom: 22px;
}

.contact-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.contact-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 26px;
	border-radius: 999px;
	color: #FFF !important;
	font-size: 17px;
	font-weight: 700;
	text-decoration: none !important;
	transition: transform .2s ease, box-shadow .2s ease;
}

.contact-btn:hover { transform: translateY(-2px); }
.contact-btn-tel { background: linear-gradient(135deg, #127DB0 0%, var(--ct-blue-dark) 100%); box-shadow: 0 10px 24px rgba(18, 125, 176, .3); }
.contact-btn-line { background: var(--ct-line); box-shadow: 0 10px 24px rgba(6, 199, 85, .28); }
.contact-btn-line i { font-size: 22px; }

.contact-qr {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 18px 18px 16px;
	border-radius: 20px;
	background: #FFF;
	border: 1px solid #e3eef4;
	box-shadow: 0 10px 28px rgba(16, 90, 130, .08);
	text-decoration: none !important;
	transition: transform .2s ease;
}

.contact-qr:hover { transform: translateY(-3px); }

.contact-qr img {
	width: 200px;
	height: 200px;
	object-fit: contain;
	margin-bottom: 6px;
}

.contact-qr span { font-size: 14px; color: var(--ct-muted); }
.contact-qr strong { font-size: 17px; color: var(--ct-ink); }

/* ---------- การ์ดช่องทางติดต่อ ---------- */
.contact-title {
	font-size: 26px;
	line-height: 36px;
	font-weight: 700;
	color: var(--ct-ink);
	text-align: center;
	margin-bottom: 24px;
}

/* จำนวนช่องทางไม่แน่นอน (ช่องที่ว่างจะไม่แสดง) ใช้ flex จัดแถวสุดท้ายให้อยู่กึ่งกลาง */
.contact-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 18px;
	margin-bottom: 50px;
}

.contact-card {
	flex: 0 1 300px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 24px;
	border-radius: 20px;
	background: #FFF;
	border: 1px solid #e3eef4;
	box-shadow: 0 6px 20px rgba(16, 90, 130, .06);
	transition: transform .2s ease, box-shadow .2s ease;
}

.contact-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(16, 90, 130, .12);
}

.contact-card-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 52px;
	height: 52px;
	margin-bottom: 14px;
	border-radius: 16px;
	background: linear-gradient(135deg, var(--ct-blue-light) 0%, var(--ct-blue) 100%);
	color: #FFF;
	font-size: 22px;
}

.contact-card-line .contact-card-icon { background: var(--ct-line); font-size: 28px; }
.contact-card-msg .contact-card-icon { background: linear-gradient(135deg, #0099FF 0%, #A033FF 100%); font-size: 25px; }
.contact-card-fb .contact-card-icon { background: #1877F2; }
.contact-card-mail .contact-card-icon { background: linear-gradient(135deg, #FFB547 0%, #F28C28 100%); }
.contact-card-addr .contact-card-icon { background: linear-gradient(135deg, #FF6B6B 0%, #E03E3E 100%); }

.contact-card-label {
	font-size: 14px;
	color: var(--ct-muted);
	margin-bottom: 2px;
}

.contact-card-value {
	flex: 1;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;
	color: var(--ct-ink);
	word-break: break-word;
	margin-bottom: 16px;
}

.contact-card-value a {
	display: block;
	color: var(--ct-ink);
}

.contact-card-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border-radius: 999px;
	background: #eef7fc;
	color: var(--ct-blue-dark) !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background .15s ease, color .15s ease;
}

.contact-card-btn i { font-size: 12px; transition: transform .15s ease; }
.contact-card:hover .contact-card-btn { background: var(--ct-blue-dark); color: #FFF !important; }
.contact-card:hover .contact-card-btn i { transform: translateX(3px); }

.contact-card a:focus-visible,
.contact-btn:focus-visible,
.contact-qr:focus-visible {
	outline: 3px solid #ffb400;
	outline-offset: 3px;
}

/* ---------- ข้อมูลที่ควรแจ้ง ---------- */
.contact-prepare {
	padding: 30px 34px;
	border-radius: 24px;
	background: #FFF;
	border: 1px dashed #bfe3f4;
}

.contact-prepare-head {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.contact-prepare-head .contact-card-icon { margin-bottom: 0; }

.contact-prepare h3 {
	font-size: 21px;
	line-height: 30px;
	font-weight: 700;
	color: var(--ct-ink);
	margin-bottom: 2px;
}

.contact-prepare p { margin: 0; color: var(--ct-muted); }

.contact-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 12px;
	padding: 0;
	margin: 0 0 20px;
	list-style: none;
	counter-reset: ct-step;
}

.contact-steps li {
	position: relative;
	padding: 14px 16px 14px 54px;
	border-radius: 14px;
	background: #f5fbfe;
	color: var(--ct-muted);
	line-height: 1.6;
	counter-increment: ct-step;
}

.contact-steps li::before {
	content: counter(ct-step);
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--ct-blue-dark);
	color: #FFF;
	font-size: 14px;
	font-weight: 700;
}

.contact-steps strong { color: var(--ct-ink); }

.contact-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	font-size: 15px;
}

.contact-links a { color: var(--ct-blue-dark); }
.contact-links i { margin-right: 4px; }

@media (prefers-reduced-motion: reduce) {
	.contact-btn, .contact-qr, .contact-card, .contact-card-btn i { transition: none; }
}

/* ---------- มือถือ / แท็บเล็ต ---------- */
@media (max-width: 991px) {
	.contact-hero { flex-direction: column; align-items: stretch; gap: 26px; padding: 28px 24px; }
	.contact-qr { align-self: center; }
}

@media (max-width: 767px) {
	.contact-page { padding: 30px 0 50px; }
	.contact-hero h2 { font-size: 24px; line-height: 34px; }
	.contact-facts li { flex: 1 1 0; min-width: 0; padding: 10px 12px; }
	.contact-facts strong { font-size: 16px; white-space: nowrap; }
	.contact-cta .contact-btn { flex: 1 1 100%; justify-content: center; }
	/* การ์ดแบบแนวนอน: ไอคอนซ้าย ข้อความขวา ปุ่มเต็มความกว้างด้านล่าง */
	.contact-card {
		flex-basis: 100%;
		display: grid;
		grid-template-columns: 52px 1fr;
		column-gap: 14px;
		align-items: center;
		padding: 18px;
	}
	.contact-card-icon { grid-row: 1 / span 2; margin-bottom: 0; }
	.contact-card-label, .contact-card-value { grid-column: 2; }
	.contact-card-value { font-size: 17px; margin-bottom: 0; }
	.contact-card-btn { grid-column: 1 / -1; justify-content: center; margin-top: 14px; padding: 10px 16px; }
	.contact-qr img { width: 170px; height: 170px; }
	.contact-prepare { padding: 22px 18px; }
	.contact-prepare-head { align-items: flex-start; }
}
