/* Компоненты: карточки, сайдбар, цитаты, разделители, пагинация. */

/* Сетки карточек */

.ptk-grid {
	display: grid;
	gap: 20px;
}

.ptk-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ptk-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Карточка стихотворения */

.ptk-card {
	display: flex;
	flex-direction: column;
	padding: 10px;
	border: 1px dotted var(--ptk-line);
	border-radius: var(--ptk-radius);
	background: var(--ptk-white);
	color: var(--ptk-ink);
	break-inside: avoid;
}

a.ptk-card:hover,
a.ptk-card:focus-visible {
	border-color: var(--ptk-ink);
	color: var(--ptk-ink);
}

.ptk-card__title {
	margin: 0 0 0 10px;
	font-family: var(--ptk-font-heading);
	font-size: var(--ptk-card-title);
	font-weight: 700;
	line-height: 1.25;
}

.ptk-card__excerpt {
	margin: 10px 0 0 10px;
	font-family: var(--ptk-font-text);
	font-size: var(--ptk-small);
	font-weight: 500;
	line-height: 1.5;
	color: var(--ptk-muted);
}

.ptk-card__author {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px 10px;
}

.ptk-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}

.ptk-card__author-name {
	font-family: var(--ptk-font-text);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
}

/* Сайдбар */

.ptk-sidebar {
	align-self: start;
	padding: 20px;
	border: 1px dotted var(--ptk-line);
	border-radius: var(--ptk-radius);
}

.ptk-sidebar__search {
	margin-bottom: 20px;
}

.ptk-sidebar__ornament {
	display: block;
	width: 120px;
	height: auto;
	margin: 18px 0;
	opacity: 0.85;
}

.ptk-sidebar__cats {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ptk-sidebar__cats a {
	display: block;
	padding: 9px 15px;
	font-family: var(--ptk-font-text);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--ptk-ink);
	text-transform: uppercase;
}

.ptk-sidebar__cats a:hover,
.ptk-sidebar__cats a:focus-visible {
	color: var(--ptk-text);
	text-decoration: underline;
}

.ptk-sidebar__cats .current-cat > a,
.ptk-sidebar__cats .current-cat a {
	text-decoration: underline;
}

/* Цитаты */

.ptk-quotes {
	position: relative;
	padding: 10px 26px 0;
	text-align: center;
}

.ptk-quotes__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ptk-quotes__item {
	display: none;
}

.ptk-quotes__item.is-active {
	display: block;
}

.ptk-quotes__text {
	margin: 0 0 15px;
	font-family: var(--ptk-font-text);
	font-size: 17px;
	font-weight: 500;
	font-style: italic;
	line-height: 1.5;
	color: #646464;
}

.ptk-quotes__author {
	font-family: var(--ptk-font-text);
	font-size: 12px;
	font-weight: 600;
	color: var(--ptk-ink);
}

.ptk-quotes__nav {
	position: absolute;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin-top: -12px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #757575;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.ptk-quotes__nav:hover,
.ptk-quotes__nav:focus-visible {
	color: var(--ptk-ink);
}

.ptk-quotes__nav--prev {
	left: 0;
}

.ptk-quotes__nav--next {
	right: 0;
}

/* Карточки цитат на странице «Темы и жанры» */

.ptk-quote-card {
	padding: 24px;
	border-radius: var(--ptk-radius);
	background: var(--ptk-quote-bg);
}

.ptk-quote-card__text {
	margin: 0 0 12px;
	font-family: var(--ptk-font-text);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
	color: #646464;
}

.ptk-quote-card__author {
	margin: 0;
	font-family: var(--ptk-font-text);
	font-size: 12px;
	font-weight: 600;
}

/* Разделитель-ветка */

.ptk-branch {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin: 30px 0;
}

.ptk-branch img:first-child {
	width: 50%;
	max-width: 462px;
}

.ptk-branch img:last-child {
	width: 24%;
	max-width: 223px;
}

.ptk-branch--tight {
	margin: 20px 0;
}

/* Пагинация */

.ptk-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 30px 0 0;
	font-family: var(--ptk-font-text);
	font-size: 14px;
}

