/**
 * Single travel-guide posts — featured image in-frame + mobile type.
 * Active layer for /best-time-to-visit-egypt/ (and later guides).
 * Do not paste into post_content. Do not add a WPCode overlay.
 */

/* Kadence "behind" pulls the white card over the photo (margin-bottom: -4.3em)
   and alignwide makes the photo ~260px wider than the boxed article. */
body.single-post .content-wrap > .post-thumbnail.article-post-thumbnail,
body.single-post .content-wrap > .post-thumbnail.kadence-thumbnail-position-behind,
body.single-post .content-wrap > .post-thumbnail.alignwide {
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0 0 1rem;
	padding-bottom: 0;
	overflow: hidden;
	border-radius: 4px;
	z-index: auto;
}

body.single-post .content-wrap > .post-thumbnail .post-thumbnail-inner {
	position: static;
	inset: auto;
}

/* Photo is 1024×239 (Home hero). Show the whole frame — do not cover-crop
   into Kadence's 2:3 / 16:9 box. */
body.single-post .content-wrap > .post-thumbnail img,
body.single-post .content-wrap > .post-thumbnail img.post-top-featured {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: contain;
	object-position: center;
}

body.single-post.content-style-boxed .kadence-thumbnail-position-behind + .entry {
	z-index: auto;
}

@media (max-width: 767px) {
	/* Match the boxed card's -16px bleed so the photo and article share one frame. */
	body.single-post.content-style-boxed .content-wrap > .post-thumbnail.article-post-thumbnail,
	body.single-post.content-style-boxed .content-wrap > .post-thumbnail.alignwide,
	body.single-post.content-style-boxed .content-wrap > .post-thumbnail.kadence-thumbnail-position-behind {
		width: calc(100% + 32px);
		max-width: none;
		margin: 0 -16px 0.75rem;
		border-radius: 4px;
	}

	body.single-post h1.entry-title {
		font-size: 1.375rem;
		line-height: 1.28;
		letter-spacing: -0.015em;
	}

	body.single-post .entry-content h2,
	body.single-post .entry-content h2.wp-block-heading {
		font-size: 1.2rem;
		line-height: 1.32;
		margin-top: 1.35em;
		margin-bottom: 0.45em;
	}

	body.single-post .entry-content h3,
	body.single-post .entry-content h3.wp-block-heading {
		font-size: 1.0625rem;
		line-height: 1.35;
		margin-top: 1.15em;
		margin-bottom: 0.35em;
	}

	body.single-post .entry-content {
		font-size: 1rem;
		line-height: 1.65;
	}

	body.single-post .entry-header {
		margin-bottom: 0.85rem;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	body.single-post h1.entry-title {
		font-size: 1.65rem;
		line-height: 1.28;
	}

	body.single-post .entry-content h2,
	body.single-post .entry-content h2.wp-block-heading {
		font-size: 1.35rem;
		line-height: 1.3;
	}
}

/* ── Travel Guides hub (/blog/) + category archive ──
   Kadence grid-lg-col-3 leaves one card 387px on the left. The cover is the
   1024×239 Home hero forced into a 3:2 crop. Same frame + type fix as the article.
   body.category is the chip under the card (/category/travel-guides/). */
body.blog .kadence-posts-list.grid-cols > .entry-list-item:only-child,
body.category .kadence-posts-list.grid-cols > .entry-list-item:only-child {
	grid-column: 1 / -1;
	max-width: 40rem;
	justify-self: center;
	width: 100%;
}

body.blog .loop-entry .post-thumbnail,
body.blog .loop-entry .post-thumbnail.kadence-thumbnail-ratio-2-3,
body.category .loop-entry .post-thumbnail,
body.category .loop-entry .post-thumbnail.kadence-thumbnail-ratio-2-3 {
	height: auto;
	padding-bottom: 0;
	overflow: hidden;
}

body.blog .loop-entry .post-thumbnail-inner,
body.category .loop-entry .post-thumbnail-inner {
	position: static;
	inset: auto;
}

body.blog .loop-entry .post-thumbnail img,
body.category .loop-entry .post-thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: contain;
	object-position: center;
}

body.blog .loop-entry .entry-title,
body.blog .loop-entry h2.entry-title,
body.category .loop-entry .entry-title,
body.category .loop-entry h2.entry-title {
	font-size: 1.35rem;
	line-height: 1.3;
}

@media (max-width: 767px) {
	body.blog h1.page-title,
	body.blog h1.archive-title,
	body.blog h1.post-home-title,
	body.category h1.page-title,
	body.category h1.archive-title {
		font-size: 1.5rem;
		line-height: 1.25;
		letter-spacing: -0.015em;
	}

	body.blog .loop-entry .entry-title,
	body.blog .loop-entry h2.entry-title,
	body.category .loop-entry .entry-title,
	body.category .loop-entry h2.entry-title {
		font-size: 1.15rem;
		line-height: 1.3;
	}

	body.blog .kadence-posts-list.grid-cols > .entry-list-item:only-child,
	body.category .kadence-posts-list.grid-cols > .entry-list-item:only-child {
		max-width: none;
	}
}
