/*
Theme Name: BlogHash Child: Meadow
Template: bloghash
Version: 1.0.0
Description: Дочерняя тема «Meadow» для сети wp-portfolio.
Text Domain: bloghash-child
*/

/* Meadow: летний луг — белый фон, трава, лютик и небо. */
:root {
	--m-green: #4C9A2A;
	--m-green-dark: #3A7A1F;
	--m-yellow: #F2C14E;
	--m-sky: #5AA9E6;
	--m-text: #2F3B45;
	--m-muted: #66737E;
	--m-line: #E4ECDD;
	--m-soft: #F6FAF2;
	--m-head: 'Exo 2', 'Trebuchet MS', sans-serif;
	--m-body: 'Open Sans', Arial, sans-serif;
	/* Акцент родителя (розовый) → трава, второй цвет → тёмный сланец. */
	--bloghash-primary: #4C9A2A;
	--bloghash-primary_80: #DCEFD2;
	--bloghash-primary_15: #5DAE39;
	--bloghash-primary_27: rgba(76, 154, 42, .27);
	--bloghash-primary_10: rgba(76, 154, 42, .1);
	--bloghash-secondary: #2F3B45;
}

html body {
	background: #fff;
	color: var(--m-text);
	font-family: var(--m-body);
}
body, body p, .entry-summary, .entry-content { font-family: var(--m-body); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4,
.entry-title, .page-title, .widget-title, .site-title {
	font-family: var(--m-head);
	color: var(--m-text);
}
a { color: var(--m-green-dark); }
a:hover, a:focus { color: var(--m-sky); }
.bloghash-container { max-width: 1200px; }

/* Шапка: широкая полоса «лютик → трава» по верхнему краю, название слева, «Блог» справа. */
#masthead { position: relative; }
#bloghash-header-inner {
	background: #fff;
	border-bottom: 1px solid var(--m-line);
	border-top: 14px solid transparent;
	border-image: linear-gradient(90deg, var(--m-yellow) 0%, #A9C43C 45%, var(--m-green) 100%) 1;
	border-image-slice: 1 0 0 0;
}
.bloghash-header-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 84px;
	gap: 16px;
}
#bloghash-header .site-title {
	margin: 0;
	font-family: var(--m-head);
	font-weight: 800;
	font-size: 2.8rem;
	line-height: 1.1;
	letter-spacing: .01em;
}
#bloghash-header .site-title a { color: var(--m-text); }
#bloghash-header .site-title a:hover { color: var(--m-green); }
#bloghash-header .site-title a::before {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 10px;
	border-radius: 50%;
	background: var(--m-yellow);
	box-shadow: 0 0 0 4px rgba(242, 193, 78, .3);
	vertical-align: 2px;
}
.bloghash-header-widgets:empty, .bloghash-mobile-nav { display: none !important; }
#bloghash-header-inner .bloghash-nav,
#bloghash-header-inner .site-navigation {
	display: block !important;
	position: static !important;
	min-height: 0 !important;
	height: auto !important;
	width: auto !important;
	margin: 0 0 0 auto !important;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
}
#bloghash-header-inner .site-navigation > ul {
	display: flex !important;
	align-items: center;
	height: 100%;
	margin: 0;
	padding: 0;
	overflow: visible !important;
	max-height: none !important;
}
#bloghash-header-inner .site-navigation > ul > li {
	border: 0 !important;
	margin: 0 !important;
	padding: 0;
	width: auto !important;
}
#bloghash-header-inner .site-navigation > ul > li > a,
#bloghash-header-inner .bloghash-nav > ul > li > a {
	display: inline-block;
	padding: 0 !important;
	color: #fff !important;
}
#bloghash-header-inner .site-navigation > ul > li > a > span {
	display: inline-block;
	width: auto;
	padding: 9px 26px !important;
	border-radius: 999px;
	background: var(--m-green);
	color: #fff;
	font-family: var(--m-head);
	font-weight: 600;
	font-size: 1.6rem;
	line-height: 1.3;
	box-shadow: 0 3px 0 var(--m-green-dark);
	transition: background .2s, transform .2s;
}
#bloghash-header-inner .site-navigation > ul > li > a:hover > span {
	background: var(--m-sky);
	box-shadow: 0 3px 0 #3E88C2;
	transform: translateY(-1px);
}
#bloghash-header-inner .site-navigation > ul > li > a > span::before,
#bloghash-header-inner .site-navigation > ul > li > a > span::after { display: none !important; }

