@charset "utf-8";

/* ============================================================
   march08 — 잡지 펼침형
   이슈 카드 클릭 → 3D 책 펼침 오버레이
   ============================================================ */

/* ============================================================
   히어로
   ============================================================ */
.mb-hero {
	padding: 160px 60px 80px;
	background: var(--color-bg-main);
	border-bottom: 1px solid var(--color-border);
}

.mb-hero-inner {
	max-width: 1400px;
	margin: 0 auto;
}

.mb-hero-label {
	font-size: clamp(14px, calc(9.5px + 0.85vw), 18px);
	font-weight: 700;
	color: var(--color-text-muted);
	text-transform: uppercase;
	margin-bottom: 20px;
	opacity: 0;
}

.mb-hero-tit {
	font-size: clamp(44px, calc(16px + 5vw), 80px);
	font-weight: 900;
	font-family: var(--font-sub-title);
	color: var(--color-text-main);
	margin-bottom: 20px;
	overflow: hidden;
}

.mb-hero-tit-inner {
	display: block;
	transform: translateY(100%);
}

.mb-hero-sub {
	font-size: clamp(16px, calc(8px + 1vw), 20px);
	color: var(--color-text-muted);
	opacity: 0;
}

/* ============================================================
   이슈 카드 그리드
   ============================================================ */
.mb-section {
	padding: 80px 0 120px;
	background: var(--color-bg-main);
}

.mb-wrap {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 60px;
}

.mb-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px 32px;
}

.mb-card {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	text-align: left;
	display: block;
	width: 100%;
}

.mb-card-img {
	position: relative;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: 4px;
	margin-bottom: 16px;
	box-shadow:
		3px 3px 0 #e0e0e0,
		6px 6px 0 #cecece,
		0 12px 36px rgba(0, 0, 0, 0.18);
	transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.mb-card:hover .mb-card-img {
	transform: translateY(-6px);
	box-shadow:
		3px 3px 0 #e0e0e0,
		6px 6px 0 #cecece,
		0 28px 56px rgba(0, 0, 0, 0.28);
}

.mb-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.mb-card:hover .mb-card-img img {
	transform: scale(1.04);
}

.mb-card-img-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 50%);
	opacity: 0;
	transition: opacity 0.35s ease;
}

.mb-card:hover .mb-card-img-overlay {
	opacity: 1;
}

.mb-card-open-hint {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	font-size: clamp(14px, calc(9.5px + 0.85vw), 18px);
	font-weight: 600;
	color: #fff;
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
	white-space: nowrap;
}

.mb-card:hover .mb-card-open-hint {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.mb-card-foot {
	display: flex;
	align-items: baseline;
	gap: 12px;
}

.mb-card-vol {
	font-size: clamp(14px, calc(9.5px + 0.85vw), 18px);
	font-weight: 800;
	color: var(--color-text-main);
}

.mb-card-theme {
	font-size: clamp(14px, calc(9.5px + 0.85vw), 18px);
	color: var(--color-text-muted);
	flex: 1;
}

.mb-card-date {
	font-size: clamp(14px, calc(9.5px + 0.85vw), 18px);
	color: var(--color-text-muted);
}

/* ============================================================
   북 뷰어 오버레이
   ============================================================ */
.mb-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.88);
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}

.mb-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}

.mb-close {
	position: absolute;
	top: 28px;
	right: 36px;
	font-size: clamp(18px, calc(10px + 1.2vw), 26px);
	color: #fff;
	background: none;
	border: none;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.2s ease;
	z-index: 10;
}

.mb-close:hover {
	opacity: 1;
}

/* 이전/다음 버튼 */
.mb-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.5);
	font-size: clamp(18px, calc(10px + 1.2vw), 24px);
	cursor: pointer;
	transition: color 0.2s ease;
	z-index: 10;
	padding: 8px;
}

.mb-nav:hover {
	color: #fff;
}

.mb-nav:disabled {
	opacity: 0.2;
	cursor: default;
}

.mb-nav-prev { left: 28px; }
.mb-nav-next { right: 28px; }

