/* ============================================================
   Contact Us — card layout (scoped to .rx-contact)
   Palette: faculty green #3a491f + gold #d4af37 (same as rx-vision.css)
   Used by: aboutus-contact.php  (loads AFTER layout.css)
   Left panel: info list + map
   Right panel: direct contact channels (LINE / Facebook / E-mail)

   NOTE for maintainers:
   layout.css already styles this page (.content-box ul.contact-info,
   .content-box .map ...). Those rules are scoped with
   .content-box and would beat a bare .rx-contact rule, so every override
   below is written as  .content-box .rx-contact ...  to out-specify them.
   ============================================================ */

.content-box .rx-contact {
	--rc-primary: #3a491f;
	--rc-primary-light: #4c5f2b;
	--rc-primary-dark: #273115;
	--rc-accent: #d4af37;
	--rc-accent-dark: #b8940f;
	--rc-text: #2b302c;
	--rc-muted: #797f78;
	--rc-tint: #fafaf6;
	--rc-line: rgba(58, 73, 31, 0.10);
	--rc-field: #f6f7f2;
	--rc-shadow: 0 6px 20px rgba(58, 73, 31, 0.07);
	--rc-shadow-lg: 0 16px 34px rgba(58, 73, 31, 0.14);

	font-family: 'Sarabun', 'Inter', sans-serif;
	color: var(--rc-text);
	margin-top: 4px;
}

/* ---------- Grid — 2 คอลัมน์เท่ากัน เพื่อให้หัวข้อทั้งสองกรอบเท่ากัน ---------- */
.content-box .rx-contact .rx-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
}

.content-box .rx-contact .rx-panel {
	box-sizing: border-box;
}

/* ---------- Panel ---------- */
.content-box .rx-contact .rx-panel {
	position: relative;
	background: #ffffff;
	border: 1px solid var(--rc-line);
	border-radius: 18px;
	box-shadow: var(--rc-shadow);
	padding: 26px 26px 28px;
	overflow: hidden;
	animation: rcFadeUp 0.55s cubic-bezier(0.25, 0.8, 0.25, 1) backwards;
}

/* gold→green ribbon on the top edge */
.content-box .rx-contact .rx-panel::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 4px;
	background: linear-gradient(90deg, var(--rc-primary) 0%, var(--rc-primary-light) 45%, var(--rc-accent) 100%);
}

.content-box .rx-contact .rx-panel--channels {
	background:
		linear-gradient(165deg, #fdfdfa 0%, #f5f8ee 100%);
	border-color: rgba(58, 73, 31, 0.14);
	animation-delay: 0.08s;
}

.content-box .rx-contact .rx-panel:hover {
	box-shadow: var(--rc-shadow-lg);
}

/* ---------- Panel head — กรอบหัวข้อรูปแบบเดียวกันทุกแผง ความสูงเท่ากัน ---------- */
.content-box .rx-contact .rx-head {
	display: flex;
	align-items: center;
	gap: 14px;
	box-sizing: border-box;
	min-height: 80px;
	padding: 12px 15px;
	margin-bottom: 18px;
	background: linear-gradient(135deg, #fafaf6 0%, #f4f7ec 100%);
	border: 1.5px solid rgba(58, 73, 31, 0.16);
	border-radius: 13px;
}

.content-box .rx-contact .rx-head-icon {
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 19px;
	color: #ffffff;
	background: linear-gradient(135deg, var(--rc-primary) 0%, var(--rc-primary-light) 100%);
	border: 2px solid #ffffff;
	box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.65), 0 6px 14px rgba(58, 73, 31, 0.22);
}

.content-box .rx-contact .rx-head-icon--gold {
	background: linear-gradient(135deg, var(--rc-accent) 0%, var(--rc-accent-dark) 100%);
	box-shadow: 0 0 0 1px rgba(58, 73, 31, 0.35), 0 6px 14px rgba(184, 148, 15, 0.28);
}

.content-box .rx-contact .rx-head-text {
	min-width: 0;
}

.content-box .rx-contact .rx-head h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--rc-primary);
}

.content-box .rx-contact .rx-head-sub {
	display: block;
	margin-top: 3px;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--rc-accent-dark);
}

/* ---------- Contact information list ---------- */
.content-box .rx-contact ul.contact-info {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.content-box .rx-contact ul.contact-info li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 12px 14px;
	background: var(--rc-tint);
	border: 1px solid rgba(58, 73, 31, 0.08);
	border-radius: 13px;
	color: var(--rc-text);
	font-family: 'Sarabun', 'Inter', sans-serif;
	font-size: 14.5px;
	line-height: 1.65;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.content-box .rx-contact ul.contact-info li:hover {
	background: #ffffff;
	border-color: rgba(212, 175, 55, 0.6);
	box-shadow: 0 8px 18px rgba(58, 73, 31, 0.09);
	transform: translateX(4px);
}

/* round icon badge — replaces layout.css plain glyph */
.content-box .rx-contact ul.contact-info li::before {
	content: "";
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	margin-top: 2px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	font-size: 15px;
	text-align: center;
	position: static;
	left: auto;
	color: var(--rc-primary);
	background: linear-gradient(135deg, rgba(58, 73, 31, 0.10) 0%, rgba(212, 175, 55, 0.26) 100%);
	box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.45);
}

.content-box .rx-contact ul.contact-info li.address::before {
	content: "\f041";
}

.content-box .rx-contact ul.contact-info li.tel::before {
	content: "\f095";
}

