/**
 * Tratok News Hub — frontend
 * Brand: navy #0c1220, gold #d4a853, teal #3bb5a8, purple #7850A0
 * Fonts: Playfair Display (display), DM Sans (body)
 */

.tratok-news-hub {
	--tnh-navy: #0c1220;
	--tnh-card: #111a2e;
	--tnh-card-2: #15203a;
	--tnh-gold: #d4a853;
	--tnh-gold-bright: #e8c36a;
	--tnh-teal: #3bb5a8;
	--tnh-teal-bright: #7fd4c8;
	--tnh-body: #c2cbdb;
	--tnh-muted: #8f9bb3;
	--tnh-line: rgba(255, 255, 255, 0.07);

	position: relative;
	overflow: hidden;
	background: #0c1220;
	background-image: radial-gradient(ellipse 70% 45% at 50% 0%, rgba(212, 168, 83, 0.10), transparent);
	border: 1px solid rgba(212, 168, 83, 0.16);
	border-radius: 24px;
	padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px);
	font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--tnh-body);
	line-height: 1.6;
}

.tratok-news-hub * {
	box-sizing: border-box;
}

.tratok-nh-glow {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(circle 380px at 85% 110%, rgba(59, 181, 168, 0.07), transparent);
}

/* ---------------------------------------------------------------
 * Header
 * --------------------------------------------------------------- */

.tratok-nh-header {
	position: relative;
	text-align: center;
	margin: 0 0 30px;
}

.tratok-nh-eyebrow {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--tnh-gold);
}

.tratok-nh-title {
	margin: 0;
	font-family: 'Playfair Display', Georgia, serif;
	font-size: clamp(30px, 4.5vw, 44px);
	font-weight: 700;
	line-height: 1.15;
	color: var(--tnh-gold);
}

/* ---------------------------------------------------------------
 * Toolbar: pills + search
 * --------------------------------------------------------------- */

.tratok-nh-toolbar {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin: 0 0 26px;
}

.tratok-nh-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tratok-nh-pill {
	appearance: none;
	cursor: pointer;
	background: transparent;
	border: 1px solid rgba(194, 203, 219, 0.22);
	border-radius: 999px;
	padding: 7px 16px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--tnh-body);
	transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.tratok-nh-pill:hover {
	border-color: rgba(212, 168, 83, 0.55);
	color: var(--tnh-gold-bright);
}

.tratok-nh-pill.is-active {
	background: rgba(212, 168, 83, 0.14);
	border-color: var(--tnh-gold);
	color: var(--tnh-gold-bright);
}

.tratok-nh-search {
	position: relative;
	display: flex;
	align-items: center;
	min-width: 220px;
	flex: 0 1 260px;
	color: var(--tnh-muted);
}

.tratok-nh-search svg {
	position: absolute;
	left: 14px;
	pointer-events: none;
}

.tratok-nh-search-input {
	width: 100%;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(194, 203, 219, 0.22);
	border-radius: 999px;
	padding: 9px 16px 9px 38px;
	font-family: inherit;
	font-size: 13.5px;
	color: var(--tnh-body);
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tratok-nh-search-input::placeholder {
	color: var(--tnh-muted);
}

.tratok-nh-search-input:focus {
	border-color: var(--tnh-gold);
	box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.18);
}

/* ---------------------------------------------------------------
 * Hero card
 * --------------------------------------------------------------- */

.tratok-nh-hero {
	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	margin: 0 0 20px;
	background: linear-gradient(135deg, var(--tnh-card-2), var(--tnh-card));
	border: 1px solid rgba(212, 168, 83, 0.30);
	border-radius: 18px;
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.tratok-nh-hero.has-media {
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

.tratok-nh-hero:hover {
	transform: translateY(-3px);
	border-color: rgba(212, 168, 83, 0.6);
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.tratok-nh-hero-body {
	padding: clamp(24px, 3.5vw, 40px);
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tratok-nh-hero-eyebrow {
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--tnh-teal-bright);
}

.tratok-nh-hero-title {
	margin: 0;
	font-family: 'Playfair Display', Georgia, serif;
	font-size: clamp(22px, 3vw, 30px);
	font-weight: 700;
	line-height: 1.25;
}

.tratok-nh-hero-excerpt {
	margin: 0;
	font-size: 15.5px;
	color: var(--tnh-muted);
}

.tratok-nh-hero-media {
	position: relative;
	min-height: 240px;
}

.tratok-nh-hero-media img,
.tratok-nh-hero-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.tratok-nh-hero:hover .tratok-nh-hero-media img {
	transform: scale(1.03);
}

.tratok-nh-hero-media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--tnh-card-2), transparent 40%);
	pointer-events: none;
}

/* ---------------------------------------------------------------
 * Card grid
 * --------------------------------------------------------------- */

.tratok-nh-grid {
	position: relative;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 20px;
}

