/* 대문 광고 슬롯 + 포스터 팝업 — _ad_slot.html, js/ad_slot.js */

/* ── 슬롯 (우측, 통계 바와 높이·바닥선 맞춤) ─────────── */
.ad-slot {
	position: relative;
	float: right;
	clear: right;
	width: 567px;
	height: 100px;
	margin-top: 14px;
	overflow: hidden;
	border-radius: 14px;
	box-shadow: 0 2px 8px rgba(30, 43, 69, .08);
	font-family: 'Nanum Gothic', sans-serif;
}
.ad-track {
	display: flex;
	height: 100%;
	transition: transform .6s cubic-bezier(.4, 0, .2, 1);
}
.ad-slide {
	position: relative;
	display: flex;
	flex: 0 0 100%;
	align-items: center;
	gap: 16px;
	height: 100%;
	margin: 0;
	padding: 0 22px 0 26px;
	box-sizing: border-box;
	overflow: hidden;
	border: 0;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.ad-slide::after {
	/* 우측 장식 원 */
	content: "";
	position: absolute;
	right: -40px;
	top: -60px;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	pointer-events: none;
}
.ad-tag {
	position: absolute;
	left: 26px;
	top: 12px;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: -.2px;
}
.ad-body { flex: 1; min-width: 0; padding-top: 16px; }
.ad-title {
	display: block;
	overflow: hidden;
	font-size: 23px;
	font-weight: 800;
	letter-spacing: -1px;
	line-height: 1.25;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.ad-sub { display: block; margin-top: 3px; font-size: 14px; font-weight: 700; opacity: .85; }
.ad-sub b { font-weight: 800; opacity: 1; }
.ad-cta {
	position: relative;
	z-index: 1;
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 2px;
	padding: 9px 12px 9px 16px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 800;
	transition: transform .2s;
}
.ad-cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ad-slide:hover .ad-cta, .ad-slide:focus-visible .ad-cta { transform: translateX(3px); }

.ad-s1 { background: linear-gradient(120deg, #1e2b45 0%, #2b4a6b 100%); color: #fff; }
.ad-s1 .ad-tag { background: #38a8bd; color: #fff; }
.ad-s1 .ad-sub b { color: #7fd6e4; }
.ad-s1 .ad-cta { background: #fff; color: #1e2b45; }

.ad-s2 { background: linear-gradient(120deg, #2f9fb4 0%, #38a8bd 60%, #4dbccd 100%); color: #fff; }
.ad-s2 .ad-tag { background: rgba(255, 255, 255, .22); color: #fff; }
.ad-s2 .ad-sub b { color: #fff6c9; }
.ad-s2 .ad-cta { background: #1e2b45; color: #fff; }

.ad-s3 { background: #fff; color: #1e2b45; box-shadow: inset 0 0 0 1px #dbe4ec; border-radius: 14px; }
.ad-s3::after { background: #fdeeee; }
.ad-s3 .ad-tag { background: #fdeeee; color: #e5484d; }
.ad-s3 .ad-sub { color: #6b7a90; opacity: 1; }
.ad-s3 .ad-sub b { color: #e5484d; }
.ad-s3 .ad-cta { background: #e5484d; color: #fff; }

.ad-dots {
	position: absolute;
	right: 22px;
	top: 12px;
	z-index: 2;
	display: flex;
	gap: 5px;
}
.ad-dots button {
	width: 6px;
	height: 6px;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: rgba(150, 165, 185, .55);
	cursor: pointer;
	transition: width .3s, background .3s;
}
.ad-dots button.is-on { width: 16px; background: #e5484d; }

/* ── 포스터 팝업 ─────────────────────────────────── */
.ad-poster {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 16px;
	overflow-y: auto;
	background: rgba(15, 23, 38, .6);
	font-family: 'Nanum Gothic', sans-serif;
	animation: ap-fade .25s ease-out;
}
.ad-poster[hidden] { display: none; }
html.ap-lock, html.ap-lock body { overflow: hidden; }
.ap-sheet {
	position: relative;
	width: 100%;
	max-width: 880px;
	overflow: hidden;
	border-radius: 20px;
	background: #f4f7fa;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	color: #1e2b45;
	animation: ap-up .35s cubic-bezier(.2, .9, .3, 1.1);
}
.ap-close {
	position: absolute;
	right: 14px;
	top: 14px;
	z-index: 2;
	width: 38px;
	height: 38px;
	padding: 9px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .15);
	cursor: pointer;
}
.ap-close svg { display: block; width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; }
.ap-close:hover { background: rgba(255, 255, 255, .28); }

.ap-head {
	position: relative;
	padding: 40px 44px 30px;
	overflow: hidden;
	background: linear-gradient(135deg, #1e2b45 0%, #23456a 55%, #2f8fa6 100%);
	color: #fff;
}
.ap-head::before,
.ap-head::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}
.ap-head::before { right: -80px; top: -120px; width: 340px; height: 340px; background: rgba(56, 168, 189, .25); }
.ap-head::after { right: 140px; bottom: -90px; width: 180px; height: 180px; background: rgba(229, 72, 77, .18); }
.ap-kicker {
	position: relative;
	display: inline-block;
	padding: 5px 12px;
	border-radius: 14px;
	background: rgba(255, 255, 255, .14);
	font-size: 13px;
	font-weight: 700;
}
.ap-title {
	position: relative;
	margin: 14px 0 6px;
	font-size: 46px;
	font-weight: 800;
	letter-spacing: -2px;
	line-height: 1.1;
	color: #fff;
}
.ap-title small { display: block; margin-bottom: 4px; font-size: 22px; letter-spacing: 1px; color: #7fd6e4; }
.ap-topics { position: relative; margin: 0; font-size: 20px; font-weight: 800; color: #fff6c9; }
.ap-topics i { display: inline-block; width: 5px; height: 5px; margin: 0 8px 4px; border-radius: 50%; background: #fff6c9; opacity: .7; }
.ap-info { position: relative; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ap-info div {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border-radius: 12px;
	background: rgba(255, 255, 255, .95);
	color: #1e2b45;
}
.ap-info span { padding: 2px 8px; border-radius: 8px; background: #e5484d; color: #fff; font-size: 12px; font-weight: 800; }
.ap-info b { font-size: 16px; font-weight: 800; }

.ap-rooms {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	padding: 24px 24px 8px;
}
.ap-room {
	padding: 18px 18px 8px;
	border: 1px solid #dbe4ec;
	border-radius: 16px;
	background: #fff;
}
.ap-room.is-dm { grid-column: 1 / -1; border-color: #f6c6c8; }
.ap-room h3 {
	display: inline-block;
	margin: 0 0 8px;
	padding: 5px 12px;
	border-radius: 10px;
	background: #1e2b45;
	color: #fff;
	font-size: 15px;
	font-weight: 800;
}
.ap-room.is-dm h3 { background: #e5484d; }
.ap-room ol { margin: 0; padding: 0; list-style: none; }
.ap-room li {
	display: grid;
	grid-template-columns: 1fr;
	padding: 10px 0;
	border-top: 1px dashed #e6eef3;
}
/* 당뇨관(전체 폭)은 시간 | 강의 2열 */
.ap-room.is-dm li { grid-template-columns: 92px 1fr; column-gap: 12px; }
.ap-room li:first-child { border-top: 0; }
.ap-room time { margin-bottom: 2px; color: #2f9fb4; font-size: 13px; font-weight: 800; }
.ap-room.is-dm time { grid-row: span 2; padding-top: 2px; color: #e5484d; }
.ap-room li p { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.4; letter-spacing: -.3px; }
.ap-room li em { margin-top: 3px; color: #6b7a90; font-size: 13px; font-style: normal; font-weight: 700; }
.ap-badge {
	display: inline-block;
	margin-right: 6px;
	padding: 1px 7px;
	border-radius: 8px;
	background: #fff6c9;
	color: #a06a00;
	font-size: 11px;
	vertical-align: 2px;
}
.ap-note {
	margin: 6px 0 10px;
	padding: 12px 14px;
	border-radius: 12px;
	background: #fdeeee;
	color: #1e2b45;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
}
.ap-note b { color: #e5484d; }
.ap-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	padding: 16px 28px 26px;
	color: #6b7a90;
	font-size: 14px;
	font-weight: 700;
}
.ap-foot span { margin-right: 8px; color: #1e2b45; font-weight: 800; }

@keyframes ap-fade { from { opacity: 0; } }
@keyframes ap-up { from { transform: translateY(24px); opacity: 0; } }

@media (max-width: 768px) {
	.ad-slot { float: none; width: 100%; height: 80px; margin: 10px 0 0; }
	.ad-slide { gap: 10px; padding: 0 14px 0 18px; }
	.ad-tag { left: 18px; top: 10px; font-size: 10px; }
	.ad-dots { right: 14px; top: 11px; }
	.ad-body { padding-top: 14px; }
	.ad-title { font-size: 17px; }
	.ad-sub { font-size: 12px; }
	.ad-cta { padding: 7px 8px 7px 12px; font-size: 12px; }

	.ad-poster { padding: 0; }
	.ap-sheet { min-height: 100%; border-radius: 0; }
	.ap-head { padding: 34px 22px 24px; }
	.ap-title { font-size: 34px; }
	.ap-title small { font-size: 18px; }
	.ap-topics { font-size: 16px; }
	.ap-info b { font-size: 14px; }
	.ap-rooms { grid-template-columns: 1fr; gap: 12px; padding: 16px 14px 6px; }
	.ap-room.is-dm li { grid-template-columns: 1fr; }
	.ap-room.is-dm time { grid-row: auto; padding-top: 0; }
	.ap-room li p { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.ad-track { transition: none; }
	.ad-poster, .ap-sheet { animation: none; }
}
