/* ==========================================================================
   News Page — /news
   ========================================================================== */

/* --- Design tokens (news-specific, extends site :root) --- */
:root {
	--news-primary-dark: #13317F;
	--news-primary-mid: #0070CC;
	--news-primary-light: #48A2E5;
	--news-primary-lightest: #B3E2FF;
	--news-accent-orange: #FF8A3B;
	--news-neutral-900: #333333;
	--news-neutral-700: #666666;
	--news-neutral-500: #9D9D9D;
	--news-neutral-300: #DDDDDD;
	--news-neutral-100: #F5F5F5;
	--news-neutral-white: #FFFFFF;
	--news-radius-sm: 4px;
	--news-radius-md: 8px;
	--news-radius-lg: 12px;
	--news-radius-full: 9999px;
}

/* --- Main wrapper — needs background so footer reveals from behind --- */
#news-main {
	background-color: #fff;
	position: relative;
	z-index: 1;
}

/* --- Page header --- */
.news-page-header {
	max-width: 1200px;
	margin: 0 auto;
	padding: 96px 32px 0;
}

.news-eyebrow {
	font-family: Inter, sans-serif;
	font-size: 14px;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--news-primary-dark);
	margin-bottom: 16px;
}

.news-page-title {
	font-family: Nanum Myeongjo, serif;
	font-size: 64px;
	font-weight: 400;
	color: var(--news-neutral-900);
	line-height: 1.2;
	max-width: 60%;
	margin: 0 0 16px;
}

.news-page-subhead {
	font-family: Inter, sans-serif;
	font-size: 18px;
	font-weight: 400;
	color: var(--news-neutral-700);
	max-width: 32ch;
	margin: 0;
	line-height: 1.5;
}

.news-header-divider {
	border: none;
	border-top: 1px solid var(--news-neutral-300);
	margin: 48px 0 0;
}

/* --- Filter chip row --- */
.news-filter-bar {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 32px;
}

.news-filter-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 48px 0 0;
	overflow-x: auto;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.news-filter-row::-webkit-scrollbar {
	display: none;
}

.news-filter-row[role="group"] {
	scroll-snap-type: x mandatory;
}

.news-chip {
	flex-shrink: 0;
	border: 1px solid var(--news-neutral-300);
	background: transparent;
	color: var(--news-neutral-700);
	padding: 8px 16px;
	border-radius: var(--news-radius-full);
	font-family: Inter, sans-serif;
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
	min-height: 44px;
	scroll-snap-align: start;
}

.news-chip:hover {
	border-color: var(--news-neutral-700);
}

.news-chip[aria-pressed="true"] {
	background-color: var(--news-primary-dark);
	color: var(--news-neutral-white);
	border-color: var(--news-primary-dark);
}

.news-chip:focus-visible {
	outline: 2px solid var(--news-primary-mid);
	outline-offset: 2px;
}

.news-filter-bar.is-sticky {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	padding-top: 16px;
	padding-bottom: 16px;
}

.news-showing-count {
	font-family: Inter, sans-serif;
	font-size: 14px;
	color: var(--news-neutral-500);
	margin-top: 12px;
	padding: 0 32px;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

/* --- Card grid --- */
.news-grid-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 32px 0;
}

.news-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
}

/* --- Card --- */
.news-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: var(--news-radius-md);
	transition: opacity 0.15s ease;
	opacity: 1;
}

.news-card:focus-visible {
	outline: 2px solid var(--news-primary-mid);
	outline-offset: 2px;
	border-radius: var(--news-radius-md);
}

.news-card-image-wrap {
	position: relative;
	border-radius: var(--news-radius-md);
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: var(--news-neutral-100);
}

.news-card.is-featured .news-card-image-wrap {
	aspect-ratio: 4 / 3;
}

.news-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease-out;
}

.news-card-image-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--news-primary-dark);
}

.news-card-image-fallback svg {
	width: 48px;
	height: 48px;
}

/* Hover — desktop only */
@media (pointer: fine) {
	.news-card:hover .news-card-image {
		transform: scale(1.02);
	}

	.news-card:hover .news-card-title {
		color: var(--news-primary-mid);
	}

	.news-card:hover .news-card-arrow {
		transform: translateX(4px);
	}

	.news-card:hover .news-card-arrow.is-external {
		transform: translate(3px, -3px);
	}
}

/* Mobile tap */
@media (pointer: coarse) {
	.news-card:active {
		opacity: 0.7;
		transition: opacity 0.15s ease;
	}
}

.news-card-tag-row {
	margin-top: 8px;
	font-family: Inter, sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: var(--news-neutral-700);
}

.news-card-tag-dot {
	color: var(--news-neutral-500);
}

.news-card-tag-category.is-recognition {
	color: var(--news-accent-orange);
}

.news-card-title {
	margin: 4px 0 0;
	font-family: Nanum Myeongjo, serif;
	font-size: 24px;
	font-weight: 400;
	color: var(--news-neutral-900);
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.2s ease;
}

