/*!
 * RD Hydrojet — blog archive + single post styles.
 *
 * Conditionally enqueued by rdh_register_blog_styles() in functions.php
 * — only loads on the blog home, post archives (category / tag / date /
 * author), and single posts.
 *
 * Component-scoped tokens at .rdh-blog-archive and .rdh-post-shell so
 * the layout renders correctly on pages that don't load
 * css/homepage-refresh.css. All selectors are namespaced under
 * .rdh-blog-archive / .rdh-blog-header / .rdh-blog-filter /
 * .rdh-blog-grid / .rdh-blog-card / .rdh-post-shell / .rdh-post-hero /
 * .rdh-post-content — no global element resets, no overrides to .btn,
 * .btn-primary, body, headings, site header, footer.
 */

.rdh-blog-archive,
.rdh-post-shell {
	--rbg-red:           #c8102e;
	--rbg-red-dark:      #a40c25;
	--rbg-red-soft-bg:   rgba(200, 16, 46, 0.08);
	--rbg-red-soft-bd:   rgba(200, 16, 46, 0.22);
	--rbg-dark:          #111111;
	--rbg-charcoal:      #1a1a1a;
	--rbg-text:          #111111;
	--rbg-text-muted:    #555555;
	--rbg-border:        #e5e5e5;
	--rbg-border-strong: #d8d8d8;
	--rbg-surface:       #f7f7f7;
	--rbg-surface-2:     #fafafa;
	--rbg-white:         #ffffff;
	--rbg-radius:        0.5rem;
	--rbg-radius-lg:     0.75rem;
	--rbg-shadow-sm:     0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
	--rbg-shadow-md:     0 6px 18px rgba(0, 0, 0, .10), 0 2px 4px rgba(0, 0, 0, .04);
}


/* ============================================================
   Blog archive — compact header + filter pills + 3-col grid.
   ============================================================ */

.rdh-blog-archive {
	background: var(--rbg-surface-2);
}

.rdh-blog-header {
	background: var(--rbg-white);
	border-bottom: 1px solid var(--rbg-border);
	text-align: center;
	padding: 2.25rem 0 1.5rem;
}

.rdh-blog-header__inner {
	max-width: 720px;
	margin: 0 auto;
}

.rdh-blog-header__eyebrow {
	display: inline-block;
	padding: 0.3rem 0.8rem;
	background: var(--rbg-red-soft-bg);
	border: 1px solid var(--rbg-red-soft-bd);
	border-radius: 999px;
	color: var(--rbg-red);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-bottom: 0.85rem;
}

.rdh-blog-header__title {
	font-size: 1.85rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--rbg-text);
	margin: 0 0 0.55rem 0;
}

@media (max-width: 575.98px) {
	.rdh-blog-header__title { font-size: 1.55rem; }
}

.rdh-blog-header__intro {
	font-size: 1rem;
	line-height: 1.55;
	color: var(--rbg-text-muted);
	margin: 0;
}


/* Filter pills */

.rdh-blog-filter {
	background: var(--rbg-white);
	border-bottom: 1px solid var(--rbg-border);
	padding: 1rem 0 1.15rem;
}

.rdh-blog-filter__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.rdh-blog-filter__item { display: inline-block; }

.rdh-blog-filter__pill {
	display: inline-block;
	padding: 0.42rem 0.95rem;
	background: var(--rbg-white);
	color: var(--rbg-text);
	border: 1px solid var(--rbg-border-strong);
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
	line-height: 1.2;
	letter-spacing: 0.02em;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.rdh-blog-filter__pill:hover,
.rdh-blog-filter__pill:focus {
	background: var(--rbg-surface);
	border-color: var(--rbg-red);
	color: var(--rbg-text);
	text-decoration: none;
	outline: none;
}

.rdh-blog-filter__pill:focus-visible {
	outline: 2px solid var(--rbg-red);
	outline-offset: 2px;
}

.rdh-blog-filter__pill.is-active {
	background: var(--rbg-red);
	border-color: var(--rbg-red);
	color: var(--rbg-white);
}

.rdh-blog-filter__pill.is-active:hover,
.rdh-blog-filter__pill.is-active:focus {
	background: var(--rbg-red-dark);
	border-color: var(--rbg-red-dark);
	color: var(--rbg-white);
}


/* Section + grid */

.rdh-blog-section {
	padding: 2.5rem 0 4rem;
}

.rdh-blog-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
}

@media (max-width: 991.98px) {
	.rdh-blog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px;
	}
}

@media (max-width: 575.98px) {
	.rdh-blog-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}


/* Card — stretched-link pattern: only the title <a> is in the tab
   order; its ::after overlay makes the whole card clickable. */

.rdh-blog-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--rbg-white);
	border: 1px solid var(--rbg-border-strong);
	border-radius: var(--rbg-radius-lg);
	overflow: hidden;
	box-shadow: var(--rbg-shadow-sm);
	transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.rdh-blog-card:hover,
.rdh-blog-card:focus-within {
	box-shadow: var(--rbg-shadow-md);
	transform: translateY(-3px);
	border-color: rgba(200, 16, 46, 0.35);
}

