/*
 * Sekce „FAQ + obrázek".
 *
 * Layout:
 *  Desktop: 2 sloupce (FAQ + image), gap 64 px
 *    Default: image vpravo, FAQ vlevo
 *    Modifier --image-left: prohozeno
 *  Mobil: stack (FAQ nahoře, obrázek dole)
 *
 * FAQ item:
 *  Inactive: bg rgba(17,24,39, 0.15), white text, padding 16px
 *  Active:   bg white, dark text, padding 32 px na question
 *  Animace přes max-height (JS nastaví na actual content height).
 *  Plus/minus ikona se mění mezi stavy.
 */

/* ── Header (centrovaný, stejné styly jako ostatní sekce) ─── */
.faq__head {
	text-align: center;
	max-width: 760px;
	margin: 0 auto 48px;                          /* 48 px nad sloupci */
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.faq__eyebrow {
	margin: 0;
	color: var(--rp-color-text);
	font-size: var(--rp-fs-sm);
	font-weight: var(--rp-fw-regular);
	letter-spacing: -0.02em;
	line-height: 1;
}

.faq__title {
	margin: 0;
	color: var(--rp-color-text);
	font-size: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);   /* 28→40 px */
	font-weight: var(--rp-fw-medium);
	line-height: var(--rp-lh-tight);
	letter-spacing: var(--rp-tracking-tight);
}

.faq__subtitle,
.faq__text {
	color: var(--rp-color-text);
	font-size: var(--rp-fs-sm);
	font-weight: var(--rp-fw-regular);
	line-height: var(--rp-lh-normal);
	letter-spacing: -0.02em;
}
.faq__subtitle p,
.faq__text p { margin: 0; color: inherit; }

/* ── 2-sloupcový layout ─────────────────────────────────── */
.faq__columns {
	display: flex;
	gap: 64px;
	align-items: stretch;
}

/* Default: FAQ vlevo, image vpravo */
/* Modifier --image-left: prohozeno (row-reverse) */
.faq--image-left .faq__columns { flex-direction: row-reverse; }

.faq__list-wrap,
.faq__media {
	flex: 1 1 0;
	min-width: 0;
}

@media (max-width: 1023px) {
	.faq__columns,
	.faq--image-left .faq__columns {
		flex-direction: column;
		gap: 32px;
	}

	/* Obrázek musí mít explicitní width + auto sizing, jinak flex-basis:0
	   v column layoutu způsobí výšku 0 a obrázek zmizí. */
	.faq__media {
		flex: 0 0 auto;
		width: 100%;
	}
}

/* ── Image figura ───────────────────────────────────────── */
.faq__media {
	margin: 0;
	border: 1px solid rgba(243, 244, 246, 0.07);  /* jemný stroke jako u Hero / image-text */
	border-radius: var(--rp-radius-md);            /* 12 px */
	overflow: hidden;
	width: 100%;
}

.faq--aspect-4-3   .faq__media { aspect-ratio: 4 / 3; }
.faq--aspect-3-4   .faq__media { aspect-ratio: 3 / 4; }
.faq--aspect-1-1   .faq__media { aspect-ratio: 1 / 1; }
.faq--aspect-16-10 .faq__media { aspect-ratio: 16 / 10; }
.faq--aspect-4-5   .faq__media { aspect-ratio: 4 / 5; }

.faq__image {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

/* ── FAQ accordion ──────────────────────────────────────── */
.faq__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;                                     /* mezi otázkami */
}

.faq__item {
	background: rgba(243, 244, 246, 0.15);         /* #F3F4F6 (light text) na 15 % */
	border-radius: 8px;
	overflow: hidden;
	transition: background 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq__item.is-open {
	background: var(--rp-color-text);              /* bílá */
}

/* Question button — KONSTANTNÍ padding mezi open/close stavy, aby se ikona
 *  ani text při rozbalení nehýbaly. Padding: 16 px shora/zprava/zdola, 32 px zleva. */
.faq__question {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 16px 16px 32px;
	background: transparent;
	border: 0;
	color: var(--rp-color-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: var(--rp-fw-medium);
	letter-spacing: -0.02em;
	line-height: 1.4;
	text-align: left;
	cursor: pointer;
	transition: color 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq__item.is-open .faq__question {
	color: var(--rp-color-bg);                     /* jen barva textu se mění při open */
}

.faq__question-text {
	flex: 1 1 auto;
	min-width: 0;
}

/* Ikona +/− 20×20 px */
.faq__icon {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.faq__icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Ikona +/− toggle */
.faq__icon-open { display: inline-flex; }
.faq__icon-close { display: none; }
.faq__item.is-open .faq__icon-open { display: none; }
.faq__item.is-open .faq__icon-close { display: inline-flex; }

/* ── Answer wrap — animovaný max-height ──────────────── */
.faq__answer-wrap {
	overflow: hidden;
	max-height: 0;
	transition: max-height 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq__answer {
	padding: 0 16px 24px 32px;                     /* zarovnáno s otázkou: 32 px zleva, 16 zprava */
	color: var(--rp-color-bg);
	font-size: 12px;
	font-weight: var(--rp-fw-regular);
	letter-spacing: -0.02em;
	line-height: var(--rp-lh-normal);              /* 150 % */
}
.faq__answer p { margin: 0 0 8px; color: inherit; }
.faq__answer p:last-child { margin-bottom: 0; }

/* Hover na inactive question — vypadá jako otevřená (jen na zařízeních s myší) */
@media (hover: hover) and (pointer: fine) {
	.faq__item:not(.is-open):hover {
		background: var(--rp-color-text);
	}
	.faq__item:not(.is-open):hover .faq__question {
		color: var(--rp-color-bg);
	}
}
