/* Modern news detail page. Scoped to avoid changing category and search pages. */
.news-detail-page {
	position: relative;
	margin: 0;
	padding: 28px 0 64px;
	background:
		radial-gradient(circle at 8% 5%, color-mix(in srgb, var(--theme-color) 7%, transparent) 0, transparent 24rem),
		linear-gradient(180deg, var(--theme-background) 0%, color-mix(in srgb, var(--theme-background) 65%, var(--theme-surface)) 32rem);
}

.news-detail-page .breadcrumb-wrapper {
	margin-bottom: 18px;
}

.news-detail-page .breadcrumb-custom {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 8px;
	overflow: hidden;
	padding: 10px 14px;
	background: color-mix(in srgb, var(--theme-surface) 88%, transparent);
	border: 1px solid #e5eaf1;
	border-radius: 12px;
	box-shadow: 0 5px 16px rgba(15, 23, 42, .04);
	font-size: 12px;
	list-style: none;
}

.news-detail-page .breadcrumb-custom li {
	display: inline-flex;
	align-items: center;
	min-width: 0;
	padding: 0;
	white-space: nowrap;
}

.news-detail-page .breadcrumb-custom > li + li::before {
	padding: 0 2px 0 0;
	color: #a1acba;
}

.news-detail-page .breadcrumb-custom a {
	color: #64748b;
	font-weight: 600;
	text-decoration: none;
}

.news-detail-page .breadcrumb-custom a:hover {
	color: var(--theme-color);
	text-decoration: none;
}

.news-detail-page .breadcrumb-custom .active {
	overflow: hidden;
	color: #334155;
	font-weight: 700;
	text-overflow: ellipsis;
}

.news-detail-page .news-card {
	overflow: hidden;
	background: var(--theme-surface);
	border: 1px solid #e5eaf1;
	border-radius: 22px;
	box-shadow: 0 22px 55px rgba(15, 23, 42, .1);
	color: var(--theme-text);
}

.news-detail-page .news-cover {
	position: relative;
	top: auto;
	z-index: 0;
	min-height: 430px;
	max-height: 600px;
	margin-bottom: 0;
	background: #14213a;
	border: 0;
	box-shadow: none;
}

.news-detail-page .news-cover > img {
	display: block;
	width: 100%;
	height: clamp(430px, 55vw, 600px);
	max-height: none;
	object-fit: cover;
}

.news-detail-page .news-cover::after {
	position: absolute;
	inset: 0;
	content: "";
	background: linear-gradient(180deg, rgba(7, 17, 34, .03) 22%, rgba(7, 17, 34, .92) 100%);
	pointer-events: none;
}

.news-detail-page .news-cover-overlay {
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: clamp(28px, 5vw, 58px);
	background: none;
}

.news-detail-page .news-kicker {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 10px;
	color: #dbeafe;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
}

.news-detail-page .news-private-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 11px;
	padding: 6px 10px;
	background: rgba(245, 158, 11, .18);
	border: 1px solid rgba(253, 230, 138, .45);
	border-radius: 999px;
	color: #fef3c7;
	font-size: 12px;
	font-weight: 800;
	backdrop-filter: blur(8px);
}

.news-detail-page .news-category {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.news-detail-page .news-category-link {
	display: inline-flex;
	align-items: center;
	padding: 6px 11px;
	background: var(--theme-color);
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: 999px;
	box-shadow: 0 5px 14px rgba(0, 0, 0, .14);
	color: #fff !important;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none !important;
}

.news-detail-page .news-category-link:hover {
	transform: translateY(-1px);
	filter: brightness(1.08);
}

.news-detail-page .news-cover-overlay .news-title,
.news-detail-page .news-no-cover .news-title {
	max-width: 940px;
	margin: 10px 0 18px;
	padding: 0;
	background: transparent;
	border: 0;
	font-size: clamp(28px, 4vw, 48px);
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: -.025em;
}

.news-detail-page .news-cover-overlay .news-title {
	color: #fff;
	text-shadow: 0 3px 20px rgba(0, 0, 0, .35);
}

.news-detail-page .news-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 12px;
}

