/* Tin tức 2027 – template-news-2027.php, loaded after site-2027.css.
   The page is UX Builder output (Flatsome markup) outside .vmt-h27; the [blog_posts] elements are printed with the
   classes below by inc/home-2027/news.php:
   .vmt-news-lead (lead story + its next posts), .vmt-news-grid (cards), .vmt-news-more; .vmt-news-hidden marks an
   element hidden on this template (titles only), whose column is hidden too.
   The page also carries its own <style> block (orange sidebar headings, column paddings): rules here that must beat it,
   or Flatsome's per-element <style> with an id selector, say so. Mobile first. */

.vmt-news-page {
	background: #ffffff;
}
.vmt-news-content {
	color: var(--ink-2);
	-webkit-font-smoothing: antialiased;
}
.vmt-news-content :where(h1, h2, h3, h4, p) {
	letter-spacing: normal;
	text-transform: none;
}

/* ---------- Page rhythm: everything lines up with the 2027 header (1200px inside the --gutter padding) ---------- */
.vmt-news-content .section {
	/* Beats the padding Flatsome prints for the section in an id-selector <style>. */
	padding-top: clamp(28px, 4.5vw, 64px) !important;
	padding-bottom: clamp(56px, 8vw, 112px) !important;
}
.vmt-news-content .section-content > :is(.container, .row, .vmt-news-grid, .vmt-news-more) {
	width: 100%;
	max-width: calc(1200px + 2 * var(--gutter));
	margin-right: auto;
	margin-left: auto;
	padding-right: var(--gutter);
	padding-left: var(--gutter);
}

/* ---------- Page title and intro ---------- */
.vmt-news-content .section-title-container {
	margin-bottom: 0;
}
.vmt-news-content .section-title {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
}
.vmt-news-content .section-title b {
	display: none;
}
.vmt-news-content .section-title .section-title-main {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--ink);
	font-family: var(--serif);
	font-weight: 600;
	text-wrap: balance;
}
.vmt-news-content h1.section-title .section-title-main {
	font-size: clamp(32px, 5.2vw, 56px);
	line-height: 1.08;
	letter-spacing: -0.015em;
}
.vmt-news-content h2.section-title .section-title-main {
	font-size: clamp(26px, 3.2vw, 38px);
	line-height: 1.15;
	letter-spacing: -0.01em;
}
/* The intro: the plain paragraph staff wrote under the title. */
.vmt-news-content .section-content > .container:not(.section-title-container) > p {
	max-width: 62ch;
	margin: clamp(14px, 1.6vw, 20px) 0 0;
	color: var(--ink-2);
	font-size: clamp(16px, 1.3vw, 18px);
	line-height: 1.7;
}

/* ---------- Top row: lead story and the sidebar (video, promo) ---------- */
/* A column holding only a hidden element (the title list) is not shown; in UX Builder it stays, with its note. */
body:not(.ux-builder-iframe) .vmt-news-content .row > .col:has(> .col-inner > .vmt-news-hidden) {
	display: none;
}
.vmt-news-hidden-note {
	margin: 0;
	padding: 16px;
	border: 1px dashed var(--line);
	border-radius: var(--radius-sm);
	color: var(--ink-2);
	font-size: 14px;
}
.vmt-news-content .section-content > .row:has(.vmt-news-lead) {
	display: flex;
	flex-wrap: wrap;
	gap: 48px 40px;
	margin-top: clamp(28px, 4vw, 48px);
}
.vmt-news-content .row:has(.vmt-news-lead) > .col {
	flex: 1 1 100%;
	max-width: 100%;
	padding: 0;
}
/* Column paddings set in UX Builder (and the page's own 8px) would push the content off the grid: beats the id rules.
   The border: the page's own pink frame around its second column. */
.vmt-news-content .row:has(.vmt-news-lead) > .col > .col-inner {
	padding: 0 !important;
	border: 0;
}
/* Desktop: the lead column takes two thirds, the sidebar one third, so both end at about the same height (the widths
   staff gave, 5 and 3 of 12, were made for three columns). */
@media (min-width: 1100px) {
	.vmt-news-content .row:has(.vmt-news-lead) > .col {
		flex: 1 1 0;
		max-width: none;
	}
	.vmt-news-content .row:has(.vmt-news-lead) > .col:has(.vmt-news-lead) {
		flex-grow: 2;
	}
}

