/* ============================================================
   RocketX Blog — dark archive + single post
   Scoped to body.rx-blogsite (set in inc/blog.php)
   ============================================================ */

.rx-blog,
.rx-post {
	position: relative;
	z-index: 1; /* lift above the fixed bg-fx layer (z-index: 0) */
	max-width: 1180px;
	margin: 0 auto;
	padding: clamp(6.5rem, 11vw, 9.5rem) clamp(1.1rem, 4vw, 2.5rem) clamp(4rem, 8vw, 7rem);
}

/* ---------- Listing header ---------- */
.rx-blog__head {
	max-width: 720px;
	margin: 0 0 clamp(2.2rem, 5vw, 3.4rem);
}

.rx-blog__eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--rx-orange-300);
	margin-bottom: 0.9rem;
}

.rx-blog__title {
	font-size: clamp(2rem, 4.4vw, 3.1rem);
	line-height: 1.06;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
	margin: 0 0 1rem;
}

.rx-blog__lede {
	font-size: clamp(1rem, 1.4vw, 1.12rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.66);
	margin: 0;
}

/* ---------- Card grid ---------- */
.rx-blog__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
	gap: clamp(1.1rem, 2.2vw, 1.7rem);
}

.rx-blog-card {
	display: flex;
	flex-direction: column;
	border-radius: var(--rx-r-lg);
	border: 1px solid var(--rx-line);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0) 55%),
		var(--rx-navy-700);
	overflow: hidden;
	transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
		border-color 320ms ease, box-shadow 320ms ease;
}

.rx-blog-card:hover {
	transform: translateY(-6px);
	border-color: rgba(240, 133, 102, 0.32);
	box-shadow: 0 28px 60px -30px rgba(0, 0, 0, 0.7), 0 0 40px -20px rgba(220, 79, 44, 0.4);
}

.rx-blog-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--rx-navy-500);
}

.rx-blog-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rx-blog-card:hover .rx-blog-card__media img { transform: scale(1.05); }

.rx-blog-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	padding: clamp(1.1rem, 2vw, 1.5rem);
	flex: 1;
}

.rx-blog-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: rgba(255, 255, 255, 0.42);
}

.rx-blog-card__cat {
	padding: 3px 9px;
	border-radius: var(--rx-r-pill);
	background: rgba(220, 79, 44, 0.14);
	color: var(--rx-orange-300);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
	font-size: 10px;
}

.rx-blog-card__read::before {
	content: '·';
	margin-right: 10px;
	color: rgba(255, 255, 255, 0.28);
}

.rx-blog-card__title {
	font-size: 1.18rem;
	line-height: 1.28;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 0;
}

.rx-blog-card__title a {
	color: #fff;
	text-decoration: none;
	background-image: linear-gradient(var(--rx-orange-300), var(--rx-orange-300));
	background-size: 0% 1px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size 300ms ease;
}
.rx-blog-card__title a:hover { background-size: 100% 1px; }

.rx-blog-card__excerpt {
	font-size: 0.92rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.6);
	margin: 0;
}

.rx-blog-card__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 0.4rem;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--rx-orange-300);
	text-decoration: none;
}
.rx-blog-card__more svg { transition: transform 240ms ease; }
.rx-blog-card__more:hover svg { transform: translateX(3px); }

/* ---------- Pagination ---------- */
.rx-blog__pagination {
	margin-top: clamp(2.4rem, 5vw, 3.6rem);
}
.rx-blog__pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
	justify-content: center;
}
.rx-blog__pagination a,
.rx-blog__pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: var(--rx-r-md);
	border: 1px solid var(--rx-line);
	color: rgba(255, 255, 255, 0.7);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 220ms ease, color 220ms ease, background 220ms ease;
}
.rx-blog__pagination a:hover {
	border-color: rgba(240, 133, 102, 0.4);
	color: #fff;
}
.rx-blog__pagination .current {
	background: var(--rx-orange);
	border-color: var(--rx-orange);
	color: #fff;
}

.rx-blog__empty {
	padding: 4rem 0;
	text-align: center;
	color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   Single post
   ============================================================ */
.rx-post { max-width: 920px; }

.rx-post__head { margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }

.rx-post__back {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	margin-bottom: 1.6rem;
	transition: color 220ms ease;
}
.rx-post__back:hover { color: var(--rx-orange-300); }
.rx-post__back svg { transition: transform 240ms ease; }
.rx-post__back:hover svg { transform: translateX(-3px); }

.rx-post__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: rgba(255, 255, 255, 0.45);
	margin-bottom: 1rem;
}
.rx-post__cat {
	padding: 4px 11px;
	border-radius: var(--rx-r-pill);
	background: rgba(220, 79, 44, 0.14);
	color: var(--rx-orange-300);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
	font-size: 10.5px;
}

.rx-post__title {
	font-size: clamp(2rem, 4.6vw, 3.2rem);
	line-height: 1.08;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
	margin: 0;
}