.news-detail-page .news-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 11px;
	background: rgba(255, 255, 255, .14);
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 999px;
	color: #fff;
	font-weight: 600;
	backdrop-filter: blur(8px);
}

.news-detail-page .news-meta-item i {
	margin: 0;
	color: #bfdbfe;
}

.news-detail-page .news-no-cover {
	position: relative;
	top: auto;
	z-index: 0;
	overflow: hidden;
	padding: clamp(34px, 6vw, 68px);
	margin-bottom: 0;
	background: linear-gradient(135deg, #101c31, color-mix(in srgb, var(--theme-color) 80%, #101c31));
	border: 0;
	box-shadow: none;
}

.news-detail-page .news-no-cover::after {
	position: absolute;
	top: -130px;
	right: -80px;
	width: 340px;
	height: 340px;
	border: 55px solid rgba(255, 255, 255, .05);
	border-radius: 50%;
	content: "";
}

.news-detail-page .news-no-cover > * {
	position: relative;
	z-index: 1;
}

.news-detail-page .news-no-cover .news-kicker,
.news-detail-page .news-no-cover .news-title {
	color: #fff;
}

.news-detail-page .news-no-cover .news-category {
	margin: 6px 0;
}

.news-detail-page .news-body {
	padding: clamp(28px, 5vw, 62px);
}

.news-detail-page .news-content {
	max-width: 900px;
	margin: 0 auto;
	color: #334155;
	font-size: clamp(16px, 1.45vw, 18px);
	line-height: 1.9;
	overflow-wrap: anywhere;
}

.news-detail-page .news-content > :first-child {
	margin-top: 0;
}

.news-detail-page .news-content > :last-child {
	margin-bottom: 0;
}

.news-detail-page .news-content h2,
.news-detail-page .news-content h3,
.news-detail-page .news-content h4 {
	margin: 1.7em 0 .65em;
	color: #172033;
	font-weight: 800;
	line-height: 1.4;
}

.news-detail-page .news-content p,
.news-detail-page .news-content ul,
.news-detail-page .news-content ol {
	margin-bottom: 1.25em;
}

.news-detail-page .news-content img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 28px auto;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
}

.news-detail-page .news-content blockquote {
	margin: 28px 0;
	padding: 18px 22px;
	background: var(--surface-soft);
	border: 0;
	border-left: 4px solid var(--theme-color);
	border-radius: 0 12px 12px 0;
	color: #475569;
}

.news-detail-page .news-content pre {
	max-width: 100%;
	overflow-x: auto;
	padding: 18px;
	background: #111827;
	border-radius: 12px;
	color: #e5e7eb;
	font-size: 14px;
	line-height: 1.7;
}

.news-detail-page .news-content table {
	display: table;
	width: 100% !important;
	max-width: 100%;
	height: auto !important;
	margin: 24px 0;
	background: #fff;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid #dfe5ec;
	border-radius: 12px;
	overflow: hidden;
	table-layout: auto;
	box-shadow: 0 7px 20px rgba(15, 23, 42, .05);
}

.news-detail-page .news-content thead,
.news-detail-page .news-content tbody,
.news-detail-page .news-content tfoot,
.news-detail-page .news-content tr {
	height: auto !important;
}

.news-detail-page .news-content th,
.news-detail-page .news-content td {
	height: auto !important;
	padding: 13px 15px;
	background: #fff;
	border: 0;
	border-right: 1px solid #e4e9f0;
	border-bottom: 1px solid #e4e9f0;
	color: #253247;
	font-size: 15px;
	line-height: 1.55;
	vertical-align: top;
}

.news-detail-page .news-content tr > :last-child {
	border-right: 0;
}

.news-detail-page .news-content tr:last-child > * {
	border-bottom: 0;
}

