/**
 * Magenta AI — blog (singles + archives)
 */

.magenta-blog-single {
	--blog-text: min(50rem, 100%);
	--blog-surface: var(--magenta-surface);
	--blog-h1: clamp(1.75rem, 3vw, 2.25rem);
	--blog-h2: clamp(1.5rem, 2.5vw, 1.75rem);
	--blog-h3: 1.3rem;
	--blog-h4: 1.125rem;
	--blog-h5: 1rem;
	--blog-h6: 0.9375rem;
	background: #fff;
	color: #000;
}

.magenta-blog-breadcrumbs {
	margin-bottom: 0;
}

/* —— Single —— */
.magenta-blog-hero {
	padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.magenta-blog-hero__copy {
	max-width: var(--blog-text);
	margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.magenta-blog-hero__cat {
	color: inherit;
	text-decoration: none;
}

.magenta-blog-hero__cat:hover,
.magenta-blog-hero__cat:focus-visible {
	opacity: 0.75;
}

.magenta-blog-title {
	font-family: var(--magenta-font-display);
	font-size: clamp(2.75rem, 6vw, 3.75rem);
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: -0.03em;
	color: var(--magenta-black);
	max-width: 100%;
}

.magenta-blog-meta {
	font-family: var(--magenta-font-display);
	font-size: 0.9375rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	color: rgba(0, 0, 0, 0.55);
}

.magenta-blog-hero__media {
	margin: 0;
	overflow: hidden;
	background: var(--blog-surface);
}

.magenta-blog-hero__image {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
	background: var(--blog-surface);
}

.magenta-blog-body {
	padding-top: 0;
	padding-bottom: 7.5rem;
}

/* Centered reading column — same pattern as portfolio singles */
.magenta-blog-single .entry-content,
.magenta-blog-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 0;
	max-width: 100%;
}

.magenta-blog-single .entry-content > *,
.magenta-blog-content > * {
	width: 100%;
	max-width: var(--blog-text);
	min-width: 0;
}

.magenta-blog-single .entry-content > *:first-child,
.magenta-blog-content > *:first-child {
	margin-top: 0;
}

.magenta-blog-single .entry-content :is(h1, h2, h3, h4, h5, h6),
.magenta-blog-single .entry-content :is(h1, h2, h3, h4, h5, h6) strong,
.magenta-blog-content :is(h1, h2, h3, h4, h5, h6),
.magenta-blog-content :is(h1, h2, h3, h4, h5, h6) strong {
	font-family: var(--magenta-font-display);
	font-weight: 600;
	letter-spacing: normal;
	text-transform: none;
	line-height: 1.15;
	margin: 5rem auto 0.5rem;
	padding: 0;
	border: none;
}

.magenta-blog-single .entry-content > :is(h1, h2, h3, h4, h5, h6):first-child,
.magenta-blog-content > :is(h1, h2, h3, h4, h5, h6):first-child {
	margin-top: 0;
}

.magenta-blog-single .entry-content h1,
.magenta-blog-single .entry-content h1 strong,
.magenta-blog-content h1,
.magenta-blog-content h1 strong {
	font-size: var(--blog-h1);
	color: var(--magenta-accent);
}

.magenta-blog-single .entry-content h2,
.magenta-blog-single .entry-content h2 strong,
.magenta-blog-content h2,
.magenta-blog-content h2 strong {
	font-size: var(--blog-h2);
	color: var(--magenta-accent);
}

.magenta-blog-single .entry-content h3,
.magenta-blog-single .entry-content h3 strong,
.magenta-blog-content h3,
.magenta-blog-content h3 strong {
	font-size: var(--blog-h3);
	color: var(--magenta-accent);
}

.magenta-blog-single .entry-content h4,
.magenta-blog-single .entry-content h4 strong,
.magenta-blog-content h4,
.magenta-blog-content h4 strong {
	font-size: var(--blog-h4);
	color: var(--magenta-accent);
}

.magenta-blog-single .entry-content h5,
.magenta-blog-single .entry-content h5 strong,
.magenta-blog-content h5,
.magenta-blog-content h5 strong {
	font-size: var(--blog-h5);
	font-weight: 600;
	color: var(--magenta-black);
	margin-top: 3rem;
	margin-bottom: 0.25rem;
	line-height: 1.2;
}

.magenta-blog-single .entry-content h6,
.magenta-blog-single .entry-content h6 strong,
.magenta-blog-content h6,
.magenta-blog-content h6 strong {
	font-size: var(--blog-h6);
	font-weight: 500;
	color: rgba(0, 0, 0, 0.55);
	margin-top: 2rem;
	margin-bottom: 0.25rem;
	line-height: 1.25;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.magenta-blog-single .entry-content p,
.magenta-blog-single .entry-content ul,
.magenta-blog-single .entry-content ol,
.magenta-blog-single .entry-content li,
.magenta-blog-content p,
.magenta-blog-content ul,
.magenta-blog-content ol,
.magenta-blog-content li {
	font-family: var(--magenta-font-display);
	font-weight: 500;
	color: #000;
}

.magenta-blog-single .entry-content p,
.magenta-blog-content p {
	font-size: clamp(1.125rem, 2vw, 1.5rem);
	line-height: 1.3;
	letter-spacing: -0.02em;
	margin: 0 auto;
}

.magenta-blog-single .entry-content :is(ul, ol).wp-block-list,
.magenta-blog-single .entry-content :is(ul, ol),
.magenta-blog-content :is(ul, ol).wp-block-list,
.magenta-blog-content :is(ul, ol) {
	list-style: none;
	padding: 0;
	margin: 1.25rem auto 2rem;
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
}

.magenta-blog-single .entry-content :is(h1, h2, h3, h4, h5, h6) + :is(ul, ol),
.magenta-blog-content :is(h1, h2, h3, h4, h5, h6) + :is(ul, ol) {
	margin-top: 0.75rem;
}

.magenta-blog-single .entry-content :is(ul, ol) > li,
.magenta-blog-content :is(ul, ol) > li {
	position: relative;
	padding-left: 1.75rem;
	margin: 0;
	font-size: clamp(1.125rem, 2vw, 1.5rem);
	line-height: 1.35;
	letter-spacing: -0.02em;
	font-family: var(--magenta-font-display);
	font-weight: 500;
	color: #000;
}

.magenta-blog-single .entry-content ul > li::before,
.magenta-blog-content ul > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.72em;
	width: 0.875rem;
	height: 2px;
	background: var(--magenta-accent);
}

.magenta-blog-single .entry-content ol,
.magenta-blog-content ol {
	counter-reset: blog-list;
}

.magenta-blog-single .entry-content ol > li,
.magenta-blog-content ol > li {
	counter-increment: blog-list;
	padding-left: 2.75rem;
}

.magenta-blog-single .entry-content ol > li::before,
.magenta-blog-content ol > li::before {
	content: counter(blog-list, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 600;
	color: var(--magenta-accent);
	line-height: 1.35;
	letter-spacing: -0.02em;
}

/* Nested lists (ol > li > ul, ul > li > ul, …) */
.magenta-blog-single .entry-content :is(ul, ol) :is(ul, ol),
.magenta-blog-content :is(ul, ol) :is(ul, ol) {
	margin: 0.85rem 0 0.25rem;
	padding: 0;
	gap: 0.5rem;
	width: 100%;
	max-width: none;
	align-self: stretch;
}

.magenta-blog-single .entry-content :is(ul, ol) :is(ul, ol) > li,
.magenta-blog-content :is(ul, ol) :is(ul, ol) > li {
	padding-left: 1.35rem;
	font-size: clamp(1rem, 1.75vw, 1.25rem);
	line-height: 1.4;
	font-weight: 500;
	color: rgba(0, 0, 0, 0.78);
	counter-increment: none;
}

.magenta-blog-single .entry-content :is(ul, ol) ul > li::before,
.magenta-blog-content :is(ul, ol) ul > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.7em;
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 50%;
	background: var(--magenta-accent);
	opacity: 0.7;
}

.magenta-blog-single .entry-content :is(ul, ol) ol,
.magenta-blog-content :is(ul, ol) ol {
	counter-reset: blog-list-nested;
}

.magenta-blog-single .entry-content :is(ul, ol) ol > li,
.magenta-blog-content :is(ul, ol) ol > li {
	counter-increment: blog-list-nested;
	padding-left: 1.85rem;
}

.magenta-blog-single .entry-content :is(ul, ol) ol > li::before,
.magenta-blog-content :is(ul, ol) ol > li::before {
	content: counter(blog-list-nested, decimal) ".";
	position: absolute;
	left: 0;
	top: 0;
	width: auto;
	height: auto;
	border-radius: 0;
	background: none;
	opacity: 1;
	font-size: 0.9em;
	font-weight: 600;
	color: var(--magenta-accent);
	line-height: 1.4;
}

.magenta-blog-single .entry-content .wp-block-image,
.magenta-blog-single .entry-content figure,
.magenta-blog-content .wp-block-image,
.magenta-blog-content figure {
	margin: 5rem 0 0;
	align-self: stretch;
	width: 100%;
	max-width: 100%;
}

.magenta-blog-single .entry-content .wp-block-image img,
.magenta-blog-single .entry-content figure img,
.magenta-blog-content .wp-block-image img,
.magenta-blog-content figure img {
	background: var(--blog-surface);
	border-radius: 0;
	box-shadow: none;
	width: 100%;
	height: auto;
	display: block;
}

.magenta-blog-single .entry-content figcaption,
.magenta-blog-single .entry-content .wp-element-caption,
.magenta-blog-content figcaption,
.magenta-blog-content .wp-element-caption {
	margin-top: 0.65rem;
	font-family: var(--magenta-font-display);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: -0.01em;
	color: rgba(0, 0, 0, 0.55);
	max-width: var(--blog-text);
	margin-inline: auto;
}

.magenta-blog-single .entry-content blockquote,
.magenta-blog-single .entry-content .wp-block-quote,
.magenta-blog-content blockquote,
.magenta-blog-content .wp-block-quote {
	margin: 2.5rem auto;
	padding: 0 0 0 1.25rem;
	border-left: 3px solid var(--magenta-accent);
	font-family: var(--magenta-font-display);
	font-size: clamp(1.125rem, 2vw, 1.5rem);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -0.02em;
}

.magenta-blog-single .entry-content blockquote cite,
.magenta-blog-single .entry-content .wp-block-quote cite,
.magenta-blog-content blockquote cite,
.magenta-blog-content .wp-block-quote cite {
	display: block;
	margin-top: 0.75rem;
	font-size: 0.875rem;
	font-weight: 500;
	font-style: normal;
	color: rgba(0, 0, 0, 0.55);
}

.magenta-blog-single .entry-content pre,
.magenta-blog-single .entry-content .wp-block-code,
.magenta-blog-content pre,
.magenta-blog-content .wp-block-code {
	margin: 1.5rem auto;
	padding: 1rem 1.15rem;
	overflow-x: auto;
	background: var(--blog-surface);
	border-radius: 0;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.9em;
}

.magenta-blog-single .entry-content > .magenta-full-width,
.magenta-blog-single .entry-content > .is-style-magenta-full-width,
.magenta-blog-single .entry-content .magenta-full-width,
.magenta-blog-single .entry-content .is-style-magenta-full-width,
.magenta-blog-single .entry-content .alignfull,
.magenta-blog-content > .magenta-full-width,
.magenta-blog-content > .is-style-magenta-full-width,
.magenta-blog-content .alignfull {
	align-self: stretch;
	width: 100%;
	max-width: 100%;
}

.magenta-blog-single .entry-content a,
.magenta-blog-content a {
	color: #000;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.magenta-blog-single .entry-content a:hover,
.magenta-blog-single .entry-content a:focus-visible,
.magenta-blog-content a:hover,
.magenta-blog-content a:focus-visible {
	opacity: 0.6;
}

/* —— Archive —— */
.magenta-blog-archive {
	overflow-x: clip;
}

.magenta-blog-archive-header {
	margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.magenta-blog-archive-title {
	font-family: var(--magenta-font-display);
	font-size: clamp(2.5rem, 8vw, 5.5rem);
	font-weight: 600;
	line-height: 0.95;
	letter-spacing: -0.03em;
	text-transform: lowercase;
	max-width: min(40rem, 100%);
}

.magenta-blog-archive-desc {
	max-width: var(--magenta-text);
	font-family: var(--magenta-font-text);
	font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
	line-height: 1.5;
	color: rgba(0, 0, 0, 0.72);
}

.magenta-blog-grid {
	margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.magenta-blog-card {
	height: 100%;
}

.magenta-blog-card__link {
	display: block;
	color: inherit;
	height: 100%;
	transition: opacity 0.25s ease;
}

.magenta-blog-card__link:hover,
.magenta-blog-card__link:focus-visible {
	opacity: 0.85;
	color: inherit;
}

.magenta-blog-card__media {
	background-color: var(--magenta-surface);
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	min-height: clamp(220px, 32vw, 360px);
	margin-bottom: 1.25rem;
}

.magenta-blog-card__cat {
	font-family: var(--magenta-font-display);
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: lowercase;
	letter-spacing: -0.01em;
	color: var(--magenta-accent);
}

.magenta-blog-card__title {
	font-family: var(--magenta-font-display);
	font-size: clamp(1.25rem, 2.4vw, 1.75rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-transform: lowercase;
	color: var(--magenta-black);
}

.magenta-blog-card__excerpt {
	font-family: var(--magenta-font-text);
	font-size: 1rem;
	line-height: 1.5;
	color: rgba(0, 0, 0, 0.7);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.magenta-blog-card__meta {
	font-family: var(--magenta-font-display);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: -0.01em;
	color: rgba(0, 0, 0, 0.5);
}

.magenta-blog-empty {
	font-family: var(--magenta-font-text);
	font-size: 1.125rem;
	line-height: 1.5;
	color: rgba(0, 0, 0, 0.65);
}

.magenta-blog-pagination {
	margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.magenta-blog-pagination .nav-links,
.navigation.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	align-items: center;
	font-family: var(--magenta-font-display);
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: lowercase;
}

.magenta-blog-pagination a,
.navigation.pagination a {
	color: var(--magenta-black);
	text-decoration: none;
}

.magenta-blog-pagination a:hover,
.navigation.pagination a:hover,
.magenta-blog-pagination a:focus-visible,
.navigation.pagination a:focus-visible {
	color: var(--magenta-accent);
}

.magenta-blog-pagination .current,
.navigation.pagination .current {
	color: var(--magenta-accent);
}

@media (min-width: 992px) {
	.magenta-blog-archive .magenta-container,
	.magenta-blog-single .magenta-container {
		--magenta-gutter: 24px;
	}
}

@media (min-width: 1200px) {
	.magenta-blog-archive .magenta-container,
	.magenta-blog-single .magenta-container {
		--magenta-gutter: 32px;
	}
}
