/* Cooly 뉴스 게시판 (board_news) : 목록·분류·단일 글
   site-b 토큰을 그대로 씀. 규칙: hover 시각 변화 없음 / 자간 0 / 한글 14px 이상 / 둥근 요소에 왼쪽 선 없음 */

/* ---------- 목록 ---------- */
.news {
	padding: calc(var(--header-h) + 96px) 0 clamp(72px, 9vw, 140px); /* 위 여백은 문의 페이지와 같게 */
}

.news .wrap {
	display: grid;
	gap: clamp(28px, 4vw, 48px);
}

.news-head {
	display: grid;
	gap: 14px;
	max-width: 760px;
}

.news-head h1 {
	font-size: clamp(36px, 4.6vw, 72px);
	line-height: 1.08;
}

.news-head .lede {
	max-width: 40em;
	font-size: clamp(16px, 1.4vw, 19px);
	color: var(--mist);
	text-wrap: balance;
}

/* 분류 알약: 헤더 메뉴와 같은 모양. 현재 분류는 다이얼과 같은 그라데이션 알약 */
.news-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.news-filter a {
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 6px 15px;
	border-radius: 999px;
	box-shadow: inset 0 0 0 1px var(--line);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--mist);
}

.news-filter a[aria-current='page'] {
	color: var(--snow);
	background: radial-gradient(120% 160% at 30% 0%, #2c343b 0%, #14181c 74%);
	box-shadow: inset 0 0 0 1px rgba(238, 241, 243, 0.16);
}

/* 카드 격자 */
.news-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(20px, 2.6vw, 36px) clamp(16px, 2vw, 28px);
}

.news-card {
	min-width: 0;
}

.news-card-link {
	display: grid;
	gap: 16px;
	height: 100%;
	color: inherit;
}

.news-card-img {
	aspect-ratio: 16 / 10;
	border-radius: var(--r);
	overflow: hidden;
	background: var(--slate);
}

.news-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 대표 이미지가 없는 글: 슬레이트 판 위에 흰 로고를 흐리게 */
.news-card-img.is-empty {
	display: grid;
	place-items: center;
}

.news-card-img.is-empty img {
	width: 38%;
	height: auto;
	opacity: 0.14;
}

.news-card-body {
	display: grid;
	gap: 10px;
	align-content: start;
}

.news-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
}

.news-card-meta .mono {
	font-size: 12px;
}

/* 분류 꼬리표 */
.news-tag {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	padding: 0 10px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--ice) 14%, transparent);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	color: var(--ice);
}

.news-card-title {
	font-size: clamp(22px, 1.9vw, 26px);
	line-height: 1.22;
}

/* 두 줄에서 자름 */
.news-card-excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 15px;
	line-height: 1.7;
	color: var(--mist);
}

/* 쪽 넘김: 슬라이더 화살표와 같은 둥근 버튼 */
.news-pagination {
	margin: 0;
}

.news-pagination .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.news-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.news-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 6px;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	font-family: var(--font-mono);
	font-weight: 500;
	font-size: 14px;
	line-height: 1;
	color: var(--snow);
	font-variant-numeric: tabular-nums;
}

.news-pagination .page-numbers.current {
	background: var(--snow);
	border-color: var(--snow);
	color: var(--ink);
}

.news-pagination .page-numbers.dots {
	border-color: transparent;
	color: var(--fog);
}

.news-pagination .page-numbers svg {
	width: 18px;
	height: 18px;
}

/* 글이 없을 때 */
.news-empty {
	display: grid;
	gap: 14px;
	justify-items: start;
	padding: clamp(32px, 5vw, 64px) 0;
	border-top: 1px solid var(--line);
}

.news-empty h2 {
	font-size: clamp(26px, 3vw, 40px);
	line-height: 1.2;
}

.news-empty p:not(.mono) {
	max-width: 36em;
	color: var(--mist);
}

/* ---------- 단일 글 ---------- */
.news-single {
	padding: calc(var(--header-h) + 56px) 0 clamp(72px, 9vw, 140px);
}

.news-single .wrap {
	display: grid;
	gap: clamp(28px, 4vw, 48px);
}

.news-single-head {
	display: grid;
	gap: 18px;
	max-width: 860px;
}

.news-single-head h1 {
	font-size: clamp(32px, 4vw, 56px);
	line-height: 1.1;
}

.news-single-head .news-card-meta {
	gap: 8px 18px;
}

.news-back {
	margin-top: 0;
	text-decoration: none;
	color: var(--mist);
}

.news-back svg {
	color: var(--ice);
}

.news-single-fig {
	margin: 0;
	max-width: 1100px;
	border-radius: var(--r);
	overflow: hidden;
	background: var(--slate);
}

.news-single-fig img {
	width: 100%;
	height: auto;
}

.news-single .prose {
	max-width: 720px;
}

/* 아래 이동: 목록으로 + 이전·다음 글 */
.news-single-nav {
	display: grid;
	gap: 24px;
	margin-top: clamp(8px, 2vw, 24px);
	padding-top: clamp(28px, 4vw, 40px);
	border-top: 1px solid var(--line);
}

.news-single-nav > .text-link {
	margin-top: 0;
	justify-self: start;
}

.news-adj {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.news-adj-link {
	display: grid;
	gap: 8px;
	min-width: 0;
	padding: 20px 22px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--slate);
	color: inherit;
}

.news-adj-link.is-next {
	text-align: right;
	justify-items: end;
}

.news-adj-link.is-empty {
	border-color: transparent;
	background: transparent;
}

.news-adj-link .mono {
	font-size: 12px;
}

.news-adj-title {
	font-family: var(--font-display);
	font-stretch: 110%;
	font-weight: 600;
	font-size: 18px;
	line-height: 1.3;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
	/* 위 여백은 데스크톱(96px)보다 줄임. 문의 페이지와 같음 */
	.news {
		padding-top: calc(var(--header-h) + 40px);
	}

	.news-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.news,
	.news-single {
		padding-top: calc(var(--header-h) + 36px);
		padding-bottom: 40px; /* 모바일 섹션 상하 여백 축소 */
	}

	.news-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.news-card-title {
		font-size: 22px;
	}

	.news-adj {
		grid-template-columns: minmax(0, 1fr);
	}

	.news-adj-link.is-next {
		text-align: left;
		justify-items: start;
	}

	.news-adj-link.is-empty {
		display: none;
	}
}
