﻿@charset "utf-8";

/* ============================================================
	mcat03 — 검색 + 다중 필터 결합형
	키워드 검색 + 카테고리/이슈 필터 + 실시간 필터링 + 하이라이트
	============================================================ */

/* ============================================================
	검색 히어로
	============================================================ */
.sf-hero {
	background: var(--color-bg-inverse);
	padding: 140px 24px 80px;
}

.sf-hero-inner {
	max-width: 720px;
	margin: 0 auto;
	text-align: center;
}

.sf-hero-label {
	font-size: clamp(14px, calc(10.8px + 0.72vw), 18px);
	font-weight: 700;
	font-family: var(--font-sub-title);
	color: rgba(255, 255, 255, 0.35);
	margin-bottom: 16px;
}

.sf-hero-tit {
	font-size: clamp(32px, calc(20px + 2.5vw), 60px);
	font-weight: 900;
	font-family: var(--font-sub-title);
	line-height: 1.2;
	color: #fff;
	margin-bottom: 40px;
}

/* ── 검색창 ── */
.sf-search-wrap {
	position: relative;
	margin-bottom: 24px;
}

.sf-search-input {
	width: 100%;
	height: 60px;
	padding: 0 56px 0 52px;
	background: rgba(255, 255, 255, 0.08);
	border: 1.5px solid rgba(255, 255, 255, 0.2);
	border-radius: 60px;
	font-size: clamp(14px, calc(10.8px + 0.72vw), 18px);
	color: #fff;
	outline: none;
	transition:
		border-color 0.2s ease,
		background 0.2s ease,
		box-shadow 0.2s ease;
	appearance: none;
}

.sf-search-input::placeholder {
	color: rgba(255, 255, 255, 0.3);
}

.sf-search-input:focus {
	border-color: var(--color-primary);
	background: rgba(255, 255, 255, 0.12);
	box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.22);
}

/* 검색 아이콘 (좌측) */
.sf-search-icon {
	position: absolute;
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	color: rgba(255, 255, 255, 0.4);
	pointer-events: none;
	display: flex;
	align-items: center;
}

/* 지우기 버튼 (우측) */
.sf-search-clear {
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.12);
	border: none;
	border-radius: 50%;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	transition:
		background 0.15s ease,
		color 0.15s ease;
}

.sf-search-clear:hover {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}

/* ── 빠른 검색 태그 ── */
.sf-quick-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.sf-quick-tag {
	padding: 6px 16px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 20px;
	background: transparent;
	font-size: clamp(14px, calc(10px + 0.48vw), 16px);
	color: rgba(255, 255, 255, 0.55);
	cursor: pointer;
	transition:
		background 0.15s ease,
		color 0.15s ease,
		border-color 0.15s ease;
}

.sf-quick-tag:hover,
.sf-quick-tag.is-active {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: #fff;
}

/* ============================================================
	필터 바
	============================================================ */
.sf-filter-wrap {
	background: var(--color-bg-main);
	border-bottom: 1px solid var(--color-border);
	transition:
		box-shadow 0.2s ease,
		top 0.3s ease;
	position: sticky;
	top: 90px;
	z-index: 4;
}

.sf-filter-wrap.has-shadow {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.sf-filter-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 60px;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.sf-filter-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--color-border);
}

.sf-filter-row:last-of-type {
	border-bottom: none;
}

.sf-filter-label {
	flex-shrink: 0;
	font-size: clamp(14px, calc(10.8px + 0.72vw), 18px);
	font-weight: 700;
	color: var(--color-text-muted);
	min-width: 52px;
}

.sf-filter-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	flex: 1;
}

.sf-filter-btn {
	padding: 5px 16px;
	border: 1px solid var(--color-border-strong);
	border-radius: 20px;
	background: transparent;
	font-size: clamp(14px, calc(10px + 0.48vw), 16px);
	color: var(--color-text-sub);
	cursor: pointer;
	transition:
		background 0.15s ease,
		color 0.15s ease,
		border-color 0.15s ease;
}

.sf-filter-btn:hover {
	background: var(--color-bg-hover);
	border-color: var(--color-text-muted);
	color: var(--color-text-main);
}

.sf-filter-btn.is-active {
	background: var(--color-text-main);
	border-color: var(--color-text-main);
	color: var(--color-bg-main);
}

/* 결과 카운트 */
.sf-filter-count {
	font-size: clamp(14px, calc(10px + 0.48vw), 16px);
	color: var(--color-text-muted);
	white-space: nowrap;
	padding: 14px 0;
	align-self: flex-end;
}

