/* =====================================================
   NEWS — editorial listing page
   Own page skin: shared tokens from main.css + home-2.css
===================================================== */

body.page-news {
	background: var(--h2-bg);
	color: var(--h2-ink);
	font-family: var(--font);
	-webkit-font-smoothing: antialiased;
}

body.page-news .h2-nav:not(.is-scrolled) {
	background: transparent;
	border-bottom-color: transparent;
}

.news-page {
	background: var(--h2-bg);
	color: var(--h2-ink);
	overflow: hidden;
}

.news-page .container {
	max-width: var(--h2-max);
	padding-left: var(--h2-pad);
	padding-right: var(--h2-pad);
}

/* =====================================================
   1. HERO — Featured story (full-bleed carousel)
===================================================== */
.news-hero.hero-shell {
	color: #fff;
}

.news-hero-media-zoom {
	position: relative;
	width: 100%;
	height: 100%;
}

.news-hero-media-layer {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 40%;
	opacity: 0;
	transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: opacity;
}

.news-hero-media-layer.is-active {
	opacity: 1;
	z-index: 1;
}

.news-hero-media-layer.is-initial {
	opacity: 0;
	transform: scale(1.04);
	animation: news-hero-media-in 1.1s 0.05s var(--ease) forwards;
}

.news-hero-story[data-slide-ready] .news-hero-kicker,
.news-hero-story[data-slide-ready] .insights-featured-tag,
.news-hero-story[data-slide-ready] h1 {
	transition:
		opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-hero-story.is-fading-copy .news-hero-kicker,
.news-hero-story.is-fading-copy .insights-featured-tag,
.news-hero-story.is-fading-copy h1 {
	opacity: 0;
	transform: translateY(10px);
}

.news-hero--story {
	/* Tối thiểu 16:9 theo chiều rộng màn hình (không theo chiều cao): zoom/độ phân giải không đổi vùng cắt ảnh.
	   Dùng min-height thay vì aspect-ratio để chữ dài hơn khung luôn đẩy hero cao thêm (Safari iOS cắt mất nội dung với aspect-ratio). */
	min-height: 56.25vw;
}

.news-hero--story .hero-shell__frame {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	max-width: var(--h2-max);
	margin: 0 auto;
	width: 100%;
	padding: calc(var(--h2-nav-h, var(--nav-h)) + clamp(24px, 4vh, 48px)) var(--h2-pad) clamp(72px, 12vh, 120px);
	box-sizing: border-box;
}

.news-hero--story .hero-shell__scrim,
.news-hero--story .news-hero-scrim {
	background: rgba(8, 8, 12, 0.66);
}

/* Ticker — topics crawl at hero base */
.news-hero-ticker {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	overflow: hidden;
	border-top: 1px solid rgba(42, 190, 236, 0.22);
	background: rgba(31, 30, 35, 0.55);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.news-hero-ticker-track {
	display: flex;
	align-items: stretch;
	width: max-content;
	gap: 20px;
	will-change: transform;
	animation: news-ticker-scroll var(--news-ticker-duration, 32s) linear infinite;
}

.news-hero-ticker-set {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-shrink: 0;
	padding: 10px 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.62);
}

.news-hero-ticker-dot {
	color: var(--cyan, #2abeec);
	opacity: 0.85;
}

@keyframes news-ticker-scroll {
	from { transform: translate3d(0, 0, 0); }
	to { transform: translate3d(var(--news-ticker-shift, -50%), 0, 0); }
}

.news-hero-story {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	width: 100%;
	max-width: 100%;
}

.news-hero-kicker {
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
}

.news-hero-story .insights-featured-tag {
	margin: 0;
}

.news-hero-story h1,
.news-hero-story .insights-featured-title {
	margin: 0;
	font-family: var(--font);
	font-size: clamp(28px, 3.6vw, 46px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.025em;
	color: #fff;
	text-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
	text-transform: none;
	max-width: min(820px, 92%);
}

.news-hero-story-actions {
	width: 100%;
	align-self: stretch;
	margin-top: 8px;
	padding-top: 14px;
	border-top: 1px solid rgba(var(--cyan-rgb), 0.55);
}

.insights-featured-read {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: var(--text-s);
	font-weight: var(--w-semibold);
	color: var(--cyan);
	text-decoration: none;
	transition: color 0.2s;
}

.insights-featured-read:hover,
.insights-featured-read:focus-visible {
	color: #fff;
}

.insights-featured-read-ico {
	font-size: 1.1em;
	line-height: 1;
}

.insights-featured-tag {
	display: table;
	align-self: flex-start;
	margin-bottom: 0;
	padding: 6px 11px;
	border-radius: var(--radius-pill);
	background: rgba(var(--cyan-rgb), 0.16);
	color: var(--cyan);
	font-size: var(--text-xs);
	font-weight: var(--w-medium);
	line-height: 1;
}

.insights-featured-actions {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.insights-featured-nav {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	margin-left: auto;
}

.insights-featured-nav button {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 50%;
	background: rgba(31, 30, 35, 0.65);
	color: #fff;
	transition: background 0.2s, border-color 0.2s;
}

.insights-featured-nav button:hover {
	border-color: var(--cyan);
	background: var(--cyan);
	color: #081016;
}

.insights-featured-count {
	min-width: 42px;
	font-size: var(--text-xs);
	font-weight: var(--w-medium);
	text-align: center;
	color: #fff;
}

@keyframes news-hero-media-in {
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* =====================================================
   2. TOPIC FILTER + ARTICLE GRID
===================================================== */
.insights-page {
	padding-top: 0;
	background: transparent;
}

.page-news--story .insights-listing {
	padding-top: var(--s-8);
}

.insights-listing {
	position: relative;
	padding: 0 0 var(--s-10);
	background: var(--bg);
}

.insights-listing-heading {
	margin: 0 0 18px;
	font-family: var(--font);
	font-size: clamp(22px, 2.4vw, 32px);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.15;
	color: #fff;
}

.insights-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
	padding: 0 0 var(--s-6);
	margin-bottom: 0;
	background: none;
}

.insights-filter-label {
	margin-right: 4px;
	font-size: var(--text-xs);
	font-weight: var(--w-medium);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.insights-filter-btn {
	padding: 7px 13px;
	font-family: var(--font);
	font-size: var(--text-xs);
	font-weight: var(--w-medium);
	color: var(--text-muted);
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--radius-pill);
	transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.insights-filter-btn:hover,
.insights-filter-btn:focus-visible {
	color: #fff;
	border-color: rgba(var(--cyan-rgb), 0.6);
}

.insights-filter-btn.is-active {
	color: #081016;
	background: var(--cyan);
	border-color: var(--cyan);
}

.insights-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 24px;
	padding-bottom: 12px;
}

.insight-card {
	grid-column: span 2;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	color: inherit;
	background: rgba(31, 30, 35, 0.52);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 0;
	transition: border-color 0.25s, transform 0.25s var(--ease), background 0.25s;
}

.insight-card--wide {
	grid-column: span 4;
}

.insight-card:hover,
.insight-card:focus-visible {
	background: rgba(17, 17, 32, 0.72);
	border-color: rgba(var(--cyan-rgb), 0.6);
	transform: translateY(-3px);
}

.insight-card-media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #13131a;
}

.insight-card--wide .insight-card-media {
	aspect-ratio: 21 / 9;
}

.insight-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.45s var(--ease);
}

.insight-card:hover .insight-card-media img {
	transform: scale(1.04);
}

.insight-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 9px;
	padding: 16px 18px 18px;
}

.insight-card-tag {
	font-size: 10px;
	font-weight: var(--w-semibold);
	letter-spacing: 0.05em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--cyan);
}