/* ---------- Shared post parts ---------- */
.vmt-news-item {
	position: relative;
	min-width: 0;
}
.vmt-news-media {
	display: block;
	overflow: hidden;
	aspect-ratio: 3 / 2;
	border-radius: var(--radius);
	background: var(--tint);
	/* Keeps the rounded corners while the image scales on hover (Safari). */
	isolation: isolate;
}
.vmt-news-content .vmt-news-img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform 0.8s var(--ease);
}
.vmt-news-content .vmt-news-title {
	margin: 0;
	padding: 0;
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	text-wrap: pretty;
}
.vmt-news-content .vmt-news-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.25s var(--ease);
}
/* The title link covers the whole post: one link, one tab stop, the image and text are all clickable. */
.vmt-news-content .vmt-news-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.vmt-news-content .vmt-news-title a:focus-visible {
	outline: none;
}
.vmt-news-item:has(.vmt-news-link:focus-visible) {
	outline: 2px solid var(--accent);
	outline-offset: 6px;
	border-radius: var(--radius-sm);
}
.vmt-news-content .vmt-news-excerpt {
	display: -webkit-box;
	overflow: hidden;
	margin: 10px 0 0;
	color: var(--ink-2);
	font-size: 15px;
	line-height: 1.6;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}
.vmt-news-content .vmt-news-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 8px;
	margin: 8px 0 0;
	color: var(--ink-3);
	font-size: 13px;
	line-height: 1.5;
	font-variant-numeric: tabular-nums;
}
.vmt-news-meta > * + *::before {
	content: "·";
	margin-right: 8px;
}
@media (hover: hover) {
	.vmt-news-item:hover .vmt-news-img {
		transform: scale(1.04);
	}
	.vmt-news-content .vmt-news-item:hover .vmt-news-title a {
		color: var(--accent-strong);
	}
}

/* ---------- Lead story ---------- */
/* Phones: photo on top. From 768px: photo on the left, text beside it, the next posts as three cards below. */
.vmt-news-item--lead .vmt-news-media {
	aspect-ratio: 16 / 10;
	border-radius: 24px;
}
.vmt-news-item--lead .vmt-news-body {
	padding-top: 20px;
}
.vmt-news-content .vmt-news-item--lead .vmt-news-title {
	font-family: var(--serif);
	font-size: clamp(23px, 2.3vw, 30px);
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-wrap: balance;
}
.vmt-news-content .vmt-news-item--lead .vmt-news-excerpt {
	margin-top: 12px;
	font-size: 16px;
	-webkit-line-clamp: 3;
}
.vmt-news-content .vmt-news-item--lead .vmt-news-meta {
	margin-top: 14px;
}
/* The next posts of the lead element: rows like the latest posts below on phones, cards from 768px. */
.vmt-news-rows {
	display: grid;
	gap: 22px;
	margin-top: 32px;
}
.vmt-news-item--row {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}
.vmt-news-item--row .vmt-news-media {
	aspect-ratio: 4 / 3;
	border-radius: var(--radius-sm);
}
.vmt-news-content .vmt-news-item--row .vmt-news-title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}
.vmt-news-content .vmt-news-item--row .vmt-news-meta {
	margin-top: 6px;
}
@media (min-width: 768px) {
	.vmt-news-item--lead {
		display: grid;
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
		gap: 32px;
		align-items: center;
	}
	.vmt-news-item--lead .vmt-news-media {
		aspect-ratio: 4 / 3;
	}
	.vmt-news-item--lead .vmt-news-body {
		padding-top: 0;
	}
	.vmt-news-content .vmt-news-item--lead .vmt-news-excerpt {
		-webkit-line-clamp: 4;
	}
	.vmt-news-rows {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 32px 24px;
		margin-top: 36px;
	}
	.vmt-news-item--row {
		display: block;
	}
	.vmt-news-item--row .vmt-news-media {
		aspect-ratio: 3 / 2;
		border-radius: var(--radius);
	}
	.vmt-news-item--row .vmt-news-body {
		padding-top: 14px;
	}
	.vmt-news-content .vmt-news-item--row .vmt-news-title {
		-webkit-line-clamp: 2;
	}
}

