/* ====== Homepage Redesign ====== */
/* 1. Grid layout for post listings */
.wp-block-query .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 2rem;
}

/* 2. Style each post as a "card" */
.wp-block-post {
	background: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 10px rgba(0,0,0,0.08);
	transition: transform .2s ease, box-shadow .2s ease;
	display: flex;
	flex-direction: column;
}

.wp-block-post:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

/* ====== FIX: Featured image gap issue ====== */
.wp-block-post-featured-image {
	margin: 0 !important;
	padding: 0 !important;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

/* IMPORTANT: prevents subpixel “white strip” rendering bug */
.wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border: 0;
}

/* Remove any accidental spacing from WP group wrappers */
.wp-block-post > .wp-block-group {
	margin: 0 !important;
	padding: 0 !important;
}

/* 3. Post title links */
.wp-block-post-title a {
	text-decoration: none;
	color: #222;
}

.wp-block-post-title a:hover {
	color: #c0392b;
}

/* Bold post titles */
.wp-block-post-title,
.wp-block-post-title a {
	font-weight: 700 !important;
}

/* 5. Post meta/date smaller + subtle */
.wp-block-post-date {
	margin: 0 1rem 1rem;
	font-size: .85rem;
	color: #666;
	text-align: center;
}

/* 7. Background rhythm */
body {
	background: #f9f9f9;
}

.wp-site-blocks {
	padding: 2rem;
}

/* ====== Hover overlay structure ====== */
.wp-block-post-featured-image {
	position: relative;
}

.wp-block-post-featured-image::after {
	content: '';
	position: absolute;
	background: transparent;
	pointer-events: none;
	transition: background .3s ease;
}

/* ====== Single post typography ====== */
.single-post .entry-content p {
	font-size: 1rem;
	line-height: 1.5;
	color: #333;
}

/* ====== Footer Adjustments ====== */
.wp-block-group.alignfull.has-global-padding {
	padding-left: 0 !important;
	padding-right: 0 !important;
	padding-top: 20px !important;
	padding-bottom: 20px !important;
	max-width: 100% !important;
	box-sizing: border-box;
	background-repeat: repeat;
	background-size: auto;
	background-position: center;
	position: relative;
}

/* Footer gradient */
.wp-block-group.alignfull.has-global-padding::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 80px;
	background: linear-gradient(to bottom, rgba(249,249,249,1), rgba(249,249,249,0));
	pointer-events: none;
	z-index: 1;
}

.wp-block-group.alignfull.has-global-padding > * {
	position: relative;
	z-index: 2;
}

/* Titles overlay styling */
.single-post .entry-title,
.single-post .wp-block-post-title,
.page .entry-title,
.page .wp-block-post-title {
	color: #fff;
	text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
}

/* Captions */
figcaption.wp-element-caption {
	font-size: .8em;
	margin-bottom: .3em;
}

/* ====== Tag archive layout ====== */
body.tag .wp-block-query .wp-block-post {
	display: block !important;
	width: 100% !important;
	font-size: 1rem !important;
	line-height: 1.5 !important;
	margin-bottom: 2rem !important;
}

body.tag .wp-block-post-title,
body.tag .wp-block-post-title a {
	font-size: 1.2rem !important;
	line-height: 1.3 !important;
	display: block;
	padding-left: .5rem;
	padding-right: .5rem;
}

/* ====== Navigation ====== */
.wp-block-navigation {
	flex-shrink: 1;
	min-width: 0;
}

.wp-block-navigation a {
	padding-left: .4rem;
	padding-right: .4rem;
	font-size: .9rem;
}

/* ====== Latest posts thumbnails ====== */
.single-post .wp-block-latest-posts__featured-image {
	width: 150px;
	overflow: hidden;
}

.single-post .wp-block-latest-posts__featured-image img {
	width: 150px !important;
	height: 85px !important;
	object-fit: cover;
	display: block;
}

/* Latest posts links */
.single-post .wp-block-latest-posts__list li > a {
	font-weight: 700;
	text-decoration: none;
	color: inherit;
}

.single-post .wp-block-latest-posts__list li > a:hover {
	color: #c0392b;
}

/* Site title */
.wp-block-site-title a {
	text-decoration: none;
}

.wp-block-site-title a:hover {
	text-decoration: none;
}

/* Footer link cleanup */
.wp-block-paragraph a[href="https://storyoverthought.com/"] {
	text-decoration: none;
}

/* not being used atm
 img.avatar {
	border-radius: 50%;
	box-shadow:
		3px 3px 4px rgba(0, 0, 0, 0.35),
		6px 6px 10px rgba(0, 0, 0, 0.15);
} */ 

h3.wp-block-heading.has-text-align-center.has-background.has-large-font-size {
	color: #fff;
	text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
	font-weight: 700 !important;
}

@media (max-width: 1100px) {
	/* Show hamburger */
	.wp-block-navigation__responsive-container-open {
		display: flex !important;
	}
	
	/* Hide nav ONLY when menu is closed */
	.wp-block-navigation__responsive-container:not(.is-menu-open)
		.wp-block-navigation__responsive-container-content {
		display: none !important;
	}
	
	/* Show overlay when open */
	.wp-block-navigation__responsive-container.is-menu-open {
		display: block;
		position: fixed;
		background: #fff;
		z-index: 999;
	}
}

/* ONLY apply the offset in your custom breakpoint range */
@media (max-width: 1100px) and (min-width: 769px) {
	.wp-block-navigation__responsive-container-open {
		position: relative;
		top: 20px;
	}
}

/* Reset it in true mobile mode */
@media (max-width: 768px) {
	.wp-block-navigation__responsive-container-open {
		top: 0;
		position: relative;
	}
}