.news-card.is-featured .news-card-title {
	font-size: 32px;
}

.news-card-description {
	margin: 8px 0 0;
	font-family: Inter, sans-serif;
	font-size: 16px;
	font-weight: 400;
	color: var(--news-neutral-700);
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.news-card-footer {
	margin-top: 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-family: Inter, sans-serif;
	font-size: 14px;
	color: var(--news-neutral-500);
}

.news-card-arrow {
	transition: transform 0.2s ease;
	display: inline-block;
}

/* --- Featured card: 2-col span on desktop --- */
/* Applied via grid in the responsive section below */

/* --- Skeleton loading --- */
.news-skeleton-card {
	display: block;
}

.news-skeleton-image {
	border-radius: var(--news-radius-md);
	aspect-ratio: 16 / 10;
	background: linear-gradient(90deg, var(--news-neutral-100) 25%, var(--news-neutral-300) 50%, var(--news-neutral-100) 75%);
	background-size: 200% 100%;
	animation: news-shimmer 1.5s ease-in-out infinite;
}

.news-skeleton-line {
	border-radius: var(--news-radius-sm);
	height: 16px;
	margin-top: 8px;
	background: linear-gradient(90deg, var(--news-neutral-100) 25%, var(--news-neutral-300) 50%, var(--news-neutral-100) 75%);
	background-size: 200% 100%;
	animation: news-shimmer 1.5s ease-in-out infinite;
}

.news-skeleton-line.short {
	width: 60%;
}

.news-skeleton-line.tiny {
	width: 30%;
	height: 12px;
	margin-top: 12px;
}

@keyframes news-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* --- Empty state --- */
.news-empty-state {
	grid-column: 1 / -1;
	text-align: center;
	padding: 96px 24px;
}

.news-empty-icon {
	color: var(--news-neutral-300);
	margin-bottom: 16px;
}

.news-empty-heading {
	font-family: Nanum Myeongjo, serif;
	font-size: 24px;
	color: var(--news-neutral-900);
	margin: 0 0 8px;
}

.news-empty-body {
	font-family: Inter, sans-serif;
	font-size: 16px;
	color: var(--news-neutral-700);
	margin: 0;
}

.news-empty-body a {
	color: var(--news-primary-mid);
	text-decoration: underline;
}

.news-empty-body a:focus-visible {
	outline: 2px solid var(--news-primary-mid);
	outline-offset: 2px;
}

/* --- End of feed --- */
.news-end-of-feed {
	max-width: 1200px;
	margin: 64px auto 0;
	padding: 0 32px 64px;
	text-align: center;
	font-family: Inter, sans-serif;
	font-size: 16px;
	color: var(--news-neutral-700);
}

.news-end-of-feed a {
	color: var(--news-primary-mid);
	text-decoration: none;
	font-weight: 500;
}

.news-end-of-feed a:hover {
	text-decoration: underline;
}

.news-end-of-feed a:focus-visible {
	outline: 2px solid var(--news-primary-mid);
	outline-offset: 2px;
}

/* --- Scroll-triggered fade-in --- */
.news-card-animate {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.news-card-animate.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* --- Filter transition --- */
.news-grid.is-filtering .news-card {
	opacity: 0;
	transition: opacity 0.2s ease;
}

/* --- Responsive --- */

/* Tablet */
@media (min-width: 768px) {
	.news-grid {
		grid-template-columns: repeat(2, 1fr);
		column-gap: 24px;
		row-gap: 48px;
	}
}

/* Desktop */
@media (min-width: 1024px) {
	.news-grid {
		grid-template-columns: repeat(3, 1fr);
		column-gap: 32px;
		row-gap: 64px;
	}

	.news-card.is-featured {
		grid-column: span 2;
	}
}

/* Mobile adjustments */
@media (max-width: 767px) {
	.news-page-header {
		padding-top: 64px;
		padding-left: 20px;
		padding-right: 20px;
	}

	.news-page-title {
		font-size: 36px;
		max-width: 100%;
	}

	.news-page-subhead {
		font-size: 16px;
	}

	.news-filter-bar {
		padding: 0 20px;
	}

	.news-showing-count {
		padding: 0 20px;
	}

	.news-grid-wrapper {
		padding: 32px 20px 0;
	}

	.news-end-of-feed {
		padding: 0 20px 48px;
	}

	.news-header-divider {
		margin-top: 32px;
	}
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
	.news-card-image,
	.news-card-title,
	.news-card-arrow,
	.news-chip,
	.news-card,
	.news-card-animate {
		transition: none !important;
		animation: none !important;
	}

	.news-card-animate {
		opacity: 1;
		transform: none;
	}

	.news-skeleton-image,
	.news-skeleton-line {
		animation: none !important;
		background: var(--news-neutral-100);
	}

	@media (pointer: fine) {
		.news-card:hover .news-card-image {
			transform: none;
		}

		.news-card:hover .news-card-arrow {
			transform: none;
		}

		.news-card:hover .news-card-arrow.is-external {
			transform: none;
		}
	}
}
