@charset "utf-8";

/* ============================== 토큰 (product-list.css 와 동일 값) */
:root {
	--ev-navy: #1e3a5f;
	--ev-text: #1f2937;
	--ev-muted: #6b7280;
	--ev-light: #9aa4b2;
	--ev-line: #e5e9ef;
	--ev-accent: #2f6fb5;
	--ev-thumb-bg: #ffffff;
	--ev-max: 1280px;
	--ev-pad: 24px;
}

.content-wrapper {
	margin-bottom: 0 !important;
}

/* ============================== 레이아웃 */
.ev-page {
	padding: 28px 0 100px;
	font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
	color: var(--ev-text);
	background: #ffffff;
}

.ev-inner {
	max-width: var(--ev-max);
	margin: 0 auto;
	padding: 0 var(--ev-pad);
}

/* sh_common.css 의 h1~h6 요소 지정이 상속을 덮으므로 되돌린다 */
.ev-page h1,
.ev-page h2,
.ev-page h3 {
	font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
}

/* ============================== 브레드크럼 */
.ev-crumb {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: var(--ev-light);
}

.ev-crumb a {
	color: inherit;
	text-decoration: none !important;
}

.ev-crumb strong {
	font-weight: 600;
	color: var(--ev-muted);
}

/* ============================== 목록 헤더 */
.ev-head {
	padding: 44px 0 64px;
	text-align: center;
}

.ev-head__title {
	margin: 0 0 24px;
	font-size: 36px;
	font-weight: 700;
	letter-spacing: -0.03em;
	color: #111827;
	font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
	line-height: 1.2;
}

.ev-head__desc {
	margin: 0 auto;
	max-width: 720px;
	font-size: 14px;
	line-height: 1.9;
	color: var(--ev-muted);
	word-break: keep-all;
}

/* ============================== 카드 그리드 */
.ev-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.ev-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid var(--ev-line);
	border-radius: 10px;
	overflow: hidden;
	color: inherit;
	text-decoration: none !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ev-card:hover {
	border-color: #b9d3ee;
	box-shadow: 0 12px 28px rgba(20, 40, 63, 0.08);
	color: inherit;
}

.ev-card__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	background: var(--ev-thumb-bg);
	border-bottom: 1px solid var(--ev-line);
	overflow: hidden;
}

.ev-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ev-card__body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px 20px 20px;
}

.ev-card__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
	min-height: 3em;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: #111827;
	word-break: keep-all;
}

.ev-card__period {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 12px;
	color: var(--ev-muted);
	font-variant-numeric: tabular-nums;
}

.ev-card__period img {
	width: 14px;
	height: 14px;
	flex: none;
	opacity: 0.6;
}

/* ============================== 상태 배지
   진행중 / 곧 시작 / 종료 세 가지를 색과 점으로 함께 구분한다.
   색만으로 구분하면 색각 이상이 있는 사용자가 상태를 읽지 못한다. */
.ev-badge {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 6px;
	height: 26px;
	padding: 0 11px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.01em;
	white-space: nowrap;
	vertical-align: middle;
	color: #ffffff;
	background: var(--ev-navy);
	border: 1px solid var(--ev-navy);
}

.ev-badge::before {
	content: "";
	width: 5px;
	height: 5px;
	flex: none;
	border-radius: 50%;
	background: currentColor;
}

/* 진행중만 점을 은은하게 확산시켜 살아있는 상태로 읽히게 한다 */
.ev-badge:not(.ev-badge-coming):not(.ev-badge-expired)::before {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}

.ev-badge-coming {
	color: var(--ev-accent);
	background: #eaf2fb;
	border-color: #c3daf1;
}

.ev-badge-expired {
	color: #97a2b0;
	background: #f4f6f8;
	border-color: #e2e7ee;
}

/* ============================== 빈 목록 */
.ev-empty {
	padding: 80px 0;
	font-size: 14px;
	color: var(--ev-muted);
	text-align: center;
}

/* ============================== 페이지네이션 (DataTables 렌더) */
.ev-paging {
	margin-top: 48px;
}

.ev-paging .pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ev-paging .page-item .page-link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: none;
	color: var(--ev-muted);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ev-paging .page-item .page-link:hover {
	background: #f2f5f9;
	color: var(--ev-text);
}

.ev-paging .page-item.active .page-link {
	border-color: var(--ev-navy);
	color: var(--ev-navy);
	font-weight: 700;
}

.ev-paging .page-item.disabled .page-link {
	opacity: 0.35;
	cursor: default;
}

.ev-paging .page-item.disabled .page-link:hover {
	background: none;
}

.ev-paging img {
	width: 7px;
	height: auto;
}

