/* ==========================================================================
   수상작 갤러리 (gallery/list.php)
   ========================================================================== */

/* Fancybox 커스텀 */
.fancybox__counter { display: none; }
.fancybox__button--slideshow { display: none; }
.is-prev { display: none; }
.is-next { display: none; }
div.toolbar { display: none; }
#viewerContainer { top: 0; }
.pdfViewer .page { margin: 0; border: 0; padding: 0; }

/* --------------------------------------------------------------------------
   연도 선택기
   -------------------------------------------------------------------------- */
.year-selector {
	display: inline-flex;
	align-items: center;
	gap: 0;
	background: #fff;
	border: 1px solid var(--primary-color-border);
	border-radius: 12px;
	padding: 4px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
	position: relative;
	z-index: 50;
	overflow: visible;
}
.year-current {
	font-size: 1.6rem;
	font-weight: 900;
	color: var(--primary-color);
	min-width: 80px;
	text-align: center;
	letter-spacing: -0.02em;
	line-height: 1;
	padding: 6px 8px;
	cursor: pointer;
	user-select: none;
}
.year-current:hover {
	opacity: 0.8;
}
.year-dropdown {
	display: none;
	position: fixed;
	background: #fff;
	border: 1px solid var(--primary-color-border);
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.12);
	padding: 6px;
	z-index: 9999;
	min-width: 110px;
}
.year-dropdown a {
	display: block;
	padding: 8px 16px;
	font-size: 0.95rem;
	font-weight: 600;
	color: #555;
	text-decoration: none;
	border-radius: 6px;
	text-align: center;
	transition: all 0.15s ease;
}
.year-dropdown a:hover {
	background: var(--primary-color-bg);
	color: var(--primary-color);
}
.year-dropdown a.active {
	background: var(--primary-color);
	color: #fff;
}
.year-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	color: var(--primary-color);
	font-size: 0.85rem;
	transition: all 0.2s ease;
	text-decoration: none;
}
.year-nav:hover {
	background: var(--primary-color);
	color: #fff;
	text-decoration: none;
}
.year-nav.disabled {
	color: var(--text-light);
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   수상작 카드
   -------------------------------------------------------------------------- */
.gallery-card {
	border: none;
	border-radius: 15px;
	overflow: hidden;
	box-shadow: 0 8px 25px rgba(0,0,0,0.07);
	transition: all 0.3s ease;
	height: 100%;
	background-color: #fff;
	margin-bottom: 2rem;
}
.gallery-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}
.gallery-card .card-img-wrapper {
	overflow: hidden;
	position: relative;
	background: #f5f6f8;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 280px;
}
.gallery-card.type-video .card-img-wrapper { height: 220px; }
.gallery-card.type-poster .card-img-wrapper { height: 350px; }
.gallery-card .card-img-top {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: transform 0.4s ease;
	display: block;
}
.gallery-card:hover .card-img-top {
	transform: scale(1.03);
}
.gallery-card .card-body {
	padding: 1.25rem;
}
.gallery-card .card-title {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: #333;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3em;
}

/* --------------------------------------------------------------------------
   상격 그룹 (대상 / 최우수상 / 우수상 ...)
   -------------------------------------------------------------------------- */
.grade-group {
	background: #f8f9fb;
	border-radius: 16px;
	padding: 28px 24px 12px;
	margin-bottom: 2rem;
	border: 1px solid #e8ecf0;
}
.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; }

.grade-5 .grade-section { border-bottom-color: #0078d4; }
.grade-5 .grade-icon-wrap { background: linear-gradient(135deg, #0070c4, #2b88d8); }
.grade-5 .grade-name { color: #0060aa; }

/* --------------------------------------------------------------------------
   부문2 필터 (일반인 / 초등학생 / 중학생 / 고등학생)
   -------------------------------------------------------------------------- */
.cate2-filter {
	display: flex;
	justify-content: center;
	gap: 0;
	margin: 20px auto 40px;
	padding: 5px;
	background: #edf2f7;
	border-radius: 50px;
	max-width: fit-content;
}
.cate2-filter a {
	position: relative;
	padding: 10px 28px;
	font-size: 0.95rem;
	font-weight: 500;
	color: #777;
	text-decoration: none;
	border-radius: 50px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	white-space: nowrap;
	letter-spacing: -0.01em;
}
.cate2-filter a:hover {
	color: var(--primary-color);
	background: var(--primary-color-bg);
}
.cate2-filter a.active {
	color: #fff;
	background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
	box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.35);
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   반응형
   -------------------------------------------------------------------------- */
@media (max-width: 575px) {
	.cate2-filter {
		flex-wrap: wrap;
		border-radius: 16px;
		gap: 2px;
		padding: 4px;
	}
	.cate2-filter a {
		padding: 8px 18px;
		font-size: 0.85rem;
	}
}
