/* ============================================================
   faq.css
   ------------------------------------------------------------
   ส่วน "คำถามที่พบบ่อย" ที่ผู้ใช้มองเห็นได้  (ดู _faq.php)

   ใช้ <details>/<summary> ของ HTML ตรง ๆ
   จึงพับ/กางได้โดยไม่ต้องใช้ JavaScript เลย
   ============================================================ */

.cfaq { display: block; }

.cfaq__list {
	border-top: 1px solid #ececec;
	margin-top: 4px;
}

/* ---------- แต่ละข้อ ---------- */
.cfaq__item {
	border-bottom: 1px solid #ececec;
	background: #fff;
	transition: background .2s ease;
}

.cfaq__item[open] { background: #fffdf0; }

/* ---------- คำถาม (ส่วนที่กดได้) ---------- */
.cfaq__q {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px 14px;
	cursor: pointer;
	list-style: none;            /* ซ่อนสามเหลี่ยมเริ่มต้นของเบราว์เซอร์ */
	user-select: none;
}

/* ซ่อนสามเหลี่ยมใน Safari / Chrome */
.cfaq__q::-webkit-details-marker { display: none; }
.cfaq__q::marker                 { content: ""; }

.cfaq__q:hover { background: rgba(252, 223, 21, .13); }

.cfaq__q:focus-visible {
	outline: 3px solid #FCDF15;
	outline-offset: -3px;
}

/* ข้อความคำถาม — เป็น h3 เพื่อให้ลำดับหัวข้อถูกต้อง (h1 > h2 ของ section > h3) */
.cfaq__q-text {
	flex: 1 1 auto;
	margin: 0 !important;
	font-size: 16.5px;
	font-weight: 600;
	line-height: 1.55;
	color: #202020;
}

/* ---------- ลูกศร ---------- */
.cfaq__icon {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #FCDF15;
	color: #202020;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	margin-top: 1px;
	transition: transform .25s ease, background .2s ease;
}

.cfaq__item[open] .cfaq__icon {
	transform: rotate(180deg);
	background: #202020;
	color: #FCDF15;
}

/* ---------- คำตอบ ---------- */
.cfaq__a {
	padding: 0 14px 18px 54px;
	animation: cfaq-open .28s ease;
}

.cfaq__a p {
	margin: 0 !important;
	font-size: 15.5px;
	line-height: 1.85 !important;
	color: #555;
}

@keyframes cfaq-open {
	from { opacity: 0; transform: translateY(-5px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ---------- ปุ่มติดต่อปิดท้าย ---------- */
.cfaq__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 11px;
	padding: 20px 14px 6px;
	text-align: center;
}

.cfaq__cta-text {
	font-size: 15.5px;
	color: #555;
	width: 100%;
	margin-bottom: 2px;
}

.cfaq__cta-btn,
.cfaq__cta-line {
	font-size: 16px !important;
	padding: 11px 22px !important;
	border-radius: 999px !important;
	text-decoration: none !important;
}

.cfaq__cta-line {
	background: #06C755 !important;
	color: #fff !important;
	border: 0 !important;
}

.cfaq__cta-line:hover {
	background: #05a847 !important;
	color: #fff !important;
	box-shadow: 0 2px 15px rgba(6, 199, 85, .45);
}

/* ---------- มือถือ ---------- */
@media (max-width: 575px) {
	.cfaq__q       { padding: 14px 10px; gap: 9px; }
	.cfaq__q-text  { font-size: 15.5px; }
	.cfaq__a       { padding: 0 10px 16px 10px; }   /* ไม่เยื้อง เพื่อให้ได้ความกว้างเต็ม */
	.cfaq__a p     { font-size: 15px; }
	.cfaq__icon    { width: 25px; height: 25px; font-size: 11px; }

	.cfaq__cta-btn,
	.cfaq__cta-line { width: 100%; font-size: 15.5px !important; }
}

/* ---------- เคารพการตั้งค่าลดการเคลื่อนไหว ---------- */
@media (prefers-reduced-motion: reduce) {
	.cfaq__item, .cfaq__icon { transition: none; }
	.cfaq__a { animation: none; }
}

/* ---------- ตอนสั่งพิมพ์ : กางทุกข้อให้เห็นครบ ---------- */
@media print {
	.cfaq__item     { background: #fff !important; }
	.cfaq__a        { display: block !important; }
	.cfaq__icon,
	.cfaq__cta      { display: none !important; }
}