/* ---------- Sidebar column: the headings, video and promo image staff placed ---------- */
/* Beats the page's own ".cot3-title h4" (orange bar with white text). */
.vmt-news-content .cot3-title {
	margin: 0 0 14px;
}
.vmt-news-content .cot3-title h4 {
	margin: 0;
	padding: 0;
	border-radius: 0;
	background: none;
	color: var(--ink);
	font-family: var(--serif);
	font-size: 21px;
	font-weight: 600;
	line-height: 1.25;
}
.vmt-news-content .col-inner > div:not([class]) + .cot3-title,
.vmt-news-content .col-inner > .img + .cot3-title {
	margin-top: 32px;
}
/* The video's inline style fixes its height at 230px with small bottom-only corners. */
.vmt-news-content .col-inner > div:not([class]) > video {
	display: block;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 16 / 10;
	border-radius: var(--radius) !important;
	background: var(--ink);
	object-fit: cover;
}
.vmt-news-content .col:has(.cot3-title) .img {
	overflow: hidden;
	border-radius: var(--radius);
	isolation: isolate;
}
.vmt-news-content .col:has(.cot3-title) .img .img-inner {
	border-radius: var(--radius);
}
.vmt-news-content .col:has(.cot3-title) .img img {
	transition: transform 0.8s var(--ease);
}
@media (hover: hover) {
	.vmt-news-content .col:has(.cot3-title) .img:hover img {
		transform: scale(1.04);
	}
}
/* Tablet: video and promo side by side under the lead story. */
@media (min-width: 768px) and (max-width: 1099px) {
	.vmt-news-content .col:has(.cot3-title) > .col-inner {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: auto auto;
		grid-auto-flow: column;
		gap: 0 40px;
	}
	.vmt-news-content .col:has(.cot3-title) > .col-inner > .cot3-title {
		margin-top: 0;
	}
}

/* ---------- Latest posts ---------- */
.vmt-news-content .section-content > .row + .section-title-container {
	margin-top: clamp(56px, 8vw, 104px);
}
/* Phones: compact rows (image beside the title), the way news apps list stories; cards from 640px. */
.vmt-news-grid {
	display: grid;
	gap: 22px;
	margin-top: clamp(22px, 3vw, 36px);
}
.vmt-news-item--card {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}
.vmt-news-item--card .vmt-news-media {
	aspect-ratio: 4 / 3;
	border-radius: var(--radius-sm);
}
.vmt-news-content .vmt-news-item--card .vmt-news-title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}
.vmt-news-content .vmt-news-item--card .vmt-news-excerpt {
	display: none;
}
.vmt-news-content .vmt-news-item--card .vmt-news-meta {
	margin-top: 6px;
}
@media (min-width: 640px) {
	.vmt-news-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 44px 28px;
	}
	.vmt-news-item--card {
		display: block;
	}
	.vmt-news-item--card .vmt-news-media {
		aspect-ratio: 3 / 2;
		border-radius: var(--radius);
	}
	.vmt-news-item--card .vmt-news-body {
		padding-top: 16px;
	}
	.vmt-news-content .vmt-news-item--card .vmt-news-title {
		font-family: var(--serif);
		font-size: 19px;
		line-height: 1.3;
		-webkit-line-clamp: 2;
	}
	.vmt-news-content .vmt-news-item--card .vmt-news-excerpt {
		display: -webkit-box;
	}
}
@media (min-width: 1024px) {
	.vmt-news-grid {
		grid-template-columns: repeat(min(var(--vmt-news-cols, 4), 4), minmax(0, 1fr));
		gap: 52px 28px;
	}
}

/* ---------- Load more ---------- */
.vmt-news-content .vmt-news-more {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-top: clamp(40px, 5vw, 64px);
}
.vmt-news-content .vmt-news-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 0 28px;
	border: 1px solid var(--ink);
	border-radius: var(--radius-sm);
	color: var(--ink);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition:
		background-color 0.25s var(--ease),
		color 0.25s var(--ease),
		transform 0.2s var(--ease);
}
.vmt-news-content .vmt-news-more-btn:hover {
	background: var(--ink);
	color: #ffffff;
}
.vmt-news-content .vmt-news-more-btn:active {
	transform: translateY(1px);
}
.vmt-news-content .vmt-news-more-btn[aria-busy="true"] {
	pointer-events: none;
	opacity: 0.6;
}
.vmt-news-content .vmt-news-status {
	min-height: 1.5em;
	margin: 0;
	color: var(--ink-2);
	font-size: 14px;
}
.vmt-news-content .vmt-news-status:empty {
	min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
	.vmt-news-content .vmt-news-img,
	.vmt-news-content .col:has(.cot3-title) .img img,
	.vmt-news-content .vmt-news-more-btn,
	.vmt-news-content .vmt-news-title a {
		transition: none;
	}
	.vmt-news-item:hover .vmt-news-img,
	.vmt-news-content .col:has(.cot3-title) .img:hover img {
		transform: none;
	}
}
