/* ============================================================
 *  Articles section (CPT: article)
 *  Loaded on the archive (/articles/) and on single articles.
 *  Class prefix: .dds-articles-* / .dds-article-*  — scoped, no globals.
 * ============================================================ */

/* For the articles section only, the body bg (which the transparent site
   header + footer inherit) matches the articles page bg, so the whole page
   reads as one continuous dark surface from header through footer. */
body.post-type-archive-article,
body.single-article {
	background-color: #16202D;
}

:root {
	--dds-articles-bg: #16202D;                  /* page bg for the articles section */
	--dds-articles-card: rgba(255, 255, 255, 0.04);
	--dds-articles-card-hover: rgba(255, 255, 255, 0.07);
	--dds-articles-border: rgba(255, 255, 255, 0.08);
	--dds-articles-text: #cfd5e0;
	--dds-articles-text-strong: #ffffff;
	--dds-articles-accent: #e30613;
	--dds-articles-radius: 12px;
	--dds-articles-radius-lg: 16px;
}

.dds-articles-archive,
.dds-article-single {
	background-color: var(--dds-articles-bg);
	color: var(--dds-articles-text);
	padding: 48px 24px 80px;
}

.dds-articles-archive__inner {
	max-width: 1500px;  /* wide enough for two ~730px cards side-by-side */
	margin: 0 auto;
}
.dds-article-single__inner,
.dds-article-more {
	max-width: 1200px;
	margin: 0 auto;
}

/* ─── Section heading (red-underline accent) ─── */
.dds-articles-archive__title,
.dds-article-more__title {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: var(--dds-articles-text-strong);
	margin: 0 0 24px;
	position: relative;
	display: inline-block;
	text-transform: uppercase;
}
.dds-articles-archive__title::after,
.dds-article-more__title::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	background: var(--dds-articles-accent);
	margin-top: 6px;
	border-radius: 2px;
}

/* ============================================================
 *  Card (used on the archive grid and the "more articles" grid)
 * ============================================================ */

.dds-articles-archive__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 32px;
	margin-bottom: 56px;
}

.dds-article-card {
	display: block;
	position: relative;
	background: #1B2737;
	border-radius: var(--dds-articles-radius);
	overflow: hidden;
	aspect-ratio: 16 / 10;
	text-decoration: none;
	color: inherit;
	transition: transform 200ms ease;
}
.dds-article-card:hover,
.dds-article-card:focus-visible {
	transform: translateY(-2px);
}
.dds-article-card:focus-visible {
	outline: 2px solid var(--dds-articles-accent);
	outline-offset: 2px;
}
.dds-article-card__image-wrap {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.25);
	overflow: hidden;
}
.dds-article-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Title overlay sits on the bottom of the image with a semi-transparent
   dark band, so the image fills the card edge-to-edge and the title floats
   on top. A 2px red left border doubles as the accent for the card. */
.dds-article-card__body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	min-height: 80px;
	padding: 18px 24px;
	background: rgba(22, 32, 45, 0.80);
	border-left: 2px solid var(--dds-articles-accent);
	z-index: 2;
}
.dds-article-card__title {
	margin: 0;
	font-size: 22px;
	line-height: 1.3;
	font-weight: 300;
	color: var(--dds-articles-text-strong);
}

/* "More articles" grid uses the compact variant — same card, smaller body */
.dds-article-more {
	margin-top: 72px;
	border-top: 1px solid var(--dds-articles-border);
	padding-top: 40px;
}
.dds-article-more__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}
.dds-article-card--compact .dds-article-card__body {
	padding: 14px 18px;
}
.dds-article-card--compact .dds-article-card__title {
	font-size: 15px;
	line-height: 1.4;
	font-weight: 400;
}

/* ============================================================
 *  Pagination — plain numbers, current page in a red rounded box
 * ============================================================ */

.dds-articles-pagination {
	margin-top: 16px;
}
.dds-articles-pagination ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 14px;
	justify-content: center;
	align-items: center;
}
.dds-articles-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	border-radius: 6px;
	color: var(--dds-articles-text);
	text-decoration: none;
	font-size: 15px;
	line-height: 1;
}
.dds-articles-pagination .page-numbers:hover {
	color: var(--dds-articles-text-strong);
}
.dds-articles-pagination .page-numbers.current {
	color: var(--dds-articles-text-strong);
	border: 1.5px solid var(--dds-articles-accent);
	font-weight: 600;
}
.dds-articles-pagination .page-numbers.dots {
	cursor: default;
}

.dds-articles-archive__empty {
	color: var(--dds-articles-text);
	opacity: 0.8;
	text-align: center;
	padding: 60px 0;
}