#sfCount {
	font-weight: 700;
	color: var(--color-text-main);
}

/* ============================================================
	기사 그리드
	============================================================ */
.sf-section {
	background: var(--color-bg-main);
}

.sf-grid-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 60px 80px;
}

.sf-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

/* ── 카드 ── */
.sf-card {
	border-radius: 8px;
	overflow: hidden;
	background: var(--color-bg-card);
	transition:
		transform 0.3s ease,
		box-shadow 0.3s ease;
}

.sf-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.sf-card.is-hidden {
	display: none;
}

/* 카드 등장 애니메이션 */
.sf-card.is-entering {
	animation: sfCardIn 0.28s ease both;
}

@keyframes sfCardIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.sf-card-link {
	display: block;
	text-decoration: none;
}

.sf-card-thumb {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.sf-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.sf-card:hover .sf-card-thumb img {
	transform: scale(1.05);
}

/* 카테고리 뱃지 */
.sf-card-cat {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: clamp(14px, calc(12px + 0.4vw), 16px);
	font-weight: 700;
	color: #fff;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
}

.sf-cat--culture {
	background: rgba(139, 92, 246, 0.75);
}
.sf-cat--life {
	background: rgba(16, 185, 129, 0.75);
}
.sf-cat--travel {
	background: rgba(245, 158, 11, 0.75);
}
.sf-cat--interview {
	background: rgba(59, 130, 246, 0.75);
}

.sf-card-body {
	padding: 18px 20px 22px;
}

.sf-card-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
	font-size: clamp(14px, calc(12px + 0.4vw), 16px);
}

.sf-card-vol {
	font-weight: 700;
	color: var(--color-primary);
}

.sf-card-date {
	color: var(--color-text-muted);
}

.sf-card-tit {
	font-size: clamp(18px, calc(13px + 0.9vw), 20px);
	font-weight: 700;
	color: var(--color-text-main);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 8px;
	transition: color 0.2s ease;
}

.sf-card:hover .sf-card-tit {
	color: var(--color-primary);
}

.sf-card-desc {
	font-size: clamp(15px, calc(11px + 0.7vw), 18px);
	color: var(--color-text-sub);
}

/* ── 검색 하이라이트 ── */
.sf-highlight {
	background: rgba(250, 204, 21, 0.35);
	color: var(--color-text-main);
	border-radius: 2px;
	padding: 1px 2px;
}

/* ── 결과 없음 ── */
.sf-empty {
	padding: 80px 24px;
	text-align: center;
	grid-column: 1 / -1;
}

.sf-empty-icon {
	color: var(--color-text-muted);
	margin-bottom: 20px;
}

.sf-empty-tit {
	font-size: clamp(18px, calc(13px + 0.9vw), 24px);
	font-weight: 700;
	color: var(--color-text-main);
	margin-bottom: 10px;
}

.sf-empty-desc {
	font-size: clamp(15px, calc(11px + 0.7vw), 20px);
	color: var(--color-text-sub);
	margin-bottom: 32px;
}

.sf-empty-reset {
	display: inline-block;
	padding: 12px 32px;
	background: var(--color-text-main);
	color: var(--color-bg-main);
	font-size: clamp(14px, calc(10.8px + 0.72vw), 18px);
	font-weight: 700;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.sf-empty-reset:hover {
	opacity: 0.75;
}

/* ============================================================
	반응형 — 필수 구간 999 / 768 / 499
	============================================================ */
@media all and (max-width: 999px) {
	.sf-hero {
		padding-top: 110px;
	}

	.sf-filter-inner {
		padding: 0 32px;
	}

	.sf-grid-wrap {
		padding: 40px 32px 64px;
	}

	.sf-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
}

@media all and (max-width: 768px) {
	.sf-hero {
		padding: 90px 20px 56px;
	}

	.sf-filter-inner {
		padding: 0 20px;
	}

	.sf-filter-row {
		flex-wrap: wrap;
		gap: 10px;
		padding: 12px 0;
	}

	.sf-filter-count {
		width: 100%;
		padding: 0 0 12px;
		align-self: auto;
	}

	.sf-grid-wrap {
		padding: 32px 20px 56px;
	}

	.sf-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

@media all and (max-width: 499px) {
	.sf-search-input {
		height: 52px;
	}

	.sf-quick-tags {
		gap: 6px;
	}

	.sf-filter-label {
		min-width: 44px;
	}
}
