/*
Theme Name: Veg Knowledge (GeneratePress)
Template: generatepress
Description: Veg Knowledge child theme for GeneratePress.
Author: Veg Knowledge
Version: 0.1.0
Text Domain: vegknowledge
*/

/* Brand colors on GeneratePress's global color variables */
html body {
	--accent: #1e932d;
	--contrast: #1d261d;
	--contrast-2: #4a564a;
	--contrast-3: #b2bdb2;
	--base: #f0f4f0;
	--base-2: #f7faf7;
	--base-3: #ffffff;
	font-family: var(--vk-font);
	color: var(--vk-text);
}
body,
button,
input,
select,
textarea {
	font-family: var(--vk-font);
}
a {
	color: var(--vk-green-dark);
}
a:hover {
	color: var(--vk-green);
}
.main-title a,
.main-title a:visited {
	color: var(--vk-green-dark);
	font-weight: 800;
	letter-spacing: -0.01em;
}
.site-header {
	border-bottom: 3px solid var(--vk-green);
}
.main-navigation .main-nav ul li a {
	font-weight: 600;
}
.entry-title {
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.01em;
}
.entry-meta {
	color: var(--vk-muted);
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"],
a.button {
	background: var(--vk-green-dark);
	color: #fff;
}

/* Home and archives: card grid */
.blog .site-main,
.archive .site-main,
.search-results .site-main {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}
.blog .site-main > :not(article),
.archive .site-main > :not(article),
.search-results .site-main > :not(article) {
	grid-column: 1 / -1;
}
.blog .site-main article,
.archive .site-main article,
.search-results .site-main article {
	margin: 0 !important;
}
.blog .inside-article,
.archive .inside-article,
.search-results .inside-article {
	height: 100%;
	padding: 0 0 20px !important;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.blog .post-image,
.archive .post-image,
.search-results .post-image {
	margin: 0 0 14px !important;
}
.blog .post-image img,
.archive .post-image img,
.search-results .post-image img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}
.blog .entry-header,
.blog .entry-summary,
.blog footer.entry-meta,
.archive .entry-header,
.archive .entry-summary,
.archive footer.entry-meta {
	padding: 0 20px;
}
.blog .entry-title,
.archive .entry-title {
	font-size: 1.25rem;
}
@media (max-width: 768px) {
	.blog .site-main,
	.archive .site-main,
	.search-results .site-main {
		grid-template-columns: 1fr;
	}
}

/* Cards: image first, then title; hide tag lists on cards */
.blog .inside-article,
.archive .inside-article,
.search-results .inside-article {
	display: flex;
	flex-direction: column;
}
.blog .post-image,
.archive .post-image,
.search-results .post-image {
	order: -1;
}
.blog .entry-header,
.archive .entry-header,
.search-results .entry-header {
	padding-top: 4px;
}
.blog .tags-links,
.archive .tags-links,
.search-results .tags-links {
	display: none;
}

/* Mediavine ad layout
 * Sidebar ads (incl. the sticky one) need at least 300px inside the sidebar.
 * Desktop: fixed 380px sidebar (40px padding each side = 300px usable).
 * 769-1023px: sidebar would be too narrow, so it goes under the content.
 * Phones: 20px side padding so in-content ads (300px) fit on 340px+ screens. */
@media (min-width: 1024px) {
	.right-sidebar .site-content .content-area {
		width: auto;
		flex: 1 1 0;
		min-width: 0;
	}
	.right-sidebar .site-content .is-right-sidebar {
		width: 380px;
		flex: 0 0 380px;
	}
}
@media (min-width: 769px) and (max-width: 1023px) {
	.right-sidebar .site-content {
		flex-direction: column;
	}
	.right-sidebar .site-content .content-area,
	.right-sidebar .site-content .is-right-sidebar {
		width: 100%;
	}
}
@media (max-width: 768px) {
	.separate-containers .inside-article,
	.separate-containers .page-header,
	.sidebar .widget {
		padding: 20px;
	}
	.separate-containers .site-main {
		margin-left: 0;
		margin-right: 0;
	}
	.inside-header {
		padding-left: 20px;
		padding-right: 20px;
	}
}
