/**
 * FAQ Section ("Câu hỏi thường gặp", trang chủ). Các giá trị trình bày được khai báo
 * trực tiếp tại đây để dễ chỉnh sửa, không phụ thuộc custom property riêng.
 *
 * Grid 2 cột × 3 hàng. Accordion: JS đo scrollHeight rồi
 * animate max-height (slide down/up 300ms). Header reuse .review-home__heading.
 */

.faq-home {
	position: relative;
	margin-block: 0;
	padding-block: 50px;
	background-color: #ffffff;
	background-image: linear-gradient(180deg, #FFFFFF 0%, #FBFDFF 100%);
	background-size: cover;
	background-position: center;
}

.faq-home__container {
	max-width: var(--container-max-width);
}

/* ==================== HEADER ==================== */
.faq-home__header {
	margin-bottom: 42px;
	text-align: center;
}

.faq-home__small {
	display: block;
	margin-bottom: 10px;
	color: #046AB5;
	font-size: 12px;
	font-weight: 700;
	/* Figma: ls 1.68/12 = 14%. */
	text-transform: uppercase;
}

.faq-home__heading {
	margin: 0 0 20px;
	/* Chuẩn hoá: heading → nội dung 20px (trước 12px tới gạch đã bỏ). */
	/* Chuẩn hoá heading system: size 85·fig, weight 900, lh 1.21, ls -0.02em (= products). */
	font-size: clamp(30px, calc(85 * var(--fig1px)), 85px);
	font-weight: 900;
	line-height: 1.21;
}

.faq-home__heading-blue {
	color: #046AB5;
}

.faq-home__heading-red {
	color: #E31F2B;
}

/* Gạch đôi ĐÃ BỎ — heading dùng TYPOGRAPHY làm điểm nhấn (chuẩn hoá Design System). */

.faq-home__description {
	margin: 0 auto;
	max-width: 820px;
	color: #464646;
	/* Đồng bộ với hệ description của toàn site (clamp 16→20px fluid). */
	font-size: clamp(16px, calc(20 * var(--fig1px)), 20px);
	line-height: 1.5;
}

/* ==================== GRID (2 cột × 3 hàng) ==================== */
.faq-home__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px 17px;
	/* Figma: hàng 18 / cột 17. */
	align-items: start;
	/* card cao theo nội dung — mở FAQ không kéo giãn card cùng hàng. */
}

/* ==================== FAQ CARD ==================== */
/* Figma: r16, viền #DCE4ED, shadow 0/8/26 #062B69 5% (giá trị đặc thù design —
   không qua whitelist shadow setting). */
.faq-card {
	position: relative;
	border: 1px solid #DCE4ED;
	border-left: 1px solid #DCE4ED;
	border-radius: 10px;
	background-color: #ffffff;
	box-shadow: 0 8px 26px rgb(6 43 105 / 0.05);
	overflow: hidden;
	transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.faq-card:hover {
	border-color: rgb(4 106 181 / 0.55);
	box-shadow: 5px 5px 5px rgb(22 138 251 / 0.12);
}

/* Mở — Figma: dải trái 5px #0C4B9B, viền quanh #B4CCE1, shadow đậm hơn 0/16/38 11%. */
/* .faq-card.is-open {
	border-color: #B4CCE1;
	border-left: 5px solid #046AB5;
	box-shadow: 0 16px 38px rgb(6 43 105 / 0.11);
} */

.faq-card__question-heading {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
}

.faq-card__toggle {
	display: flex;
	align-items: center;
	gap: 12px;
	/* Figma: badge → câu hỏi 12px. */
	width: 100%;
	padding: 26px 15px 26px 17px;
	/* Figma: pad hàng toggle. */
	border: none;
	background: transparent;
	text-align: left;
	cursor: pointer;
	font-family: inherit;
}

/* ==================== NUMBER BADGE ==================== */
.faq-card__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background-color: #EAF3FB;
	color: #046AB5;
	font-size: 16px;
	/* Figma: số 16/700. */
	font-weight: 700;
	transition: background-color 0.25s ease, color 0.25s ease;
}

/* .faq-card.is-open .faq-card__badge {
	background-color: #E31F2B;
	color: #ffffff;
} */

/* ==================== QUESTION ==================== */
.faq-card__question {
	flex: 1;
	min-width: 0;
	color: #172437;
	/* Figma: 24/700 — fluid theo container (lh Figma 81% không khả thi trên web,
	   dùng 1.2 giữ 1 dòng gọn). */
	font-size: clamp(16px, calc(24 * var(--fig1px)), 24px);
	font-weight: 700;
	line-height: 1.2;
	transition: color 0.2s ease;
}

.faq-card__toggle:hover .faq-card__question {
	color: #046AB5;
}

.faq-card.is-open .faq-card__question {
	color: #046AB5;
}

/* ==================== ICON ==================== */
.faq-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 31px;
	width: 31px;
	height: 31px;
	border-radius: 50%;
	background-color: #F2F6FA;
	color: #046AB5;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.faq-card.is-open .faq-card__icon {
	background-color: #046AB5;
	color: #ffffff;
}

.faq-card__icon svg {
	width: 16px;
	height: 16px;
}

/* Plus mặc định, Minus khi mở (không hiển thị cả 2). */
.faq-card__icon-minus {
	display: none;
}

.faq-card.is-open .faq-card__icon-plus {
	display: none;
}

.faq-card.is-open .faq-card__icon-minus {
	display: block;
}

/* ==================== PANEL / ANSWER (slide down/up) ==================== */
.faq-card__panel {
	overflow: hidden;
}

/* Khi JS điều khiển: animate max-height (JS đặt inline max-height cụ thể). */
.faq-card__panel.is-animating {
	transition: max-height 300ms ease;
}

.faq-card__answer {
	/* Figma: answer thụt trái 73 (thẳng hàng chữ câu hỏi sau badge 17+42+12+2),
	   trên 14 / phải 16 / đáy 18; ngăn với câu hỏi bằng kẻ mảnh #E6ECF2. */
	margin-inline: 17px 16px;
	border-top: 1px solid #E6ECF2;
	padding: 14px 0 18px 56px;
	color: #667180;
	font-size: 15px;
	line-height: 1.36;
}

.faq-card__answer p {
	margin: 0 0 10px;
}

.faq-card__answer p:last-child {
	margin-bottom: 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
	.faq-card__question {
		font-size: 18px;
	}
}

@media (max-width: 599px) {
	.faq-home {
		padding-block: 48px;
	}

	.faq-home__grid {
		grid-template-columns: 1fr;
	}

	.faq-card__question {
		font-size: 16px;
	}

	.faq-card__toggle {
		gap: 10px;
	}

	/* Mobile: bỏ thụt trái 56px của câu trả lời (màn hẹp cần tối đa bề ngang chữ). */
	.faq-card__answer {
		padding-left: 0;
	}
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {

	.faq-card,
	.faq-card__badge,
	.faq-card__icon,
	.faq-card__question,
	.faq-card__panel.is-animating {
		transition: none;
	}
}
