/* Główne kontenery */
/* .faq-section {
}

.faq-section__container {
} */

.faq-section__header {
	max-width: 30rem;
}

@media (max-width: 768px) {
	.faq-section__header {
		padding-bottom: 1rem;
	}
}

@media (min-width: 768px) {
	.faq-section__header {
		padding-right: 2em;
	}
}

.faq-section__pretitle {
	margin: 0;
}

.faq-section__title {
	margin: 0;
}

/*
.faq-section__title {
	font-size: 2.5em;
}
@media (min-width: 768px) {
	.faq-section__title {
		font-size: 3em;
	}
} */

.faq-section__posttitle {
	font-size: 0.875em;
	line-height: 1.75;
	margin: 0;
	margin-top: 1em;
}

.faq-section__list {
	flex: 1;
}

/* Podtytuł przy kilku powiązanych zestawach FAQ (tytuł wpisu faq_set) */
.faq-section__group-title {
	margin: 2.5rem 0 0;
	font-size: 1.25rem;
	font-weight: 600;
}

.faq-section__group-title:first-child {
	margin-top: 0;
}

/* Pojedynczy element FAQ */
.faq-section__item {
	border-bottom: 1px solid #d1d1d1;
}

/* Przycisk pytania */
.faq-section__question-button {
	color: inherit;
	/* font-family: var(--wp--preset--font-family--heading); */
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 2rem 0;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	outline: none;
	transition:
		color 0.2s ease,
		padding-left 0.4s ease;
}

.faq-section__item {
	transition: all 0.2s ease-out;
}

.faq-section__item:has(.faq-section__question-button[aria-expanded="true"]) {
	background-color: rgba(0, 0, 0, 0.025);
}

@media (min-width: 768px) {
	.faq-section__item:has(.faq-section__question-button[aria-expanded="true"]) {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
}

@media (max-width: 768px) {
	.faq-section__question-button {
		padding: 1.25rem 0;
	}
}

.faq-section__question-text {
	font-size: 1em;
	font-weight: 400;
	padding-right: 1.25em;
    line-height: 1.4;
    max-width: calc(100% - 3rem);
}

/* Ikona +/- */
.faq-section__icon {
	position: relative;
	width: 1em;
	height: 1em;
	flex-shrink: 0;
}

.faq-section__icon::before,
.faq-section__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	height: 1px;
	width: 100%;
	transform: translate(-50%) rotate(0deg);
	background-color: currentColor;
	transition: transform 0.3s ease;
}

/* Pionowa kreska (tworzy plus, znika przy otwarciu) */
.faq-section__icon::after {
	transform: translate(-50%) rotate(90deg);
}

/* Stan aktywny ikony (zmiana w minus) */
.faq-section__question-button[aria-expanded="true"] .faq-section__icon::before {
	transform: translate(-50%) rotate(180deg);
}
.faq-section__question-button[aria-expanded="true"] .faq-section__icon::after {
	opacity: 0;
	transform: translate(-50%) rotate(360deg);
}

/* Odpowiedź */
.faq-section__answer-wrapper {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: all 0.2s ease;
	max-height: 10000px;
}

/* HTML5 'hidden' attribute fix dla płynności (opcjonalnie) */
.faq-section__answer-wrapper[hidden] {
	display: flex;
	max-height: 0 !important;
	overflow: hidden !important;
	opacity: 0 !important;
	transition: all 0.2s ease-out;
}

.faq-section__answer-content {
	padding: 0 0 2rem 0;
	max-width: 37.5rem;
	opacity: 0.7;

	p {
		margin: 0;
	}
}

.faq-section__answer-actions {
	z-index: 2;
	margin-top: 1rem;
	padding-bottom: 2rem;
	max-width: 37.5rem;
	position: relative;
}

@media (max-width: 768px) {
	.faq-section__answer-actions {
		padding-bottom: 1.5rem;
	}
}

.faq-section__answer-content:has(+ .faq-section__answer-actions) {
	padding-bottom: 0;
}

/* Responsywność */
@media (min-width: 768px) {
	.faq-section__header__content {
		position: sticky;
		top: 8rem;
		padding-right: 0.6vw;
	}

	.faq-section__container {
		display: grid;
		grid-template-columns: 3fr 3fr;
	}
}

@media (max-width: 768px) {
	.faq-section__item {
		position: relative;
	}

	.faq-section__question-button:before {
		content: "";
		position: absolute;
		inset: 0;
		z-index: 2;
	}

	.faq-section__answer-content {
		padding-top: 0.5rem;
		padding-bottom: 1.5rem;
	}
	.faq-section__container {
		flex-direction: column;
		gap: 2rem;
	}
}
