/* ==========================================================================
   СТИЛІ ПІД WORDPRESS
   Те, чого не було у статичній верстці: класи редактора, адмін-бар,
   типографіка всередині the_content(), коментарі.
   Підключається останнім — може перекривати попередні файли.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Адмін-бар
   -------------------------------------------------------------------------- */

body.admin-bar .header__bar.is-stuck {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .header__bar.is-stuck {
		top: 46px;
	}
}


/* --------------------------------------------------------------------------
   2. Типографіка контенту з редактора
   -------------------------------------------------------------------------- */

.page-content > *:first-child,
.article__body > *:first-child {
	margin-top: 0;
}

.page-content > *:last-child,
.article__body > *:last-child {
	margin-bottom: 0;
}

.article__body h2,
.page-content h2 {
	margin: 2em 0 .6em;
	font-family: var(--font-display);
	font-size: var(--fs-h3);
	font-weight: 600;
	line-height: 1.2;
	color: var(--c-blue);
}

.article__body h3,
.page-content h3 {
	margin: 1.6em 0 .5em;
	font-family: var(--font-display);
	font-size: 1.375rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--c-blue);
}

.article__body h4,
.page-content h4 {
	margin: 1.4em 0 .4em;
	font-family: var(--font-body);
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--c-brown);
}

.article__body ul,
.article__body ol,
.page-content ul,
.page-content ol {
	margin: 0 0 1.25em;
	padding-left: 1.5em;
	font-size: var(--fs-lead);
	line-height: 1.7;
}

.article__body ul {
	list-style: disc;
}

.article__body ol {
	list-style: decimal;
}

.article__body li,
.page-content li {
	margin-bottom: .4em;
}

.article__body a,
.page-content a {
	color: var(--c-brown);
	text-decoration: underline;
	text-underline-offset: .2em;
}

.article__body a:hover,
.page-content a:hover {
	color: var(--c-blue);
}

.article__body blockquote,
.page-content blockquote {
	margin: 1.75em 0;
	padding: 1.25rem 1.5rem;
	border-left: 4px solid var(--c-ochre);
	background: var(--c-cream);
	font-family: var(--font-display);
	font-size: 1.25rem;
	line-height: 1.4;
	color: var(--c-blue);
}

.article__body blockquote p:last-child,
.page-content blockquote p:last-child {
	margin-bottom: 0;
}

.article__body table,
.page-content table {
	width: 100%;
	margin: 1.5em 0;
	border-collapse: collapse;
	font-size: var(--fs-sm);
}

.article__body th,
.article__body td,
.page-content th,
.page-content td {
	padding: .625rem .75rem;
	border: 1px solid var(--c-line);
	text-align: left;
}

.article__body th,
.page-content th {
	background: var(--c-cream);
	font-weight: 600;
	color: var(--c-brown);
}

.article__body hr,
.page-content hr {
	height: 1px;
	margin: 2.5em 0;
	border: 0;
	background: var(--gold-h);
}

.article__body code,
.page-content code {
	padding: .1em .35em;
	background: var(--c-cream);
	border: 1px solid var(--c-line);
	border-radius: 3px;
	font-size: .9em;
}


/* --------------------------------------------------------------------------
   3. Класи вирівнювання й підписів WordPress
   -------------------------------------------------------------------------- */

.alignnone,
.aligncenter,
.alignleft,
.alignright,
.alignwide,
.alignfull {
	max-width: 100%;
	height: auto;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.alignleft {
	float: left;
	margin: .35em 1.5rem 1rem 0;
}

.alignright {
	float: right;
	margin: .35em 0 1rem 1.5rem;
}

@media (max-width: 640px) {
	.alignleft,
	.alignright {
		float: none;
		margin-inline: 0;
	}
}

.wp-caption {
	max-width: 100%;
	margin-bottom: 1.5rem;
}

.wp-caption-text,
.wp-element-caption,
figcaption {
	margin-top: .5rem;
	font-family: var(--font-ui);
	font-size: var(--fs-xs);
	line-height: 1.4;
	color: var(--c-ink-muted);
	text-align: center;
}

.wp-block-image img,
.article__body img,
.page-content img {
	max-width: 100%;
	height: auto;
}

.wp-block-image {
	margin: 1.75em 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.sticky,
.bypostauthor {
	/* потрібні темі для сумісності з ядром */
	position: relative;
}


/* --------------------------------------------------------------------------
   4. Дрібні доповнення до верстки
   -------------------------------------------------------------------------- */

/* Пошук окремим блоком на сторінці результатів і 404 */
.header-search--page {
	display: flex;
	max-width: 26rem;
	margin: 0 auto 2.5rem;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Абзац у ряді історії — редактор віддає <p> усередині обгортки */
.history__paragraph > p:last-child {
	margin-bottom: 0;
}

/* Порожній стан і службові повідомлення по центру секції */
.section .form-status:only-child {
	text-align: center;
}


/* --------------------------------------------------------------------------
   5. Коментарі
   -------------------------------------------------------------------------- */

.comments {
	max-width: 53.6875rem;
	margin-inline: auto;
}

.comments__list {
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.comments__list .children {
	margin: 1rem 0 0 1.5rem;
	padding: 0;
	list-style: none;
}

.comments__list li article {
	padding: 1.25rem;
	margin-bottom: 1rem;
	background: var(--c-cream);
	border-left: 3px solid var(--c-ochre);
}

.comment-meta {
	margin-bottom: .5rem;
	font-family: var(--font-ui);
	font-size: var(--fs-xs);
	color: var(--c-ink-muted);
}

.comment-form p {
	margin-bottom: 1rem;
}

.comment-form label {
	display: block;
	margin-bottom: .375rem;
	font-family: var(--font-ui);
	font-size: var(--fs-xs);
	font-weight: 500;
	text-transform: uppercase;
	color: var(--c-brown);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: .625rem;
	border: 1px solid var(--c-line);
	background: var(--c-white);
	font-family: var(--font-body);
	font-size: var(--fs-sm);
}
