/* Footori Hub v0.3 — 모든 규칙은 .fcs-wrapper 하위 격리 (Astra 비침범)
 * 디자인 컨셉: '길을 걷다' — 점선 발자국 경로 모티프 + 트레일 그린, 절제된 카드
 */

.fcs-wrapper {
	--fcs-accent: #2e7d4f;        /* 트레일 그린 */
	--fcs-accent-deep: #1f5c39;
	--fcs-accent-soft: #eaf4ee;
	--fcs-hot: #e8833a;           /* 임박·강조 (선셋 오렌지) */
	--fcs-hot-soft: #fdf0e6;
	--fcs-ink: #1b2430;
	--fcs-muted: #68727f;
	--fcs-line: #e6e9ed;
	--fcs-bg: #ffffff;
	--fcs-panel: #f5f8f6;
	--fcs-radius: 14px;
	margin: 0 0 2.5rem;
	color: var(--fcs-ink);
	font-size: 15px;
}

/* ============ 필터 패널 (검색 허브) ============ */
.fcs-wrapper .fcs-filters {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 14px;
	padding: 20px 20px 24px;
	margin: 0 0 26px;
	background: var(--fcs-panel);
	border: 1px solid var(--fcs-line);
	border-radius: var(--fcs-radius);
}
/* 시그니처: 패널 아래 '점선 길' + 출발점 */
.fcs-wrapper .fcs-filters::after {
	content: "";
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 10px;
	height: 0;
	border-bottom: 2px dashed rgba(46, 125, 79, 0.35);
}
.fcs-wrapper .fcs-filters::before {
	content: "";
	position: absolute;
	left: 12px;
	bottom: 6px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--fcs-accent);
	z-index: 1;
}

.fcs-wrapper .fcs-filters {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 14px;
	text-align: center;
}

/* ---- 센터 검색바: 입력 + 검색 | 초기화 ---- */
.fcs-wrapper .fcs-searchbar {
	display: flex;
	gap: 8px;
	width: 100%;
	max-width: 620px;
	margin: 0 auto;   /* 센터 강제 — 플렉스 정렬 무관 */
}
.fcs-wrapper .fcs-search {
	flex: 1 1 auto;
	min-width: 0;
	height: 48px;
	padding: 0 14px 0 40px;
	border: 1px solid var(--fcs-line);
	border-radius: 10px;
	background-color: var(--fcs-bg);
	font-size: 15px;
	color: var(--fcs-ink);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%2368727f' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 13px center;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fcs-wrapper .fcs-search:focus {
	outline: none;
	border-color: var(--fcs-accent);
	box-shadow: 0 0 0 3px rgba(46, 125, 79, 0.14);
}
.fcs-wrapper .fcs-btn {
	flex: 0 0 auto;
	height: 48px;
	padding: 0 22px;
	border: 1px solid var(--fcs-line);
	border-radius: 10px;
	background: var(--fcs-bg);
	color: var(--fcs-muted);
	font-size: 14.5px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.fcs-wrapper .fcs-btn:hover {
	border-color: var(--fcs-accent);
	color: var(--fcs-accent);
}
.fcs-wrapper .fcs-btn--primary {
	background: var(--fcs-accent);
	border-color: var(--fcs-accent);
	color: #fff;
}
.fcs-wrapper .fcs-btn--primary:hover {
	background: var(--fcs-accent-deep);
	border-color: var(--fcs-accent-deep);
	color: #fff;
}

/* ---- 셀렉트 행 (센터) ---- */
.fcs-wrapper .fcs-selects {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;   /* 검색창과 앞선(좌측선) 일치 */
	gap: 12px 8px;
	width: 100%;
	max-width: 620px;              /* 검색바와 동일 폭 */
	margin: 0 auto;
}
.fcs-wrapper .fcs-select {
	height: 44px;
	flex: 1 1 0;                   /* 620px 폭을 균등 분할 */
	min-width: 0;
	max-width: none;
	padding: 0 14px;
	border: 1px solid var(--fcs-line);
	border-radius: 10px;
	background: var(--fcs-bg);
	font-size: 14px;
	color: var(--fcs-ink);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fcs-wrapper .fcs-select:focus {
	outline: none;
	border-color: var(--fcs-accent);
	box-shadow: 0 0 0 3px rgba(46, 125, 79, 0.14);
}

/* ---- 결과 카운트 (그리드 위) ---- */
.fcs-wrapper .fcs-resultbar {
	margin: 0 0 12px;
	min-height: 1px;
}
.fcs-wrapper .fcs-count {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--fcs-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
}
.fcs-wrapper .fcs-count:empty {
	display: none;
}

/* ============ 코스 카드 그리드 ============ */
.fcs-wrapper .fcs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 14px;
}
.fcs-wrapper .fcs-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 9px;
	padding: 18px 16px 14px;
	border: 1px solid var(--fcs-line);
	border-radius: var(--fcs-radius);
	background: var(--fcs-bg);
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
/* 카드 상단 얇은 트레일 라인 — hover 시 점선 '길'로 살아남 */
.fcs-wrapper .fcs-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--fcs-accent-soft);
	transition: background 0.15s ease;
}
.fcs-wrapper .fcs-card:hover {
	transform: translateY(-2px);
	border-color: var(--fcs-accent);
	box-shadow: 0 8px 20px rgba(27, 36, 48, 0.09);
}
.fcs-wrapper .fcs-card:hover::before {
	background: repeating-linear-gradient(
		90deg,
		var(--fcs-accent) 0 10px,
		transparent 10px 16px
	);
}
.fcs-wrapper .fcs-card--link {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}
.fcs-wrapper .fcs-card[hidden] {
	display: none;
}

