/*
Theme Name:  newstxtr Child
Description: Child theme for newstxtr.com
Template:    kadence
Version:     1.0.0
Text Domain: newstxtr-child
*/

/* ── CSS Variables ────────────────────────────────────────────────────────── */

:root {
	--nxt-badge-longread-bg:   #1e3a5f;
	--nxt-badge-longread-text: #ffffff;
	--nxt-badge-wrap-bg:       #b45309;
	--nxt-badge-wrap-text:     #ffffff;
	--nxt-divider-color:       var(--global-palette7, #e5e7eb);
	--nxt-meta-color:          var(--global-palette4, #6b7280);
	--nxt-tag-bg:              var(--global-palette8, #f3f4f6);
	--nxt-tag-color:           var(--global-palette3, #374151);
	--nxt-tag-hover-bg:        var(--global-palette2, #1f2937);
	--nxt-tag-hover-color:     #ffffff;
	--nxt-ressort-color:       var(--global-palette4, #6b7280);
	--nxt-disclaimer-color:    var(--global-palette5, #9ca3af);
	--nxt-week-label-color:    var(--global-palette4, #6b7280);
	--nxt-card-radius:         0.5rem;
}

/* ── Feed Grid ────────────────────────────────────────────────────────────── */

.nxt-feed {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	margin-bottom: 3rem;
}

@media (min-width: 640px) {
	.nxt-feed {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.nxt-feed {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ── Article Card ─────────────────────────────────────────────────────────── */

.nxt-card {
	display: flex;
	flex-direction: column;
	background: var(--global-palette9, #ffffff);
	border-radius: var(--nxt-card-radius);
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.nxt-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}

.nxt-card__image-link {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.nxt-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.nxt-card:hover .nxt-card__image {
	transform: scale(1.03);
}

.nxt-card__body {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex: 1;
}

.nxt-card__title {
	font-size: 1.125rem;
	line-height: 1.4;
	margin: 0;
}

.nxt-card__title a {
	color: var(--global-palette1, #111827);
	text-decoration: none;
}

.nxt-card__title a:hover {
	text-decoration: underline;
}

.nxt-card__meta {
	font-size: 0.8125rem;
	color: var(--nxt-meta-color);
	margin: 0;
}

.nxt-card__excerpt {
	font-size: 0.9375rem;
	color: var(--global-palette3, #374151);
	line-height: 1.6;
}

.nxt-card__excerpt p {
	margin: 0;
}

/* ── Badges ───────────────────────────────────────────────────────────────── */

.nxt-badge {
	display: inline-block;
	padding: 0.2em 0.65em;
	border-radius: 2em;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1;
	white-space: nowrap;
}

/* card.php emits badge--longread / badge--wrap; singles emit nxt-badge--longread / nxt-badge--wrap */
.nxt-badge.badge--longread,
.nxt-badge.nxt-badge--longread {
	background: var(--nxt-badge-longread-bg);
	color: var(--nxt-badge-longread-text);
}

.nxt-badge.badge--wrap,
.nxt-badge.nxt-badge--wrap {
	background: var(--nxt-badge-wrap-bg);
	color: var(--nxt-badge-wrap-text);
}

/* ── Archive Title ────────────────────────────────────────────────────────── */

.nxt-archive-title {
	font-size: 1.875rem;
	margin-bottom: 2rem;
}

/* ── Archive — Compact List (older articles) ──────────────────────────────── */

.nxt-archive-older {
	margin-top: 1rem;
}

.nxt-week-group {
	margin-bottom: 2rem;
}

.nxt-week-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--nxt-week-label-color);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--nxt-divider-color);
	margin-bottom: 0.75rem;
}

.nxt-compact-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.nxt-compact-item {
	display: flex;
	gap: 1rem;
	align-items: baseline;
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--global-palette8, #f3f4f6);
}

.nxt-compact-item__date {
	font-size: 0.8125rem;
	color: var(--nxt-meta-color);
	white-space: nowrap;
	flex-shrink: 0;
}

.nxt-compact-item__title {
	font-size: 0.9375rem;
	color: var(--global-palette1, #111827);
	text-decoration: none;
	line-height: 1.4;
}

.nxt-compact-item__title:hover {
	text-decoration: underline;
}

/* ── Single Article ───────────────────────────────────────────────────────── */

.nxt-single {
	max-width: 800px;
	margin: 0 auto;
}

.nxt-single__header {
	margin-bottom: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.nxt-single__title {
	font-size: clamp(1.5rem, 4vw, 2.25rem);
	line-height: 1.25;
	margin: 0;
}

/* ── Hero Image ───────────────────────────────────────────────────────────── */

.nxt-single__hero {
	margin: 0 0 0.25rem;
	width: 100%;
}

.nxt-single__hero-img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var(--nxt-card-radius);
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.nxt-single__caption {
	font-size: 0.8125rem;
	font-style: italic;
	color: var(--nxt-meta-color);
	margin-top: 0.4rem;
	line-height: 1.5;
}

/* ── Excerpt / Lead Block ─────────────────────────────────────────────────── */

.nxt-single__excerpt {
	font-size: 1.0625rem;
	color: var(--global-palette3, #374151);
	border-left: 3px solid var(--global-palette1, #111827);
	padding: 0.5rem 0 0.5rem 1rem;
	margin: 1.5rem 0;
	line-height: 1.6;
}

.nxt-single__excerpt time {
	font-weight: 600;
	color: var(--global-palette1, #111827);
}

.nxt-single__excerpt p {
	display: inline;
	margin: 0;
}

/* ── Article Content ──────────────────────────────────────────────────────── */

.nxt-single__content {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--global-palette1, #111827);
}

.nxt-single__content h2 {
	font-size: 1.5rem;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}

/* ── Divider ──────────────────────────────────────────────────────────────── */

.nxt-divider {
	border: none;
	border-top: 1px solid var(--nxt-divider-color);
	margin: 2rem 0;
}

/* ── Tags ─────────────────────────────────────────────────────────────────── */

.nxt-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
}

.nxt-tag {
	display: inline-block;
	background: var(--nxt-tag-bg);
	color: var(--nxt-tag-color);
	padding: 0.3em 0.8em;
	border-radius: 2em;
	font-size: 0.8125rem;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.nxt-tag:hover {
	background: var(--nxt-tag-hover-bg);
	color: var(--nxt-tag-hover-color);
}

/* ── Sources ──────────────────────────────────────────────────────────────── */

.nxt-sources {
	font-size: 0.875rem;
	color: var(--global-palette3, #374151);
}

.nxt-sources__label {
	font-weight: 600;
	margin-bottom: 0.4rem;
}

.nxt-sources__list {
	list-style: none;
	padding: 0;
	margin: 0 0 0.5rem;
}

.nxt-sources__list li {
	margin-bottom: 0.25rem;
}

.nxt-sources__list a {
	color: var(--global-palette1, #111827);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.nxt-sources__list a:hover {
	text-decoration: none;
}

.nxt-sources__overflow {
	color: var(--nxt-meta-color);
	margin: 0;
}

/* ── Disclaimer ───────────────────────────────────────────────────────────── */

.nxt-disclaimer {
	font-size: 0.8125rem;
	font-style: italic;
	color: var(--nxt-disclaimer-color);
	margin: 0;
}

/* ── Wrap — Topic List ────────────────────────────────────────────────────── */

.nxt-topics {
	margin: 1.5rem 0;
}

.nxt-topic {
	padding-bottom: 1.75rem;
}

.nxt-topic--separated {
	padding-top: 1.75rem;
	border-top: 1px dashed var(--nxt-divider-color);
}

.nxt-ressort-label {
	display: block;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--nxt-ressort-color);
	margin-bottom: 0.35rem;
}

.nxt-topic__headline {
	font-size: 1.25rem;
	line-height: 1.3;
	margin: 0 0 0.75rem;
}

.nxt-topic__body {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--global-palette3, #374151);
}

.nxt-topic__body p {
	margin-top: 0;
}

/* ── No Posts ─────────────────────────────────────────────────────────────── */

.nxt-no-posts {
	color: var(--nxt-meta-color);
	font-style: italic;
	padding: 2rem 0;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */

.nxt-footer {
	border-top: 1px solid var(--global-palette7, #e5e7eb);
	background: var(--global-palette9, #ffffff);
	padding: 2rem 1rem;
	margin-top: 3rem;
}

.nxt-footer__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
	max-width: 1200px;
	margin: 0 auto;
}

.nxt-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0;
	font-size: 0.875rem;
	color: var(--global-palette4, #6b7280);
}

.nxt-footer__legal a {
	color: inherit;
	text-decoration: none;
}

.nxt-footer__legal a:hover {
	color: var(--global-palette1, #111827);
	text-decoration: underline;
}

.nxt-footer__sep {
	color: var(--global-palette6, #9ca3af);
	padding: 0 0.35rem;
}

.nxt-footer__social {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.nxt-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--global-palette4, #6b7280);
	transition: color 0.15s ease;
}

.nxt-social-link:hover {
	color: var(--global-palette1, #111827);
}

.nxt-social-icon {
	fill: currentColor;
	display: block;
}

@media (min-width: 768px) {
	.nxt-footer__inner {
		flex-direction: row;
		justify-content: space-between;
	}
}