/* Главная и /blog/: H1 и сетка 3 колонки, широкие карточки — 1-я, 6-я, 11-я… (порядок по дате сохраняется). */
.page-header, .bloghash-breadcrumbs { display: none; }
.blog #primary { margin-top: 0; }
#primary .site-content > .bloghash-flex-row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	margin: 0;
	padding: 0;
}
#primary .site-content > .bloghash-flex-row > [class*="col-"] {
	width: auto;
	max-width: none;
	padding: 0;
	margin: 0;
	flex: none;
}
.portfolio-home-h1 {
	grid-column: 1 / -1;
	margin: 40px 0 6px;
	padding: 0 0 16px;
	font-family: var(--m-head);
	font-weight: 800;
	font-size: clamp(2.6rem, 3.4vw, 3.8rem);
	line-height: 1.2;
	color: var(--m-text);
	position: relative;
}
.portfolio-home-h1::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 120px;
	height: 6px;
	border-radius: 0 6px 0 6px;
	background: linear-gradient(90deg, var(--m-yellow), var(--m-green));
}

/* Карточка: картинка сверху. */
#primary .bloghash-flex-row .bloghash-article {
	height: 100%;
	margin: 0 !important;
	padding: 0;
	background: #fff;
	border: 1px solid var(--m-line);
	border-radius: 14px;
	box-shadow: 0 6px 18px rgba(76, 154, 42, .08);
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}
#primary .bloghash-flex-row .bloghash-article:hover {
	box-shadow: 0 10px 26px rgba(90, 169, 230, .18);
	transform: translateY(-2px);
}
#primary .bloghash-flex-row .bloghash-article .bloghash-blog-entry-wrapper {
	display: flex;
	flex-direction: column;
	align-items: stretch !important;
	height: 100%;
	margin: 0;
	padding: 0;
	gap: 0;
}
#primary .bloghash-flex-row .bloghash-article .post-thumb {
	flex: none !important;
	flex-basis: auto !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	border-radius: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	box-shadow: none !important;
}
#primary .bloghash-flex-row .bloghash-article .post-thumb::before,
#primary .bloghash-flex-row .bloghash-article .post-thumb::after { display: none !important; }
#primary .bloghash-flex-row .bloghash-article .post-thumb a,
#primary .bloghash-flex-row .bloghash-article .post-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}
#primary .bloghash-flex-row .bloghash-article .bloghash-entry-content-wrapper {
	display: flex;
	flex-direction: column;
	flex: 1;
	width: auto !important;
	padding: 20px 22px 18px !important;
	margin: 0 !important;
}
#primary .bloghash-flex-row .bloghash-article.no-entry-media .bloghash-entry-content-wrapper {
	background: linear-gradient(160deg, var(--m-soft), #fff 60%);
	border-top: 6px solid var(--m-sky);
}

/* Рубрика — зелёный «листок». */
.post-category { margin: 0 0 12px; }
.post-category .cat-links a,
.single .post-category a {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 0 12px 0 12px;
	background: var(--m-green) !important;
	color: #fff !important;
	font-family: var(--m-head);
	font-weight: 600;
	font-size: 1.25rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	line-height: 1.5;
}
.post-category .cat-links a::before, .post-category .cat-links a::after { display: none !important; }
.post-category .cat-links a:hover { background: var(--m-sky) !important; }

#primary .bloghash-flex-row .bloghash-article .entry-header { margin: 0 0 10px; }
#primary .bloghash-flex-row .bloghash-article .entry-title {
	margin: 0;
	font-family: var(--m-head);
	font-weight: 600;
	font-size: 2rem;
	line-height: 1.3;
}
#primary .bloghash-flex-row .bloghash-article .entry-title a {
	color: var(--m-text);
	background: none;
}
#primary .bloghash-flex-row .bloghash-article .entry-title a:hover { color: var(--m-green); }
#primary .bloghash-flex-row .bloghash-article .entry-summary {
	margin: 0 0 14px;
	font-size: 1.5rem;
	line-height: 1.65;
	color: var(--m-muted);
}
#primary .bloghash-flex-row .bloghash-article .entry-meta {
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px dashed var(--m-line);
	font-size: 1.35rem;
	color: var(--m-muted);
}
#primary .bloghash-flex-row .bloghash-article .entry-meta .posted-on::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 8px;
	border-radius: 50%;
	background: var(--m-yellow);
	vertical-align: 1px;
}

