/*
 * blog.css — "Blog & Wellness Advice", the three-up latest-posts teaser.
 *
 * Figma: "our blog" frame, node 45:1531. The artboard lays this out across a
 * 1631px content box (three 528px cards, 24px apart); this site's column is
 * 1280px, so the boxes are scaled by 1280/1631 (~0.784) while the type stays
 * at the artboard's own sizes, the same split every other section here uses.
 *
 * The artboard fills its middle card with --accent as a permanent highlight.
 * That fill was dropped on request and not replaced: the cards carry no hover
 * state at all, so a card looks the same whether the pointer is over it or
 * not. Keyboard focus is still visible — the title's link picks up the global
 * :focus-visible ring from base.css.
 *
 * index.php renders the blog listing from these same classes rather than
 * owning a near-identical stylesheet (CLAUDE.md §4). .isListing is the only
 * difference: that page opens on its own banner, so the grid is the first
 * thing in the section and needs no gap above it.
 */

.blog {
	background: var(--surface-deep);
	color: var(--warm-sand);
}

.blogInner {
	width: min(100% - (var(--gutter) * 2), var(--container));
	margin-inline: auto;
	padding-block: clamp(56px, 6.2vw, 110px);
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.blogEyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	line-height: 28px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--warm-sand);
}

.blogEyebrow .eyebrowRule {
	color: var(--accent);
}

.blogTitle {
	margin-top: 26px;
	max-width: 20em;
	font-size: 44px;
	line-height: 1.364;
	font-weight: 400;
	text-transform: capitalize;
	text-wrap: balance;
	color: var(--warm-sand);
}

.blogIntro {
	margin-top: clamp(16px, 1.8vw, 26px);
	max-width: 575px;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.625;
	color: var(--warm-sand);
}

/* ------------------------------------------------------------- Cards */

.blogGrid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 19px;
	width: 100%;
	margin: clamp(40px, 4.4vw, 76px) 0 0;
	padding: 0;
	list-style: none;
}

.blogCard {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 22px 22px 32px;
	border-radius: 31px;
	text-align: left;
	background: var(--warm-sand);
	color: var(--ink);
}

.blogCardMedia {
	position: relative;
	overflow: hidden;
	border-radius: 31px;
	/* The artboard's 471x376 image well. */
	aspect-ratio: 471 / 376;
}

.blogCardImg {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.blogCardDate {
	position: absolute;
	top: 20px;
	left: 20px;
	display: inline-flex;
	align-items: center;
	min-height: 29px;
	padding: 0 18px;
	border-radius: 16px;
	font-size: 16px;
	line-height: 26px;
	background: var(--white);
	color: var(--surface-deep);
}

.blogCardTitle {
	margin-top: 26px;
	font-size: 22px;
	line-height: 1.455;
	font-weight: 400;
	text-transform: capitalize;
	color: inherit;
}

.blogCardTitle a {
	color: inherit;
}

/*
 * Stretches the title's link over the whole card, so the card is clickable
 * without a second link duplicating the same destination — three cards each
 * carrying an "Explore More" link would give the page three adjacent links
 * with identical, meaningless text.
 */
.blogCardTitle a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

/* Decorative twin of the title link — see the note above. It is hidden from
   assistive tech in the template rather than being a link of its own. */
.blogCardMore {
	margin-top: auto;
	padding-top: 28px;
	font-size: 16px;
	line-height: 1.2;
	color: inherit;
}

.blogViewAll {
	margin-top: clamp(32px, 3.5vw, 60px);
}

/* ------------------------------------------------------- The listing */

.blog.isListing .blogGrid {
	margin-top: 0;
}

/*
 * WordPress prints the page numbers as a flat run of links and spans; this
 * centres them and gives the current page the same filled treatment the
 * buttons elsewhere use. The nav's own heading is hidden by .screen-reader-text
 * in base.css, which core expects the theme to define.
 */
.blogPagination {
	margin-top: clamp(40px, 4.4vw, 64px);
}

.blogPagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.blogPagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid rgba(246, 242, 234, 0.35);
	border-radius: var(--radius-pill);
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1;
	color: var(--warm-sand);
	transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.blogPagination a.page-numbers:hover,
.blogPagination a.page-numbers:focus-visible {
	border-color: transparent;
	background: var(--accent-deep);
	color: #fff;
}

.blogPagination .page-numbers.current {
	border-color: transparent;
	background: var(--warm-sand);
	color: var(--forest-ink);
}

/* The ellipsis is not a control and should not look like one. */
.blogPagination .page-numbers.dots {
	min-width: 0;
	padding: 0 4px;
	border-color: transparent;
}

/* --------------------------------------------------------------- Small */

@media (max-width: 900px) {
	.blogGrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.blogTitle {
		font-size: 34px;
	}
}

@media (max-width: 600px) {
	.blogGrid {
		grid-template-columns: minmax(0, 1fr);
	}

	.blogTitle {
		font-size: 28px;
	}

	.blogCardTitle {
		font-size: 20px;
	}
}