.fcs-wrapper .fcs-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.fcs-wrapper .fcs-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
}
.fcs-wrapper .fcs-badge--trail {
	background: var(--fcs-accent-soft);
	color: var(--fcs-accent-deep);
}
.fcs-wrapper .fcs-badge--grade {
	background: #f2f4f6;
	color: var(--fcs-muted);
	border: 1px solid var(--fcs-line);
	text-transform: capitalize;
}
.fcs-wrapper .fcs-grade--white {
	background: #fff;
}

.fcs-wrapper .fcs-card__name {
	margin: 0;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.45;
	word-break: keep-all;
}
.fcs-wrapper .fcs-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	margin-top: auto;
	padding-top: 6px;
	border-top: 1px dashed var(--fcs-line);
	font-size: 13px;
	color: var(--fcs-muted);
}
.fcs-wrapper .fcs-card__region {
	flex: 1 1 auto;
}
.fcs-wrapper .fcs-card__dist {
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--fcs-accent);
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
}
.fcs-wrapper .fcs-card__done {
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--fcs-hot-soft);
	color: var(--fcs-hot);
	font-size: 12px;
	font-weight: 700;
}

/* ============ 상태 메시지 ============ */
.fcs-wrapper .fcs-hint,
.fcs-wrapper .fcs-loading,
.fcs-wrapper .fcs-empty,
.fcs-wrapper .fcs-notice {
	padding: 42px 16px;
	border: 1px dashed var(--fcs-line);
	border-radius: var(--fcs-radius);
	text-align: center;
	color: var(--fcs-muted);
	font-size: 14.5px;
	background: var(--fcs-bg);
}
.fcs-wrapper .fcs-hint::before {
	content: "\1F6B6";  /* 🚶 */
	display: block;
	font-size: 26px;
	margin-bottom: 8px;
}

/* ============ 모션 절제 ============ */
@media (prefers-reduced-motion: reduce) {
	.fcs-wrapper * {
		transition: none !important;
	}
}

/* ============ 모바일 ============ */
@media (max-width: 640px) {
	.fcs-wrapper .fcs-filters {
		padding: 16px 14px 22px;
	}
	.fcs-wrapper .fcs-searchbar {
		flex-wrap: wrap;
	}
	.fcs-wrapper .fcs-search {
		flex: 1 1 100%;
	}
	.fcs-wrapper .fcs-btn {
		flex: 1 1 calc(50% - 4px);
	}
	.fcs-wrapper .fcs-selects {
		width: 100%;
	}
	.fcs-wrapper .fcs-select {
		width: 100%;
		max-width: none;
	}
	.fcs-wrapper .fcs-grid {
		grid-template-columns: 1fr;
	}
}
