/**
 * Allrecipes-style article page:
 * Banner under header = GluJoy Ads plugin
 * Title + meta + image inside article column
 */

/* Hide Kadence bg-title hero if any */
body.gj-ar-article-layout .entry-hero.page-hero-section,
body.gj-ar-article-layout .entry-hero.post-hero-section,
body.gj-has-feature-hero .gj-feature-hero,
body.gj-has-feature-hero .gj-article-titleblock {
	display: none !important;
}

/* Article pages: skip homepage-style promo/trust so top reads as ad + article (AR) */
body.gj-ar-article-layout .gj-ar-promo,
body.gj-ar-article-layout .gj-ar-trust {
	display: none !important;
}

body.gj-ar-article-layout .content-area {
	margin-top: 1.5rem;
}

/* —— Article header inside content (title + meta) —— */
.gj-article-header {
	margin: 0 0 1.25rem;
	padding: 0;
	text-align: left;
}

.gj-article-header__eyebrow {
	margin: 0 0 0.5rem;
	font-family: Montserrat, sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--global-palette2, #3d998e);
}

.gj-article-header__eyebrow a {
	color: inherit !important;
	text-decoration: none !important;
}

.gj-article-header__title {
	margin: 0 0 0.75rem !important;
	font-family: "DM Serif Display", Georgia, serif !important;
	font-size: clamp(1.75rem, 3.2vw, 2.5rem) !important;
	font-weight: 400 !important;
	line-height: 1.2 !important;
	letter-spacing: 0.01em !important;
	color: var(--global-palette3, #343434) !important;
	text-align: left !important;
}

.gj-article-header__meta .mak-post-meta {
	display: block !important;
	width: 100%;
	max-width: 100%;
	margin: 0;
	font-family: Montserrat, sans-serif;
	font-size: 13px;
	line-height: 1.45;
	color: var(--global-palette5, #727272) !important;
	background: none;
	border: 0;
	padding: 0;
}

.gj-article-header__meta .mak-post-meta__row {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	column-gap: 0.35rem;
	row-gap: 0.45rem;
	width: 100%;
	margin: 0;
	padding: 0;
}

.gj-article-header__meta .mak-post-meta__item {
	min-width: 0;
}

/* Keep the portrait/byline together on a dedicated first row. */
.gj-article-header__meta .mak-post-meta__byline {
	display: flex !important;
	flex: 0 0 100%;
	align-items: center;
	gap: 0.62rem;
}

/* These rules live here as well as in the author archive stylesheet because
 * article-style pages do not enqueue the archive-only author asset. */
.gj-article-header__meta .gj-byline-avatar {
	align-items: center;
	background: #eef6f3;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(61, 153, 142, 0.28);
	display: inline-flex !important;
	flex: 0 0 42px;
	height: 42px;
	overflow: hidden;
	width: 42px;
}

.gj-article-header__meta .gj-byline-avatar__image {
	display: block !important;
	height: 100% !important;
	margin: 0 !important;
	max-width: none !important;
	object-fit: cover;
	width: 100% !important;
}

.gj-article-header__meta .mak-byline {
	min-width: 0;
}

/* The first divider would otherwise begin the date row. */
.gj-article-header__meta .mak-post-meta__byline + .mak-post-meta__sep {
	display: none !important;
}

.gj-article-header__meta .mak-post-meta__updated,
.gj-article-header__meta .mak-post-meta__published,
.gj-article-header__meta .mak-post-meta__read {
	white-space: nowrap;
}

.gj-article-header__meta .mak-post-meta__label {
	font-weight: 600;
	color: var(--global-palette4, #484848) !important;
}

.gj-article-header__meta .mak-post-meta__sep {
	color: #b0aaa2 !important;
	margin: 0 0.15rem;
}

.gj-article-header__meta .mak-byline__name,
.gj-article-header__meta .mak-post-meta a {
	color: var(--global-palette2, #3d998e) !important;
	text-decoration: none !important;
	font-weight: 600;
}

.gj-article-header__meta .mak-post-meta__read-label {
	font-weight: 600;
	color: var(--global-palette1, #c9952e) !important;
}

/* —— Featured image in article (after title/meta) —— */
.gj-article-feature {
	margin: 1.25rem 0 1.5rem !important;
	max-width: 100%;
}

.gj-article-feature img,
.gj-article-feature__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0;
}

.gj-article-feature figcaption,
.gj-article-feature .wp-element-caption {
	margin-top: 0.5rem;
	font-family: Montserrat, sans-serif;
	font-size: 13px;
	line-height: 1.45;
	color: var(--global-palette5, #727272);
	text-align: left;
}

/* Key Moments after first paragraph */
.mak-article__content > .gj-article-feature ~ p + .mak-key-moments,
.entry-content-inner > .gj-article-feature ~ p + .mak-key-moments,
.mak-article__content > p + .mak-key-moments,
.entry-content-inner > p + .mak-key-moments {
	margin-top: 1.25rem !important;
	margin-bottom: 1.75rem !important;
}

/* When TOC is left, article header stays in content column */
body.gj-has-floating-toc .mak-article__content .gj-article-header {
	max-width: 100%;
}

@media (max-width: 767px) {
	.gj-ad-leaderboard {
		padding: 10px 8px 12px;
	}
	.gj-article-header__title {
		font-size: 1.65rem !important;
	}

	.gj-article-header__meta .mak-post-meta__row {
		align-items: flex-start;
		column-gap: 0;
		row-gap: 0.28rem;
	}

	.gj-article-header__meta .mak-post-meta__byline {
		margin-bottom: 0.2rem;
	}

	.gj-article-header__meta .gj-byline-avatar {
		flex-basis: 36px;
		height: 36px;
		width: 36px;
	}

	.gj-article-header__meta .mak-post-meta__sep {
		display: none !important;
	}

	.gj-article-header__meta .mak-post-meta__updated,
	.gj-article-header__meta .mak-post-meta__published,
	.gj-article-header__meta .mak-post-meta__read {
		flex: 0 0 100%;
		white-space: normal;
	}

	.gj-article-header__meta .mak-post-meta__row:has(.gj-byline-avatar) > .mak-post-meta__updated,
	.gj-article-header__meta .mak-post-meta__row:has(.gj-byline-avatar) > .mak-post-meta__published,
	.gj-article-header__meta .mak-post-meta__row:has(.gj-byline-avatar) > .mak-post-meta__read {
		flex-basis: calc(100% - 36px - 0.62rem);
		margin-left: calc(36px + 0.62rem);
	}
}