.tratok-nh-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--tnh-card);
	border: 1px solid var(--tnh-line);
	border-radius: 16px;
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.tratok-nh-card:hover {
	transform: translateY(-4px);
	border-color: rgba(212, 168, 83, 0.45);
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.tratok-nh-card.is-entering {
	animation: tratok-nh-in 0.4s ease both;
}

@keyframes tratok-nh-in {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.tratok-nh-card-media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.tratok-nh-card-media img,
.tratok-nh-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.tratok-nh-card:hover .tratok-nh-card-media img {
	transform: scale(1.05);
}

.tratok-nh-card-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px;
	flex: 1;
}

/* Meta row: source badge + name + date */

.tratok-nh-meta {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 13px;
}

.tratok-nh-badge {
	position: relative;
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid var(--tnh-line);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.tratok-nh-badge img {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 18px;
	height: 18px;
	z-index: 1;
}

.tratok-nh-badge-letter {
	font-family: 'Playfair Display', Georgia, serif;
	font-weight: 700;
	font-size: 14px;
	color: var(--tnh-gold);
}

.tratok-nh-source {
	font-weight: 700;
	color: var(--tnh-gold-bright);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tratok-nh-date {
	margin-left: auto;
	color: var(--tnh-muted);
	white-space: nowrap;
}

/* Title + excerpt */

.tratok-nh-card-title {
	margin: 0;
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.tratok-nh-link {
	color: #f0f4fb;
	text-decoration: none;
	transition: color 0.2s ease;
}

/* Whole card is clickable via a stretched link. */
.tratok-nh-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
}

.tratok-nh-card:hover .tratok-nh-link,
.tratok-nh-hero:hover .tratok-nh-link {
	color: var(--tnh-gold-bright);
}

.tratok-nh-link:focus-visible {
	outline: 2px solid var(--tnh-gold);
	outline-offset: 3px;
	border-radius: 4px;
}

.tratok-nh-excerpt {
	margin: 0;
	font-size: 14.5px;
	color: var(--tnh-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Footer row */

.tratok-nh-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 4px;
}

.tratok-nh-tag {
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tnh-teal-bright);
	background: rgba(59, 181, 168, 0.12);
	border: 1px solid rgba(59, 181, 168, 0.3);
	border-radius: 999px;
	padding: 4px 11px;
	white-space: nowrap;
}

.tratok-nh-read {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--tnh-gold);
	white-space: nowrap;
}

.tratok-nh-arrow {
	display: inline-block;
	transition: transform 0.2s ease;
}

.tratok-nh-card:hover .tratok-nh-arrow,
.tratok-nh-hero:hover .tratok-nh-arrow {
	transform: translateX(4px);
}

/* ---------------------------------------------------------------
 * Empty state, Load More
 * --------------------------------------------------------------- */

.tratok-nh-empty {
	position: relative;
	text-align: center;
	padding: 48px 20px;
	color: var(--tnh-muted);
}

.tratok-nh-empty[hidden] {
	display: none;
}

.tratok-nh-empty-mark {
	margin: 0 0 10px;
	font-size: 30px;
	color: var(--tnh-gold);
	opacity: 0.6;
}

.tratok-nh-more-wrap {
	position: relative;
	text-align: center;
	margin-top: 32px;
}

.tratok-nh-more-wrap[hidden] {
	display: none;
}

.tratok-nh-more {
	appearance: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: transparent;
	border: 1px solid var(--tnh-gold);
	border-radius: 999px;
	padding: 12px 30px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--tnh-gold-bright);
	transition: background 0.2s ease, transform 0.2s ease;
}

.tratok-nh-more:hover {
	background: rgba(212, 168, 83, 0.12);
	transform: translateY(-1px);
}

.tratok-nh-more:focus-visible {
	outline: 2px solid var(--tnh-gold);
	outline-offset: 3px;
}

.tratok-nh-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(232, 195, 106, 0.3);
	border-top-color: var(--tnh-gold-bright);
	border-radius: 50%;
	animation: tratok-nh-spin 0.7s linear infinite;
}

.tratok-nh-more.is-loading .tratok-nh-spinner {
	display: inline-block;
}

@keyframes tratok-nh-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------------------------------------------------------------
 * Responsive + reduced motion
 * --------------------------------------------------------------- */

@media (max-width: 760px) {
	.tratok-nh-hero.has-media {
		grid-template-columns: 1fr;
	}

	.tratok-nh-hero-media {
		order: -1;
		min-height: 200px;
	}

	.tratok-nh-hero-media::after {
		background: linear-gradient(0deg, var(--tnh-card-2), transparent 55%);
	}

	.tratok-nh-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.tratok-nh-search {
		flex: 1 1 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tratok-news-hub *,
	.tratok-news-hub *::after {
		transition: none !important;
		animation: none !important;
	}
}