/* 이슈 카운터 */
.mb-counter {
	position: absolute;
	bottom: 28px;
	left: 50%;
	transform: translateX(-50%);
	font-size: clamp(14px, calc(9.5px + 0.85vw), 18px);
	font-weight: 600;
	color: rgba(255, 255, 255, 0.45);
	white-space: nowrap;
}

.mb-spread-wrap {
	width: 90vw;
	max-width: 960px;
	height: 58vh;
	min-height: 400px;
	perspective: 2400px;
	display: flex;
	align-items: stretch;
}

.mb-spread {
	display: flex;
	width: 100%;
	height: 100%;
}

/* 페이지 공통 */
.mb-page {
	flex: 1;
	overflow: hidden;
	height: 100%;
}

/* 왼쪽 — 표지 */
.mb-page-left {
	position: relative;
	transform-origin: right center;
	border-radius: 4px 0 0 4px;
}

.mb-page-left img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mb-cover-badge {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 40px 28px 24px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
}

.mb-cover-vol {
	font-size: clamp(18px, calc(10px + 1.2vw), 26px);
	font-weight: 900;
	color: #fff;
	font-family: var(--font-sub-title);
}

.mb-cover-date {
	font-size: clamp(14px, calc(9.5px + 0.85vw), 18px);
	color: rgba(255, 255, 255, 0.7);
}