.news-detail-page .news-content th,
.news-detail-page .news-content thead th,
.news-detail-page .news-content table:not(:has(thead)) tbody tr:first-child td {
	background: color-mix(in srgb, var(--theme-color) 8%, #fff);
	color: #172033;
	font-weight: 800;
}

.news-detail-page .news-content tbody tr:nth-child(even):not(:first-child) td {
	background: #f8fafc;
}

/* Password-protected article */
.private-news-page {
	position: relative;
	min-height: 72vh;
	padding: clamp(28px, 5vw, 72px) 0;
	background:
		radial-gradient(circle at 8% 12%, color-mix(in srgb, var(--theme-color) 13%, transparent), transparent 28rem),
		radial-gradient(circle at 92% 88%, rgba(245, 158, 11, .12), transparent 25rem),
		var(--theme-background, #f5f7fb);
}

.private-access-card {
	display: grid;
	grid-template-columns: minmax(0, .95fr) minmax(420px, 1.05fr);
	max-width: 1080px;
	min-height: 620px;
	margin: 0 auto;
	background: var(--theme-surface, #fff);
	border: 1px solid #e2e8f0;
	border-radius: 26px;
	overflow: hidden;
	box-shadow: 0 28px 70px rgba(15, 23, 42, .14);
}

.private-access-visual {
	position: relative;
	min-height: 100%;
	background:
		linear-gradient(145deg, color-mix(in srgb, var(--theme-color) 88%, #101827), #0b1220);
	background-position: center;
	background-size: cover;
	overflow: hidden;
}

.private-access-visual::before {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(4, 10, 24, .18) 15%, rgba(4, 10, 24, .92) 100%);
	content: '';
}

.private-access-visual::after {
	position: absolute;
	top: -110px;
	right: -100px;
	width: 320px;
	height: 320px;
	border: 54px solid rgba(255, 255, 255, .07);
	border-radius: 50%;
	content: '';
}

.private-access-visual-content {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	padding: clamp(30px, 5vw, 54px);
	color: #fff;
}

.private-access-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 11px;
	background: rgba(255, 255, 255, .14);
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	backdrop-filter: blur(8px);
}

.private-access-visual h1 {
	margin: 18px 0 14px;
	color: #fff;
	font-size: clamp(27px, 3.3vw, 43px);
	font-weight: 800;
	line-height: 1.35;
	text-shadow: 0 3px 18px rgba(0, 0, 0, .45);
}

.private-access-visual p {
	margin: 0;
	color: rgba(255, 255, 255, .82);
	font-size: 13px;
	font-weight: 600;
}

.private-access-panel {
	display: flex;
	align-items: stretch;
	justify-content: center;
	flex-direction: column;
	padding: clamp(32px, 5vw, 62px);
}

.private-access-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-bottom: 20px;
	background: color-mix(in srgb, var(--theme-color) 11%, #fff);
	border: 1px solid color-mix(in srgb, var(--theme-color) 18%, #e2e8f0);
	border-radius: 15px;
	color: var(--theme-color);
	font-size: 20px;
}

.private-access-eyebrow {
	margin-bottom: 7px;
	color: var(--theme-color);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.private-access-panel h2 {
	margin: 0;
	color: #172033;
	font-size: clamp(23px, 2.5vw, 31px);
	font-weight: 800;
	line-height: 1.35;
}

.private-access-intro {
	margin: 12px 0 24px;
	color: #64748b;
	font-size: 14px;
	line-height: 1.7;
}

.private-access-error {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin-bottom: 18px;
	padding: 12px 14px;
	background: #fff1f2;
	border: 1px solid #fecdd3;
	border-radius: 10px;
	color: #b42318;
	font-size: 13px;
	font-weight: 600;
}

.private-access-form {
	display: grid;
	gap: 19px;
}

.private-field label {
	display: block;
	margin-bottom: 7px;
	color: #344054;
	font-size: 13px;
	font-weight: 700;
}

.private-password-control {
	position: relative;
	display: flex;
	align-items: center;
}

.private-password-control > i {
	position: absolute;
	left: 15px;
	z-index: 1;
	color: #94a3b8;
}

.private-password-control input,
.private-captcha-answer {
	width: 100%;
	height: 48px;
	padding: 0 46px 0 42px;
	background: #fff;
	border: 1px solid #cfd8e5;
	border-radius: 11px;
	box-shadow: none;
	color: #172033;
	font-size: 15px;
	outline: 0;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.private-captcha-answer {
	padding-right: 14px;
	padding-left: 14px;
}

.private-password-control input:focus,
.private-captcha-answer:focus {
	border-color: var(--theme-color);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--theme-color) 12%, transparent);
}

.private-password-toggle {
	position: absolute;
	right: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 8px;
	color: #64748b;
}

.private-password-toggle:hover,
.private-password-toggle:focus {
	background: #f1f5f9;
	color: var(--theme-color);
}

.private-captcha-question {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 9px;
	padding: 12px 14px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-left: 4px solid var(--theme-color);
	border-radius: 10px;
	color: #253247;
	font-size: 15px;
	font-weight: 700;
}

.private-captcha-question i {
	color: var(--theme-color);
}

.private-field small {
	display: block;
	margin-top: 7px;
	color: #7b8798;
	font-size: 12px;
	line-height: 1.5;
}

.private-access-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 49px;
	padding: 11px 18px;
	background: var(--theme-color);
	border: 0;
	border-radius: 11px;
	box-shadow: 0 10px 22px color-mix(in srgb, var(--theme-color) 25%, transparent);
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	transition: filter .2s ease, transform .2s ease;
}

.private-access-submit:hover,
.private-access-submit:focus {
	color: #fff;
	filter: brightness(1.1);
	transform: translateY(-1px);
}

.private-access-back {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	width: max-content;
	margin-top: 20px;
	color: #64748b;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.private-access-back:hover {
	color: var(--theme-color);
}

.news-detail-page .news-gallery,
.news-detail-page .news-tags-wrapper,
.news-detail-page .news-share {
	max-width: 900px;
	margin-right: auto;
	margin-left: auto;
}

.news-detail-page .news-gallery {
	margin-top: 42px;
	padding-top: 30px;
	border-top: 1px solid #e7ecf2;
}

.news-detail-page .gallery-title {
	display: flex;
	align-items: center;
	gap: 11px;
	margin: 0 0 20px;
	color: var(--theme-text);
	font-size: 20px;
}

.news-detail-page .gallery-title small {
	display: block;
	margin-top: 2px;
	color: #94a3b8;
	font-size: 12px;
	font-weight: 600;
}

.news-detail-page .section-title-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	background: color-mix(in srgb, var(--theme-color) 10%, white);
	border-radius: 12px;
	color: var(--theme-color);
}

.news-detail-page .gallery-grid {
	margin-top: 0;
}

.news-detail-page .gallery-thumb {
	position: relative;
	padding: 0;
	aspect-ratio: 4 / 3;
	border-radius: 13px;
	box-shadow: none;
}

.news-detail-page .gallery-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.news-detail-page .gallery-photo:hover .gallery-thumb {
	transform: translateY(-3px);
	box-shadow: 0 12px 24px rgba(15, 23, 42, .16);
}

.news-detail-page .gallery-photo:hover .gallery-thumb img {
	transform: scale(1.04);
}

.news-detail-page .news-tags-wrapper {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-top: 36px;
	padding: 22px;
	background: var(--surface-soft);
	border: 1px solid #e7ecf2;
	border-radius: 14px;
}

.news-detail-page .tags-title {
	flex: 0 0 auto;
	padding-top: 7px;
	color: #475569;
	font-size: 12px;
	font-weight: 700;
}

.news-detail-page .news-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.news-detail-page .tag-item {
	margin: 0;
	padding: 6px 11px;
	background: var(--theme-surface);
	border: 1px solid #dfe6ee;
	color: #526071;
	font-size: 12px;
	font-weight: 600;
}

.news-detail-page .tag-item:hover {
	background: var(--theme-color);
	border-color: var(--theme-color);
	color: #fff;
}

.news-detail-page .news-share {
	margin-top: 30px;
}

.news-detail-page .news-share h4 {
	margin-bottom: 14px;
	color: #334155;
	font-size: 15px;
	font-weight: 700;
}

.news-detail-page .comment-panel {
	margin-top: 24px;
	overflow: hidden;
	background: var(--theme-surface);
	border: 1px solid #e7ecf2;
	border-radius: 16px;
}

@media (max-width: 991.98px) {
	.private-access-card {
		grid-template-columns: 1fr;
		max-width: 680px;
		min-height: 0;
	}

	.private-access-visual {
		min-height: 300px;
	}

	.private-access-panel {
		padding: 38px;
	}
}

@media (max-width: 767.98px) {
	.news-detail-page {
		padding: 16px 0 40px;
	}

	.news-detail-page .breadcrumb-wrapper {
		margin-bottom: 12px;
	}

	.news-detail-page .breadcrumb-custom {
		padding: 9px 11px;
	}

	.news-detail-page .breadcrumb-custom li:nth-last-child(n + 3) {
		display: none;
	}

	.news-detail-page .news-card {
		border-radius: 16px;
	}

	.news-detail-page .news-cover,
	.news-detail-page .news-cover > img {
		min-height: 390px;
		height: 390px;
	}

	.news-detail-page .news-cover-overlay {
		padding: 22px;
	}

	.news-detail-page .news-cover-overlay .news-title,
	.news-detail-page .news-no-cover .news-title {
		margin: 9px 0 14px;
		font-size: clamp(24px, 7vw, 32px);
	}

	.news-detail-page .news-meta {
		gap: 6px;
	}

	.news-detail-page .news-meta-item {
		padding: 6px 9px;
		font-size: 12px;
	}

	.news-detail-page .news-body {
		padding: 25px 20px 30px;
	}

	.news-detail-page .news-content {
		font-size: 16px;
		line-height: 1.82;
		overflow-x: auto;
		overscroll-behavior-inline: contain;
	}

	.news-detail-page .news-content table {
		min-width: 560px;
		margin: 20px 0;
	}

	.news-detail-page .news-content th,
	.news-detail-page .news-content td {
		padding: 11px 12px;
		font-size: 14px;
	}

	.news-detail-page .news-content img {
		margin: 22px auto;
		border-radius: 10px;
	}

	.news-detail-page .news-tags-wrapper {
		flex-direction: column;
		gap: 9px;
		padding: 16px;
	}

	.private-news-page {
		padding: 18px 0 38px;
	}

	.private-news-page > .container {
		padding-right: 12px;
		padding-left: 12px;
	}

	.private-access-card {
		border-radius: 18px;
	}

	.private-access-visual {
		min-height: 240px;
	}

	.private-access-visual-content {
		padding: 25px;
	}

	.private-access-visual h1 {
		margin: 13px 0 9px;
		font-size: 26px;
	}

	.private-access-panel {
		padding: 28px 22px 30px;
	}

	.private-access-icon {
		width: 46px;
		height: 46px;
		margin-bottom: 15px;
	}

	.private-access-panel h2 {
		font-size: 23px;
	}
}

@media (max-width: 419.98px) {
	.news-detail-page .news-cover,
	.news-detail-page .news-cover > img {
		min-height: 420px;
		height: 420px;
	}

	.news-detail-page .news-meta-item {
		background: rgba(255, 255, 255, .18);
	}
}

@media (prefers-reduced-motion: reduce) {
	.news-detail-page *,
	.news-detail-page *::before,
	.news-detail-page *::after,
	.private-news-page *,
	.private-news-page *::before,
	.private-news-page *::after {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
	}
}
