/**
 * FAQ Page Styles
 * R5 EDU: FAQ's design — question (bold dark grey), answer (regular light grey).
 *
 * @package Plastpro
 * @since 1.0.0
 */

.faq-page-inner {
	max-width: 900px;
	margin: 0 auto;
	padding: 3rem 1.5rem 0;
	overflow-x: visible;
}

.faq-sections,
.faq-category-section,
.faq-list {
	overflow-x: visible;
}

/* Wrapper for all category sections */
.faq-sections {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

/* Section heading (e.g. "General Questions") */
.faq-category-section {
	margin: 0;
}

.faq-category-title {
	color: var(--CoolGray-90, #21272A);
	text-align: center;
	font-family: "Gilda Display", serif;
	font-size: var(--font-size-display);
	font-style: normal;
	font-weight: 400;
	line-height: 40px; /* 100% */
	margin: 0 0 1.25rem 0;
}

.faq-list {
	display: flex;
	flex-direction: column;
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Full-bleed row (100vw); clipped by .site-main. Content inset via padding. */
.faq-item {
	position: relative;
	border-bottom: 1px solid #e5e5e5;
	padding: 0;
	margin: 0;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	padding-left: calc(50vw - 50%);
	padding-right: calc(50vw - 50%);
	box-sizing: border-box;
	background: #f5f5f5;
	transition: background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.is-open {
	background: #fff;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	padding-left: calc(50vw - 50%);
	padding-right: calc(50vw - 50%);
}

.faq-item:first-child {
	padding-top: 0;
}

/* Header row: question + toggle button (el fondo gris/blanco lo da .faq-item) */
.faq-item-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 0;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.faq-question {
	/* Layout */
	display: flex;
	width: 850px;
	max-width: 100%;
	min-height: 21px;
	height: auto;
	flex-direction: column;
	justify-content: center;
	/* Typography – CoolGray/90, negrita (h3) */
	color: var(--CoolGray-90, #21272A);
	font-family: Montserrat, sans-serif;
	font-size: var(--font-size-large);
	font-style: normal;
	line-height: 1.3;
	margin: 0;
	flex: 1;
	min-width: 0;
	font-weight: bold;
}

/* Toggle button: plus / minus */
.faq-toggle {
	position: relative;
	flex-shrink: 0;
	width: 2.25rem;
	height: 2.25rem;
	border: none;
	background: transparent;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease;
	padding: 0;
}

.faq-toggle:hover {
	background: transparent;
}

.faq-toggle-icon {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	margin-top: -6px;
}

.faq-toggle-icon::before,
.faq-toggle-icon::after {
	content: '';
	position: absolute;
	background-color: #1D252D;
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease;
}

/* Plus: horizontal + vertical */
.faq-toggle-icon--plus::before {
	left: 5px;
	top: 0;
	bottom: 0;
	width: 2px;
}

.faq-toggle-icon--plus::after {
	top: 5px;
	left: 0;
	right: 0;
	height: 2px;
}

/* Minus: horizontal only */
.faq-toggle-icon--minus::before {
	display: none;
}

.faq-toggle-icon--minus::after {
	top: 5px;
	left: 0;
	right: 0;
	height: 2px;
}

.faq-toggle .faq-toggle-icon--minus {
	display: none;
}

.faq-item.is-open .faq-toggle .faq-toggle-icon--plus {
	display: none;
}

.faq-item.is-open .faq-toggle .faq-toggle-icon--minus {
	display: block;
}

/* Collapsible answer: hidden by default, apertura/cierre suave */
.faq-answer {
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
	font-size: var(--font-size-h6);
	font-weight: 400;
	line-height: 1.6;
	color: #7C878E;
	margin: 0;
	padding: 0;
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition:
		max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
		opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
		padding-top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
		padding-bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.is-open .faq-answer {
	max-height: 1200px;
	opacity: 1;
	padding-top: 0.5rem;
	padding-bottom: 1.25rem;
}

.faq-answer p {
	margin: 0 0 0.5rem 0;
}

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

.faq-answer ul,
.faq-answer ol {
	margin: 0.5rem 0 0 1.25rem;
	padding: 0;
}

.faq-answer li {
	margin-bottom: 0.35rem;
}

.faq-empty {
	font-family: var(--plastpro-font-family, 'Montserrat', sans-serif);
	color: #7C878E;
	text-align: center;
	padding: 2rem 1rem;
	margin: 0;
}

/* ==========================================================================
   Responsive: tablet, mobile, small mobile
   ========================================================================== */

/* Tablet (hasta 1024px) */
@media (max-width: 1024px) {
	.faq-page-inner {
		max-width: 100%;
		padding: 2.5rem 1.5rem 0;
	}

	.faq-category-title {
		font-size: var(--font-size-h1);
		line-height: 34px;
		margin-bottom: 1rem;
	}

	.faq-question {
		width: 100%;
		font-size: var(--font-size-large);
	}

	.faq-item-header {
		padding: 0.65rem 0;
	}
}

/* Mobile (hasta 768px) */
@media (max-width: 768px) {
	.faq-page-inner {
		padding: 2rem 1rem 0;
	}

	.faq-sections {
		gap: 2rem;
	}

	.faq-category-title {
		font-size: var(--font-size-h2);
		line-height: 1.2;
		margin-bottom: 0.875rem;
	}

	.faq-question {
		font-size: var(--font-size-h6);
		line-height: 1.35;
	}

	.faq-item-header {
		padding: 0.875rem 0;
		gap: 0.75rem;
	}

	/* Área táctil mínima 44px para el botón +/- */
	.faq-toggle {
		width: 2.75rem;
		height: 2.75rem;
		min-width: 44px;
		min-height: 44px;
	}

	.faq-answer {
		font-size: var(--font-size-body);
		line-height: 1.55;
	}

	.faq-item.is-open .faq-answer {
		padding-top: 0.35rem;
		padding-bottom: 1rem;
	}
}

/* Small mobile (hasta 480px) */
@media (max-width: 480px) {
	.faq-page-inner {
		padding: 1.5rem 0.75rem 0;
	}

	.faq-category-title {
		font-size: var(--font-size-h2);
		line-height: 1.25;
		margin-bottom: 0.75rem;
	}

	.faq-question {
		font-size: var(--font-size-h6);
		line-height: 1.4;
	}

	.faq-item-header {
		padding: 0.75rem 0;
		gap: 0.5rem;
	}

	.faq-toggle {
		width: 2.5rem;
		height: 2.5rem;
		min-width: 44px;
		min-height: 44px;
	}

	.faq-answer {
		font-size: var(--font-size-small);
	}

	.faq-answer ul,
	.faq-answer ol {
		margin-left: 1rem;
	}

	.faq-item {
		border-bottom-width: 1px;
	}
}

/* Desktop grande: contenedor opcional más ancho (opcional) */
@media (min-width: 1200px) {
	.faq-page-inner {
		max-width: 900px;
		padding: 3rem 2rem 0;
	}
}
h3 {
	font-weight: bold;
}