/* =========================================
   ★ [너비 고정 핵심] 스크롤바 점프 현상 방지
========================================= */
html {
	overflow-y: scroll !important;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
	background-color: #FFFFFF;
	color: #000000;
	-webkit-font-smoothing: antialiased;
}

/* =========================================
   상단 헤더 및 본문 컨테이너 (너비 절대 고정)
========================================= */
.fixed-header-wrapper {
	position: sticky;
	top: 0;
	z-index: 90; /* 사이드바 오픈 백드롭 밑으로 정상 수렴 처리 */
	width: 100%;
	background-color: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid #EAEAEA;
}

.fixed-header-inner {
	width: 100%;
	max-width: 1250px;
	margin: 0 auto;
	padding: 40px 4% 0 4%;
}

.container {
	width: 100%;
	max-width: 1250px;
	margin: 0 auto;
	padding: 50px 4% 120px 4%;
}

.info-top-bar {
	display: flex;
	align-items: center;
	gap: 20px;
	padding-bottom: 15px;
}

.info-prefix {
	font-size: 16px;
	font-weight: 900;
	color: #111111;
	letter-spacing: 2px;
	padding-right: 20px;
	border-right: 1px solid #DDDDDD;
}

.info-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0;
	color: #111111;
}

.menu-scroll-wrapper {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-bottom: 12px;
}

.top-menu-bar {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: nowrap;
	width: 100%;
	padding: 10px 0 4px 0;
	gap: 36px;
	overflow-x: auto;
	white-space: nowrap;
	scrollbar-width: none;
	-ms-overflow-style: none;
	cursor: grab;
}

.top-menu-bar.grabbing {
	cursor: grabbing;
	user-select: none;
}

.top-menu-bar::-webkit-scrollbar {
	display: none;
}

.menu-button {
	background: none;
	border: none;
	padding: 4px 0;
	font-size: 20px;
	font-weight: 500;
	color: #CCCCCC;
	cursor: pointer;
	flex-shrink: 0;
	transition: color 0.3s ease;
}

.menu-button:hover {
	color: #666666;
}

.menu-button.current {
	color: #000000;
	font-weight: 700;
	border-bottom: 3px solid #000000;
}

.menu-progress-container {
	width: 100%;
	height: 2px;
	background-color: #EEEEEE;
	position: relative;
	border-radius: 2px;
	overflow: hidden;
	display: none;
}

.menu-progress-thumb {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background-color: #000000;
	border-radius: 2px;
}

.content {
	width: 100%;
	background-color: #FFFFFF;
}

/* =========================================
   소개 배너 영역 (PC 데스크톱)
========================================= */
.program-intro {
	display: flex;
	gap: 40px;
	padding: 30px;
	background-color: #FAF9F8;
	border-radius: 12px;
	margin-bottom: 60px;
	height: 360px;
	overflow: hidden;
}

.pi-img-wrapper {
	flex: 0 0 290px;
	height: 100%;
	border-radius: 8px;
	overflow: hidden;
}

.pi-img {
	width: 100%;
	height: 100%;
/*	object-fit: cover;*/
	display: block;
}

.pi-ex-box {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.pi-badge {
	flex: 0 0 auto;
	align-self: flex-start;
	height: 24px;
	line-height: 24px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	background-color: #111111;
	color: #FFFFFF;
	padding: 0 8px;
	border-radius: 3px;
	margin-bottom: 12px;
}

.pi-ex-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding-right: 10px;
}

.pi-ex-scroll::-webkit-scrollbar {
	width: 4px;
}

.pi-ex-scroll::-webkit-scrollbar-thumb {
	background-color: #DDDDDD;
	border-radius: 2px;
}

.pi-ex-scroll::-webkit-scrollbar-track {
	background: transparent;
}

.pi-ex {
	font-size: 15px;
	line-height: 1.7;
	color: #555555;
	word-break: keep-all;
	margin: 0;
}

.pi-ex p,
.pi-ex h1,
.pi-ex h2,
.pi-ex h3,
.pi-ex h4,
.pi-ex ul,
.pi-ex li {
	margin-top: 0;
}

/* =========================================
   프로그램 리스트 영역
========================================= */
.program-list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 40px 24px;
	width: 100%;
}

.program-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: #000000;
}

.program-card:hover .card-image-wrapper img {
	filter: grayscale(0%);
	transform: scale(1.03);
}

.card-image-wrapper {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	margin-bottom: 16px;
	background-color: #F8F8F8;
	position: relative;
	border-radius: 6px;
}

.card-image-wrapper img {
	width: 100%;
	height: 100%;
/*	object-fit: cover;*/
	filter: grayscale(10%);
	transition: filter 0.6s ease, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.badge-ended {
	position: absolute;
	top: 12px;
	right: 12px;
	background-color: rgba(220, 53, 69, 0.9);
	color: #FFFFFF;
	padding: 4px 8px;
	font-size: 11px;
	font-weight: 700;
	z-index: 10;
	border-radius: 4px;
}

.program-title {
	font-size: 16px;
	font-weight: 600;
	color: #111111;
	letter-spacing: -0.5px;
	line-height: 24px;
	height: 48px;
	margin: 0;
	word-break: keep-all;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

@media screen and (max-width: 768px) {
	/* 모바일 전용 햄버거 최우선 터치 활성화 조치 */
	.header-row1 {
		z-index: 99 !important;
	}
	.mobile-menu {
		z-index: 99999 !important;
		pointer-events: auto !important;
	}

	.fixed-header-inner {
		padding-top: 20px;
	}

	.info-top-bar {
		gap: 12px;
		padding-bottom: 10px;
	}

	.info-title {
		font-size: 20px;
	}

	/* ── 📦 모바일 배너: 높이 고정을 풀고, 아래로 늘어나도록 변경 ── */
	.program-intro {
		flex-direction: column;
		padding: 20px;
		height: auto !important;       /* 고정 높이 해제 */
		min-height: unset !important;  /* 고정 높이 해제 */
		max-height: unset !important;  /* 고정 높이 해제 */
		gap: 20px;
		margin-bottom: 40px;
	}

	/* ── 🖼️ 이미지: 원본 비율 유지 설정 ── */
	.pi-img-wrapper {
		flex: 0 0 auto;                /* 높이 고정 해제 */
		width: 100%;
		height: auto;
	}

	.pi-img {
		width: 100%;
		height: auto;                  /* 가로 너비에 맞춰 원본 비율대로 세로가 자동 조절됨 */
		object-fit: contain;           /* 이미지 잘림 방지 및 원본 비율 보존 */
		display: block;
	}

	/* ── 📝 소개 글 영역: 스크롤 없이 정상 출력 ── */
	.pi-ex-box {
		flex: unset;
		width: 100%;
		height: auto !important;       /* 고정 계산식 해제 */
		display: block;
	}

	.pi-badge {
		margin-bottom: 10px;
	}

	/* 감싸고 있던 내부 스크롤 틀 해제 */
	.pi-ex-scroll {
		overflow-y: visible !important; /* 스크롤을 없애고 콘텐츠가 다 보이게 설정 */
		height: auto;
		padding-right: 0;
	}

	.pi-ex {
		font-size: 14.5px;
		line-height: 1.65;
		color: #555555;
		padding-bottom: 0;
	}

	/* ── 리스트 영역 ── */
	.container {
		padding-top: 30px;
	}

	.program-list {
		grid-template-columns: repeat(2, 1fr);
		gap: 30px 16px;
	}

	.program-title {
		font-size: 14.5px;
		height: 44px !important;
		line-height: 22px;
	}
}