.rx-post__media {
	margin: clamp(1.6rem, 3vw, 2.4rem) 0;
	border-radius: var(--rx-r-lg);
	overflow: hidden;
	border: 1px solid var(--rx-line);
}
.rx-post__media img { width: 100%; height: auto; display: block; }

/* ---------- Article prose ---------- */
.rx-post__content {
	font-size: clamp(1rem, 1.25vw, 1.12rem);
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.8);
}
.rx-post__content > * + * { margin-top: 1.3em; }
.rx-post__content h2,
.rx-post__content h3,
.rx-post__content h4 {
	color: #fff;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.25;
	margin-top: 2em;
}
.rx-post__content h2 { font-size: 1.6em; }
.rx-post__content h3 { font-size: 1.3em; }
.rx-post__content a {
	color: var(--rx-orange-300);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}
.rx-post__content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--rx-r-md);
}
.rx-post__content ul,
.rx-post__content ol { padding-left: 1.3em; }
.rx-post__content li + li { margin-top: 0.5em; }
.rx-post__content blockquote {
	margin: 1.6em 0;
	padding: 0.4em 0 0.4em 1.3em;
	border-left: 3px solid var(--rx-orange);
	color: rgba(255, 255, 255, 0.9);
	font-style: italic;
}
.rx-post__content code {
	background: rgba(255, 255, 255, 0.07);
	padding: 0.15em 0.45em;
	border-radius: 6px;
	font-size: 0.9em;
}

/* ---------- End-of-post CTA ---------- */
.rx-post__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.2rem;
	margin-top: clamp(2.8rem, 6vw, 4rem);
	padding: clamp(1.5rem, 3vw, 2.2rem);
	border-radius: var(--rx-r-lg);
}
.rx-post__cta h2 {
	font-size: 1.35rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 0.4rem;
}
.rx-post__cta p {
	margin: 0;
	color: rgba(255, 255, 255, 0.66);
	font-size: 0.95rem;
	max-width: 46ch;
}
.rx-post__cta .rx-btn { flex-shrink: 0; }

@media (max-width: 560px) {
	.rx-post__cta { flex-direction: column; align-items: flex-start; }
	.rx-post__cta .rx-btn { width: 100%; justify-content: center; }
}

/* ============================================================
   Archive: featured hero + filter bar
   ============================================================ */
