/* 자료실 – Figma 09_리소스_자료실 (PC 1920: 콘텐츠 1200, 카드 282 × 4열) */
.ml-library {
	--ml-main: #0058aa;
	--ml-black: #111;
	--ml-gray: #c1c1c1;
	--ml-font: "Noto Sans KR", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
	--ml-font-en: "Montserrat", "Noto Sans KR", "Pretendard Variable", Pretendard, sans-serif;
	font-family: var(--ml-font);
	color: var(--ml-black);
	background: #fff;
	word-break: keep-all;
}
.ml-library *,
.ml-library *::before,
.ml-library *::after { box-sizing: border-box; }
.ml-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* 탭 바: 누르면 해당 분류로 이동, 스크롤하면 GNB 아래에 붙는다 */
.ml-tabs-wrap {
	position: sticky;
	top: var(--ml-top, 0px);
	z-index: 20;
	background: #fff;
	border-top: 1px solid var(--ml-gray);
	border-bottom: 1px solid var(--ml-gray);
}
.ml-tabs {
	display: grid;
	grid-template-columns: repeat(var(--ml-tab-count, 7), minmax(0, 1fr));
	column-gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
}
.ml-library .ml-tab {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 58px;
	font-family: var(--ml-font);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.2;
	color: var(--ml-black);
	text-decoration: none;
	white-space: nowrap;
	box-shadow: none;
}
.ml-library .ml-tab:hover,
.ml-library .ml-tab:focus { color: var(--ml-black); text-decoration: none; }
.ml-tab::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: #363636;
	opacity: 0;
	transition: opacity .2s;
}
.ml-tab.is-active::after,
.ml-tab:hover::after { opacity: 1; }
.ml-tabs-wrap.is-stuck { border-top-color: transparent; } /* GNB 아래에 붙으면 GNB 선과 겹치지 않게 */
.ml-tab:focus-visible { outline: 2px solid var(--ml-main); outline-offset: -2px; }

/* 분류 */
.ml-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 120px 0;
}
.ml-section {
	scroll-margin-top: calc(var(--ml-top, 0px) + 100px);
}
.ml-section + .ml-section { margin-top: 120px; }
.ml-library .ml-section__title {
	margin: 0 0 24px;
	padding: 0;
	font-family: var(--ml-font-en);
	font-weight: 700;
	font-size: 48px;
	line-height: 59px; /* Figma 글 상자 높이 59 – 1.2(57.6)면 분류마다 1.4px씩 위로 밀림 */
	letter-spacing: 0;
	text-transform: none;
	color: var(--ml-black);
}
.ml-library .ml-section__title:focus:not(:focus-visible) { outline: none; }

/* 카드 */
.ml-library .ml-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 40px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ml-library .ml-card { margin: 0; padding: 0; list-style: none; }
.ml-library .ml-card::before,
.ml-library .ml-card::marker { content: none; }
.ml-library .ml-card__link {
	display: flex;
	flex-direction: column;
	gap: 16px;
	color: inherit;
	text-decoration: none;
	box-shadow: none;
}
.ml-library a.ml-card__link:hover,
.ml-library a.ml-card__link:focus { color: inherit; text-decoration: none; }
a.ml-card__link:focus-visible { outline: 2px solid var(--ml-main); outline-offset: 4px; border-radius: 18px; }
.ml-card__box {
	position: relative;
	display: block;
	aspect-ratio: 282 / 288;
	overflow: hidden;
	border: .75px solid var(--ml-gray);
	border-radius: 18px;
	background: #f6f6f6;
}
/* 표지: 세로형 143 × 203 / 가로형(사례집) 최대 203 × 123, 가운데 */
.ml-library .ml-card__thumb {
	position: absolute;
	inset: 0;
	display: block;
	width: auto;
	height: auto;
	max-width: 72%;
	max-height: 70.5%;
	margin: auto;
	border-radius: 12px;
	box-shadow: 0 6.75px 12px rgba(0, 0, 0, .25);
	transition: transform .25s ease;
}
.ml-library .is-landscape .ml-card__thumb { max-height: 42.7%; border-radius: 10px; }
.ml-card__blank {
	position: absolute;
	inset: 0;
	width: 50.7%;
	height: 70.5%;
	margin: auto;
	border-radius: 12px;
	background: #e3e6ea;
}
.ml-card__icon {
	position: absolute;
	right: 0;
	bottom: 0;
	display: flex;
	width: 48px;
	height: 48px;
	border-top-left-radius: 12px;
	background: rgba(0, 88, 170, .7);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	color: #fff;
	transition: background-color .2s;
}
.ml-card__icon svg { display: block; width: 100%; height: 100%; }
a.ml-card__link:hover .ml-card__thumb { transform: translateY(-4px); }
a.ml-card__link:hover .ml-card__icon { background: var(--ml-main); }

.ml-card__text {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0 -10px; /* Figma 문구 상자가 카드보다 조금 넓은 경우(287~290px)도 같은 줄바꿈 */
	text-align: center;
	text-wrap: balance;
}
.ml-card__title { /* 1.1.3 요청: 시안(24/20)보다 제목 2px, 설명 4px 작게 */
	font-family: var(--ml-font-en);
	font-weight: 700;
	font-size: 22px;
	line-height: 30px;
	color: var(--ml-black);
}
.ml-card__sub {
	font-family: var(--ml-font);
	font-weight: 500;
	font-size: 16px;
	line-height: 24px;
	color: #777;
}
.ml-empty { max-width: 1200px; margin: 80px auto; text-align: center; color: #666; }

@media (max-width: 1240px) {
	.ml-tabs { column-gap: 0; }
	.ml-container { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 1024px) {
	.ml-container { padding-top: 72px; padding-bottom: 72px; }
	.ml-section + .ml-section { margin-top: 80px; }
	.ml-library .ml-section__title { font-size: 36px; }
	.ml-library .ml-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; }
	.ml-card__title { font-size: 20px; line-height: 28px; }
	.ml-card__sub { font-size: 16px; line-height: 24px; }
}
@media (max-width: 767px) {
	.ml-tabs-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	.ml-tabs-wrap::-webkit-scrollbar { display: none; }
	.ml-tabs { display: flex; gap: 4px; min-width: max-content; padding: 0 16px; }
	.ml-library .ml-tab { flex: 1 0 auto; height: 50px; padding: 0 10px; font-size: 14px; }
	.ml-container { padding: 48px 16px; }
	.ml-section { scroll-margin-top: calc(var(--ml-top, 0px) + 72px); }
	.ml-section + .ml-section { margin-top: 56px; }
	.ml-library .ml-section__title { margin-bottom: 16px; font-size: 28px; }
	.ml-library .ml-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
	.ml-card__link { gap: 10px; }
	.ml-card__box { border-radius: 14px; }
	.ml-library .ml-card__thumb { border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, .22); }
	.ml-card__icon { width: 36px; height: 36px; border-top-left-radius: 10px; }
	.ml-card__text { margin: 0; }
	.ml-card__title { font-size: 16px; line-height: 23px; }
	.ml-card__sub { font-size: 13px; line-height: 20px; }
	.ml-library .ml-br { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.ml-library .ml-card__thumb,
	.ml-tab::after,
	.ml-card__icon { transition: none; }
	a.ml-card__link:hover .ml-card__thumb { transform: none; }
}
