/*
Theme Name: Catch Box Child: Greenhouse
Template: catch-box
Version: 1.0.0
Description: Дочерняя тема «Greenhouse» для сети wp-portfolio: викторианская оранжерея — мятное стекло, бутылочная зелень, латунь.
Text Domain: catch-box-child
*/

/* Палитра: мятное стекло, бутылочная зелень, латунь. */
:root {
	--gh-glass: #eaf4f0;
	--gh-green: #1e4d3a;
	--gh-green-2: #2a6450;
	--gh-brass: #b5893b;
	--gh-brass-light: #d9b66f;
	--gh-text: #1e4d3a;
	--gh-muted: #4d6e61;
	--gh-pane: rgba(255, 255, 255, .78);
	--gh-head: 'Philosopher', Georgia, serif;
	--gh-body: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* Фон — стёкла оранжереи: тонкая сетка рам. */
body,
body.custom-background {
	background-color: var(--gh-glass);
	background-image:
		linear-gradient(rgba(30, 77, 58, .07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(30, 77, 58, .07) 1px, transparent 1px);
	background-size: 64px 64px;
	background-position: center top;
}
body,
button,
input,
select,
textarea {
	color: var(--gh-text);
	font-family: var(--gh-body);
	font-weight: 400;
}
h1, h2, h3, h4, h5, h6,
.entry-title {
	font-family: var(--gh-head);
	font-weight: 700;
	color: var(--gh-green);
}
a {
	color: var(--gh-green-2);
}
a:hover,
a:focus {
	color: var(--gh-brass);
}

/* Раскладка: вместо серой «коробки» по центру — во всю ширину. */
.site,
.one-column .site {
	width: auto;
	max-width: none;
	margin: 0;
	background: transparent;
	border-radius: 0;
}
#main {
	background: transparent;
	box-sizing: border-box;
	max-width: 1280px;
	margin: 0 auto;
	padding: 48px 32px 24px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 40px;
	align-items: start;
}
#main::before,
#main::after {
	display: none;
}
#primary,
#secondary {
	float: none;
	width: auto;
	margin: 0;
}

/* Шапка: бутылочная зелень, латунное название, рамы стёкол. */
#branding {
	background-color: var(--gh-green);
	background-image:
		linear-gradient(90deg, rgba(234, 244, 240, .06) 1px, transparent 1px);
	background-size: 64px 100%;
	border-radius: 0;
	border-bottom: 4px solid var(--gh-brass);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	box-sizing: border-box;
	padding: 0 max(32px, calc((100% - 1216px) / 2));
}
#header-content {
	margin: 0;
	padding: 26px 0;
}
#site-title {
	font-family: var(--gh-head);
	font-size: 34px;
	line-height: 1.2;
}
#site-title a {
	color: var(--gh-brass-light);
	font-weight: 700;
	letter-spacing: .02em;
}
#site-title a:hover,
#site-title a:focus {
	color: #fff;
}
#site-title a::before {
	content: "";
	display: inline-block;
	width: 22px;
	height: 26px;
	margin-right: 12px;
	vertical-align: -3px;
	border: 2px solid var(--gh-brass);
	border-radius: 11px 11px 2px 2px;
	background: linear-gradient(90deg, transparent 9px, var(--gh-brass) 9px, var(--gh-brass) 11px, transparent 11px);
}
#site-description {
	display: none;
}

/* Меню: одна ссылка «Блог», видна на всех ширинах. */
.menu-access-wrap {
	float: none;
	clear: none;
	background: transparent !important;
}
.mobile-menu-anchor,
#mobile-header-left-menu {
	display: none !important;
}
.site-header-menu,
#site-header-menu-primary {
	display: block !important;
}
#access,
#access ul.menu a {
	background: transparent;
}
#access {
	float: none;
	width: auto;
}
#access div {
	margin: 0;
}
#access ul.menu li {
	border: 0;
	float: none;
	display: inline-block;
}
#access ul.menu a {
	display: inline-block;
	color: var(--gh-glass);
	font-family: var(--gh-head);
	font-size: 18px;
	line-height: 1;
	padding: 10px 22px;
	border: 1px solid var(--gh-brass);
	border-radius: 20px 20px 2px 2px;
	background: transparent;
}
#access ul.menu li:hover > a,
#access ul.menu a:focus,
#access .menu .current-menu-item > a {
	background: var(--gh-brass);
	color: var(--gh-green);
}

