/*
Theme Name: bonkod.org Astra
Description: Дочерняя тема Astra для блога bonkod.org (v2): светлый современный журнал — белый, кобальт, мята, шрифт Onest.
Template: astra
Version: 2.0.0
Text Domain: bonkod-org-astra
*/

:root {
	--bko-blue: #1E4FD8;
	--bko-blue-d: #173FB0;
	--bko-mint: #DDF5EC;
	--bko-mint-d: #BFE9D9;
	--bko-ink: #1C2230;
	--bko-text: #3B4457;
	--bko-muted: #5F687B;
	--bko-line: #E2E8F3;
	--bko-soft: #F4F7FD;
	--bko-r: 12px;
	--bko-font: 'Onest', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- База ---------- */

body,
button,
input,
select,
textarea,
.ast-button,
.ast-custom-button {
	font-family: var(--bko-font);
}
body {
	color: var(--bko-text);
	background: #fff;
	font-size: 17px;
	line-height: 1.65;
	overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
	font-family: var(--bko-font);
	font-weight: 700;
	color: var(--bko-ink);
	letter-spacing: -0.01em;
}
a {
	color: var(--bko-blue);
}
a:hover,
a:focus {
	color: var(--bko-blue-d);
}
:focus-visible {
	outline: 2px solid var(--bko-blue);
	outline-offset: 2px;
}
img {
	max-width: 100%;
	height: auto;
}

.bko-chip,
.ast-taxonomy-container.cat-links.badge a,
.cat-links.badge a.ast-button {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--bko-mint);
	color: #12408F;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	text-transform: none;
	letter-spacing: 0;
	border: 0;
}
.bko-chip:hover,
.cat-links.badge a.ast-button:hover {
	background: var(--bko-blue);
	color: #fff;
}
.bko-date {
	display: block;
	color: var(--bko-muted);
	font-size: 14px;
}
.bko-btn {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 999px;
	background: var(--bko-blue);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.bko-btn:hover,
.bko-btn:focus {
	background: var(--bko-blue-d);
	color: #fff;
}

/* ---------- Шапка ---------- */

.site-header .main-header-bar {
	background: #fff;
	border-bottom: 1px solid var(--bko-line);
}
.site-header .custom-logo-link img {
	width: 180px;
	height: auto;
	max-width: 180px;
}
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link {
	position: relative;
	padding: 0 14px;
	color: var(--bko-ink);
	font-size: 15.5px;
	font-weight: 500;
}
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link::after {
	content: '';
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: -1px;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: transparent;
}
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link:hover,
.ast-builder-menu-1 .main-header-menu > .current-menu-item > .menu-link,
.ast-builder-menu-1 .main-header-menu > .current-menu-ancestor > .menu-link,
.ast-builder-menu-1 .main-header-menu > .current-post-ancestor > .menu-link {
	color: var(--bko-blue);
}
.ast-builder-menu-1 .main-header-menu > .current-menu-item > .menu-link::after,
.ast-builder-menu-1 .main-header-menu > .current-menu-ancestor > .menu-link::after,
.ast-builder-menu-1 .main-header-menu > .current-post-ancestor > .menu-link::after {
	background: var(--bko-blue);
}
.ast-desktop .ast-builder-menu-1 .main-header-menu > .menu-item {
	line-height: 76px;
}
.ast-header-search {
	margin-left: 10px;
}
.ast-header-search .astra-search-icon,
.ast-header-search .ast-search-icon .astra-search-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--bko-mint);
	color: var(--bko-blue);
}
.ast-header-search .astra-search-icon:hover {
	background: var(--bko-blue);
	color: #fff;
}
.ast-header-search .ast-icon svg {
	fill: currentColor;
	width: 16px;
	height: 16px;
}
.ast-search-menu-icon .search-form {
	border-radius: 10px;
	border-color: var(--bko-line);
	background: #fff;
}
.ast-search-menu-icon .search-field {
	font-size: 15px;
}
/* Мобильное меню */
.ast-mobile-header-wrap .main-header-bar {
	background: #fff;
}
.ast-mobile-header-content {
	background: #fff;
	border-bottom: 1px solid var(--bko-line);
}
.ast-mobile-header-content .menu-link {
	color: var(--bko-ink);
	font-weight: 500;
	border-bottom-color: var(--bko-line) !important;
}
.ast-mobile-header-content .current-menu-item > .menu-link {
	color: var(--bko-blue);
}
.ast-mobile-menu-trigger-minimal,
.ast-button-wrap .menu-toggle.main-header-menu-toggle {
	color: var(--bko-ink);
	background: transparent;
}