.ptk-pagination a,
.ptk-pagination span {
	padding: 4px 6px;
	color: var(--ptk-accent-dark);
}

.ptk-pagination .current {
	font-weight: 700;
	color: var(--ptk-ink);
}

.ptk-pagination .dots {
	color: var(--ptk-line);
}

/* Навигация между стихами */

.ptk-postnav {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	margin: 10px 0 0;
}

.ptk-postnav__link {
	display: flex;
	flex-direction: column;
	max-width: 46%;
}

.ptk-postnav__link--next {
	margin-left: auto;
	text-align: right;
}

.ptk-postnav__label {
	font-family: var(--ptk-font-text);
	font-size: 11px;
	font-weight: 300;
	color: #a2a2a2;
}

.ptk-postnav__title {
	font-family: var(--ptk-font-text);
	font-size: 13px;
	font-weight: 600;
	color: var(--ptk-ink);
}

/* Соцсети */

.ptk-social {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ptk-social--center {
	justify-content: center;
	margin-top: 14px;
}

.ptk-social__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--ptk-white);
	color: var(--ptk-ink);
}

.ptk-social__link:hover,
.ptk-social__link:focus-visible {
	color: var(--ptk-accent-dark);
}

.ptk-social__icon {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* Заголовок секции */

.ptk-section-title {
	margin: 0 0 16px;
	font-family: var(--ptk-font-text);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
}

/* Чипсы рубрик */

.ptk-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 14px;
	margin: 24px 0;
	padding: 0;
	list-style: none;
}

.ptk-chips a {
	font-family: var(--ptk-font-text);
	font-size: 15px;
	font-weight: 600;
	color: var(--ptk-ink);
}

.ptk-chips a:hover,
.ptk-chips a:focus-visible {
	text-decoration: underline;
}

.ptk-chips li + li::before {
	content: "⋮";
	margin-right: 14px;
	color: var(--ptk-line);
}

/* Аудио */

.ptk-track {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 8px 18px;
	padding: 14px 0;
	border-bottom: 1px dotted var(--ptk-line);
}

.ptk-track__title {
	margin: 0;
	font-family: var(--ptk-font-text);
	font-size: 15px;
	font-weight: 600;
}

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

.ptk-track audio {
	grid-column: 1 / -1;
	width: 100%;
	height: 38px;
}

/* Медиа в контенте */

.ptk-entry-content img {
	height: auto;
	border-radius: var(--ptk-radius);
}

.ptk-entry-content .wp-block-image {
	margin: 0 0 1.2em;
}

.ptk-entry-content .wp-block-quote {
	margin: 20px 0;
	padding: 24px;
	border: 0;
	border-radius: var(--ptk-radius);
	background: var(--ptk-quote-bg);
}

.ptk-entry-content .wp-block-quote p {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 500;
	color: #646464;
}

.ptk-entry-content .wp-block-quote cite {
	font-size: 12px;
	font-weight: 600;
	font-style: normal;
	color: var(--ptk-ink);
}

.ptk-dropcap > p:first-of-type::first-letter {
	float: left;
	margin: 0 10px 0 0;
	font-family: var(--ptk-font-heading);
	font-size: 54px;
	font-weight: 500;
	line-height: 0.9;
}

@media (max-width: 1024px) {
	.ptk-grid--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.ptk-grid--3,
	.ptk-grid--2 {
		grid-template-columns: minmax(0, 1fr);
	}

	.ptk-card__title {
		font-size: 16px;
	}

	.ptk-card__excerpt {
		font-size: 12px;
		line-height: 1.4;
	}

	.ptk-branch {
		gap: 10px;
		margin: 22px 0;
	}

	.ptk-quotes__text {
		font-size: 14px;
	}

	.ptk-chips li + li::before {
		content: none;
		margin: 0;
	}
}
