/**
 * Blog template styles.
 *
 * Uses theme.json tokens:
 *   --wp--preset--color--theme-02 = #002026 (dark)
 *   --wp--preset--color--theme-03 = #01666C (teal)
 *   --wp--preset--color--theme-06 = #FFEEEB (pink)
 *   --wp--preset--color--theme-07 = #448083 (lighter teal)
 *   --wp--preset--font-family--dm-sans
 *   --wp--preset--font-family--butler
 */

/* ─── Hero gradient overlay ─── */
.blog-hero .wp-block-cover__background {
	background: linear-gradient( 267deg, rgba( 5, 23, 9, 0 ) 10%, rgba( 0, 0, 0, 0.48 ) 95% ) !important;
	opacity: 1 !important;
}

/* ─── Filter tabs ─── */
.blog-tabs {
	max-width: 1600px;
	margin: 0 auto var(--wp--preset--spacing--50);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.blog-tabs::-webkit-scrollbar {
	display: none;
}

.blog-tabs__list {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	white-space: nowrap;
}

.blog-tabs__tab {
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: var(--wp--custom--letter-spacing--wide);
	line-height: var(--wp--custom--line-height--normal, 1.5);
	text-transform: uppercase;
	color: var(--wp--preset--color--theme-03);
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.875rem 1.5rem;
	border-radius: 0;
	transition: background-color 0.3s ease, border-radius 0.3s ease;
	flex-shrink: 0;
}

.blog-tabs__tab:hover {
	background-color: color-mix(in srgb, var(--wp--preset--color--theme-06) 50%, transparent);
	border-radius: 70px;
}

.blog-tabs__tab.is-active {
	background-color: var(--wp--preset--color--theme-06);
	border-radius: 70px;
}

/* ─── Blog grid ─── */
.blog-grid {
	max-width: 1600px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
}

.blog-grid__empty {
	grid-column: 1 / -1;
	text-align: center;
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: 20px;
	color: var(--wp--preset--color--theme-03);
	padding: var(--wp--preset--spacing--60) 0;
}

/* ─── Blog card ─── */
.blog-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.blog-card__link {
	display: flex;
	flex-direction: column;
	flex: 1;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
}

.blog-card__link:hover .blog-card__image img {
	transform: scale(1.05);
}

.blog-card__image {
	height: 346px;
	overflow: hidden;
}

.blog-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.blog-card__placeholder {
	width: 100%;
	height: 100%;
	background-color: var(--wp--preset--color--theme-03);
}

.blog-card__content {
	background-color: var(--wp--preset--color--theme-06);
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: var(--wp--preset--spacing--30);
}

.blog-card__title {
	font-family: var(--wp--preset--font-family--butler);
	font-size: 40px;
	font-weight: 400;
	line-height: 43.2px;
	color: var(--wp--preset--color--theme-03);
	margin: 0;
}

.blog-card__cta {
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--cta);
	line-height: 32px;
	text-transform: uppercase;
	color: var(--wp--preset--color--theme-02);
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* ─── Load More button ─── */
.blog-load-more {
	max-width: 1600px;
	margin: var(--wp--preset--spacing--60) auto;
	text-align: center;
}

.blog-load-more__btn {
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing--cta);
	line-height: 32px;
	text-transform: uppercase;
	color: var(--wp--preset--color--theme-07);
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	position: relative;
}

.blog-load-more__btn::after {
	content: '';
	display: block;
	width: 100%;
	height: 1px;
	background-color: var(--wp--preset--color--theme-07);
	margin-top: 2px;
}

.blog-load-more__btn:hover {
	opacity: 0.7;
}

.blog-load-more__btn.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

.blog-load-more__btn.is-hidden {
	display: none;
}

/* ═══════════════════════════════════════════
   SINGLE POST
   ═══════════════════════════════════════════ */

/* ─── Single hero gradient ─── */
.blog-single-hero .wp-block-cover__background {
	background: linear-gradient( 267deg, rgba( 5, 23, 9, 0 ) 10%, rgba( 0, 0, 0, 0.48 ) 95% ) !important;
	opacity: 1 !important;
}

/* Category links in hero */
.blog-single-hero .taxonomy-category {
	display: flex;
	gap: 12px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.blog-single-hero .taxonomy-category a {
	color: var(--wp--preset--color--theme-06);
	text-decoration: none;
}

/* ─── Single post content typography ─── */
.single-post .entry-content h2,
.single-post .wp-block-post-content h2 {
	font-family: var(--wp--preset--font-family--butler);
	font-size: 35px;
	font-weight: 400;
	line-height: 40px;
	color: var(--wp--preset--color--theme-03);
	margin-top: var(--wp--preset--spacing--60);
	margin-bottom: var(--wp--preset--spacing--30);
}

.single-post .entry-content p,
.single-post .wp-block-post-content p {
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: 20px;
	font-weight: 300;
	line-height: 31px;
	letter-spacing: 0.2px;
	color: var(--wp--preset--color--theme-02);
}

/* ─── Related Articles ─── */
.blog-related {
	max-width: 1600px;
	margin: var(--wp--preset--spacing--80) auto var(--wp--preset--spacing--60);
}

.blog-related__heading {
	font-family: var(--wp--preset--font-family--butler);
	font-size: 63px;
	font-weight: 300;
	line-height: 70px;
	color: var(--wp--preset--color--theme-04);
	text-align: center;
	margin-bottom: var(--wp--preset--spacing--60);
}

.blog-related__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
}

/* ─── Responsive ─── */
@media (max-width: 1200px) {
	.blog-grid,
	.blog-related__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
		margin-left: var(--wp--preset--spacing--40);
		margin-right: var(--wp--preset--spacing--40);
	}

	.blog-tabs {
		margin-left: var(--wp--preset--spacing--40);
		margin-right: var(--wp--preset--spacing--40);
	}

	.blog-card__content {
		padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
	}

	.blog-card__title {
		font-size: 32px;
		line-height: 36px;
	}

	.blog-related__heading {
		font-size: 48px;
		line-height: 56px;
	}
}

@media (max-width: 768px) {
	.blog-grid,
	.blog-related__grid {
		grid-template-columns: 1fr;
	}

	.blog-tabs__list {
		gap: 12px;
	}

	.blog-tabs__tab {
		font-size: var(--wp--preset--font-size--small);
		letter-spacing: var(--wp--custom--letter-spacing--wide);
		padding: 0.75rem 1rem;
	}

	.blog-card__image {
		height: 250px;
	}

	.blog-card__content {
		padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
	}

	.blog-card__title {
		font-size: 28px;
		line-height: 32px;
	}

	.blog-related__heading {
		font-size: 36px;
		line-height: 44px;
	}

	.single-post .entry-content h2,
	.single-post .wp-block-post-content h2 {
		font-size: 28px;
		line-height: 34px;
	}

	.single-post .entry-content p,
	.single-post .wp-block-post-content p {
		font-size: 18px;
		line-height: 28px;
	}
}