/* ---------- Каркас ---------- */

.site-content > .ast-container {
	flex-wrap: wrap;
}
#content {
	padding-bottom: 24px;
}
.ast-right-sidebar #primary {
	border-right: 0;
}
.ast-right-sidebar #secondary {
	border-left: 0;
}
@media (min-width: 922px) {
	.ast-plain-container.ast-right-sidebar #primary,
	.ast-right-sidebar #primary {
		width: 69%;
		padding-right: 44px;
		margin-top: 40px;
		margin-bottom: 40px;
	}
	.ast-plain-container.ast-right-sidebar #secondary,
	.ast-right-sidebar #secondary {
		width: 31%;
		padding-left: 0;
		margin-top: 40px;
	}
	.ast-right-sidebar .sidebar-main {
		padding: 0;
	}
}
.screen-reader-text,
.wp-block-search__label.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	left: auto !important;
	top: auto !important;
}

/* ---------- Главная: крупная + 2 малые ---------- */

.bko-lead {
	flex: 0 0 100%;
	width: 100%;
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 28px;
	margin: 36px 0 8px;
}
.bko-lead__side {
	display: grid;
	grid-template-rows: 1fr 1fr;
	gap: 28px;
}
.bko-lead__item {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.bko-lead__img {
	display: block;
	border-radius: var(--bko-r);
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--bko-mint);
}
.bko-lead__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}
.bko-lead__img:hover img {
	transform: scale(1.03);
}
.bko-lead__body {
	padding-top: 16px;
}
.bko-lead__title {
	margin: 12px 0 8px;
	font-size: 21px;
	line-height: 1.3;
}
.bko-lead__item--big .bko-lead__title {
	font-size: 34px;
	line-height: 1.18;
	margin-top: 14px;
}
.bko-lead__title a {
	color: var(--bko-ink);
	text-decoration: none;
}
.bko-lead__title a:hover {
	color: var(--bko-blue);
}
.bko-lead__excerpt {
	margin: 0 0 10px;
	font-size: 18px;
	color: var(--bko-text);
}
.bko-section-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 22px;
	font-size: 24px;
}
.bko-section-title::before {
	content: '';
	width: 28px;
	height: 12px;
	border-radius: 6px;
	background: var(--bko-blue);
	box-shadow: 14px 0 0 var(--bko-mint);
	margin-right: 14px;
}

/* ---------- Сетка карточек (главная, рубрики, поиск) ---------- */

