/*
 * Styles for FAQ Block
 */

.faq-section {
	padding: 88px 57px 112px 57px;
	background-color: var(--white);
}

/* 2-column layout on desktop with 64px gap */
.faq-container {
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 64px;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

.faq-header-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
}

/* Label Pill: same as why choose us and testimonials */
.faq-label-wrapper {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background-color: #E9EDFC;
	padding: 10px 25px;
	border-radius: 100px;
	margin-bottom: 20px;
}

.faq-label-dot {
	width: 6px;
	height: 6px;
	background-color: var(--primary-color);
	border-radius: 50%;
}

.faq-label-text {
	font-family: 'Public Sans', sans-serif;
	font-weight: 400;
	font-size: 16px;
	color: var(--primary-color);
	letter-spacing: 0.05em;
}

/* Heading: Public Sans, Medium 60px, line-height 70, letter spacing -3% */
.faq-title-editable,
.faq-header-content h2 {
	font-family: 'Public Sans', sans-serif;
	font-weight: 500;
	font-size: 60px;
	line-height: 70px;
	letter-spacing: -0.03em;
	color: #0F172A;
	margin-bottom: 0;
}

/* Accordion cards container, items separated by 10px */
.faq-cards-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Card: background #EDF1FF, padding 20px, border-radius 8px */
.faq-card {
	background-color: #EDF1FF;
	border-radius: 8px;
	padding: 20px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	transition: background-color var(--transition-fast);
}

.faq-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	user-select: none;
}

/* Card Title: 20px Public Sans, Regular, line-height 25, letter-spacing 2% */
.faq-card-title {
	font-family: 'Public Sans', sans-serif;
	font-weight: 400;
	font-size: 20px;
	line-height: 25px;
	letter-spacing: 0.02em;
	color: #0F172A;
	margin: 0;
	padding-right: 20px; /* Space for the toggle icon */
}

/* Plus/Minus Toggle Icon: 2342C8 color, morphing animation */
.faq-toggle-icon {
	position: relative;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	display: inline-block;
}

.faq-toggle-icon::before,
.faq-toggle-icon::after {
	content: "";
	position: absolute;
	background-color: #2342C8;
	border-radius: 2px;
	transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

/* Horizontal line */
.faq-toggle-icon::before {
	top: 7px;
	left: 0;
	width: 16px;
	height: 2px;
}

/* Vertical line */
.faq-toggle-icon::after {
	top: 0;
	left: 7px;
	width: 2px;
	height: 16px;
}

/* Active vertical line morphing: rotate and fade out to make it a minus sign */
.faq-card.is-active .faq-toggle-icon::after {
	transform: rotate(90deg);
	opacity: 0;
}

.faq-card.is-active .faq-toggle-icon::before {
	transform: rotate(180deg);
}

/* Accordion display none when closed to prevent extra spacing, fade-in slide animation when open */
.faq-card-body {
	display: none;
	overflow: hidden;
}

.faq-card.is-active .faq-card-body {
	display: block;
	animation: faq-slide-down 0.25s ease-out forwards;
}

@keyframes faq-slide-down {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.faq-card-content {
	min-height: 0;
	padding-top: 8px; /* Gap between title and description of the FAQ card is 8px */
	font-family: var(--font-nunito);
	font-weight: 400;
	font-size: 16px;
	line-height: 21px;
	letter-spacing: 0.02em;
	color: var(--text-muted);
}

/* Block Editor specific adjustments */
.faq-block-editor-wrapper {
	padding: 20px;
	background-color: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	margin-bottom: 25px;
}

.faq-block-editor-wrapper h3 {
	margin-top: 0;
	margin-bottom: 15px;
	font-family: 'Public Sans', sans-serif;
	color: #0f172a;
}

.faq-block-editor-wrapper .card-editor-group {
	background-color: var(--white);
	padding: 15px;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
	margin-bottom: 15px;
}

.faq-block-editor-wrapper .editor-preview-label {
	font-weight: bold;
	color: #64748b;
	margin-top: 25px;
	margin-bottom: 10px;
	font-size: 14px;
	letter-spacing: 0.05em;
}

/* ==========================================
   Responsive Rules
   ========================================== */
@media (max-width: 1024px) {
	.faq-section {
		padding: 60px 24px 80px 24px;
	}
	
	.faq-container {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	
	.faq-header-content {
		align-items: center;
		text-align: center;
	}
	
	.faq-title-editable,
	.faq-header-content h2 {
		font-size: 48px;
		line-height: 56px;
	}
}

@media (max-width: 600px) {
	.faq-title-editable,
	.faq-header-content h2 {
		font-size: 34px;
		line-height: 42px;
	}

	.faq-section {
		padding: 0px 24px 80px 24px;
	}
	
	.faq-card-title {
		font-size: 18px;
		line-height: 23px;
	}
}
