/* ==========================================================
   Дочерние страницы карточками + оформление контента раздела
   (шаблон tpl-child-cards.php, классы pc-*)
   ========================================================== */

:root {
	--pc-accent: var(--main-color, #0063c3);
	--pc-accent-soft: #e7f2ff;
	--pc-border: #e3e7ee;
	--pc-text: var(--block-text-color, #212529);
	--pc-muted: var(--block-description-color, #6c757d);
	--pc-bg: #fff;
	--pc-radius: 16px;
}

/* ---------- Сетка карточек ---------- */
.pc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 16px;
	margin: 24px 0 8px;
}

.pc-tile {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 104px;
	padding: 24px;
	background: var(--pc-bg);
	border: 1px solid var(--pc-border);
	border-radius: var(--pc-radius);
	color: var(--pc-text);
	text-decoration: none !important;
	transition: border-color .2s, box-shadow .2s, transform .2s;
}

.pc-tile:hover,
.pc-tile:focus-visible {
	border-color: var(--pc-accent);
	box-shadow: 0 8px 24px rgba(0, 63, 135, .08);
	transform: translateY(-2px);
	color: var(--pc-text);
}

.pc-tile__icon {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--pc-accent-soft);
	color: var(--pc-accent);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	transition: background .2s, color .2s;
}

.pc-tile__icon iconify-icon {
	width: 24px;
	height: 24px;
	display: block;
}

.pc-tile:hover .pc-tile__icon {
	background: var(--pc-accent);
	color: #fff;
}

.pc-tile__title {
	font-weight: 600;
	font-size: 16px;
	line-height: 1.4;
}

/* ---------- Вкладки соседних страниц ---------- */
.pc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 24px;
}

.pc-tabs__item {
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid var(--pc-border);
	background: var(--pc-bg);
	color: var(--pc-text);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none !important;
	transition: background .2s, border-color .2s, color .2s;
}

.pc-tabs__item:hover {
	border-color: var(--pc-accent);
	color: var(--pc-accent);
}

.pc-tabs__item.is-active {
	background: var(--pc-accent);
	border-color: var(--pc-accent);
	color: #fff;
}

/* ---------- Иллюстрация ---------- */
.entry-content img.pc-illustration {
	float: right;
	width: 260px;
	max-width: 40%;
	height: auto;
	margin: 0 0 16px 24px;
	border-radius: 12px;
}

@media (max-width: 575.98px) {
	.entry-content img.pc-illustration {
		float: none;
		display: block;
		max-width: 220px;
		width: 60%;
		margin: 0 auto 16px;
	}
}

/* ---------- Списки с галочками ---------- */
.entry-content ul.pc-ticks {
	list-style: none;
	padding: 0;
	margin: 0 0 16px;
	overflow: hidden;
}

.entry-content ul.pc-ticks li {
	position: relative;
	padding-left: 34px;
	margin-bottom: 12px;
}

.entry-content ul.pc-ticks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 2px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--pc-accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230063c3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.entry-content ul.pc-ticks li p {
	margin: 0;
}

/* ---------- Нумерованные шаги ---------- */
.entry-content ol.pc-steps {
	list-style: none;
	counter-reset: pc-step;
	padding: 0;
	margin: 0 0 24px;
	display: grid;
	gap: 12px;
}

.entry-content ol.pc-steps > li {
	counter-increment: pc-step;
	position: relative;
	padding: 16px 16px 16px 64px;
	min-height: 64px;
	background: var(--pc-bg);
	border: 1px solid var(--pc-border);
	border-radius: 12px;
}

.entry-content ol.pc-steps > li > br:first-child {
	display: none;
}

.entry-content ol.pc-steps > li::before {
	content: counter(pc-step);
	position: absolute;
	left: 16px;
	top: 16px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--pc-accent);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Аккордеоны ---------- */
.entry-content .pc-accordions {
	margin: 0 0 12px;
	clear: both;
}

.entry-content details.pc-acc {
	background: var(--pc-bg);
	border: 1px solid var(--pc-border);
	border-radius: 12px;
	overflow: hidden;
}

.entry-content details.pc-acc > summary {
	list-style: none;
	cursor: pointer;
	position: relative;
	padding: 16px 52px 16px 20px;
	font-weight: 600;
	font-size: 16px;
	user-select: none;
}

.entry-content details.pc-acc > summary::-webkit-details-marker {
	display: none;
}

.entry-content details.pc-acc > summary::after {
	content: "";
	position: absolute;
	right: 20px;
	top: 50%;
	width: 10px;
	height: 10px;
	margin-top: -7px;
	border-right: 2px solid var(--pc-accent);
	border-bottom: 2px solid var(--pc-accent);
	transform: rotate(45deg);
	transition: transform .2s, margin-top .2s;
}

.entry-content details.pc-acc[open] > summary::after {
	transform: rotate(-135deg);
	margin-top: -2px;
}

.entry-content details.pc-acc > summary:hover {
	color: var(--pc-accent);
}

.entry-content .pc-acc__body {
	padding: 0 20px 16px;
	border-top: 1px solid var(--pc-border);
	padding-top: 16px;
}

.entry-content .pc-acc__body h3 {
	font-size: 16px;
	font-weight: 600;
	margin: 16px 0 8px;
}

.entry-content .pc-acc__body h3:first-child {
	margin-top: 0;
}

/* ---------- Карточки с текстом ---------- */
.entry-content .pc-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
	margin: 0 0 24px;
	clear: both;
}

.entry-content .pc-card {
	background: var(--pc-bg);
	border: 1px solid var(--pc-border);
	border-radius: 12px;
	padding: 20px;
}

.entry-content .pc-card h3 {
	font-size: 17px;
	font-weight: 600;
	margin: 0 0 8px;
}

.entry-content .pc-card p:last-child {
	margin-bottom: 0;
}

/* ---------- Файлы для скачивания ---------- */
.entry-content a.pc-file {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px 14px 56px;
	margin: 0 0 10px;
	position: relative;
	background: var(--pc-bg);
	border: 1px solid var(--pc-border);
	border-radius: 12px;
	color: var(--pc-text);
	text-decoration: none !important;
	clear: both;
	transition: border-color .2s;
}

.entry-content a.pc-file::before {
	content: "";
	position: absolute;
	left: 16px;
	top: 50%;
	width: 28px;
	height: 28px;
	margin-top: -14px;
	border-radius: 8px;
	background: var(--pc-accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230063c3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.entry-content a.pc-file:hover {
	border-color: var(--pc-accent);
}

.pc-file__name {
	flex: 1;
	font-weight: 500;
	word-break: break-word;
}

.pc-file__size {
	color: var(--pc-muted);
	font-size: 13px;
	white-space: nowrap;
}

/* ---------- Видео ---------- */
.entry-content .pc-video {
	position: relative;
	aspect-ratio: 16 / 9;
	max-width: 800px;
	margin: 0 0 24px;
	border-radius: 12px;
	overflow: hidden;
	background: #000;
	clear: both;
}

.entry-content .pc-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

@media (max-width: 575.98px) {
	.pc-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.pc-tile {
		min-height: 0;
		padding: 16px;
	}

	.pc-tile__icon {
		flex-basis: 40px;
		width: 40px;
		height: 40px;
	}
}