.blog .site-main > .ast-row,
.archive .site-main > .ast-row,
.search .site-main > .ast-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
	margin: 0;
}
.blog .site-main > .ast-row::before,
.blog .site-main > .ast-row::after,
.archive .site-main > .ast-row::before,
.archive .site-main > .ast-row::after,
.search .site-main > .ast-row::before,
.search .site-main > .ast-row::after {
	display: none;
}
.ast-row > .ast-article-post {
	width: auto;
	margin: 0;
	padding: 0;
	float: none;
	background: #fff;
	border: 1px solid var(--bko-line);
	border-radius: var(--bko-r);
	overflow: hidden;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.ast-row > .ast-article-post:hover {
	border-color: #C9D5F3;
	box-shadow: 0 10px 28px -18px rgba(30, 79, 216, .45);
}
.ast-row > .ast-article-post .ast-article-inner,
.ast-row > .ast-article-post .post-content {
	padding: 0;
	margin: 0;
	background: transparent;
	height: 100%;
}
.ast-row > .ast-article-post .post-content {
	display: flex;
	flex-direction: column;
	padding-bottom: 22px;
}
.ast-row > .ast-article-post .post-content > *:not(.ast-blog-featured-section) {
	margin-left: 22px;
	margin-right: 22px;
}
.ast-row > .ast-article-post .ast-blog-featured-section {
	margin: 0 0 18px;
	border-radius: 0;
}
.ast-row > .ast-article-post .ast-blog-featured-section,
.ast-row > .ast-article-post .post-thumb-img-content,
.ast-row > .ast-article-post .post-thumb-img-content a {
	display: block;
	width: 100%;
	max-width: none;
	padding: 0;
	margin: 0 !important;
}
.ast-row > .ast-article-post .post-thumb-img-content img {
	display: block;
	width: 100% !important;
	max-width: none;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 0;
}
.ast-row > .ast-article-post .cat-links.badge {
	margin-bottom: 10px;
	align-self: flex-start;
}
.ast-row > .ast-article-post .entry-title {
	font-size: 21px;
	line-height: 1.3;
	margin-bottom: 6px;
}
.ast-row > .ast-article-post .entry-title a {
	color: var(--bko-ink);
}
.ast-row > .ast-article-post .entry-title a:hover {
	color: var(--bko-blue);
}
.ast-row > .ast-article-post .entry-header,
.ast-row > .ast-article-post .entry-meta,
.ast-row > .ast-article-post .entry-meta * {
	color: var(--bko-muted);
	font-size: 14px;
	font-weight: 400;
}
.ast-row > .ast-article-post .ast-excerpt-container {
	margin-top: 10px;
	font-size: 16px;
	color: var(--bko-text);
}
.ast-row > .ast-article-post .ast-excerpt-container p {
	margin-bottom: 0;
}
.ast-row > .ast-article-post .read-more {
	margin-top: auto;
	padding-top: 16px;
	margin-bottom: 0;
}
.ast-row > .ast-article-post .read-more a {
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	color: var(--bko-blue);
}
.ast-row > .ast-article-post .read-more a::after {
	content: ' →';
}
.ast-row > .ast-article-post .entry-content:empty,
.ast-row > .ast-article-post .entry-content.clear {
	display: none;
}

/* Пагинация */
.ast-pagination .page-numbers {
	border-radius: 10px;
	border: 1px solid var(--bko-line);
	color: var(--bko-ink);
}
.ast-pagination .page-numbers.current {
	background: var(--bko-blue);
	border-color: var(--bko-blue);
	color: #fff;
}

/* ---------- Заголовок рубрики и поиска ---------- */

.ast-archive-description,
.ast-separate-container .ast-archive-description {
	position: relative;
	flex: 0 0 100%;
	margin: 0 0 28px;
	padding: 30px 32px;
	border-radius: var(--bko-r);
	background: var(--bko-mint);
	border: 0;
	overflow: hidden;
}
.ast-archive-description::after {
	content: '';
	position: absolute;
	right: -40px;
	top: -40px;
	width: 160px;
	height: 160px;
	border-radius: 50%;
	background: var(--bko-blue);
	opacity: .12;
}
.ast-archive-description .ast-archive-title,
.ast-archive-description .page-title {
	font-size: 32px;
	line-height: 1.2;
	margin: 0;
	color: var(--bko-ink);
}
.ast-archive-description p,
.ast-archive-description .taxonomy-description {
	margin: 8px 0 0;
	color: var(--bko-text);
}
.bko-kicker {
	display: block;
	margin-bottom: 6px;
	color: var(--bko-blue);
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .08em;
}
.search-no-results .no-results {
	padding: 28px 30px;
	border: 1px solid var(--bko-line);
	border-radius: var(--bko-r);
}

/* ---------- Правая колонка ---------- */

#secondary .widget {
	margin-bottom: 24px;
}
#secondary .bko-w {
	padding: 22px 22px 18px;
	border-radius: var(--bko-r);
	background: var(--bko-soft);
}
#secondary .bko-w-about {
	background: var(--bko-mint);
}
#secondary .bko-w .wp-block-heading {
	margin: 0 0 12px;
	font-size: 18px;
}
#secondary .bko-w ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.bko-w-cats li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 9px 0;
	border-bottom: 1px solid var(--bko-line);
	color: var(--bko-muted);
	font-size: 14px;
}
.bko-w-cats li:last-child {
	border-bottom: 0;
}
.bko-w-cats li a {
	color: var(--bko-ink);
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
}
.bko-w-cats li a:hover {
	color: var(--bko-blue);
}
.bko-w-fresh .wp-block-latest-posts li {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	column-gap: 12px;
	align-items: start;
	margin: 0 0 16px;
}
.bko-w-fresh .wp-block-latest-posts li:last-child {
	margin-bottom: 0;
}
.bko-w-fresh .wp-block-latest-posts__featured-image {
	grid-row: span 2;
	margin: 0 !important;
	float: none !important;
}
.bko-w-fresh .wp-block-latest-posts__featured-image img {
	width: 76px !important;
	height: 56px !important;
	max-width: none;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}