.insight-card-title {
	margin: 0;
	font-size: clamp(16px, 1.4vw, 19px);
	font-weight: var(--w-semibold);
	line-height: 1.35;
	letter-spacing: -0.01em;
	color: #fff;
}

.insight-card-meta {
	margin-top: auto;
	font-size: var(--text-xs);
	font-weight: var(--w-regular);
	color: var(--text-muted);
}

.insight-card-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
	font-size: var(--text-xs);
	font-weight: var(--w-semibold);
	color: var(--cyan);
}

.insight-card.is-hidden,
.insight-card.is-deferred {
	display: none;
}

.insights-more {
	display: flex;
	justify-content: center;
	padding: 28px 0 0;
}

.insights-more.is-hidden {
	display: none;
}

.insights-empty {
	display: none;
	padding: var(--s-9) 24px;
	margin: 0;
	text-align: center;
	color: var(--text-muted);
}

.insights-empty.is-visible {
	display: block;
}

@media (max-width: 1024px) {
	.news-hero-story h1 {
		font-size: clamp(26px, 4.2vw, 38px);
	}

	.insights-grid {
		gap: 18px;
	}
}

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

	.insight-card,
	.insight-card--wide {
		grid-column: span 1;
	}

	.insight-card--wide .insight-card-media {
		aspect-ratio: 16 / 10;
	}
}

@media (max-width: 768px) {
	.news-hero--story {
		aspect-ratio: 16 / 9;
		min-height: 0;
		height: auto;
		width: 100%;
	}

	.news-hero--story .hero-shell__frame {
		aspect-ratio: auto;
		min-height: 0;
		height: 100%;
		padding-top: var(--h2-nav-h, var(--nav-h));
		padding-bottom: 32px;
	}

	.news-hero-story {
		gap: 2px;
	}

	.news-hero-story .insights-featured-title {
		font-size: clamp(16px, 4.4vw, 22px);
		line-height: 1.05;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
	}

	.news-hero-story-actions {
		margin-top: 0;
		padding-top: 4px;
		flex-wrap: nowrap;
		gap: 12px;
	}

	.insights-featured-nav button {
		width: 28px;
		height: 28px;
	}

	.news-hero-ticker-set {
		padding: 6px 0;
	}

	.insights-featured-read {
		font-size: var(--text-xs);
	}

	.insights-filter {
		gap: 8px;
		padding-bottom: var(--s-5);
	}

	.insights-filter-label {
		width: 100%;
		margin-right: 0;
	}

	.insights-grid {
		grid-template-columns: 1fr;
	}

	.insight-card,
	.insight-card--wide {
		grid-column: span 1;
	}
}

@media (prefers-reduced-motion: reduce) {

	.news-hero-media-layer,
	.news-hero-media-zoom,
	.news-hero-ticker-track {
		opacity: 1;
		transform: none;
		animation: none;
	}
}
