/*
Theme Name: Lovecraft Child: Library
Template: lovecraft
Description: Дочерняя тема в духе старой библиотеки: шалфейный фон, тёмно-зелёная шапка и латунные акценты, шрифты Literata и Source Sans 3, сайдбар слева, записи горизонтальными карточками с миниатюрой слева.
Version: 1.0.0
Text Domain: lovecraft-child
*/

:root {
	--lib-bg: #EEF1EA;
	--lib-green: #1E3A2F;
	--lib-green-2: #2D5242;
	--lib-brass: #C9A227;
	--lib-ink: #24302A;
	--lib-muted: #66756C;
	--lib-card: #FFFFFF;
	--lib-line: #D5DCD2;
	--lib-serif: Literata, Georgia, serif;
	--lib-sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
}

body { background: var(--lib-bg); color: var(--lib-ink); font-family: var(--lib-sans); }
h1, h2, h3, h4, h5, h6, .blog-title, .post-title, .widget-title, .wp-block-heading { font-family: var(--lib-serif); letter-spacing: 0; }
a { color: var(--lib-green-2); }
a:hover { color: var(--lib-brass); }

/* ---------- Шапка: зелёная полоса, название слева, меню латунью ---------- */
.header.section.bg-white, .navigation.bg-white { background: var(--lib-green); }
.header.section { padding: 34px 0 30px; }
.header .section-inner { text-align: left; }
.blog-title { text-align: left; }
.blog-title a { color: #F3EBD3; font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 700; text-transform: none; letter-spacing: 0; }
.blog-title a:hover { color: var(--lib-brass); }
.navigation { border-top: 1px solid rgba(201, 162, 39, .35); }
.main-menu > li > a, .navigation a { color: var(--lib-brass) !important; font-family: var(--lib-sans); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.toggles .bar { background: #F3EBD3; }
.toggles .genericon { color: #F3EBD3; }

/* Фото шапки — зелёный дуотон и меньшая высота */
.header-image { position: relative; height: 220px !important; padding: 0 !important; }
.header-image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(30, 58, 47, .55), rgba(30, 58, 47, .9));
	mix-blend-mode: multiply;
}

/* ---------- Раскладка: сайдбар слева ---------- */
.wrapper .content { float: right; }
.wrapper .sidebar { float: left; }
.wrapper.section { padding-top: 48px; }

/* ---------- Записи: горизонтальные карточки ---------- */
.posts .post {
	display: grid;
	grid-template-columns: 38% minmax(0, 1fr);
	align-items: stretch;
	background: var(--lib-card);
	border: 0;
	border-left: 5px solid var(--lib-brass);
	margin-bottom: 26px;
	padding: 0;
	box-shadow: 0 1px 0 var(--lib-line);
}
.posts .post .post-image { margin: 0; height: 100%; }
.posts .post .post-image a, .posts .post .post-image img { height: 100%; width: 100%; object-fit: cover; display: block; }
.posts .post .post-image img { filter: sepia(.35) saturate(.8); }
.posts .post .post-inner { padding: 26px 30px 22px; margin: 0; width: auto; max-width: none; }
.posts .post .post-header, .posts .post .post-content { width: auto; max-width: none; }
.posts .post .post-header { text-align: left; margin-bottom: 12px; }
.posts .post .post-title { font-size: 1.55rem; line-height: 1.25; text-align: left; margin: 0 0 8px; }
.posts .post .post-title a { color: var(--lib-green); }
.posts .post .post-title a:hover { color: var(--lib-brass); }
.posts .post .post-meta, .posts .post .post-meta a { color: var(--lib-muted); font-family: var(--lib-sans); text-align: left; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.posts .post .post-content { font-family: var(--lib-serif); font-size: .98rem; line-height: 1.7; color: var(--lib-ink); }
.posts .post .post-content p:last-child { margin-bottom: 0; }
.posts .post .more-link, .posts .post .post-content a.more-link {
	display: inline-block;
	margin-top: 10px;
	color: var(--lib-green);
	border-bottom: 2px solid var(--lib-brass);
	font-family: var(--lib-sans);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .1em;
	font-size: .75rem;
}

/* ---------- Сайдбар ---------- */
.sidebar .widget { background: transparent; border-top: 3px double var(--lib-green); padding-top: 16px; }
.sidebar .wp-block-heading, .sidebar .widget-title { color: var(--lib-green); font-size: 1.15rem; text-transform: none; letter-spacing: 0; }
.sidebar a { color: var(--lib-ink); }
.sidebar a:hover { color: var(--lib-brass); }
.sidebar .wp-block-search__input, .wrapper .search-field { background: var(--lib-card); border-color: var(--lib-line); }
.wp-block-search__button, .wrapper .search-button { background: var(--lib-green) !important; color: #F3EBD3 !important; border: 0; }

/* ---------- Пагинация и подвал ---------- */
.archive-nav a, .page-numbers { color: var(--lib-green); }
.credits.section.bg-dark { background: var(--lib-green); }
.credits, .credits a { color: #CFD8CC; }

/* ---------- Узкие экраны ---------- */
@media (max-width: 1000px) {
	.wrapper .content, .wrapper .sidebar { float: none; }
}
@media (max-width: 600px) {
	.posts .post { grid-template-columns: minmax(0, 1fr); border-left: 0; border-top: 5px solid var(--lib-brass); }
	.posts .post .post-image img { aspect-ratio: 16 / 9; }
	.posts .post .post-inner { padding: 20px; }
	.header-image { height: 140px !important; }
	.blog-title a { font-size: 1.45rem; word-break: normal; overflow-wrap: normal; hyphens: manual; }
}

/* H1 главной (mu-plugin portfolio-headings): колонка записей заезжает на картинку шапки,
   поэтому заголовок — такая же белая карточка, как записи */
.content .portfolio-home-h1 { position: relative; z-index: 2; background: #fff; border: 1px solid #ddd; margin: 0 0 30px; padding: 28px 40px; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; }