.rdh-blog-card__image {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--rbg-surface);
}

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

.rdh-blog-card:hover .rdh-blog-card__image-img {
	transform: scale(1.04);
}

/* Tasteful fallback when a post has no featured image. */

.rdh-blog-card__image-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		radial-gradient(circle at 28% 32%, rgba(200, 16, 46, 0.20) 0%, transparent 55%),
		radial-gradient(circle at 75% 85%, rgba(200, 16, 46, 0.08) 0%, transparent 50%),
		linear-gradient(135deg, #1a1a1a 0%, #0e0e0e 100%);
}

.rdh-blog-card__image-fallback-mark {
	color: rgba(255, 255, 255, 0.78);
	font-size: 1.85rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.rdh-blog-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 1.2rem 1.25rem 1.3rem;
	flex: 1 1 auto;
}

.rdh-blog-card__category {
	color: var(--rbg-red);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.rdh-blog-card__title {
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: -0.005em;
	color: var(--rbg-text);
	margin: 0;
}

.rdh-blog-card__title-link {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.rdh-blog-card__title-link:hover,
.rdh-blog-card__title-link:focus {
	color: var(--rbg-red);
	text-decoration: none;
}

/* Stretched click target — clicks anywhere on the card open the post,
   but tab order and screen-reader announce remain a single link. */
.rdh-blog-card__title-link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}

.rdh-blog-card__excerpt {
	color: var(--rbg-text-muted);
	font-size: 0.94rem;
	line-height: 1.55;
	margin: 0;
}

.rdh-blog-card__date {
	color: var(--rbg-text-muted);
	font-size: 0.82rem;
	font-weight: 600;
	margin: auto 0 0 0;
	padding-top: 0.4rem;
}


/* Empty state */

.rdh-blog-empty {
	text-align: center;
	padding: 3rem 1.5rem;
	color: var(--rbg-text-muted);
	background: var(--rbg-white);
	border: 1px dashed var(--rbg-border-strong);
	border-radius: var(--rbg-radius-lg);
	margin: 0;
}


/* Pagination — standard WP nav-links / page-numbers output. */

.rdh-blog-archive .pagination,
.rdh-blog-archive .nav-links {
	margin: 2.5rem 0 0;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.45rem;
	flex-wrap: wrap;
}

.rdh-blog-archive .pagination .screen-reader-text,
.rdh-blog-archive .nav-links .screen-reader-text {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	width: 1px;
	overflow: hidden;
}

.rdh-blog-archive .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	padding: 0.4rem 0.75rem;
	background: var(--rbg-white);
	border: 1px solid var(--rbg-border-strong);
	border-radius: var(--rbg-radius);
	color: var(--rbg-text);
	font-weight: 700;
	font-size: 0.92rem;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rdh-blog-archive .page-numbers:hover,
.rdh-blog-archive .page-numbers:focus {
	border-color: var(--rbg-red);
	color: var(--rbg-red);
	text-decoration: none;
}

.rdh-blog-archive .page-numbers.current {
	background: var(--rbg-red);
	border-color: var(--rbg-red);
	color: var(--rbg-white);
}

.rdh-blog-archive .page-numbers.dots {
	background: transparent;
	border: none;
	color: var(--rbg-text-muted);
}


/* ============================================================
   Single post — full-width hero + centered single-column body.
   ============================================================ */

.rdh-post-hero {
	position: relative;
	min-height: 440px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4rem 0 3rem;
	color: var(--rbg-white);
	background-color: var(--rbg-dark);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	overflow: hidden;
}

/* RD-branded dark/red gradient fallback when no featured image is set. */
.rdh-post-hero.no-image {
	background:
		radial-gradient(circle at 25% 30%, rgba(200, 16, 46, 0.22) 0%, transparent 55%),
		radial-gradient(circle at 80% 80%, rgba(200, 16, 46, 0.12) 0%, transparent 55%),
		linear-gradient(135deg, #0e0e0e 0%, #1a1a1a 100%);
}

.rdh-post-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: linear-gradient(180deg, rgba(14, 14, 14, 0.55) 0%, rgba(14, 14, 14, 0.78) 100%);
	pointer-events: none;
}

.rdh-post-hero.no-image .rdh-post-hero__overlay {
	background: transparent;
}

.rdh-post-hero .container {
	position: relative;
	z-index: 1;
}

.rdh-post-hero__inner {
	max-width: 800px;
	margin: 0 auto;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
}

.rdh-post-hero__back {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: none;
	letter-spacing: 0.02em;
	transition: color 0.15s ease;
}

.rdh-post-hero__back:hover,
.rdh-post-hero__back:focus {
	color: var(--rbg-white);
	text-decoration: none;
}

.rdh-post-hero__back:focus-visible {
	outline: 2px solid var(--rbg-white);
	outline-offset: 2px;
	border-radius: 4px;
}

.rdh-post-hero__category {
	display: inline-block;
	padding: 0.32rem 0.85rem;
	background: var(--rbg-red);
	color: var(--rbg-white);
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.rdh-post-hero__title {
	font-size: 2.6rem;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.015em;
	margin: 0;
	color: var(--rbg-white);
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

@media (max-width: 991.98px) {
	.rdh-post-hero {
		min-height: 380px;
		padding: 3rem 0 2.5rem;
	}
	.rdh-post-hero__title { font-size: 2.1rem; }
}

@media (max-width: 575.98px) {
	.rdh-post-hero {
		min-height: 320px;
		padding: 2.5rem 0 2rem;
	}
	.rdh-post-hero__title { font-size: 1.7rem; }
}

.rdh-post-hero__date {
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0;
}


/* Article body — centered single-column typography. */

.rdh-post-content {
	padding: 3rem 0 4rem;
	background: var(--rbg-white);
}

.rdh-post-content__inner {
	max-width: 760px;
	margin: 0 auto;
	color: var(--rbg-text);
	font-size: 18px;
	line-height: 1.75;
}

.rdh-post-content__inner h2 {
	font-size: 1.65rem;
	font-weight: 800;
	line-height: 1.25;
	color: var(--rbg-text);
	margin: 2.2em 0 0.6em;
	letter-spacing: -0.01em;
}

.rdh-post-content__inner h3 {
	font-size: 1.3rem;
	font-weight: 800;
	line-height: 1.3;
	color: var(--rbg-text);
	margin: 1.85em 0 0.5em;
}

.rdh-post-content__inner h4 {
	font-size: 1.1rem;
	font-weight: 800;
	color: var(--rbg-text);
	margin: 1.5em 0 0.4em;
}

.rdh-post-content__inner p {
	margin: 0 0 1.15em;
}

.rdh-post-content__inner > :first-child { margin-top: 0; }
.rdh-post-content__inner > :last-child  { margin-bottom: 0; }

.rdh-post-content__inner a {
	color: var(--rbg-red);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.rdh-post-content__inner a:hover,
.rdh-post-content__inner a:focus {
	color: var(--rbg-red-dark);
}

.rdh-post-content__inner ul,
.rdh-post-content__inner ol {
	padding-left: 1.5em;
	margin: 0 0 1.2em;
}

.rdh-post-content__inner li {
	margin: 0 0 0.45em;
}

.rdh-post-content__inner blockquote {
	margin: 1.75em 0;
	padding: 0.5em 0 0.5em 1.25em;
	border-left: 4px solid var(--rbg-red);
	color: var(--rbg-text-muted);
	font-style: italic;
}

.rdh-post-content__inner blockquote p:last-child { margin-bottom: 0; }

.rdh-post-content__inner img,
.rdh-post-content__inner .wp-block-image img {
	max-width: 100%;
	height: auto;
	border-radius: var(--rbg-radius-lg);
	margin: 0.5em 0;
}

.rdh-post-content__inner figure {
	margin: 1.75em 0;
}

.rdh-post-content__inner figcaption {
	font-size: 0.88rem;
	color: var(--rbg-text-muted);
	text-align: center;
	margin-top: 0.5em;
	font-style: italic;
}

.rdh-post-content__inner pre,
.rdh-post-content__inner code {
	background: var(--rbg-surface);
	border-radius: var(--rbg-radius);
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.92em;
}

.rdh-post-content__inner code {
	padding: 0.12em 0.4em;
}

.rdh-post-content__inner pre {
	padding: 1em 1.25em;
	overflow-x: auto;
	border: 1px solid var(--rbg-border);
}

.rdh-post-content__inner pre code {
	background: transparent;
	padding: 0;
}

/* Tables — allow horizontal scroll on narrow viewports so they don't
   break mobile layout. */

.rdh-post-content__inner table {
	width: 100%;
	margin: 1.5em 0;
	border-collapse: collapse;
	display: block;
	overflow-x: auto;
}

.rdh-post-content__inner th,
.rdh-post-content__inner td {
	padding: 0.6em 0.85em;
	border: 1px solid var(--rbg-border);
	text-align: left;
	font-size: 0.96em;
}

.rdh-post-content__inner th {
	background: var(--rbg-surface);
	font-weight: 800;
}


/* wp_link_pages (multi-page posts) */

.rdh-post-content__pagelinks {
	margin: 2rem 0 0;
	padding: 0.75rem 1rem;
	background: var(--rbg-surface);
	border-radius: var(--rbg-radius);
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	font-size: 0.92rem;
}

.rdh-post-content__pagelinks > span:first-child {
	font-weight: 700;
	color: var(--rbg-text-muted);
}

.rdh-post-content__pagelinks a {
	color: var(--rbg-red);
	text-decoration: none;
	font-weight: 700;
}

.rdh-post-content__pagelinks a:hover,
.rdh-post-content__pagelinks a:focus {
	text-decoration: underline;
}


/* Comments — keep contained to the same article width. */

.rdh-post-comments {
	padding: 2.5rem 0 4rem;
	background: var(--rbg-surface-2);
	border-top: 1px solid var(--rbg-border);
}
