/* ===== 완전초보를 위한 주식투자 (/web/8) — 모던 리디자인 ===== */

/* 컨테이너 */
.beginner-course {
	width: 100%;
	max-width: 970px;
	margin: 0 auto;
}

/* ===== 히어로 섹션 ===== */
.beginner-hero {
	position: relative;
	width: 100%;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.beginner-hero > img {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: top;
	transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.beginner-hero:hover > img {
	transform: scale(1.02);
}

/* 히어로 오버레이 */
.beginner-hero__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 65%;
	height: 100%;
	padding: 5% 3% 8% 8%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background: linear-gradient(90deg,
		rgba(255,255,255,0.92) 0%,
		rgba(255,255,255,0.6) 60%,
		rgba(255,255,255,0) 100%
	);
}

/* 밸류 과목 — 오버레이 왼쪽 정렬 */
.beginner-hero--value .beginner-hero__overlay {
	width: 70%;
	padding: 5% 3% 11% 4%;
}

/* 가격 과목 — 오버레이 오른쪽 정렬 */
.beginner-hero--price .beginner-hero__overlay {
	left: auto;
	right: 0;
	width: 70%;
	padding: 5% 4% 11% 3%;
	background: linear-gradient(270deg,
		rgba(255,255,255,0.92) 0%,
		rgba(255,255,255,0.6) 60%,
		rgba(255,255,255,0) 100%
	);
}

.beginner-hero--price .beginner-hero__title {
	color: #be1d2c;
}

/* 타이틀 */
.beginner-hero__title {
	margin: 0 0 0.4em;
	font-size: clamp(24px, 3.9vw, 38px);
	font-weight: 700;
	line-height: 1.35;
	color: #a5422a;
	letter-spacing: -0.02em;
	word-break: keep-all;
	position: relative;
	display: inline-block;
}

.beginner-hero__title::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, #a5422a, #d4876e);
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.beginner-hero__title.animate::after {
	transform: scaleX(1);
}

/* 바디 텍스트 */
.beginner-hero__body {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
}

.beginner-hero__body p {
	margin: 0;
	font-size: clamp(15px, 1.85vw, 18px);
	font-weight: 400;
	line-height: 1.55;
	color: #444;
	word-break: keep-all;
}

.beginner-hero__emphasis {
	font-size: calc(1em + 3px);
	font-weight: 700;
	color: #a5422a;
	position: relative;
	display: inline-block;
}

/* ===== 공통 블록 ===== */
.beginner-course__block {
	margin-top: 32px;
}

.beginner-course__block--indent {
	margin-top: 32px;
	padding-left: 0;
}

/* ===== 강의 목록 (카드형) ===== */
.beginner-lecture-table-wrap {
	width: 100%;
	background: #f8fafc;
	border-radius: 20px;
	padding: 28px 24px;
	box-sizing: border-box;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

.beginner-lecture-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0 8px;
	font-size: 15px;
	font-weight: 400;
	color: #333;
}

.beginner-lecture-table thead {
	display: none;
}

.beginner-lecture-table tbody tr {
	display: flex;
	align-items: center;
	gap: 0;
	background: #fff;
	border-radius: 14px;
	padding: 0;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
	border: 1px solid #edf1f7;
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
	            box-shadow 0.3s ease,
	            border-color 0.3s ease;
	cursor: default;
	overflow: hidden;
}

.beginner-lecture-table tbody tr:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
	border-color: #dce1e8;
}