/* H1 главной и /blog/ — табличка над лентой. */
.portfolio-home-h1 {
	font-family: var(--gh-head);
	font-size: 34px;
	line-height: 1.25;
	color: var(--gh-green);
	margin: 0 0 32px;
	padding: 0 0 18px;
	border-bottom: 1px solid rgba(181, 137, 59, .55);
	position: relative;
}
.portfolio-home-h1::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -3px;
	width: 96px;
	height: 5px;
	background: var(--gh-brass);
}

/* Карточки ленты: текст слева, фото справа на 55%. */
#content .gh-card {
	display: grid;
	grid-template-columns: 45% 55%;
	padding: 0;
	margin: 0 0 32px;
	background: var(--gh-pane);
	border: 1px solid rgba(30, 77, 58, .14);
	border-top: 4px solid var(--gh-brass);
	border-radius: 0;
	box-shadow: 0 10px 28px -18px rgba(30, 77, 58, .5);
	overflow: hidden;
}
#content .gh-card:not(.has-post-thumbnail) {
	grid-template-columns: 1fr;
}
.gh-card-text {
	padding: 30px 32px 28px;
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.gh-card-date {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--gh-brass);
	margin-bottom: 10px;
}
.gh-card .entry-title {
	font-size: 25px;
	line-height: 1.25;
	padding: 0;
	margin: 0 0 14px;
}
.gh-card .entry-title a {
	color: var(--gh-green);
	text-decoration: none;
}
.gh-card .entry-title a:hover {
	color: var(--gh-brass);
}
.gh-card .entry-summary {
	padding: 0;
	font-size: 15px;
	line-height: 1.65;
	color: var(--gh-muted);
}
.gh-card .entry-summary p {
	margin: 0 0 18px;
}
.gh-card-more {
	margin-top: auto;
	align-self: flex-start;
	font-size: 14px;
	font-weight: 500;
	color: var(--gh-green);
	text-decoration: none;
	border-bottom: 2px solid var(--gh-brass);
	padding-bottom: 2px;
}
.gh-card-more::after {
	content: " →";
	color: var(--gh-brass);
}
.gh-card-media {
	display: block;
	position: relative;
	min-height: 280px;
	border-left: 1px solid rgba(30, 77, 58, .14);
}
.gh-card-media img,
#content .gh-card-media img.wp-post-image {
	position: absolute;
	padding: 0;
	border: 0;
	background: none;
	max-width: none;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	border-radius: 0;
	transition: transform .4s ease;
}
.gh-card:hover .gh-card-media img {
	transform: scale(1.03);
}

/* Навигация по страницам. */
#content nav#nav-below {
	background: transparent;
	border: 0;
	display: flex;
	justify-content: space-between;
	padding: 0;
	margin: 0 0 32px;
}
#nav-below .nav-previous,
#nav-below .nav-next {
	float: none;
	width: auto;
}
#nav-below a {
	display: inline-block;
	padding: 10px 20px;
	background: var(--gh-green);
	color: var(--gh-glass);
	text-decoration: none;
	border-bottom: 3px solid var(--gh-brass);
}
#nav-below a:hover {
	background: var(--gh-brass);
	color: var(--gh-green);
}

/* Сайдбар справа — зелёные панели. */
#secondary .widget {
	background: var(--gh-green);
	color: var(--gh-glass);
	border: 0;
	border-top: 4px solid var(--gh-brass);
	border-radius: 0;
	padding: 22px 24px;
	margin: 0 0 28px;
	box-shadow: none;
}
#secondary .widget h2,
#secondary .widget-title,
#secondary .wp-block-search__label {
	font-family: var(--gh-head);
	font-size: 20px;
	font-weight: 700;
	color: var(--gh-brass-light);
	text-transform: none;
	letter-spacing: 0;
	margin: 0 0 12px;
	padding: 0;
	border: 0;
	background: none;
}
#secondary .widget ul,
#secondary .widget ol {
	margin: 0;
	padding: 0;
	list-style: none;
}
#secondary .widget li {
	border-bottom: 1px solid rgba(234, 244, 240, .14);
	padding: 8px 0;
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
}
#secondary .widget li:last-child {
	border-bottom: 0;
}
#secondary .widget a {
	color: var(--gh-glass);
	text-decoration: none;
}
#secondary .widget a:hover {
	color: var(--gh-brass-light);
}
#secondary .wp-block-latest-comments__comment-meta {
	color: rgba(234, 244, 240, .7);
}
#secondary .wp-block-latest-comments article {
	margin: 0;
}
#secondary .wp-block-search__inside-wrapper {
	display: flex;
	gap: 6px;
}
#secondary .wp-block-search__input {
	flex: 1;
	min-width: 0;
	border: 1px solid var(--gh-brass);
	background: var(--gh-glass);
	color: var(--gh-green);
	padding: 8px 10px;
	border-radius: 0;
}
#secondary .wp-block-search__button {
	background: var(--gh-brass);
	color: var(--gh-green);
	border: 0;
	border-radius: 0;
	padding: 8px 14px;
	font-weight: 500;
	margin: 0;
}

