/*
 * GeekHall – FAQ kategorií: frontend styly
 * Barvy a typografie vychází z designu geekhall.cz (Roboto, #202124 text,
 * #dc3545 akcent, zaoblené "pill" prvky).
 */

.gcf-faq {
	--gcf-text: #202124;
	--gcf-muted: #5f6368;
	--gcf-accent: #dc3545;
	--gcf-bg: #ffffff;
	--gcf-border: #e5e7eb;
	--gcf-radius: 14px;
	--gcf-font: "Roboto", -apple-system, "Segoe UI", Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

	font-family: var(--gcf-font);
	color: var(--gcf-text);
	width: 100%;
	max-width: none;
	margin: 40px 0 0;
	box-sizing: border-box;
}

.gcf-faq * {
	box-sizing: border-box;
}

.gcf-faq__heading {
	font-family: var(--gcf-font);
	font-size: 28px;
	font-weight: 700;
	color: var(--gcf-text);
	margin: 0 0 20px;
}

.gcf-faq__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.gcf-faq__item {
	background: var(--gcf-bg);
	border: 1px solid var(--gcf-border);
	border-radius: var(--gcf-radius);
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gcf-faq__item:has(.gcf-faq__question[aria-expanded="true"]) {
	border-color: #d9d9dc;
	box-shadow: 0 4px 16px rgba(32, 33, 36, 0.06);
}

.gcf-faq__question-wrap {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
}

.gcf-faq__question {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	padding: 18px 22px;
	cursor: pointer;
	font-family: var(--gcf-font);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--gcf-text);
}

.gcf-faq__question:focus-visible {
	outline: 2px solid var(--gcf-accent);
	outline-offset: -2px;
	border-radius: var(--gcf-radius);
}

.gcf-faq__question:hover {
	color: var(--gcf-accent);
}

.gcf-faq__icon {
	position: relative;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
}

.gcf-faq__icon::before,
.gcf-faq__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background-color: var(--gcf-accent);
	border-radius: 2px;
	transform: translate(-50%, -50%);
	transition: transform 0.25s ease;
}

.gcf-faq__icon::before {
	width: 14px;
	height: 2px;
}

.gcf-faq__icon::after {
	width: 2px;
	height: 14px;
}

.gcf-faq__question[aria-expanded="true"] .gcf-faq__icon::after {
	transform: translate(-50%, -50%) rotate(90deg);
	opacity: 0;
}

/*
 * Výchozí stav (bez JS) je ROZBALENÝ, aby byl obsah FAQ vždy dostupný,
 * i kdyby se JavaScript z nějakého důvodu nenačetl. JS po načtení stránky
 * panely zavře (data-open="false") a řídí přepínání přes klik.
 */
.gcf-faq__answer {
	display: grid;
	grid-template-rows: 1fr;
	transition: grid-template-rows 0.3s ease;
}

.gcf-faq__answer-inner {
	overflow: hidden;
	min-height: 0;
	padding: 0 22px 20px;
}

.gcf-faq__answer[data-open="false"] {
	grid-template-rows: 0fr;
}

.gcf-faq__answer[data-open="false"] .gcf-faq__answer-inner {
	padding-bottom: 0;
}

.gcf-faq__answer-inner p:first-child {
	margin-top: 0;
}

.gcf-faq__answer-inner p:last-child {
	margin-bottom: 0;
}

.gcf-faq__answer-inner {
	font-size: 16px;
	line-height: 1.6;
	color: var(--gcf-text);
}

.gcf-faq__answer-inner a {
	color: var(--gcf-accent);
	text-decoration: underline;
}

.gcf-faq__answer-inner a:hover {
	text-decoration: none;
}

@media (max-width: 600px) {
	.gcf-faq__heading {
		font-size: 22px;
	}

	.gcf-faq__question {
		padding: 15px 18px;
		font-size: 16px;
	}

	.gcf-faq__answer-inner {
		padding: 0 18px;
	}
}
