/* ===================================================
   AK Blog List — Front-end Styles
   한국 GD Web Award 스타일: 미니멀, 타이포 중심, 블랙 통일
   =================================================== */

.abl-wrapper {
	font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ── Grid ── */
.abl-grid {
	display: grid;
	grid-template-columns: repeat(var(--abl-columns, 2), 1fr);
	column-gap: var(--abl-col-gap, 40px);
	row-gap: var(--abl-col-gap, 40px);
}

/* ── Card ── */
@keyframes ablFadeInUp {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.abl-card {
	position: relative;
	opacity: 0;
	animation: ablFadeInUp 0.45s ease forwards;
	z-index: 1;
	overflow: visible;
}

.abl-card:nth-child(1) { animation-delay: 0s; }
.abl-card:nth-child(2) { animation-delay: 0.06s; }
.abl-card:nth-child(3) { animation-delay: 0.12s; }
.abl-card:nth-child(4) { animation-delay: 0.18s; }
.abl-card:nth-child(5) { animation-delay: 0.24s; }
.abl-card:nth-child(6) { animation-delay: 0.3s; }
.abl-card:nth-child(7) { animation-delay: 0.36s; }
.abl-card:nth-child(8) { animation-delay: 0.42s; }
.abl-card:nth-child(9) { animation-delay: 0.48s; }
.abl-card:nth-child(10) { animation-delay: 0.54s; }
.abl-card:nth-child(n+11) { animation-delay: 0.6s; }

.abl-card-link {
	display: block;
	padding: var(--abl-card-pad, 24px) 0;
	text-decoration: none !important;
	color: inherit !important;
	transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease, padding 0.35s ease;
	border-radius: 6px;
	background: transparent;
}

/* ── Box hover expand ── */
.abl-style-box.abl-hover-on .abl-card.abl-expanded {
	z-index: 10;
}

.abl-style-box.abl-hover-on .abl-card.abl-expanded .abl-card-link {
	position: absolute;
	top: -1px;
	left: -1px;
	right: -1px;
	text-decoration: none !important;
	transform: translateY(-4px);
	background: #fff;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.07);
	padding: var(--abl-card-pad, 24px);
}

.abl-style-box.abl-hover-on .abl-card.abl-expanded .abl-title {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ── Card styles ── */

/* 텍스트형: 하단 라인 구분 */
.abl-style-text .abl-card {
	border-bottom: 1px solid var(--abl-border-color, #e0e0e0);
}

.abl-style-text .abl-card-link {
	padding: var(--abl-card-pad, 24px) 0;
}

/* 박스형: 라인 테두리 카드 */
.abl-style-box .abl-card {
	border: 1px solid var(--abl-border-color, #e0e0e0);
	border-radius: 4px;
}

.abl-style-box .abl-card-link {
	padding: calc(var(--abl-card-pad, 24px) + 6px);
}

/* 라인형: 하단 라인만 있는 미니멀 스타일, 카드 높이 정렬로 라인 위치 일치 */
.abl-style-line .abl-card {
	border-bottom: 1px solid var(--abl-border-color, #e0e0e0);
	display: flex;
	flex-direction: column;
}
.abl-style-line .abl-card-link {
	padding: calc(var(--abl-card-pad, 24px) + 4px) 4px;
	transition: padding-left 0.35s ease;
	flex: 1;
}
.abl-style-line .abl-card-link:hover {
	padding-left: 12px;
}
.abl-style-line .abl-card-link:hover .abl-title {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* 오버레이형: 썸네일 위에 텍스트 오버레이 */
.abl-style-overlay .abl-card {
	border-radius: 4px;
	overflow: hidden;
}
.abl-style-overlay .abl-card-link {
	position: relative;
	padding: 0;
	display: block;
	border-radius: 4px;
	overflow: hidden;
}
.abl-style-overlay .abl-thumb {
	position: relative;
	width: 100%;
	padding-top: 66%;
	background-color: #222;
	background-size: cover;
	background-position: center;
	transition: transform 0.6s ease;
}
.abl-style-overlay .abl-card-link:hover .abl-thumb {
	transform: scale(1.05);
}
.abl-style-overlay .abl-thumb::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.35) 55%, rgba(0,0,0,0.08) 100%);
}
.abl-style-overlay .abl-thumb-ph {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #3a3a3a 0%, #1a1a1a 100%);
}
.abl-style-overlay .abl-card-body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: var(--abl-card-pad, 24px);
	z-index: 2;
	color: #fff;
}
.abl-style-overlay .abl-cat {
	color: #fff;
	border-color: rgba(255,255,255,0.55);
	margin-bottom: 12px;
}
.abl-style-overlay .abl-title {
	color: #fff !important;
}
.abl-style-overlay .abl-excerpt {
	color: rgba(255,255,255,0.82);
}
.abl-style-overlay .abl-date {
	color: rgba(255,255,255,0.65);
}

/* 매거진형: 좌측 이미지 + 우측 텍스트 가로 레이아웃 */
.abl-style-magazine .abl-card {
	border-bottom: 1px solid var(--abl-border-color, #e0e0e0);
}
.abl-style-magazine .abl-card-link {
	display: grid;
	grid-template-columns: 38% 1fr;
	gap: calc(var(--abl-card-pad, 24px) + 4px);
	padding: calc(var(--abl-card-pad, 24px) + 4px) 0;
	align-items: center;
}
.abl-style-magazine .abl-thumb {
	position: relative;
	width: 100%;
	padding-top: 66%;
	background-color: #f0f0f0;
	background-size: cover;
	background-position: center;
	border-radius: 4px;
	overflow: hidden;
	transition: transform 0.4s ease;
}
.abl-style-magazine .abl-card-link:hover .abl-thumb {
	transform: translateY(-2px);
}
.abl-style-magazine .abl-thumb-ph {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}
.abl-style-magazine .abl-card-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.abl-style-magazine .abl-card-link:hover .abl-title {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ── Category tag ── */
.abl-cat {
	display: block;
	width: fit-content;
	font-size: 11px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0.01em;
	color: #888;
	margin: 0 0 10px 0;
	padding: 8px 16px;
	background: transparent;
	border: 1px solid #bbb;
	border-radius: 60px;
}

/* ── Title ── */
.abl-title {
	font-size: var(--abl-title-size, 20px) !important;
	font-weight: var(--abl-title-weight, 700) !important;
	letter-spacing: var(--abl-title-spacing, -0.03em) !important;
	line-height: var(--abl-title-height, 1.4) !important;
	color: #1a1a1a;
	margin: 0 0 12px 0 !important;
	padding: 0 !important;
	transition: text-decoration 0.3s ease;
	word-break: keep-all;
	overflow-wrap: break-word;
}

/* ── Excerpt ── */
.abl-excerpt {
	font-size: var(--abl-excerpt-size, 15px) !important;
	font-weight: var(--abl-excerpt-weight, 400) !important;
	letter-spacing: var(--abl-excerpt-spacing, -0.01em) !important;
	line-height: var(--abl-excerpt-height, 1.75) !important;
	color: #555;
	margin: 0 0 16px 0 !important;
	padding: 0 !important;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: var(--abl-excerpt-lines, 2);
	-webkit-box-orient: vertical;
	word-break: keep-all;
	max-height: calc(var(--abl-excerpt-lines, 2) * var(--abl-excerpt-height, 1.75) * 1em);
	transition: max-height 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.abl-style-box.abl-hover-on .abl-card.abl-expanded .abl-excerpt {
	-webkit-line-clamp: 6;
	max-height: calc(6 * var(--abl-excerpt-height, 1.75) * 1em);
}

/* ── Date ── */
.abl-date {
	display: block;
	font-size: calc(var(--abl-meta-size, 13px) - 2px);
	font-weight: 400;
	letter-spacing: 0.02em;
	color: #999;
	font-variant-numeric: tabular-nums;
}

/* ── Empty ── */
.abl-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px 20px;
	color: #999;
	font-size: 15px;
}

/* ── Pagination ── */
.abl-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-top: 34px;
	padding-top: 22px;
}

.abl-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: auto;
	height: auto;
	padding: 2px 6px;
	border: none;
	border-radius: 0;
	background: transparent;
	color: #999;
	font-family: 'Noto Sans KR', sans-serif;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0;
	cursor: pointer;
	transition: color 0.2s ease;
}

.abl-page-btn:hover {
	color: #1a1a1a;
}

.abl-page-btn.active {
	color: #1a1a1a;
	font-weight: 600;
}

.abl-page-btn.abl-page-hidden {
	display: none;
}

/* ── Pagination arrows ── */
.abl-page-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 2px 6px;
	border: none;
	border-radius: 0;
	background: transparent;
	color: #999;
	font-family: 'Noto Sans KR', sans-serif;
	font-size: 12px;
	font-weight: 400;
	cursor: pointer;
	transition: color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
}

.abl-page-arrow:hover:not(:disabled) {
	color: #1a1a1a;
}

.abl-page-arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

/* ── Loading ── */
.abl-grid.abl-loading {
	opacity: 0.4;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

/* ── Responsive ── */
@media (max-width: 768px) {
	.abl-grid {
		grid-template-columns: 1fr !important;
		row-gap: 8px !important;
		column-gap: 0 !important;
	}

	.abl-style-magazine .abl-card-link {
		grid-template-columns: 1fr;
		gap: 14px;
		padding: 20px 0;
	}
	.abl-style-magazine .abl-thumb,
	.abl-style-overlay .abl-thumb {
		padding-top: 100%;
	}

	.abl-card-link {
		padding: 20px 0;
	}

	.abl-title {
		font-size: calc(var(--abl-title-size, 20px) - 2px) !important;
	}

	.abl-excerpt {
		font-size: calc(var(--abl-excerpt-size, 15px) - 1px) !important;
	}

	.abl-pagination {
		margin-top: 32px;
		padding-top: 24px;
	}

	.abl-page-btn {
		font-size: 11px;
	}
}
