/* ==========================================================================
   수상작 갤러리
   ========================================================================== */

.gallery-page {
	padding-bottom: 3.5rem;
}

.gallery-list__header {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1rem;
	margin-bottom: 2rem;
}

.gallery-years {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 0.35rem 1.75rem;
	margin: 0.25rem 0 1.5rem;
}

.gallery-years__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: #8b95a1;
	font-size: 1.05rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.2;
	text-decoration: none;
}

.gallery-years__link:hover {
	color: var(--primary, #0088cc);
	text-decoration: none;
}

.gallery-years__link.is-active {
	color: var(--primary, #0088cc);
	font-weight: 700;
}

.gallery-card__division {
	display: inline-block;
	font-size: 0.78rem;
	color: var(--primary-color);
	margin-bottom: 0.5rem;
	font-weight: 600;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	background: var(--primary-color-bg);
}

.gallery-categories {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
	margin: 0 0 0.35rem;
	padding: 0.4rem;
	gap: 0.25rem;
	background: #eef3f8;
	border-radius: 18px;
}

.gallery-categories__link {
	display: inline-flex;
	flex: 1 1 10rem;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0.75rem 1.25rem;
	border: 1px solid transparent;
	border-radius: 14px;
	color: #64748b;
	font-size: 1.05rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	text-align: center;
	text-decoration: none;
	background: transparent;
}

.gallery-categories__link:hover {
	color: var(--primary, #0088cc);
	text-decoration: none;
}

.gallery-categories__link.is-active {
	background: #fff;
	border-color: #fff;
	color: var(--primary, #0088cc);
	font-weight: 600;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.gallery-categories--solo {
	margin-bottom: 2.5rem;
}

.gallery-subcategories {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	max-width: 100%;
	gap: 0.3rem;
	margin: 0.7rem 0 2rem;
	padding: 0.3rem;
	background: #f4f7fb;
	border-radius: 14px;
}

.gallery-subcategories__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0.35rem 0.95rem;
	border: 1px solid transparent;
	border-radius: 10px;
	color: #64748b;
	font-size: 0.92rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.2;
	text-decoration: none;
	background: transparent;
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.gallery-subcategories__link:hover {
	color: var(--primary, #0088cc);
	text-decoration: none;
}

.gallery-subcategories__link:focus-visible {
	outline: 2px solid var(--primary, #0088cc);
	outline-offset: 2px;
}

.gallery-subcategories__link.is-active {
	background: #fff;
	color: var(--primary, #0088cc);
	font-weight: 600;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Fancybox */
.fancybox__counter { display: none; }
.fancybox__button--slideshow { display: none; }
.is-prev { display: none; }
.is-next { display: none; }
div.toolbar { display: none; }

.fancybox__caption {
	width: min(52rem, calc(100vw - 3rem));
	padding: 0.9rem 0.25rem 0;
	color: #fff;
	text-align: center;
}

.gallery-lightbox__grade {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 1.65rem;
	margin: 0;
	padding: 0.15rem 0.7rem;
	border-radius: 999px;
	background: #fff;
	color: #222;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.03em;
}

.gallery-lightbox__title {
	margin: 0.85rem 0 0;
	color: #e0e0e0;
	font-size: 1.65rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.04em;
}

.gallery-lightbox__author {
	margin: 0.45rem 0 0;
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.4;
}

.gallery-lightbox__description {
	margin: 1.15rem 0 0;
	padding-top: 1.1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.42);
	color: rgba(255, 255, 255, 0.86);
	font-size: 0.92rem;
	font-weight: 400;
	line-height: 1.75;
	text-align: left;
	white-space: pre-wrap;
}

.gallery-audio-lightbox .fancybox__caption {
	width: min(28rem, calc(100vw - 3rem));
}

/* 수상작 카드 */
.gallery-card {
	border: 1px solid #e3e8ef;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: none;
	transition:
		transform 0.25s ease,
		box-shadow 0.25s ease,
		border-color 0.25s ease;
	background-color: #fff;
}

.gallery-card:hover {
	transform: translateY(-4px);
	border-color: rgba(var(--primary-color-rgb), 0.35);
	box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.gallery-card .card-img-wrapper {
	overflow: hidden;
	position: relative;
	background: #f3f5f8;
	line-height: 0;
	border-bottom: 1px solid #e8ecf0;
}

.gallery-card .card-img-wrapper a {
	display: block;
	width: 100%;
}

.gallery-card .card-img-top {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.4s ease;
}

.gallery-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 12rem;
	background: #f3f5f8;
	color: #64748b;
	font-size: 2rem;
	line-height: 1;
}

.gallery-audio-lightbox .fancybox__content {
	background: #fff;
	padding: 1.25rem 1.5rem;
	border-radius: 12px;
}

.gallery-audio-lightbox .fancybox__content audio {
	display: block;
	width: min(28rem, calc(100vw - 4rem));
}

.gallery-card:hover .card-img-top {
	transform: scale(1.03);
}

.gallery-card .card-body {
	padding: 1rem 1.1rem 1.15rem;
	background: #fff;
}

.gallery-card .card-title {
	font-size: 1.02rem;
	font-weight: 700;
	margin-bottom: 0;
	color: #1f2937;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3em;
}

/* 상격 그룹 */
.grade-group {
	background: #fff;
	border-radius: 18px;
	padding: 1.75rem 1.5rem 0.5rem;
	margin-bottom: 2.25rem;
	border: 1px solid #e3e8ef;
	box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.grade-section {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 1.5rem;
	padding-bottom: 16px;
	border-bottom: 2px solid;
}

.grade-icon-wrap {
	position: relative;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: #fff;
}

.grade-icon-wrap i {
	font-size: 1.3rem;
	position: relative;
	z-index: 1;
}

.grade-info {
	display: flex;
	align-items: baseline;
	gap: 10px;
}

.grade-info .grade-name {
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
}

.grade-info .grade-count {
	font-size: 0.8rem;
	color: #aaa;
	font-weight: 400;
}

.grade-1 .grade-section { border-bottom-color: #d4a017; }
.grade-1 .grade-icon-wrap { background: linear-gradient(135deg, #c9a020, #e8c840); }
.grade-1 .grade-name { color: #9a7a0a; }

.grade-2 .grade-section { border-bottom-color: #8a9bae; }
.grade-2 .grade-icon-wrap { background: linear-gradient(135deg, #7a8a9e, #a8b8c8); }
.grade-2 .grade-name { color: #5a6a7a; }

.grade-3 .grade-section { border-bottom-color: #b07840; }
.grade-3 .grade-icon-wrap { background: linear-gradient(135deg, #a06830, #c89060); }
.grade-3 .grade-name { color: #7a5020; }

.grade-4 .grade-section { border-bottom-color: #0078d4; }
.grade-4 .grade-icon-wrap { background: linear-gradient(135deg, #0070c4, #2b88d8); }
.grade-4 .grade-name { color: #0060aa; }

@media (max-width: 767px) {
	.gallery-list__header {
		justify-content: flex-end;
	}

	.gallery-years {
		gap: 0.25rem 1.15rem;
	}
}
