/**
 * Winchester Posts Section — styles
 * Prefixed with .wps- / --wps- to avoid colliding with theme classes.
 */

.wps-add-post-form,
.wps-add-post-form label,
.wps-add-post-form input,
.wps-add-post-form select,
.wps-add-post-form textarea,
.wps-add-post-form button {
	font-family: "Times New Roman", Times, serif;
	font-size: 18px;
}

.wps-wrap {
	--wps-navy: #16273f;
	--wps-navy-deep: #0e1a2c;
	--wps-gold: #c39a4d;
	--wps-gold-soft: #e8d5a8;
	--wps-cream: #f8f4ec;
	--wps-paper: #fffdf8;
	--wps-ink: #1c2430;
	--wps-ink-soft: #5a6478;
	--wps-line: #e2dbc9;
	--wps-shadow: 0 1px 2px rgba(22, 39, 63, 0.06), 0 8px 24px rgba(22, 39, 63, 0.08);
	--wps-shadow-hover: 0 4px 8px rgba(22, 39, 63, 0.1), 0 16px 32px rgba(22, 39, 63, 0.12);

	max-width: 1180px;
	margin-inline: auto;
	padding-inline: 16px;
	color: var(--wps-ink);
	font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
	box-sizing: border-box;
}

.wps-wrap *,
.wps-wrap *::before,
.wps-wrap *::after {
	box-sizing: border-box;
}

.wps-wrap h1,
.wps-wrap h2,
.wps-wrap h3,
.wps-wrap h4 {
	font-family: "Fraunces", Georgia, serif;
	font-weight: 600;
	margin: 0;
	text-wrap: balance;
}

/* ---- Section header ---- */
.wps-section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 40px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--wps-line);
}

.wps-eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--wps-gold);
	margin-bottom: 10px;
}

.wps-eyebrow::before {
	content: "";
	width: 22px;
	height: 1px;
	background: var(--wps-gold);
}

.wps-heading {
	font-size: clamp(1.8rem, 3.4vw, 2.6rem);
	color: var(--wps-ink);
}

.wps-intro {
	max-width: 46ch;
	color: var(--wps-ink-soft);
	font-size: 0.98rem;
	line-height: 1.55;
	margin-top: 8px;
}

.wps-view-all {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--wps-navy);
	text-decoration: none;
	padding-bottom: 2px;
	border-bottom: 1px solid var(--wps-navy);
	white-space: nowrap;
}

/* ---- Grid: featured + side stack ---- */
.wps-grid {
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	gap: 28px;
	align-items: stretch;
}

@media (max-width: 820px) {
	.wps-grid {
		grid-template-columns: 1fr;
	}
}