/* ============================== 상세 헤더 */
.ev-detail__head {
	padding: 48px 0 32px;
	border-bottom: 1px solid var(--ev-line);
	text-align: center;
}

.ev-detail__title {
	margin: 14px 0 10px;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.03em;
	color: #111827;
	word-break: keep-all;
}

.ev-detail__date {
	margin: 0;
	font-size: 13px;
	color: var(--ev-light);
	font-variant-numeric: tabular-nums;
}

/* 이전/다음 화살표 */
.ev-detail__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex: none;
	border: 1px solid var(--ev-line);
	border-radius: 50%;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ev-detail__arrow:hover {
	border-color: #b9d3ee;
	background: #f5f9fd;
}

.ev-detail__arrow img {
	width: 8px;
	height: auto;
}

.ev-detail__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.ev-detail__barmain {
	flex: 1;
	min-width: 0;
}

/* ============================== 공유 */
.ev-share {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 22px;
}

.ev-share a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 36px;
	padding: 0 15px;
	border: 1px solid var(--ev-line);
	border-radius: 999px;
	color: var(--ev-muted);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.ev-share a:hover {
	border-color: var(--ev-accent);
	color: var(--ev-accent);
}

.ev-share img {
	width: 16px;
	height: 16px;
	flex: none;
	object-fit: contain;
}

/* ============================== 기간 안내 */
.ev-period {
	display: grid;
	grid-template-columns: 110px minmax(0, 1fr);
	gap: 16px;
	margin: 40px 0 0;
	padding: 18px 22px;
	background: #f7f9fc;
	border: 1px solid var(--ev-line);
	border-radius: 10px;
	font-size: 14px;
	list-style: none;
}

.ev-period li:first-child {
	font-weight: 600;
	color: var(--ev-navy);
}

.ev-period li:last-child {
	color: var(--ev-muted);
	font-variant-numeric: tabular-nums;
}

/* ============================== 본문 */
.ev-body {
	padding: 44px 0 56px;
	font-size: 15px;
	line-height: 1.85;
	color: var(--ev-text);
	border-bottom: 1px solid var(--ev-line);
}

.ev-body img {
	max-width: 100%;
	height: auto;
}

/* ============================== 이전/다음 내비 */
/* flex 컨테이너라 태그 사이 공백이 무시된다 — 빈 줄이 생길 여지가 없다 */
.ev-nav {
	display: flex;
	flex-direction: column;
}

/* 각 행이 스스로 아래 선을 그린다.
   이전/다음이 없으면 th:remove 로 링크 자체가 렌더링되지 않아 선도 함께 사라진다. */
.ev-nav__item {
	display: flex;
	align-items: center;
	gap: 20px;
	min-height: 68px;
	padding: 0 18px;
	line-height: 1.4;
	border-bottom: 1px solid var(--ev-line);
	color: inherit;
	text-decoration: none !important;
	transition: background-color 0.15s ease;
}

.ev-nav__item:hover {
	background: #f7f9fc;
	color: inherit;
}

.ev-nav__dir {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.06em;
	color: var(--ev-accent);
	flex: none;
	width: 78px;
}

.ev-nav__dir img {
	width: 7px;
	height: auto;
	flex: none;
}

.ev-nav__title {
	overflow: hidden;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ev-muted);
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ============================== 목록으로 */
.ev-back {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.ev-back a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 40px;
	border: 1px solid var(--ev-navy);
	border-radius: 8px;
	background: #ffffff;
	color: var(--ev-navy);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ev-back a:hover {
	background: var(--ev-navy);
	color: #ffffff;
}

/* ============================== 반응형 */
@media (max-width: 1024px) {
	.ev-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	:root {
		--ev-pad: 16px;
	}

	.ev-page {
		padding-bottom: 64px;
	}

	.ev-head {
		padding: 28px 0 36px;
	}

	.ev-head__title {
		font-size: 26px;
		margin-bottom: 16px;
	}

	.ev-head__desc {
		font-size: 13px;
	}

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

	.ev-detail__head {
		padding: 28px 0 24px;
	}

	.ev-detail__title {
		font-size: 22px;
	}

	.ev-detail__arrow {
		width: 34px;
		height: 34px;
	}

	.ev-share {
		flex-wrap: wrap;
	}

	.ev-period {
		grid-template-columns: minmax(0, 1fr);
		gap: 4px;
	}

	.ev-body {
		padding: 32px 0 40px;
	}

	.ev-nav__item {
		gap: 12px;
		min-height: 60px;
		padding: 0 12px;
	}

	.ev-nav__dir {
		width: 62px;
	}

	.ev-back a {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ev-card,
	.ev-share a,
	.ev-back a,
	.ev-nav__item,
	.ev-detail__arrow,
	.ev-paging .page-item .page-link {
		transition: none;
	}
}