.content-box .rx-contact ul.contact-info li.email::before {
	content: "\f0e0";
}

.content-box .rx-contact .rx-ci-body {
	display: block;
	min-width: 0;
}

.content-box .rx-contact .rx-ci-k {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.4px;
	color: var(--rc-accent-dark);
	margin-bottom: 1px;
}

.content-box .rx-contact .rx-ci-v {
	display: block;
	color: var(--rc-text);
	word-wrap: break-word;
}

.content-box .rx-contact .rx-ci-v a {
	color: var(--rc-primary);
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px dotted rgba(58, 73, 31, 0.45);
}

.content-box .rx-contact .rx-ci-v a:hover {
	color: var(--rc-accent-dark);
	border-bottom-color: var(--rc-accent);
}

/* ---------- Map — แผงเต็มความกว้างด้านล่าง รูปทรงแนวยาว ---------- */
.content-box .rx-contact .rx-panel--map {
	margin-top: 24px;
}

.content-box .rx-contact .map {
	height: 420px;
	border-radius: 16px;
	overflow: hidden;
	border: 4px solid #ffffff;
	outline: 1px solid rgba(58, 73, 31, 0.14);
	box-shadow: 0 10px 24px rgba(58, 73, 31, 0.13);
	background: #eef0e8;
}

.content-box .rx-contact .map iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Direct contact channels ---------- */
.content-box .rx-contact .rx-channels {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.content-box .rx-contact .rx-channel {
	display: flex;
	align-items: center;
	gap: 13px;
	padding: 14px 15px;
	background: #ffffff;
	border: 1.5px solid #e2e5d8;
	border-radius: 14px;
	text-decoration: none !important;
	color: var(--rc-text);
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.content-box .rx-contact .rx-channel:hover,
.content-box .rx-contact .rx-channel:focus {
	transform: translateY(-3px);
	border-color: var(--rc-accent);
	box-shadow: 0 10px 22px rgba(58, 73, 31, 0.13);
	background: #fffdf5;
	text-decoration: none !important;
	outline: none;
}

/* LINE card spans the full row as the primary channel */
.content-box .rx-contact .rx-channel--line {
	grid-column: 1 / -1;
}

.content-box .rx-contact .rx-channel-icon {
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 19px;
	color: #ffffff;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.content-box .rx-contact .rx-channel-icon--word {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.3px;
}

/* โลโก้เป็น SVG inline — ไม่พึ่ง glyph ฟอนต์ FA (ไฟล์ฟอนต์โปรเจกต์ไม่มี f09a) */
.content-box .rx-contact .rx-channel-icon svg {
	display: block;
	width: 20px;
	height: 20px;
}

.content-box .rx-contact .rx-channel--line .rx-channel-icon {
	background: #06c755;
}

.content-box .rx-contact .rx-channel--fb .rx-channel-icon {
	background: #1877f2;
}

.content-box .rx-contact .rx-channel--mail .rx-channel-icon {
	background: linear-gradient(135deg, var(--rc-primary) 0%, var(--rc-primary-light) 100%);
}

.content-box .rx-contact .rx-channel-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
}

.content-box .rx-contact .rx-channel-name {
	font-size: 14.5px;
	font-weight: 700;
	color: var(--rc-primary);
}

.content-box .rx-contact .rx-channel-val {
	font-size: 12.5px;
	color: var(--rc-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.content-box .rx-contact .rx-channel-arrow {
	font-size: 13px;
	color: var(--rc-accent-dark);
	opacity: 0.55;
	transition: all 0.3s ease;
}

.content-box .rx-contact .rx-channel:hover .rx-channel-arrow {
	opacity: 1;
	transform: translateX(4px);
}

/* ---------- Motion ---------- */
@keyframes rcFadeUp {
	from {
		opacity: 0;
		transform: translateY(18px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
	.content-box .rx-contact .rx-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 991px) {
	.content-box .rx-contact .rx-grid {
		gap: 18px;
	}

	.content-box .rx-contact .rx-panel {
		padding: 22px 20px 24px;
	}

	.content-box .rx-contact .map {
		height: 340px;
	}
}

@media (max-width: 767px) {
	.content-box .rx-contact .rx-panel {
		padding: 18px 15px 20px;
		border-radius: 15px;
	}

	.content-box .rx-contact .rx-head {
		gap: 11px;
		min-height: 72px;
		padding: 10px 13px;
		margin-bottom: 15px;
	}

	.content-box .rx-contact .rx-head h3 {
		font-size: 16px;
	}

	.content-box .rx-contact .rx-head-sub {
		font-size: 10.5px;
	}

	.content-box .rx-contact .map {
		height: 250px;
	}
}

@media (max-width: 560px) {
	.content-box .rx-contact .rx-channels {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.content-box .rx-contact .rx-panel {
		animation: none;
	}

	.content-box .rx-contact ul.contact-info li,
	.content-box .rx-contact .rx-channel,
	.content-box .rx-contact .rx-channel-arrow {
		transition: none;
	}
}

/* ติดต่อเรา */
.article-title {
	position: relative;
	display: block;

	margin: 0 0 30px;
	padding: 8px 0 10px 18px;

	color: #34451f;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.3;

	border-bottom: 1px solid #e4e4e4;
}

.article-title::before {
	content: "";
	position: absolute;
	left: 0;
	top: 5px;

	width: 6px;
	height: 38px;

	background: linear-gradient(180deg,
			#c9a91a,
			#34451f);

	border-radius: 5px;
}