/*
 * FAQ page (/voprosy-i-otvety/). Loaded only on that page.
 *
 * Built from the psmix/page-faq pattern with the dedicated page-faq template.
 * The layout mirrors the FAQ reference: breadcrumbs, a hero, a sticky section
 * index and grouped native <details> questions. Section search is intentionally
 * not part of this page. Colours, radii and shadows come from the theme tokens
 * in base.css.
 */

/* Page canvas and container. */
.psmix-faq-main .wp-block-post-content > .psmix-faq-page {
	width: 100%;
	max-width: 100%;
	margin-inline: 0;
}

.psmix-faq-page,
.psmix-faq-page > * {
	background: var(--ps-warm);
}

.psmix-faq-page > * + * {
	margin-block-start: 0;
}

.psmix-faq-page .pfq-container {
	width: min(100% - 40px, var(--container));
	margin-inline: auto;
	padding-block: 20px 64px;
}

/*
 * WordPress inserts its block gap between flow children. The FAQ layout sets
 * its own spacing, so neutralise the injected margins inside the composed
 * groups. `:where()` keeps this reset at the lowest specificity so the explicit
 * margins below still win.
 */
.psmix-faq-page :where(
	.pfq-hero,
	.pfq-hero-copy,
	.pfq-layout,
	.pfq-nav,
	.pfq-nav-list,
	.pfq-content,
	.pfq-group,
	.pfq-group-head,
	.pfq-list
) > * + * {
	margin-block-start: 0;
}

/* Breadcrumbs. */
.psmix-faq-page .pfq-breadcrumbs {
	margin: 0;
	padding: 0 0 24px;
	color: var(--ps-gray);
	font-size: 12px;
	font-weight: 700;
}

.psmix-faq-page .pfq-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.psmix-faq-page .pfq-breadcrumbs a:hover {
	color: var(--ps-black);
}

.psmix-faq-page .pfq-breadcrumbs span {
	margin: 0 7px;
	color: var(--ps-line);
}

/* Hero. */
.psmix-faq-page .pfq-hero {
	padding: 24px 0 32px;
	border-bottom: 1px solid rgb(21 21 21 / 0.09);
}

.psmix-faq-page .pfq-kicker {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 14px;
	color: var(--ps-red-dark);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.psmix-faq-page .pfq-kicker::before {
	width: 9px;
	height: 9px;
	border-radius: 2px;
	background: linear-gradient(135deg, var(--ps-yellow), var(--ps-red));
	content: "";
	transform: rotate(12deg);
}

.psmix-faq-page .pfq-hero h1 {
	max-width: 780px;
	margin: 0;
	color: var(--ps-black);
	font-size: var(--psmix-page-title-size);
	font-weight: 950;
	letter-spacing: -0.055em;
	line-height: 1.15;
}

.psmix-faq-page .pfq-lead {
	max-width: 760px;
	margin: 20px 0 0;
	color: var(--ps-gray);
	font-size: 16px;
	line-height: 1.65;
}

/* Two-column layout: section index + questions. */
.psmix-faq-page .pfq-layout {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 48px;
	padding-top: 32px;
}

/* Sticky section index. */
.psmix-faq-page .pfq-nav {
	position: sticky;
	top: calc(var(--psmix-anchor-offset) + 16px);
	align-self: start;
}

.psmix-faq-page .pfq-nav-title {
	margin: 0 0 15px;
	color: var(--ps-gray);
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.psmix-faq-page .pfq-nav-list {
	display: grid;
	gap: 3px;
}

.psmix-faq-page .pfq-nav-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 42px;
	padding: 9px 11px;
	border-radius: 11px;
	color: var(--ps-gray);
	font-size: 12.5px;
	font-weight: 780;
	text-decoration: none;
	transition:
		background-color var(--motion-fast) var(--ease-standard),
		color var(--motion-fast) var(--ease-standard);
}

.psmix-faq-page .pfq-nav-link:hover {
	background: var(--ps-white);
	color: var(--ps-black);
}

.psmix-faq-page .pfq-nav-link.is-active {
	background: var(--ps-white);
	color: var(--ps-black);
	box-shadow: 0 5px 18px rgb(21 21 21 / 0.05);
}

.psmix-faq-page .pfq-nav-count {
	display: inline-grid;
	min-width: 25px;
	height: 21px;
	align-items: center;
	padding: 0 6px;
	border-radius: 7px;
	background: var(--ps-soft);
	color: var(--ps-gray);
	font-size: 10px;
	font-weight: 900;
	place-items: center;
}

.psmix-faq-page .pfq-nav-link.is-active .pfq-nav-count {
	background: #f7e8e6;
	color: var(--ps-red);
}

/* Question groups. */
.psmix-faq-page .pfq-content {
	display: grid;
	gap: 32px;
}

.psmix-faq-page .pfq-group {
	scroll-margin-top: calc(var(--psmix-anchor-offset) + 22px);
}

.psmix-faq-page .pfq-group-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
	margin: 0 0 16px;
	padding: 0 2px;
}

