/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://warrickai.com
 Description:  Three-column blog grid (image, category, title, excerpt)
 Author:       Warrick AI
 Template:     generatepress
 Version:      2.0.0
 License:      GNU General Public License v2 or later
 Text Domain:  generatepress-child
*/

/* ---- Blog / archive / search: 3-column post grid ---- */
body.blog .site-main,
body.archive .site-main,
body.search .site-main {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2rem 1.75rem;
	align-items: start;
}

body.blog.separate-containers .site-main > article,
body.archive.separate-containers .site-main > article,
body.search.separate-containers .site-main > article {
	margin-bottom: 0;
}

/* Pagination and other non-post blocks span full width */
body.blog .site-main > *:not(article),
body.archive .site-main > *:not(article),
body.search .site-main > *:not(article) {
	grid-column: 1 / -1;
}

/* Each post: vertical stack — image → category → title → excerpt */
body.blog .site-main > article .inside-article,
body.archive .site-main > article .inside-article,
body.search .site-main > article .inside-article {
	display: flex;
	flex-direction: column;
	padding: 0;
	background: transparent;
	height: 100%;
}

body.blog .site-main > article .post-image,
body.archive .site-main > article .post-image,
body.search .site-main > article .post-image {
	order: 1;
	margin: 0 0 0.85rem !important;
	padding: 0;
	line-height: 0;
}

body.blog .site-main > article .post-image a,
body.archive .site-main > article .post-image a,
body.search .site-main > article .post-image a {
	display: block;
}

body.blog .site-main > article .post-image img,
body.archive .site-main > article .post-image img,
body.search .site-main > article .post-image img {
	display: block;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 2px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

body.blog .site-main > article .entry-header,
body.archive .site-main > article .entry-header,
body.search .site-main > article .entry-header {
	order: 2;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
}

body.blog .site-main > article .entry-category,
body.archive .site-main > article .entry-category,
body.search .site-main > article .entry-category {
	order: -1;
	margin: 0 0 0.4rem;
}

body.blog .site-main > article .entry-category a,
body.archive .site-main > article .entry-category a,
body.search .site-main > article .entry-category a {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--accent, #1e73be);
}

body.blog .site-main > article:nth-of-type(3n + 1) .entry-category a,
body.archive .site-main > article:nth-of-type(3n + 1) .entry-category a,
body.search .site-main > article:nth-of-type(3n + 1) .entry-category a {
	color: #c45c9e;
}

body.blog .site-main > article:nth-of-type(3n + 2) .entry-category a,
body.archive .site-main > article:nth-of-type(3n + 2) .entry-category a,
body.search .site-main > article:nth-of-type(3n + 2) .entry-category a {
	color: #5dade2;
}

body.blog .site-main > article:nth-of-type(3n + 3) .entry-category a,
body.archive .site-main > article:nth-of-type(3n + 3) .entry-category a,
body.search .site-main > article:nth-of-type(3n + 3) .entry-category a {
	color: #1e73be;
}

body.blog .site-main > article .entry-title,
body.archive .site-main > article .entry-title,
body.search .site-main > article .entry-title {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.25rem);
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 0.55rem;
}

body.blog .site-main > article .entry-title a,
body.archive .site-main > article .entry-title a,
body.search .site-main > article .entry-title a {
	color: var(--contrast, #222);
	text-decoration: none;
}

body.blog .site-main > article .entry-title a:hover,
body.archive .site-main > article .entry-title a:hover,
body.search .site-main > article .entry-title a:hover {
	color: var(--accent, #1e73be);
}

body.blog .site-main > article .entry-summary,
body.archive .site-main > article .entry-summary,
body.search .site-main > article .entry-summary,
body.blog .site-main > article .entry-content,
body.archive .site-main > article .entry-content,
body.search .site-main > article .entry-content {
	order: 3;
	margin: 0;
	padding: 0;
	color: var(--contrast-2, #575760);
	font-size: 0.95rem;
	line-height: 1.55;
}

body.blog .site-main > article .entry-summary p,
body.archive .site-main > article .entry-summary p,
body.search .site-main > article .entry-summary p {
	margin-bottom: 0.35em;
}

body.blog .site-main > article .entry-summary .read-more,
body.archive .site-main > article .entry-summary .read-more,
body.search .site-main > article .entry-summary .read-more {
	font-weight: 600;
	text-decoration: none;
	color: var(--contrast-2, #575760);
	white-space: nowrap;
}

body.blog .site-main > article .entry-summary .read-more:hover,
body.archive .site-main > article .entry-summary .read-more:hover,
body.search .site-main > article .entry-summary .read-more:hover {
	color: var(--accent, #1e73be);
	text-decoration: underline;
}

body.blog .site-main > article > .inside-article > footer.entry-meta,
body.archive .site-main > article > .inside-article > footer.entry-meta,
body.search .site-main > article > .inside-article > footer.entry-meta {
	display: none;
}

@media (max-width: 900px) {
	body.blog .site-main,
	body.archive .site-main,
	body.search .site-main {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.75rem 1.25rem;
	}
}

@media (max-width: 600px) {
	body.blog .site-main,
	body.archive .site-main,
	body.search .site-main {
		grid-template-columns: minmax(0, 1fr);
		gap: 2rem;
	}
}
