:root {
	--news-ink: #1f3a44;
	--news-strong: #075e63;
	--news-muted: #607781;
	--news-teal: #047d80;
	--news-teal-dark: #055f63;
	--news-soft: #e8fbfb;
	--news-page: #f4fbfc;
	--news-surface: #ffffff;
	--news-line: #d9e8eb;
	--news-coral: #ff6f61;
	--news-focus: rgba(4, 125, 128, 0.2);
}

* {
	box-sizing: border-box;
}

html,
body {
	min-height: 100%;
	margin: 0;
	font-family: "Mitr", "Sarabun", "Noto Sans Thai", Tahoma, sans-serif;
	color: var(--news-ink);
	background: var(--news-page);
}

html,
body,
.news-page,
.news-library,
.news-tabs {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.news-page::-webkit-scrollbar,
.news-library::-webkit-scrollbar,
.news-tabs::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body {
	overflow-x: hidden;
}

button,
a {
	font-family: inherit;
}

a,
a:hover {
	text-decoration: none;
}

.news-page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background:
		radial-gradient(
			circle at 86% 10%,
			rgba(4, 125, 128, 0.09),
			transparent 28rem
		),
		linear-gradient(180deg, #f8fdfd 0, var(--news-page) 38rem);
}

.news-topbar {
	min-height: 88px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 12px max(28px, calc((100vw - 1240px) / 2));
	background: rgba(255, 255, 255, 0.94);
	border-bottom: 1px solid rgba(4, 125, 128, 0.12);
	position: relative;
	z-index: 10;
}

.news-brand {
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--news-strong);
}

.news-brand:hover,
.news-brand:focus {
	color: var(--news-strong);
}

.news-brand__logo {
	width: 60px;
	height: 60px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 60px;
	overflow: hidden;
}

.news-brand__logo img {
	width: 58px;
	height: 58px;
	object-fit: contain;
}

.news-brand__text strong,
.news-brand__text span {
	display: block;
}

.news-brand__text strong {
	font-size: 1.18rem;
	line-height: 1.25;
	font-weight: 600;
}

.news-brand__text span {
	margin-top: 3px;
	color: var(--news-muted);
	font-size: 0.82rem;
	line-height: 1.35;
}

.news-nav {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
}

.news-nav__link {
	min-height: 42px;
	padding: 0 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1px solid rgba(4, 125, 128, 0.3);
	border-radius: 999px;
	color: var(--news-teal-dark);
	background: #fff;
	font-size: 0.9rem;
	font-weight: 500;
	white-space: nowrap;
	transition:
		background-color 180ms ease,
		border-color 180ms ease,
		color 180ms ease,
		transform 180ms ease;
}

.news-nav__link:hover,
.news-nav__link:focus-visible {
	color: #fff;
	background: var(--news-teal);
	border-color: var(--news-teal);
	transform: translateY(-1px);
}

.news-nav__link--primary {
	color: #fff;
	background: var(--news-teal);
	border-color: var(--news-teal);
}

.news-nav__link--primary:hover,
.news-nav__link--primary:focus-visible {
	background: var(--news-teal-dark);
	border-color: var(--news-teal-dark);
}

.news-main {
	width: min(1240px, calc(100% - 48px));
	margin: 0 auto;
	padding: 40px 0 64px;
	flex: 1;
}

.news-hero {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
	padding: 10px 0 34px;
}

.news-hero__content {
	max-width: 780px;
}

.news-breadcrumb {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	color: var(--news-muted);
	font-size: 0.88rem;
}

.news-breadcrumb a {
	color: var(--news-teal-dark);
}