.bko-w-fresh .wp-block-latest-posts__post-title {
	color: var(--bko-ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
}
.bko-w-fresh .wp-block-latest-posts__post-title:hover {
	color: var(--bko-blue);
}
.bko-w-fresh .wp-block-latest-posts__post-date {
	margin-top: 4px;
	color: var(--bko-muted);
	font-size: 13px;
}
.bko-w-about p {
	font-size: 15px;
	line-height: 1.55;
	margin-bottom: 10px;
}
.bko-w-about a {
	font-weight: 600;
	text-decoration: none;
}

/* Поиск (виджет, 404, пустой результат) */
.wp-block-search__inside-wrapper,
.bko-search {
	display: flex;
	gap: 8px;
}
.bko-search label {
	flex: 1;
	min-width: 0;
	display: flex;
}
.wp-block-search .wp-block-search__input,
.bko-search .search-field {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 16px;
	border: 1px solid #CBD4E6;
	border-radius: 10px;
	background: #fff;
	color: var(--bko-ink);
	font-size: 16px;
}
.wp-block-search .wp-block-search__input:focus,
.search-field:focus {
	border-color: var(--bko-blue);
	outline: none;
	box-shadow: 0 0 0 3px rgba(30, 79, 216, .18);
}
.wp-block-search .wp-block-search__button,
.bko-search .search-submit {
	height: 48px;
	margin: 0;
	padding: 0 20px;
	border: 0;
	border-radius: 10px;
	background: var(--bko-blue);
	color: #fff;
	font-weight: 600;
	font-size: 15px;
}
.wp-block-search .wp-block-search__button:hover,
.bko-search .search-submit:hover {
	background: var(--bko-blue-d);
}

/* ---------- Статья ---------- */

.single .site-main > article,
.ast-plain-container.single .site-main > article {
	padding: 0;
}
.single .entry-header {
	margin-bottom: 18px;
}
.single .entry-header .entry-title,
.single .ast-single-post-order .entry-title {
	font-size: 40px;
	line-height: 1.15;
	margin-bottom: 14px;
}
.single .entry-meta,
.single .entry-meta * {
	color: var(--bko-muted);
	font-size: 15px;
}
.single .entry-meta .cat-links a,
.single .entry-meta a[rel~="category"] {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 999px;
	background: var(--bko-mint);
	color: #12408F;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
}
.bko-cover {
	margin: 4px 0 30px;
}
.bko-cover img {
	display: block;
	box-shadow: none;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--bko-r);
}
.single .entry-content {
	font-size: 18px;
	line-height: 1.75;
	color: var(--bko-text);
}
.single .entry-content h2 {
	font-size: 27px;
	margin: 1.6em 0 .6em;
}
.single .entry-content h3 {
	font-size: 22px;
	margin: 1.4em 0 .5em;
}
.single .entry-content a,
.page .entry-content a {
	text-decoration: underline;
	text-decoration-color: rgba(30, 79, 216, .35);
	text-underline-offset: 3px;
}
.single .entry-content ul,
.single .entry-content ol {
	margin-left: 1.3em;
}
.single .entry-content li::marker {
	color: var(--bko-blue);
}
.single .entry-content blockquote,
.page .entry-content blockquote {
	margin: 1.6em 0;
	padding: 18px 22px;
	border: 0;
	border-left: 4px solid var(--bko-blue);
	border-radius: 0 var(--bko-r) var(--bko-r) 0;
	background: var(--bko-mint);
	color: var(--bko-ink);
	font-style: normal;
}
.single .post-navigation,
.single .ast-author-meta {
	display: none;
}

/* ---------- Страница «О сайте» ---------- */

