/**
 * Blog (post listing, archive, single) styles.
 *
 * Hand-written (not part of the Tailwind utility build in main.css) so the
 * blog renders correctly regardless of which utility classes that build
 * happens to contain. Reuses the same design tokens defined in main.css.
 *
 * @package HerMidlife
 */

/* ---------- Shared hero banner (blog index + single post) ---------- */

.hml-blog-hero {
	position: relative;
	padding: 9rem 1.5rem 4rem;
	text-align: center;
	overflow: hidden;
	background: linear-gradient(135deg, var(--blush) 0%, var(--cream) 55%, var(--lavender-light) 100%);
}

.hml-blog-hero__glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
	pointer-events: none;
}

.hml-blog-hero__glow--1 {
	top: -40px;
	left: 8%;
	width: 220px;
	height: 220px;
	background: color-mix(in oklab, var(--rose) 18%, transparent);
}

.hml-blog-hero__glow--2 {
	bottom: -60px;
	right: 10%;
	width: 260px;
	height: 260px;
	background: color-mix(in oklab, var(--sage) 16%, transparent);
}

.hml-blog-hero__inner {
	position: relative;
	max-width: 48rem;
	margin: 0 auto;
}

.hml-blog-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1.1rem;
	border-radius: 999px;
	background: color-mix(in oklab, var(--color-white) 60%, transparent);
	border: 1px solid var(--champagne);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--rose-dark);
	margin-bottom: 1.5rem;
}

.hml-blog-hero__title {
	font-family: Georgia, serif;
	font-size: clamp(2.25rem, 4vw, 3.5rem);
	font-weight: 700;
	line-height: 1.15;
	color: var(--foreground);
	margin: 0 0 1rem;
}

.hml-blog-hero__subtitle {
	font-size: 1.1rem;
	line-height: 1.7;
	color: color-mix(in oklab, var(--foreground) 65%, transparent);
	margin: 0;
}

/* ---------- Category filter pills ---------- */

.hml-blog-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
	max-width: 64rem;
	margin: 0 auto 3.5rem;
	padding: 0 1.5rem;
}

.hml-blog-filters a {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 1.25rem;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid var(--champagne);
	color: color-mix(in oklab, var(--foreground) 65%, transparent);
	background: var(--color-white);
	transition: all 0.2s ease;
}

.hml-blog-filters a:hover {
	border-color: var(--rose);
	color: var(--rose-dark);
}

.hml-blog-filters a.is-active {
	background: var(--rose);
	border-color: var(--rose);
	color: var(--color-white);
}

/* ---------- Post grid + cards ---------- */

.hml-blog-section {
	padding: 4rem 1.5rem 6rem;
	background: var(--background);
}

.hml-blog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
	gap: 2.25rem;
	max-width: 80rem;
	margin: 0 auto;
}

.hml-blog-card {
	display: flex;
	flex-direction: column;
	background: var(--color-white);
	border: 1px solid color-mix(in oklab, var(--champagne) 80%, transparent);
	border-radius: 1.5rem;
	overflow: hidden;
	text-decoration: none;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
}

.hml-blog-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 40px -12px color-mix(in oklab, var(--rose) 22%, transparent);
}

.hml-blog-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--beige-light);
}

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

.hml-blog-card:hover .hml-blog-card__media img {
	transform: scale(1.06);
}

.hml-blog-card__category {
	position: absolute;
	top: 0.9rem;
	left: 0.9rem;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	background: color-mix(in oklab, var(--color-white) 92%, transparent);
	color: var(--rose-dark);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hml-blog-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.6rem 1.6rem 1.8rem;
}

.hml-blog-card__meta {
	display: flex;
	align-items: center;
	gap: 1rem;
	font-size: 0.78rem;
	color: color-mix(in oklab, var(--foreground) 45%, transparent);
	margin-bottom: 0.75rem;
}

.hml-blog-card__meta span {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.hml-blog-card__meta svg {
	width: 14px;
	height: 14px;
}

.hml-blog-card__title {
	font-family: Georgia, serif;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--foreground);
	margin: 0 0 0.65rem;
}

.hml-blog-card:hover .hml-blog-card__title {
	color: var(--rose-dark);
}

.hml-blog-card__excerpt {
	font-size: 0.92rem;
	line-height: 1.65;
	color: color-mix(in oklab, var(--foreground) 65%, transparent);
	margin: 0 0 1.25rem;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hml-blog-card__readmore {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--rose-dark);
}

.hml-blog-card__readmore svg {
	width: 16px;
	height: 16px;
	transition: transform 0.2s ease;
}

.hml-blog-card:hover .hml-blog-card__readmore svg {
	transform: translateX(3px);
}

.hml-blog-empty {
	text-align: center;
	max-width: 36rem;
	margin: 0 auto;
	padding: 3rem 1.5rem;
	color: color-mix(in oklab, var(--foreground) 60%, transparent);
}