.news-hero h1 {
	margin: 0;
	color: var(--news-strong);
	font-size: 2.35rem;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.news-hero p {
	max-width: 72ch;
	margin: 15px 0 0;
	color: var(--news-muted);
	font-size: 1rem;
	line-height: 1.75;
	text-wrap: pretty;
}

.news-hero__summary {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
}

.news-hero__summary span {
	min-height: 44px;
	padding: 0 15px;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	border-radius: 999px;
	color: var(--news-muted);
	background: var(--news-soft);
	font-size: 0.88rem;
}

.news-hero__summary strong {
	color: var(--news-teal-dark);
	font-size: 1.12rem;
	font-weight: 600;
}

.news-library {
	overflow: hidden;
	border-radius: 16px;
	background: var(--news-surface);
	box-shadow: 0 8px 24px rgba(31, 58, 68, 0.09);
}

.news-tabs {
	display: flex;
	gap: 6px;
	padding: 12px 18px 0;
	border-bottom: 1px solid var(--news-line);
	overflow-x: auto;
}

.news-tab {
	min-height: 52px;
	padding: 0 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	position: relative;
	border: 0;
	border-radius: 10px 10px 0 0;
	color: var(--news-muted);
	background: transparent;
	font-size: 0.96rem;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
	transition:
		color 180ms ease,
		background-color 180ms ease;
}

.news-tab::after {
	content: "";
	height: 3px;
	position: absolute;
	right: 16px;
	bottom: -1px;
	left: 16px;
	border-radius: 3px 3px 0 0;
	background: transparent;
}

.news-tab:hover {
	color: var(--news-teal-dark);
	background: rgba(232, 251, 251, 0.65);
}

.news-tab.is-active {
	color: var(--news-teal-dark);
}

.news-tab.is-active::after {
	background: var(--news-teal);
}

.news-tab span {
	min-width: 25px;
	height: 25px;
	padding: 0 7px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	color: var(--news-teal-dark);
	background: var(--news-soft);
	font-size: 0.78rem;
}

.news-tab:focus-visible,
.document-card__link:focus-visible,
.video-card__button:focus-visible,
.news-nav__link:focus-visible,
.news-brand:focus-visible,
.news-breadcrumb a:focus-visible {
	outline: 3px solid var(--news-focus);
	outline-offset: 3px;
}

.news-panel {
	padding: 30px;
}

.news-panel[hidden] {
	display: none;
}

.news-section-heading {
	margin-bottom: 24px;
}

.news-section-heading h2 {
	margin: 0;
	color: var(--news-ink);
	font-size: 1.35rem;
	line-height: 1.3;
	font-weight: 600;
}

.news-section-heading p {
	margin: 7px 0 0;
	color: var(--news-muted);
	font-size: 0.9rem;
	line-height: 1.6;
}

.document-grid,
.video-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.document-card,
.video-card {
	min-width: 0;
}

.document-card__link,
.video-card__button {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--news-line);
	border-radius: 14px;
	color: var(--news-ink);
	background: #fff;
	text-align: left;
	transition:
		border-color 180ms ease,
		transform 180ms ease,
		box-shadow 180ms ease;
}

.video-card__button {
	padding: 0;
	cursor: pointer;
}

.document-card__link:hover,
.video-card__button:hover {
	color: var(--news-ink);
	border-color: rgba(4, 125, 128, 0.48);
	transform: translateY(-3px);
	box-shadow: 0 8px 16px rgba(31, 58, 68, 0.09);
}

.document-card__preview,
.video-card__preview {
	width: 100%;
	aspect-ratio: 4 / 3;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #eef7f8;
}

.document-card__preview {
	padding: 14px;
}

.document-card__preview img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.video-card__preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 220ms ease;
}

.video-card__button:hover .video-card__preview img {
	transform: scale(1.025);
}

.document-card__format {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 4px 8px;
	border-radius: 999px;
	color: #fff;
	background: #c53b4b;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.03em;
}

.document-card__body,
.video-card__body {
	padding: 17px;
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
}

.document-card__type,
.video-card__number {
	margin-bottom: 8px;
	color: var(--news-teal-dark);
	font-size: 0.78rem;
	font-weight: 500;
}

.document-card h3,
.video-card strong {
	margin: 0;
	color: var(--news-ink);
	font-size: 0.96rem;
	line-height: 1.6;
	font-weight: 500;
	text-wrap: pretty;
}