/* ============================================================
 *  Single article — hero with title-overlay card + image
 * ============================================================ */

.dds-article-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: 40px;
}
.dds-article-hero__title {
	margin: 0 0 28px;
	font-size: 46px;
	line-height: 1.2;
	font-weight: 300;
	color: var(--dds-articles-text-strong);
	letter-spacing: -0.01em;
	max-width: 900px;
	/* Override the theme's global `h1 { text-transform: uppercase }` so the
	   article title renders in mixed case as authored. */
	text-transform: none;
}
.dds-article-hero__image-wrap {
	max-width: 900px;
	width: 100%;
	border-radius: var(--dds-articles-radius-lg);
	overflow: hidden;
	background: rgba(0, 0, 0, 0.25);
}
.dds-article-hero__image {
	width: 100%;
	height: auto;
	display: block;
}

/* Back arrow — desktop: absolutely positioned at the top-left of the hero,
   to the left of the centered title. Mobile: pinned to the top-left of the
   viewport so it sits in the header area. */
.dds-article-back {
	position: absolute;
	top: 8px;
	left: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: var(--dds-articles-text-strong);
	text-decoration: none;
	border-radius: 6px;
	transition: background-color 150ms ease;
}
.dds-article-back:hover,
.dds-article-back:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	color: var(--dds-articles-text-strong);
}
.dds-article-back__icon {
	display: block;
	width: 22px;
	height: 22px;
}
/* Mobile back arrow lives inside header.php's .wrap-logo-nav (the same
   container as the hamburger icon) so it picks up the same vertical-center
   trick the hamburger uses. Hidden on desktop — the in-hero copy handles
   desktop. */
.dds-article-back--mobile {
	display: none;
}
@media (max-width: 720px) {
	/* Hide the in-hero arrow; the wrap-logo-nav --mobile copy takes over. */
	.dds-article-hero > .dds-article-back {
		display: none;
	}
	/* Same top/transform pattern as .hamburger-menu-icon so the two icons
	   land on the same horizontal line, just mirrored left/right. Scrolls
	   with the header because .wrap-logo-nav is in normal document flow. */
	.dds-article-back--mobile {
		display: inline-flex;
		position: absolute;
		top: 50%;
		left: 14px;
		transform: translateY(-50%);
		z-index: 1000;
	}
	/* Mobile only: hide the header search icon on article single pages. */
	body.single-article .wrap-search {
		display: none !important;
	}
	/* Mobile only: smaller hero title on article single. */
	body.single-article .dds-article-hero__title {
		font-size: 28px;
	}
	/* Mobile only: card title stays at the mobile size (desktop is 22px). */
	.dds-article-card__title {
		font-size: 18px;
		line-height: 1.2;
	}
}

/* ============================================================
 *  Single article — body (centered text column, red-accent H2s)
 * ============================================================ */

.dds-article-body {
	max-width: 820px;
	margin: 0 auto;
	font-size: 15px;
	line-height: 1.75;
	color: #e4e9f0;
	font-weight: 400;
}
.dds-article-body p,
.dds-article-body li,
.dds-article-body blockquote {
	font-size: 17px;
	font-weight: 300;
	letter-spacing: 0.03rem;
	color: #e4e9f0;
}
.dds-article-body p {
	margin: 0 0 18px;
}
.dds-article-body h2,
.dds-article-body h3 {
	color: var(--dds-articles-text-strong);
	margin: 36px 0 14px;
}
.dds-article-body h2 {
	font-size: 19px;
	font-weight: 600;
	display: inline-block;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--dds-articles-accent);
	border-radius: 1px;
}
.dds-article-body h3 {
	font-size: 17px;
	font-weight: 700;
}
.dds-article-body a {
	color: #9ec3ff;
	text-decoration: underline;
}
.dds-article-body img {
	max-width: 100%;
	height: auto;
	border-radius: var(--dds-articles-radius);
	margin: 18px 0;
}
.dds-article-body ul,
.dds-article-body ol {
	margin: 0 0 18px 1.4em;
}
.dds-article-body blockquote {
	margin: 22px 0;
	padding: 10px 22px;
	border-left: 4px solid var(--dds-articles-accent);
	color: var(--dds-articles-text-strong);
	font-style: italic;
}

/* ============================================================
 *  Responsive
 * ============================================================ */

@media (max-width: 900px) {
	.dds-article-more__grid {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 640px) {
	.dds-articles-archive,
	.dds-article-single {
		padding: 32px 16px 56px;
	}
	.dds-articles-archive__grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}
}