/* ---------- Pagination ---------- */

.hml-blog-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	max-width: 80rem;
	margin: 3.5rem auto 0;
}

.hml-blog-pagination a,
.hml-blog-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.7rem;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid var(--champagne);
	color: var(--foreground);
	background: var(--color-white);
	transition: all 0.2s ease;
}

.hml-blog-pagination a:hover {
	border-color: var(--rose);
	color: var(--rose-dark);
}

.hml-blog-pagination .current {
	background: var(--rose);
	border-color: var(--rose);
	color: var(--color-white);
}

.hml-blog-pagination .dots {
	border-color: transparent;
	background: transparent;
}

.hml-blog-pagination .next,
.hml-blog-pagination .prev {
	padding: 0 1.1rem;
}

/* ---------- Single post ---------- */

.hml-post-hero {
	position: relative;
	padding: 9rem 1.5rem 0;
	text-align: center;
	background: linear-gradient(135deg, var(--blush) 0%, var(--cream) 55%, var(--lavender-light) 100%);
}

.hml-post-hero__inner {
	max-width: 46rem;
	margin: 0 auto;
	padding-bottom: 3.5rem;
}

.hml-post-hero__category {
	display: inline-flex;
	padding: 0.4rem 1rem;
	border-radius: 999px;
	background: var(--rose);
	color: var(--color-white);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin-bottom: 1.25rem;
}

.hml-post-hero__title {
	font-family: Georgia, serif;
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--foreground);
	margin: 0 0 1.25rem;
}

.hml-post-hero__meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
	font-size: 0.88rem;
	color: color-mix(in oklab, var(--foreground) 55%, transparent);
}

.hml-post-hero__meta span {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.hml-post-hero__meta svg {
	width: 16px;
	height: 16px;
}

.hml-post-featured {
	max-width: 56rem;
	margin: -3rem auto 0;
	padding: 0 1.5rem;
}

.hml-post-featured img {
	width: 100%;
	height: clamp(220px, 40vw, 460px);
	object-fit: cover;
	border-radius: 1.5rem;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	display: block;
}

.hml-post-wrap {
	max-width: 42rem;
	margin: 0 auto;
	padding: 4rem 1.5rem 6rem;
}

.hml-post-content {
	font-size: 1.08rem;
	line-height: 1.85;
	color: color-mix(in oklab, var(--foreground) 80%, transparent);
}

.hml-post-content > * + * {
	margin-top: 1.4rem;
}

.hml-post-content h2 {
	font-family: Georgia, serif;
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--foreground);
	margin-top: 2.4rem;
}

.hml-post-content h3 {
	font-family: Georgia, serif;
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--foreground);
	margin-top: 2rem;
}

.hml-post-content ul,
.hml-post-content ol {
	padding-left: 1.4rem;
}

.hml-post-content li {
	margin-top: 0.5rem;
}

.hml-post-content li::marker {
	color: var(--rose);
}

.hml-post-content a {
	color: var(--rose-dark);
	text-decoration: underline;
}

.hml-post-content strong {
	color: var(--foreground);
}

.hml-post-content blockquote {
	margin: 1.75rem 0;
	padding: 1rem 1.5rem;
	border-left: 3px solid var(--rose);
	background: var(--blush);
	border-radius: 0 0.75rem 0.75rem 0;
	font-style: italic;
	color: var(--foreground);
}

.hml-post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--champagne);
}

.hml-post-tags a {
	padding: 0.35rem 0.9rem;
	border-radius: 999px;
	background: var(--beige-light);
	color: color-mix(in oklab, var(--foreground) 65%, transparent);
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
}

.hml-post-tags a:hover {
	background: var(--rose-light);
	color: var(--rose-dark);
}

.hml-post-back {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 2.5rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--rose-dark);
	text-decoration: none;
}

.hml-post-back svg {
	width: 16px;
	height: 16px;
}

.hml-post-cta {
	margin-top: 3.5rem;
	padding: 2.25rem;
	border-radius: 1.5rem;
	background: linear-gradient(135deg, var(--rose) 0%, var(--rose-dark) 100%);
	color: var(--color-white);
	text-align: center;
}

.hml-post-cta h3 {
	font-family: Georgia, serif;
	font-size: 1.4rem;
	margin: 0 0 0.6rem;
}

.hml-post-cta p {
	margin: 0 0 1.25rem;
	color: color-mix(in oklab, var(--color-white) 85%, transparent);
}

.hml-post-cta a {
	display: inline-flex;
	align-items: center;
	padding: 0.75rem 1.75rem;
	border-radius: 999px;
	background: var(--color-white);
	color: var(--rose-dark);
	font-weight: 700;
	text-decoration: none;
}

@media (max-width: 640px) {
	.hml-blog-hero,
	.hml-post-hero {
		padding-top: 7.5rem;
	}

	.hml-post-hero__meta {
		gap: 1rem;
		flex-wrap: wrap;
	}
}