/* 책등 */
.mb-spine {
	width: 44px;
	flex-shrink: 0;
	background: linear-gradient(to right, #5a5a5a 0%, #161616 28%, #020202 50%, #161616 72%, #5a5a5a 100%);
	box-shadow:
		inset 8px 0 10px rgba(0, 0, 0, 0.85),
		inset -8px 0 10px rgba(0, 0, 0, 0.85),
		4px 0 12px rgba(0, 0, 0, 0.5),
		-4px 0 12px rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	position: relative;
}

.mb-spine-text {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-size: 12px;
	font-weight: 800;
	color: rgba(255, 255, 255, 0.5);
	white-space: nowrap;
	font-family: var(--font-sub-title);
}

/* 오른쪽 — 목차 */
.mb-page-right {
	background: #faf9f7;
	transform-origin: left center;
	border-radius: 0 4px 4px 0;
	display: flex;
	align-items: center;
}

body.dark .mb-hero {
	border-bottom-color: var(--color-border-strong);
}

body.dark .mb-card-img {
	box-shadow:
		3px 3px 0 #3a3a3a,
		6px 6px 0 #2a2a2a,
		0 12px 36px rgba(0, 0, 0, 0.4);
}

body.dark .mb-card:hover .mb-card-img {
	box-shadow:
		3px 3px 0 #3a3a3a,
		6px 6px 0 #2a2a2a,
		0 28px 56px rgba(0, 0, 0, 0.6);
}

body.dark .mb-page-right {
	background: #1c1c1e;
}

.mb-toc {
	padding: 48px 44px;
	width: 100%;
}

/* 모바일 전용 — 목차 상단 표지 썸네일 */
.mb-toc-mobile-head {
	display: none;
}

.mb-toc-mobile-thumb {
	width: 52px;
	height: 68px;
	object-fit: cover;
	border-radius: 3px;
	flex-shrink: 0;
	box-shadow: 2px 2px 0 #e0e0e0, 4px 4px 0 #cecece;
}

.mb-toc-mobile-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mb-toc-mobile-vol {
	font-size: clamp(16px, calc(10px + 1vw), 20px);
	font-weight: 900;
	color: var(--color-text-main);
	font-family: var(--font-sub-title);
}

.mb-toc-mobile-date {
	font-size: clamp(14px, calc(9.5px + 0.85vw), 18px);
	color: var(--color-text-muted);
}

.mb-toc-label {
	font-size: clamp(14px, calc(9.5px + 0.85vw), 18px);
	font-weight: 700;
	color: var(--color-text-muted);
	text-transform: uppercase;
	margin-bottom: 16px;
}

.mb-toc-theme {
	font-size: clamp(20px, calc(10px + 1.6vw), 32px);
	font-weight: 900;
	font-family: var(--font-sub-title);
	color: var(--color-text-main);
	margin-bottom: 32px;
}

.mb-toc-list {
	list-style: none;
	margin-bottom: 40px;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.mb-toc-item {
	display: flex;
	align-items: baseline;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid var(--color-border);
}

.mb-toc-item:first-child {
	border-top: 1px solid var(--color-border);
}

.mb-toc-item-cat {
	font-size: clamp(14px, calc(9.5px + 0.85vw), 18px);
	font-weight: 600;
	color: var(--color-primary);
	flex-shrink: 0;
	width: 52px;
}

.mb-toc-item-link {
	font-size: clamp(16px, calc(9px + 1.1vw), 20px);
	font-weight: 600;
	color: var(--color-text-main);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.mb-toc-item-link:hover {
	opacity: 0.6;
}

.mb-toc-cta {
	display: inline-block;
	font-size: clamp(14px, calc(9.5px + 0.85vw), 18px);
	font-weight: 700;
	color: var(--color-text-main);
	text-decoration: none;
	border-bottom: 2px solid var(--color-text-main);
	padding-bottom: 2px;
	transition: opacity 0.2s ease;
}

.mb-toc-cta:hover {
	opacity: 0.6;
}

/* ============================================================
   반응형 — 999px (태블릿)
   ============================================================ */
@media (max-width: 999px) {
	.mb-hero {
		padding: 130px 40px 60px;
	}

	.mb-wrap {
		padding: 0 40px;
	}

	.mb-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 32px 24px;
	}

	.mb-spread-wrap {
		max-width: 720px;
		height: 65vh;
	}

	.mb-toc {
		padding: 36px 32px;
	}
}

/* ============================================================
   반응형 — 768px (모바일)
   ============================================================ */
@media (max-width: 768px) {
	.mb-hero {
		padding: 110px 24px 48px;
	}

	.mb-section {
		padding: 48px 0 80px;
	}

	.mb-wrap {
		padding: 0 24px;
	}

	.mb-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px 16px;
	}

	/* 모바일 — 목차 페이지만 표시 */
	.mb-spread-wrap {
		width: 92vw;
		max-width: 480px;
		height: auto;
		max-height: 85vh;
		perspective: none;
		overflow-y: auto;
		border-radius: 8px;
	}

	.mb-spread {
		height: auto;
	}

	.mb-page-left,
	.mb-spine {
		display: none;
	}

	.mb-page-right {
		flex: 1;
		border-radius: 8px;
		height: auto;
	}

	.mb-toc {
		padding: 20px 20px;
	}

	.mb-toc-mobile-head {
		display: flex;
		align-items: center;
		gap: 14px;
		margin-bottom: 16px;
		padding-bottom: 16px;
		border-bottom: 1px solid var(--color-border);
	}

	.mb-toc-label {
		margin-bottom: 8px;
	}

	.mb-toc-theme {
		margin-bottom: 16px;
	}

	.mb-toc-item {
		padding: 10px 0;
	}

	.mb-toc-list {
		margin-bottom: 20px;
	}

	.mb-close {
		top: 16px;
		right: 20px;
	}

	.mb-nav {
		width: 40px;
		height: 40px;
		font-size: clamp(18px, calc(10px + 1.2vw), 22px);
		top: auto;
		bottom: 20px;
		transform: none;
	}

	.mb-nav-prev {
		left: auto;
		right: calc(50% + 56px);
	}

	.mb-nav-next {
		right: auto;
		left: calc(50% + 56px);
	}

	.mb-counter {
		bottom: 28px;
	}
}

/* ============================================================
   반응형 — 499px (소형 폰)
   ============================================================ */
@media (max-width: 499px) {
	.mb-hero {
		padding: 100px 20px 40px;
	}

	.mb-wrap {
		padding: 0 20px;
	}

	.mb-grid {
		grid-template-columns: 1fr;
		gap: 20px 0;
	}

	.mb-toc {
		padding: 24px 20px;
	}
}
