/**
 * Section: Text List Component Styles (FAQ Accordion)
 * Figma reference: Desktop (1:2480) and Mobile (1:2211)
 */

.section-text-list {
	width: 100%;
	background-color: var(--color-white);
	padding: 0;
	margin: 0;
}

.section-text-list--background-light-green {
	background-color: var(--color-bg-light-green);
}

.section-text-list--background-light-green .text-list-item,
.section-text-list--background-light-green .text-list-item__header,
.section-text-list--background-light-green .text-list-item__content {
	background-color: var(--color-bg-light-green);
}

.section-text-list--background-light-green .text-list-item__header:hover {
	background-color: var(--color-bg-light-green);
}

.section-text-list__container {
	max-width: 1280px;
	margin: 0 auto;
	width: 100%;
	padding: 0;
	position: relative;
}

/* ========================================
   DESKTOP VERSION (1024px+)
   ======================================== */
@media (min-width: 1024px) {
	.section-text-list__container {
		padding: 130px 124px 110px 124px; /* Top, right, bottom, left padding */
		display: flex;
		align-items: flex-start;
		gap: 30px; /* Gap between header and list (461 - 124 - 307 = 30px) */
	}

	.section-text-list__header {
		width: 307px;
		flex-shrink: 0;
	}

	.section-text-list__title {
		/* Typography handled by .typog-h2 */
		/* Figma: 52px, Bricolage Grotesque, letter-spacing -5% */
		color: var(--color-primary-text);
		margin: 0;
	}

	.section-text-list__list {
		flex: 1;
		display: flex;
		flex-direction: column;
		gap: 16px; /* Gap between items from Figma */
		max-width: 694px; /* Width from Figma */
	}

	.text-list-item {
		background-color: var(--color-white);
		border: 1px solid var(--color-primary-text); /* #2B2B2B from Figma */
		border-radius: 16px; /* Exact from Figma */
		overflow: hidden;
		transition: all 0.3s ease;
	}

	.text-list-item__header {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 12px;
		padding: 24px; /* Padding from Figma */
		background: none;
		border: none;
		cursor: pointer;
		text-align: left;
		transition: all 0.3s ease;
	}

	.text-list-item__header:hover {
		background-color: rgba(0, 0, 0, 0.02);
	}

	.text-list-item__question {
		/* Typography handled by .text-subtitle-bold-md (H4 style) */
		/* Figma: 20px, Bricolage Grotesque, bold, letter-spacing -0.5% */
		color: var(--color-primary-text);
		margin: 0;
		flex: 1;
	}

	.text-list-item__icon {
		flex-shrink: 0;
		width: 19px;
		height: 19px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.text-list-item__icon-svg {
		width: 100%;
		height: 100%;
		display: block;
		transition: transform 0.3s ease;
	}

	.text-list-item[aria-expanded="true"] .text-list-item__icon-svg {
		transform: rotate(180deg);
	}

	.text-list-item__content {
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease, padding 0.3s ease;
		padding: 0 24px;
	}

	.text-list-item[aria-expanded="true"] .text-list-item__content {
		max-height: 1000px; /* Large enough for content */
		padding: 0 24px 24px 24px;
	}

	.text-list-item__answer {
		/* Typography handled by .text-body */
		/* Figma: 18px, Bricolage Grotesque, letter-spacing -0.5% */
		color: var(--color-primary-text);
		margin: 0;
		padding-top: 16px; /* Gap between question and answer */
	}

	.text-list-item__answer p {
		margin: 0 0 1em 0;
	}

	.text-list-item__answer p:last-child {
		margin-bottom: 0;
	}
}

/* ========================================
   MOBILE VERSION (below 1024px)
   ======================================== */
@media (max-width: 1023px) {
	.section-text-list__container {
		padding: 80px 24px 90px 24px; /* Top, right, bottom, left padding */
	}

	.section-text-list__header {
		text-align: left;
		margin-bottom: 40px; /* Space between header and list (148 - 80 - 28 = 40px) */
		width: 100%;
		max-width: 327px;
	}

	.section-text-list__title {
		/* Typography handled by .typog-h2 */
		/* Figma: 32px, Bricolage Grotesque, letter-spacing -5% */
		color: var(--color-primary-text);
		margin: 0;
		font-size: 32px;
		line-height: 1.09375em;
	}

	.section-text-list__list {
		display: flex;
		flex-direction: column;
		gap: 16px; /* Gap between items from Figma */
		width: 100%;
		max-width: 327px; /* Width from Figma */
		margin: 0 auto;
	}

	.text-list-item {
		background-color: var(--color-white);
		border: 1px solid var(--color-primary-text); /* #2B2B2B from Figma */
		border-radius: 9px; /* Exact from Figma */
		overflow: hidden;
		transition: all 0.3s ease;
	}

	.text-list-item__header {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 12px;
		padding: 24px; /* Padding from Figma */
		background: none;
		border: none;
		cursor: pointer;
		text-align: left;
		transition: all 0.3s ease;
		min-height: 64px; /* Minimum height from Figma */
	}

	.text-list-item__header:hover {
		background-color: rgba(0, 0, 0, 0.02);
	}

	.text-list-item__question {
		/* Typography handled by .text-subtitle-bold-md (H4 style) */
		/* Figma: 16px, Bricolage Grotesque, bold, letter-spacing -0.5% */
		color: var(--color-primary-text);
		margin: 0;
		flex: 1;
		font-size: 16px;
		line-height: 1.4500000476837158em;
	}

	.text-list-item__icon {
		flex-shrink: 0;
		width: 19px;
		height: 19px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.text-list-item__icon-svg {
		width: 100%;
		height: 100%;
		display: block;
		transition: transform 0.3s ease;
	}

	.text-list-item[aria-expanded="true"] .text-list-item__icon-svg {
		transform: rotate(180deg);
	}

	.text-list-item__content {
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.3s ease, padding 0.3s ease;
		padding: 0 24px;
	}

	.text-list-item[aria-expanded="true"] .text-list-item__content {
		max-height: 1000px; /* Large enough for content */
		padding: 0 24px 24px 24px;
	}

	.text-list-item__answer {
		/* Typography handled by .text-body */
		/* Figma: 14px, Bricolage Grotesque, letter-spacing -0.5% */
		color: var(--color-primary-text);
		margin: 0;
		padding-top: 12px; /* Gap between question and answer */
		font-size: 14px;
		line-height: 1.5399999618530273em;
	}

	.text-list-item__answer p {
		margin: 0 0 1em 0;
	}

	.text-list-item__answer p:last-child {
		margin-bottom: 0;
	}
}