/* 번호 뱃지 셀 */
.beginner-lecture-table tbody td:first-child {
	flex: 0 0 auto;
	width: auto;
	min-width: 64px;
	padding: 18px 0 18px 22px;
	text-align: center;
	white-space: nowrap;
	font-size: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.beginner-lecture-table tbody td:first-child::before {
	content: attr(data-chapter);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: linear-gradient(135deg, #a32035, #d94a5e);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	box-shadow: 0 3px 8px rgba(163, 32, 53, 0.2);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.beginner-lecture-table tbody tr:hover td:first-child::before {
	transform: scale(1.08);
	box-shadow: 0 4px 14px rgba(163, 32, 53, 0.3);
}

/* 강의명 셀 */
.beginner-lecture-table tbody td:last-child {
	flex: 1;
	padding: 18px 22px 18px 14px;
	border: none;
	border-left: 1px solid #edf1f7;
	text-align: left;
	font-size: 15px;
	font-weight: 500;
	color: #222;
	line-height: 1.5;
	word-break: keep-all;
	letter-spacing: -0.01em;
	transition: color 0.2s ease;
}

.beginner-lecture-table tbody tr:hover td:last-child {
	color: #a32035;
}

/* 키워드 강조 */
.beginner-lecture-table__keyword {
	font-weight: 700;
	color: #a32035;
	position: relative;
	padding-bottom: 1px;
}

.beginner-lecture-table__keyword::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background: linear-gradient(90deg, #a32035, #e06070);
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.beginner-lecture-table tbody tr:hover .beginner-lecture-table__keyword::after {
	transform: scaleX(1);
}

/* 마지막 행 (8장) 강조 */
.beginner-lecture-table tbody tr:last-child {
	background: linear-gradient(135deg, #fef7f8 0%, #fff 60%);
	border-color: #f0d6da;
}

.beginner-lecture-table tbody tr:last-child td:last-child {
	font-weight: 600;
}

.beginner-lecture-table tbody tr:last-child td:first-child::before {
	background: linear-gradient(135deg, #bd1c2f, #e86070);
	box-shadow: 0 3px 10px rgba(189, 28, 47, 0.35);
}

/* ===== AOS 진입 애니메이션 ===== */
.beginner-lecture-table tbody tr {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s ease,
	            transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
	            box-shadow 0.3s ease,
	            border-color 0.3s ease;
}

.beginner-lecture-table tbody tr.aos-animate {
	opacity: 1;
	transform: translateY(0);
}

.beginner-lecture-table tbody tr:nth-child(1) { transition-delay: 0.04s; }
.beginner-lecture-table tbody tr:nth-child(2) { transition-delay: 0.08s; }
.beginner-lecture-table tbody tr:nth-child(3) { transition-delay: 0.12s; }
.beginner-lecture-table tbody tr:nth-child(4) { transition-delay: 0.16s; }
.beginner-lecture-table tbody tr:nth-child(5) { transition-delay: 0.20s; }
.beginner-lecture-table tbody tr:nth-child(6) { transition-delay: 0.24s; }
.beginner-lecture-table tbody tr:nth-child(7) { transition-delay: 0.28s; }
.beginner-lecture-table tbody tr:nth-child(8) { transition-delay: 0.32s; }

/* ===== OT 타이틀 이미지 ===== */
.beginner-ot-title {
	text-align: center;
	padding: 8px 0 4px;
}

.beginner-ot-title img {
	display: inline-block;
	width: auto;
	height: 32px;
	vertical-align: middle;
	opacity: 0.7;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.beginner-ot-title:hover img {
	opacity: 1;
	transform: scale(1.03);
}

/* ===== 비디오 섹션 ===== */
.beginner-video {
	max-width: 700px;
	margin: 8px auto 0;
	text-align: center;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
	background: #0f0f0f;
	transition: box-shadow 0.3s ease;
}

.beginner-video:hover {
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.13);
}

.beginner-video video {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 7 / 4;
	background: #111;
	vertical-align: top;
}

/* ===== 모바일 768px ===== */
@media (max-width: 768px) {
	.beginner-hero {
		border-radius: 14px;
	}

	.beginner-hero__overlay {
		width: 65%;
		padding: 7% 3% 7% 6%;
	}

	.beginner-hero--value .beginner-hero__overlay {
		width: 70%;
		padding: 5% 3% 11% 4%;
	}

	.beginner-hero--price .beginner-hero__overlay {
		left: auto;
		right: 0;
		width: 70%;
		padding: 5% 4% 11% 3%;
	}

	.beginner-hero__body p {
		font-size: 15px;
	}

	.beginner-lecture-table-wrap {
		padding: 20px 16px;
		border-radius: 16px;
	}

	.beginner-lecture-table tbody tr {
		border-radius: 12px;
	}

	.beginner-lecture-table tbody td:last-child {
		font-size: 14px;
		padding: 16px 18px 16px 10px;
	}

	.beginner-lecture-table tbody td:first-child {
		min-width: 52px;
		padding: 16px 0 16px 18px;
	}

	.beginner-lecture-table tbody td:first-child::before {
		width: 34px;
		height: 34px;
		line-height: 34px;
		font-size: 13px;
		border-radius: 9px;
	}
}

/* ===== 모바일 480px ===== */
@media (max-width: 480px) {
	.beginner-hero {
		border-radius: 12px;
	}

	.beginner-hero__overlay {
		width: 100%;
		padding: 6% 6% 7%;
		position: relative;
		background: #f7f2e8;
	}

	.beginner-hero {
		display: flex;
		flex-direction: column;
	}

	.beginner-hero > img {
		order: 2;
	}

	.beginner-hero__overlay {
		order: 1;
		width: 100%;
		height: auto;
	}

	.beginner-hero__title::after {
		bottom: -1px;
		height: 2px;
	}

	.beginner-course__block {
		margin-top: 24px;
	}

	.beginner-course__block--indent {
		padding-left: 0;
	}

	.beginner-lecture-table-wrap {
		padding: 16px 12px;
		border-radius: 14px;
	}

	.beginner-lecture-table tbody tr {
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 0;
		border-radius: 10px;
	}

	.beginner-lecture-table tbody td {
		display: block;
		border: none;
	}

	.beginner-lecture-table tbody td:first-child {
		min-width: 46px;
		padding: 14px 0 14px 14px;
	}

	.beginner-lecture-table tbody td:first-child::before {
		width: 30px;
		height: 30px;
		line-height: 30px;
		font-size: 11px;
		border-radius: 8px;
	}

	.beginner-lecture-table tbody td:last-child {
		font-size: 13px;
		padding: 14px 14px;
		border-left: 1px solid #edf1f7;
	}

	.beginner-lecture-table tbody tr:last-child {
		font-size: 13px;
	}

	.beginner-lecture-table {
		border-spacing: 0 6px;
	}

	/* 모바일 호버 제거 */
	.beginner-lecture-table tbody tr:hover {
		transform: none;
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
	}

	.beginner-lecture-table tbody tr:hover td:last-child {
		color: inherit;
	}

	.beginner-lecture-table tbody tr:hover td:first-child::before {
		transform: none;
		box-shadow: 0 3px 8px rgba(163, 32, 53, 0.2);
	}

	.beginner-hero:hover > img {
		transform: none;
	}

	.beginner-video {
		border-radius: 12px;
		margin: 4px auto 0;
	}
}