.document-card__action,
.video-card__action {
	margin-top: auto;
	padding-top: 15px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--news-teal-dark);
	font-size: 0.82rem;
	font-weight: 500;
}

.video-card__play {
	width: 54px;
	height: 54px;
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: #fff;
	background: rgba(5, 95, 99, 0.92);
	box-shadow: 0 6px 12px rgba(5, 55, 58, 0.2);
	font-size: 1rem;
	transition:
		background-color 180ms ease,
		transform 180ms ease;
}

.video-card__button:hover .video-card__play {
	background: var(--news-coral);
	transform: scale(1.06);
}

.news-footer {
	padding: 22px 24px;
	border-top: 1px solid var(--news-line);
	color: var(--news-muted);
	background: #fff;
	text-align: center;
}

.news-footer p {
	margin: 0;
	font-size: 0.82rem;
	line-height: 1.6;
}

.news-video-modal .modal-content {
	overflow: hidden;
	border: 0;
	border-radius: 14px;
}

.news-video-modal .modal-header {
	align-items: flex-start;
	padding: 18px 20px;
	border-bottom: 1px solid var(--news-line);
}

.news-video-modal .modal-title {
	max-width: calc(100% - 42px);
	color: var(--news-ink);
	font-size: 1.08rem;
	line-height: 1.5;
	font-weight: 500;
}

.news-video-modal .close {
	width: 38px;
	height: 38px;
	margin: -5px -7px -5px auto;
	padding: 0;
	border-radius: 50%;
	color: var(--news-ink);
}

.news-video-modal .modal-body {
	padding: 0;
	background: #061719;
}

.news-video-frame {
	width: 100%;
	aspect-ratio: 16 / 9;
}

.news-video-frame iframe {
	width: 100%;
	height: 100%;
	display: block;
	border: 0;
}

@media (max-width: 1040px) {
	.document-grid,
	.video-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.news-brand__text span {
		max-width: 260px;
	}
}

@media (max-width: 820px) {
	.news-topbar {
		align-items: flex-start;
		padding: 14px 24px;
	}
	.news-brand__text span {
		display: none;
	}
	.news-nav__link span {
		display: none;
	}
	.news-nav__link {
		width: 42px;
		padding: 0;
	}
	.news-main {
		width: min(100% - 36px, 1240px);
		padding-top: 30px;
	}
	.news-hero {
		align-items: flex-start;
		flex-direction: column;
		gap: 22px;
	}
	.document-grid,
	.video-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 540px) {
	.news-topbar {
		min-height: 74px;
		align-items: center;
		gap: 10px;
		padding: 10px 16px;
	}
	.news-brand {
		gap: 9px;
	}
	.news-brand__logo {
		width: 48px;
		height: 48px;
		flex-basis: 48px;
	}
	.news-brand__logo img {
		width: 46px;
		height: 46px;
	}
	.news-brand__text strong {
		font-size: 0.95rem;
	}
	.news-nav {
		gap: 6px;
	}
	.news-nav__link {
		width: 38px;
		min-height: 38px;
	}
	.news-nav__link:nth-child(2) {
		display: none;
	}
	.news-main {
		width: calc(100% - 24px);
		padding: 24px 0 40px;
	}
	.news-hero {
		padding-bottom: 26px;
	}
	.news-hero h1 {
		font-size: 1.8rem;
	}
	.news-hero p {
		font-size: 0.92rem;
	}
	.news-hero__summary {
		width: 100%;
	}
	.news-hero__summary span {
		flex: 1;
		justify-content: center;
	}
	.news-tabs {
		padding: 8px 8px 0;
	}
	.news-tab {
		flex: 1 0 auto;
		padding: 0 12px;
		font-size: 0.88rem;
	}
	.news-panel {
		padding: 22px 14px;
	}
	.document-grid,
	.video-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}
	.document-card__preview,
	.video-card__preview {
		aspect-ratio: 16 / 10;
	}
	.news-video-modal .modal-dialog {
		margin: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