/* Широкая карточка — на 2 колонки, картинка слева, текст справа. */
#primary .site-content > .bloghash-flex-row > [class*="col-"]:has(> .meadow-wide) { grid-column: span 2; }
#primary .site-content > .bloghash-flex-row > [class*="col-"]:has(> .meadow-wide) .bloghash-blog-entry-wrapper {
	flex-direction: row;
	align-items: stretch;
}
#primary .site-content > .bloghash-flex-row > [class*="col-"]:has(> .meadow-wide) .post-thumb {
	width: 52% !important;
	height: auto;
	aspect-ratio: auto;
	min-height: 300px;
}
#primary .site-content > .bloghash-flex-row > [class*="col-"]:has(> .meadow-wide) .bloghash-entry-content-wrapper {
	justify-content: center;
	padding: 30px 32px !important;
	background: linear-gradient(135deg, #FFFBEF, #fff 70%);
}
#primary .site-content > .bloghash-flex-row > [class*="col-"]:has(> .meadow-wide) .entry-title { font-size: 2.6rem; }

/* Пагинация — кружки-цветки. */
.bloghash-pagination, .navigation.pagination { margin-top: 40px; }
.navigation.pagination .page-numbers,
.bloghash-pagination .page-numbers {
	border-radius: 50% !important;
	border: 2px solid var(--m-line) !important;
	color: var(--m-text);
	font-family: var(--m-head);
	background: #fff;
}
.navigation.pagination .page-numbers.current,
.bloghash-pagination .page-numbers.current,
.navigation.pagination .page-numbers:hover {
	background: var(--m-yellow) !important;
	border-color: var(--m-yellow) !important;
	color: var(--m-text) !important;
}

/* Запись. */
.single #primary .entry-title { font-size: clamp(2.6rem, 3.6vw, 3.8rem); line-height: 1.2; margin-top: 18px; }
.single .post-category { margin-top: 14px; }
.single .entry-title, .single .page-title { font-weight: 800; color: var(--m-text); }
.single .entry-content a { color: var(--m-green-dark); text-decoration: underline; text-decoration-color: var(--m-yellow); }
.single .post-thumb img { border-radius: 14px; }
.widget-title, .bloghash-widget .widget-title { color: var(--m-text); }
/* Иконки Font Awesome у заголовков сайдбара заменяем «листком» (Font Awesome не грузим). */
.is-section-heading-init-s1 #secondary .widget-title::after,
.is-section-heading-init-s1 #secondary .wp-block-heading::after,
.is-section-heading-init-s1 #secondary .wp-block-search .wp-block-search__label::after,
.is-section-heading-init-s1 .bloghash-card-items .widget-title::after {
	content: "" !important;
	font-family: inherit !important;
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-left: 8px;
	border-radius: 0 6px 0 6px;
	background: var(--m-green) !important;
	vertical-align: middle;
}
#secondary .wp-block-heading, #secondary .widget-title { font-family: var(--m-head); color: var(--m-text); }
#secondary .bloghash-widget, #secondary .widget { border-radius: 14px; }

/* Подвал: только копирайт на светло-зелёном. */
#colophon {
	background: var(--m-soft) !important;
	border-top: 6px solid var(--m-green);
	margin-top: 60px;
}
.meadow-footer {
	padding: 26px 0;
	color: var(--m-text);
	font-family: var(--m-head);
	font-weight: 600;
	font-size: 1.5rem;
	text-align: center;
}
.bloghash-glassmorphism, #bloghash-scroll-top { display: none !important; }

/* Планшет: 2 колонки, широкая карточка — на всю строку. */
@media (max-width: 960px) {
	#primary .site-content > .bloghash-flex-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}

/* Телефон: одна колонка, широкие карточки — как обычные. */
@media (max-width: 600px) {
	.bloghash-header-container { min-height: 66px; }
	#bloghash-header .site-title { font-size: 2.1rem; }
	#bloghash-header .site-title a::before { width: 10px; height: 10px; margin-right: 8px; }
	#bloghash-header-inner .site-navigation > ul > li > a > span { padding: 7px 18px !important; font-size: 1.5rem; }
	#primary .site-content > .bloghash-flex-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	#primary .site-content > .bloghash-flex-row > [class*="col-"]:has(> .meadow-wide) { grid-column: auto; }
	#primary .site-content > .bloghash-flex-row > [class*="col-"]:has(> .meadow-wide) .bloghash-blog-entry-wrapper { flex-direction: column; }
	#primary .site-content > .bloghash-flex-row > [class*="col-"]:has(> .meadow-wide) .post-thumb { width: 100% !important; aspect-ratio: 4 / 3; min-height: 0; }
	#primary .site-content > .bloghash-flex-row > [class*="col-"]:has(> .meadow-wide) .bloghash-entry-content-wrapper { padding: 20px 22px 18px !important; }
	#primary .site-content > .bloghash-flex-row > [class*="col-"]:has(> .meadow-wide) .entry-title { font-size: 2.1rem; }
	.portfolio-home-h1 { margin-top: 26px; }
}