.rx-blog-hero {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	margin-bottom: clamp(1.6rem, 3.5vw, 2.6rem);
	border-radius: var(--rx-r-lg);
	border: 1px solid var(--rx-line);
	overflow: hidden;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 55%),
		var(--rx-navy-700);
	transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), border-color 360ms ease, box-shadow 360ms ease;
}
.rx-blog-hero[hidden] { display: none; }
.rx-blog-hero:hover {
	transform: translateY(-5px);
	border-color: rgba(240, 133, 102, 0.32);
	box-shadow: 0 32px 70px -34px rgba(0, 0, 0, 0.75), 0 0 50px -24px rgba(220, 79, 44, 0.4);
}
.rx-blog-hero__media { display: block; overflow: hidden; background: var(--rx-navy-500); aspect-ratio: 16 / 10; }
.rx-blog-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1); }
.rx-blog-hero:hover .rx-blog-hero__media img { transform: scale(1.04); }
.rx-blog-hero__body {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	justify-content: center;
	padding: clamp(1.5rem, 3vw, 2.8rem);
}
.rx-blog-hero__flag {
	padding: 3px 10px;
	border-radius: var(--rx-r-pill);
	background: var(--rx-orange);
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
	font-size: 10px;
}
.rx-blog-hero__title { font-size: clamp(1.5rem, 2.6vw, 2.15rem); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.rx-blog-hero__title a { color: #fff; text-decoration: none; }
.rx-blog-hero__title a:hover { color: var(--rx-orange-300); }
.rx-blog-hero__excerpt { font-size: 1rem; line-height: 1.6; color: rgba(255, 255, 255, 0.66); margin: 0; }
.rx-blog-hero__cta { align-self: flex-start; margin-top: 0.4rem; }
@media (max-width: 820px) {
	.rx-blog-hero { grid-template-columns: 1fr; }
	.rx-blog-hero__media { aspect-ratio: 16 / 9; }
}

.rx-blog-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: clamp(1.6rem, 3vw, 2.2rem);
}
.rx-blog-filter__search { position: relative; flex: 1 1 240px; max-width: 360px; display: flex; align-items: center; }
.rx-blog-filter__search svg { position: absolute; left: 15px; width: 17px; height: 17px; color: rgba(255, 255, 255, 0.4); pointer-events: none; }
.rx-blog-filter__search input {
	width: 100%;
	height: 44px;
	padding: 0 16px 0 42px;
	border-radius: var(--rx-r-pill);
	border: 1px solid var(--rx-line);
	background: rgba(255, 255, 255, 0.05);
	color: #fff;
	font-size: 0.92rem;
	font-family: inherit;
	transition: border-color 160ms, background 160ms, box-shadow 160ms;
}
.rx-blog-filter__search input::placeholder { color: rgba(255, 255, 255, 0.4); }
.rx-blog-filter__search input:focus {
	outline: none;
	border-color: rgba(240, 133, 102, 0.6);
	background: rgba(255, 255, 255, 0.08);
	box-shadow: 0 0 0 4px rgba(220, 79, 44, 0.16);
}
.rx-blog-filter__tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.rx-blog-filter__tab {
	padding: 8px 16px;
	border-radius: var(--rx-r-pill);
	border: 1px solid var(--rx-line);
	background: transparent;
	color: rgba(255, 255, 255, 0.7);
	font-size: 12.5px;
	font-weight: 600;
	font-family: inherit;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background 180ms, border-color 180ms, color 180ms, transform 180ms;
}
.rx-blog-filter__tab:hover { color: #fff; border-color: rgba(240, 133, 102, 0.4); transform: translateY(-1px); }
.rx-blog-filter__tab.is-active { background: var(--rx-orange); border-color: var(--rx-orange); color: #fff; }

.rx-blog-card[hidden] { display: none; }
.rx-blog__noresults { padding: 3rem 0; text-align: center; color: rgba(255, 255, 255, 0.55); }
.rx-blog__noresults[hidden] { display: none; }

/* ============================================================
   Single: reading progress bar
   ============================================================ */
.rx-readbar {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	z-index: 200;
	background: rgba(255, 255, 255, 0.06);
	pointer-events: none;
}
.rx-readbar__fill {
	display: block;
	height: 100%;
	width: 100%;
	transform: scaleX(0);
	transform-origin: 0 50%;
	background: linear-gradient(90deg, var(--rx-orange-300), var(--rx-orange-600, #B43A22));
	will-change: transform;
}
@media (prefers-reduced-motion: reduce) { .rx-readbar { display: none; } }

/* ============================================================
   Single: share row
   ============================================================ */
.rx-share { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 1.4rem; }
.rx-share__label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.42);
	margin-right: 2px;
}
.rx-share__btn {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--rx-line);
	background: rgba(255, 255, 255, 0.04);
	color: rgba(255, 255, 255, 0.78);
	cursor: pointer;
	transition: background 200ms, border-color 200ms, color 200ms, transform 200ms;
}
.rx-share__btn svg { width: 16px; height: 16px; }
.rx-share__btn:hover { color: #fff; border-color: rgba(240, 133, 102, 0.5); background: rgba(220, 79, 44, 0.16); transform: translateY(-2px); }
.rx-share__copied {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	padding: 3px 9px;
	border-radius: 6px;
	background: var(--rx-orange);
	color: #fff;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.04em;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 180ms, transform 180ms;
}
.rx-share__copy.is-copied .rx-share__copied { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   Single: body grid + sticky table of contents
   ============================================================ */
.rx-post { max-width: 760px; }
.rx-post__body { position: relative; display: flex; flex-direction: column; }
.rx-post__content { min-width: 0; }

.rx-post__aside { order: -1; margin-bottom: 1.6rem; }
.rx-post__toc {
	padding: 1.1rem 1.3rem;
	border-radius: var(--rx-r-md);
	border: 1px solid var(--rx-line);
	background: rgba(255, 255, 255, 0.03);
}
.rx-post__toc[hidden] { display: none; }
.rx-post__toc-title {
	margin: 0 0 0.7rem;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
}
.rx-post__toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rx-post__toc-item--h3 a { padding-left: 14px; font-size: 0.84rem; }
.rx-post__toc-list a {
	display: block;
	padding: 4px 0;
	font-size: 0.9rem;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.6);
	text-decoration: none;
	border-left: 2px solid transparent;
	padding-left: 12px;
	margin-left: -2px;
	transition: color 180ms, border-color 180ms;
}
.rx-post__toc-list a:hover { color: #fff; }
.rx-post__toc-list a.is-active { color: var(--rx-orange-300); border-color: var(--rx-orange); }

/* Wide screens: float the TOC into the right margin, sticky alongside the read.
   Gated to >=1280px so the side gutter ((vw - 760)/2) can fit it without clipping. */
@media (min-width: 1280px) {
	.rx-post__aside {
		position: absolute;
		top: 0;
		bottom: 0;
		left: 100%;
		width: 210px;
		margin: 0 0 0 2rem;
		order: 0;
	}
	.rx-post__toc { position: sticky; top: 104px; }
}

/* ============================================================
   Single: related posts ("Read next")
   ============================================================ */
.rx-post__related { margin-top: clamp(2.8rem, 6vw, 4rem); }
.rx-post__related-title {
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #fff;
	margin: 0 0 clamp(1.2rem, 2.5vw, 1.6rem);
}
.rx-blog__grid--related { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.rx-blog__grid--related .rx-blog-card__title { font-size: 1.02rem; }