.psmix-faq-page .pfq-group-head h2 {
	margin: 0;
	color: var(--ps-black);
	font-size: var(--psmix-section-title-size);
	letter-spacing: -0.04em;
	line-height: 1.15;
}

.psmix-faq-page .pfq-group-count {
	margin: 0;
	color: var(--ps-gray);
	font-size: 11px;
	font-weight: 850;
}

.psmix-faq-page .pfq-list {
	display: grid;
	gap: 9px;
}

/* Disclosure items. */
.psmix-faq-page .pfq-item {
	overflow: hidden;
	border: 1px solid rgb(21 21 21 / 0.085);
	border-radius: 17px;
	background: var(--ps-white);
	box-shadow: 0 6px 20px rgb(21 21 21 / 0.035);
	transition:
		border-color var(--motion-fast) var(--ease-standard),
		box-shadow var(--motion-fast) var(--ease-standard);
}

.psmix-faq-page .pfq-item[open] {
	border-color: rgb(21 21 21 / 0.14);
	box-shadow: 0 12px 28px rgb(21 21 21 / 0.055);
}

.psmix-faq-page .pfq-item summary {
	position: relative;
	min-height: 56px;
	padding: 16px 60px 16px 20px;
	color: #202124;
	cursor: pointer;
	font-size: 15px;
	font-weight: 850;
	line-height: 1.35;
	list-style: none;
}

.psmix-faq-page .pfq-item summary::-webkit-details-marker {
	display: none;
}

.psmix-faq-page .pfq-item summary::after {
	position: absolute;
	right: 19px;
	top: 50%;
	display: grid;
	width: 30px;
	height: 30px;
	align-items: center;
	border: 1px solid var(--ps-line);
	border-radius: 10px;
	background: var(--ps-soft);
	color: var(--ps-gray);
	content: "+";
	font-size: 20px;
	font-weight: 500;
	line-height: 1;
	place-items: center;
	transform: translateY(-50%);
	transition:
		background-color var(--motion-fast) var(--ease-standard),
		border-color var(--motion-fast) var(--ease-standard),
		color var(--motion-fast) var(--ease-standard);
}

.psmix-faq-page .pfq-item[open] summary::after {
	border-color: #f0d5d2;
	background: #f5e6e4;
	color: var(--ps-red);
	content: "−";
}

.psmix-faq-page .pfq-item summary:focus-visible {
	outline: 0.1875rem solid var(--psmix-focus);
	outline-offset: -0.1875rem;
}

.psmix-faq-page .pfq-item p {
	margin: 0;
	padding: 0 58px 20px 21px;
	color: var(--ps-gray);
	font-size: var(--psmix-body-size);
	line-height: 1.6;
}

@media (max-width: 980px) {
	.psmix-faq-page .pfq-layout {
		grid-template-columns: 1fr;
		gap: 30px;
	}

	/*
	 * Mobile/tablet: the section index becomes a horizontal scroller. The
	 * native scrollbar clashes with the rounded pills, so it is hidden; the
	 * scroller bleeds into the page gutter and an edge fade signals that more
	 * sections are off-screen.
	 */
	.psmix-faq-page .pfq-nav {
		position: static;
		overflow-x: auto;
		padding-bottom: 4px;
		margin-inline: -20px;
		scrollbar-width: none;
		-ms-overflow-style: none;
		-webkit-overflow-scrolling: touch;
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
		mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
	}

	.psmix-faq-page .pfq-nav::-webkit-scrollbar {
		display: none;
	}

	.psmix-faq-page .pfq-nav-title {
		display: none;
	}

	.psmix-faq-page .pfq-nav-list {
		display: flex;
		gap: 7px;
		min-width: max-content;
		padding-inline: 20px;
	}

	.psmix-faq-page .pfq-nav-link {
		border: 1px solid rgb(21 21 21 / 0.07);
		background: var(--ps-white);
	}

	.psmix-faq-page .pfq-nav-link.is-active {
		border-color: rgb(223 36 27 / 0.34);
		box-shadow: none;
	}

	.psmix-faq-page .pfq-content {
		gap: 36px;
	}
}

@media (max-width: 700px) {
	.psmix-faq-page .pfq-container {
		padding-block: 14px 48px;
	}

	.psmix-faq-page .pfq-breadcrumbs {
		padding-bottom: 16px;
	}

	.psmix-faq-page .pfq-hero {
		padding: 16px 0 24px;
	}

	.psmix-faq-page .pfq-hero h1 {
		font-size: var(--psmix-page-title-size);
	}

	.psmix-faq-page .pfq-lead {
		font-size: var(--psmix-body-size);
	}

	.psmix-faq-page .pfq-layout {
		padding-top: 24px;
	}

	.psmix-faq-page .pfq-group-head h2 {
		font-size: var(--psmix-section-title-size);
	}

	.psmix-faq-page .pfq-item summary {
		min-height: 52px;
		padding: 14px 52px 14px 16px;
		font-size: 15px;
	}

	.psmix-faq-page .pfq-item p {
		padding: 0 16px 16px;
		font-size: var(--psmix-body-size);
	}

	.psmix-faq-page .pfq-item summary::after {
		right: 14px;
	}
}