.wps-card {
	background: var(--wps-paper);
	border: 1px solid var(--wps-line);
	border-radius: 6px;
	box-shadow: var(--wps-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wps-card:hover,
.wps-card:focus-visible {
	transform: translateY(-3px);
	box-shadow: var(--wps-shadow-hover);
}

.wps-card:focus-visible {
	outline: 2px solid var(--wps-gold);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.wps-card {
		transition: none;
	}
	.wps-card:hover {
		transform: none;
	}
}

.wps-thumb {
	position: relative;
	aspect-ratio: 16 / 10;
	background: linear-gradient(135deg, var(--wps-navy), var(--wps-navy-deep));
	overflow: hidden;
}

.wps-thumb img,
.wps-thumb svg {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.wps-cat-pill {
	position: absolute;
	top: 14px;
	left: 14px;
	background: var(--wps-gold);
	color: var(--wps-navy-deep);
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 5px 11px;
	border-radius: 100px;
	z-index: 1;
}

.wps-date-badge {
	position: absolute;
	top: 14px;
	right: 14px;
	background: rgba(16, 24, 35, 0.72);
	backdrop-filter: blur(3px);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 600;
	padding: 5px 10px;
	border-radius: 4px;
	font-variant-numeric: tabular-nums;
	z-index: 1;
}

/* ---- Featured card ---- */
.wps-card--featured {
	grid-row: span 2;
}

.wps-card--featured .wps-thumb {
	aspect-ratio: 16 / 11;
}

.wps-card-body {
	padding: 26px 26px 28px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
}

.wps-card--featured .wps-card-body {
	padding: 30px 32px 34px;
	gap: 14px;
}

.wps-card--featured h3 {
	font-size: clamp(1.3rem, 2.2vw, 1.7rem);
	line-height: 1.25;
}

.wps-card h3 {
	font-size: 1.08rem;
	line-height: 1.35;
}

.wps-excerpt {
	color: var(--wps-ink-soft);
	font-size: 0.92rem;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wps-card--featured .wps-excerpt {
	font-size: 0.98rem;
	-webkit-line-clamp: 3;
}

.wps-meta-row {
	margin-top: auto;
	padding-top: 14px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.82rem;
	color: var(--wps-ink-soft);
	border-top: 1px solid var(--wps-line);
	flex-wrap: wrap;
}

.wps-avatar {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--wps-gold-soft);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: "Fraunces", serif;
	font-weight: 600;
	font-size: 0.75rem;
	color: var(--wps-navy-deep);
	flex-shrink: 0;
}

.wps-dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--wps-ink-soft);
	flex-shrink: 0;
}

/* ---- Side stack (two smaller cards) ---- */
.wps-side-stack {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.wps-side-stack .wps-card {
	flex-direction: row;
}

.wps-side-stack .wps-thumb {
	width: 42%;
	aspect-ratio: auto;
	flex-shrink: 0;
}

.wps-side-stack .wps-card-body {
	padding: 20px 22px;
	gap: 8px;
}

.wps-side-stack .wps-excerpt {
	display: none;
}

@media (max-width: 560px) {
	.wps-side-stack .wps-card {
		flex-direction: column;
	}
	.wps-side-stack .wps-thumb {
		width: 100%;
		aspect-ratio: 16 / 10;
	}
}

/* ---- Strip below ---- */
.wps-strip-head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 52px 0 22px;
}

.wps-strip-head h4 {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--wps-ink-soft);
	font-family: "Source Sans 3", sans-serif;
	font-weight: 700;
	white-space: nowrap;
	margin: 0;
}

.wps-rule {
	height: 1px;
	flex: 1;
	background: var(--wps-line);
}

.wps-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 22px;
}

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

@media (max-width: 480px) {
	.wps-strip {
		grid-template-columns: 1fr;
	}
}

.wps-strip .wps-card-body {
	padding: 18px 20px 20px;
	gap: 8px;
}

.wps-strip h3 {
	font-size: 0.98rem;
}

.wps-strip .wps-thumb {
	aspect-ratio: 4 / 3;
}

.wps-empty {
	color: var(--wps-ink-soft);
	font-family: "Source Sans 3", sans-serif;
	padding: 24px 0;
}

/* ---- All Posts grid + pagination ---- */
.wps-all-posts .wps-heading {
	margin-bottom: 32px;
}

.wps-all-posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

@media (max-width: 900px) {
	.wps-all-posts-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.wps-all-posts-grid {
		grid-template-columns: 1fr;
	}
}

.wps-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 44px;
}

.wps-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--wps-line);
	border-radius: 4px;
	color: var(--wps-navy);
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 600;
}

.wps-pagination .page-numbers:hover {
	border-color: var(--wps-navy);
}

.wps-pagination .page-numbers.current {
	background: var(--wps-navy);
	border-color: var(--wps-navy);
	color: #fff;
}

.wps-pagination .page-numbers.dots {
	border-color: transparent;
}

/* ---- Dark mode (only applies if the theme sets prefers-color-scheme / a dark class up the tree) ---- */
@media (prefers-color-scheme: dark) {
	body.is-dark-theme .wps-wrap,
	html[data-theme="dark"] .wps-wrap {
		--wps-navy: #e8d5a8;
		--wps-navy-deep: #0b1420;
		--wps-gold: #e0b563;
		--wps-gold-soft: #8a6a2f;
		--wps-cream: #101823;
		--wps-paper: #141f2d;
		--wps-ink: #eef1f6;
		--wps-ink-soft: #a3aebd;
		--wps-line: #263449;
	}
}