/* Запись и страница. */
.single #content .hentry,
.page #content .hentry,
#content .page-header,
#content .no-results,
#content .post-navigation {
	background: var(--gh-pane);
	border: 1px solid rgba(30, 77, 58, .14);
	border-top: 4px solid var(--gh-brass);
	border-radius: 0;
}
.single .entry-header .entry-title,
.page .entry-header .entry-title {
	font-size: 36px;
	line-height: 1.2;
}
.single .entry-meta,
.single .entry-meta a {
	color: var(--gh-brass);
}
.entry-content {
	font-size: 17px;
	line-height: 1.75;
}
.entry-content h2,
.entry-content h3 {
	color: var(--gh-green);
}
.entry-content blockquote {
	border-left: 4px solid var(--gh-brass);
	color: var(--gh-muted);
}

/* Форма комментария — зелёная рама вместо серой коробки. */
#respond {
	background: var(--gh-pane);
	border: 1px solid rgba(30, 77, 58, .14);
	border-top: 4px solid var(--gh-green);
	border-radius: 0;
}
#respond .comment-form-comment label,
#respond .comment-form-author label,
#respond .comment-form-email label,
#respond .comment-form-url label {
	background: var(--gh-green);
	color: var(--gh-glass);
	box-shadow: none;
}
#respond textarea,
#respond input[type="text"],
#respond input[type="email"],
#respond input[type="url"] {
	border: 1px solid rgba(30, 77, 58, .3);
	border-radius: 0;
	box-shadow: none;
}
#respond input#submit {
	background: var(--gh-brass);
	color: var(--gh-green);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font-weight: 500;
}
#secondary .widget a,
#secondary .wp-block-latest-comments a {
	border-bottom: 0;
	text-decoration: none;
	box-shadow: none;
}

/* Подвал прижат к низу окна. */
#page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
#colophon {
	margin-top: auto !important;
}

/* Подвал: только копирайт. */
#colophon {
	background: var(--gh-green);
	border-top: 4px solid var(--gh-brass);
	border-radius: 0;
	margin: 0;
}
#site-generator {
	background: transparent;
	text-align: center;
	padding: 26px 32px;
	border: 0;
}
#site-generator .copyright {
	float: none;
	width: auto;
	color: var(--gh-brass-light);
	font-family: var(--gh-head);
	font-size: 16px;
	letter-spacing: .04em;
}

/* Планшет: сайдбар под лентой. */
@media screen and (max-width: 960px) {
	#main {
		grid-template-columns: minmax(0, 1fr);
		padding: 32px 24px 16px;
		gap: 16px;
	}
	#secondary {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
		gap: 0 24px;
	}
}

/* Телефон: фото над текстом. */
@media screen and (max-width: 640px) {
	#branding {
		padding: 0 16px;
	}
	#header-content {
		padding: 18px 0;
	}
	#site-title {
		font-size: 24px;
	}
	#site-title a::before {
		width: 16px;
		height: 20px;
		margin-right: 8px;
		background: linear-gradient(90deg, transparent 6px, var(--gh-brass) 6px, var(--gh-brass) 8px, transparent 8px);
	}
	#access ul.menu a {
		font-size: 16px;
		padding: 8px 16px;
	}
	#main {
		padding: 24px 16px 8px;
	}
	.portfolio-home-h1 {
		font-size: 25px;
		margin-bottom: 24px;
	}
	#content .gh-card {
		grid-template-columns: 1fr;
		margin-bottom: 24px;
	}
	.gh-card-media {
		order: -1;
		min-height: 0;
		aspect-ratio: 16 / 10;
		border-left: 0;
	}
	.gh-card-text {
		padding: 20px 20px 22px;
	}
	.gh-card .entry-title {
		font-size: 22px;
	}
	.single .entry-header .entry-title,
	.page .entry-header .entry-title {
		font-size: 28px;
	}
}
