/*
 * Q&A — Figma node 11:120 (1440×660, nền Background 2)
 * Hoạ tiết G (503) tại (90, 72); tiêu đề căn giữa khối 524 tại x=80; danh sách câu hỏi x=729 y=119 (631).
 */

.vg-faq {
	position: relative;
	overflow: hidden;
	padding: 119px 16px 149px;
	background-color: var(--vg-color-bg-2);
}

.vg-faq__pattern {
	position: absolute;
	top: 72px;
	left: max(16px, calc(50% - 630px));
	width: 503px;
	height: 503px;
	max-width: none;
	pointer-events: none;
}

.vg-faq__inner {
	position: relative;
	display: grid;
	grid-template-columns: 524px 631px;
	justify-content: space-between;
	align-items: start;
	max-width: 1280px;
	margin: 0 auto;
}

/* Tiêu đề nằm giữa theo chiều dọc so với hoạ tiết (Figma y=275) */
.vg-faq__title {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 156px 0 0;
	color: var(--vg-color-primary);
	font-family: var(--vg-font-heading);
	font-size: var(--vg-h3-size);
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.02em;
	text-align: center;
}

.vg-faq__title-script {
	color: #c69278;
	font-family: var(--vg-font-subheading);
	letter-spacing: 0.04em;
}

.vg-faq__title-line {
	margin-top: -11px;
}

/* Accordion */
.vg-faq__item {
	border-bottom: 1px solid rgba(163, 116, 98, 0.3);
}

.vg-faq__question {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 0 15px; /* Figma: hàng 56px đã gồm đường kẻ 1px */
	color: var(--vg-color-primary);
	font-family: var(--vg-font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: -0.005em;
	list-style: none;
	cursor: pointer;
}

.vg-faq__question::-webkit-details-marker {
	display: none;
}

.vg-faq__question > span:first-child {
	flex: 1;
}

.vg-faq__question:hover > span:first-child,
.vg-faq__item[open] .vg-faq__question > span:first-child {
	color: var(--vg-color-description-gold);
}

/* Dấu + xoay thành × khi mở */
.vg-faq__icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	background-color: var(--vg-color-description-gold);
	-webkit-mask: url("../icons/plus.svg") center / 24px 24px no-repeat;
	mask: url("../icons/plus.svg") center / 24px 24px no-repeat;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.vg-faq__item[open] .vg-faq__icon {
	transform: rotate(45deg);
}

.vg-faq__answer {
	padding: 0 40px 16px 0;
	color: var(--vg-color-description-blue);
	font-family: var(--vg-font-body);
	font-size: 14px;
	line-height: 1.5;
}

.vg-faq__answer p {
	margin: 0 0 8px;
}

.vg-faq__answer p:last-child {
	margin-bottom: 0;
}

.vg-faq__answer ul {
	margin: 0 0 8px;
	padding-left: 21px;
}

/* Mở/đóng mượt (trình duyệt hỗ trợ ::details-content); trình duyệt cũ vẫn mở/đóng tức thì */
@supports selector(::details-content) {
	.vg-faq__item {
		interpolate-size: allow-keywords;
	}

	.vg-faq__item::details-content {
		height: 0;
		overflow: hidden;
		transition: height 0.45s cubic-bezier(0.22, 1, 0.36, 1), content-visibility 0.45s allow-discrete;
	}

	.vg-faq__item[open]::details-content {
		height: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vg-faq__item::details-content,
	.vg-faq__icon {
		transition: none;
	}
}

@media (max-width: 1199.98px) {
	.vg-faq {
		padding-top: 72px;
		padding-bottom: 72px;
	}

	.vg-faq__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.vg-faq__title {
		margin-top: 0;
	}

	.vg-faq__pattern {
		top: -40px;
		left: 50%;
		width: 360px;
		height: 360px;
		transform: translateX(-50%);
	}
}