.page .entry-header .entry-title {
	font-size: 40px;
	line-height: 1.15;
}
.page .entry-header {
	margin: 40px 0 22px;
	padding-bottom: 18px;
	border-bottom: 3px solid var(--bko-mint);
}
.page .entry-content {
	font-size: 18px;
	line-height: 1.75;
}

/* ---------- 404 ---------- */

.error404 #primary {
	width: 100%;
}
.bko-404 {
	max-width: 640px;
	margin: 56px auto 40px;
	text-align: center;
}
.bko-404__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 168px;
	height: 96px;
	margin-bottom: 22px;
	border-radius: var(--bko-r);
	background: radial-gradient(circle at 100% 100%, var(--bko-mint) 0 30px, transparent 31px), var(--bko-blue);
	color: #fff;
	font-size: 44px;
	font-weight: 700;
	letter-spacing: .04em;
}
.bko-404 .page-title {
	font-size: 36px;
	margin: 0 0 10px;
}
.bko-404__text {
	color: var(--bko-text);
	margin-bottom: 22px;
}
.bko-404__search {
	max-width: 480px;
	margin: 0 auto 22px;
	text-align: left;
}
.bko-404__cats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 0 26px;
	padding: 0;
	list-style: none;
}

/* ---------- Подвал ---------- */

.site-footer,
.site-below-footer-wrap[data-section="section-below-footer-builder"] {
	background: var(--bko-soft);
	border-top: 1px solid var(--bko-line);
}
.site-footer .ast-footer-copyright,
.site-footer .ast-footer-copyright p {
	color: var(--bko-muted);
	font-size: 14px;
}
.ast-scroll-top-icon {
	background: var(--bko-blue);
	border-radius: 10px;
}

/* ---------- Адаптив ---------- */

@media (max-width: 921px) {
	.bko-lead {
		grid-template-columns: minmax(0, 1fr);
		margin-top: 24px;
	}
	.bko-lead__side {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: none;
	}
	.bko-lead__item--big .bko-lead__title {
		font-size: 28px;
	}
	#primary {
		margin-top: 32px;
	}
	#secondary {
		margin-top: 36px;
		padding-top: 0;
	}
	.single .entry-header .entry-title,
	.page .entry-header .entry-title {
		font-size: 32px;
	}
}
@media (max-width: 640px) {
	.bko-lead {
		gap: 22px;
	}
	.bko-lead__side {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}
	.bko-lead__side .bko-lead__item {
		display: grid;
		grid-template-columns: 112px minmax(0, 1fr);
		gap: 14px;
		align-items: start;
	}
	.bko-lead__side .bko-lead__img {
		aspect-ratio: 1 / 1;
		border-radius: 10px;
	}
	.bko-lead__side .bko-lead__body {
		padding-top: 0;
	}
	.bko-lead__side .bko-lead__title {
		font-size: 17px;
		margin: 8px 0 4px;
	}
	.bko-lead__item--big .bko-lead__title {
		font-size: 25px;
	}
	.bko-lead__excerpt {
		font-size: 16px;
	}
	.blog .site-main > .ast-row,
	.archive .site-main > .ast-row,
	.search .site-main > .ast-row {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}
	.ast-row > .ast-article-post .entry-title {
		font-size: 19px;
	}
	.ast-archive-description,
	.ast-separate-container .ast-archive-description {
		padding: 22px 20px;
	}
	.ast-archive-description .ast-archive-title,
	.ast-archive-description .page-title {
		font-size: 26px;
	}
	.single .entry-header .entry-title,
	.page .entry-header .entry-title {
		font-size: 27px;
	}
	.single .entry-content,
	.page .entry-content {
		font-size: 17px;
	}
	.bko-404 .page-title {
		font-size: 28px;
	}
	.bko-section-title {
		font-size: 21px;
	}
	.site-header .custom-logo-link img {
		width: 150px;
		max-width: 150px;
	}
}

/* Уточнения поверх динамических стилей Astra */
.ast-row > .ast-article-post .ast-blog-featured-section {
	margin-bottom: 18px !important;
}
.ast-archive-description,
.ast-archive-description * {
	text-align: left !important;
}
.ast-archive-description .ast-breadcrumbs-wrapper,
.ast-archive-description .ast-breadcrumbs {
	margin-top: 8px;
	font-size: 14px;
	color: var(--bko-muted);
}
