

.qng-cert-page {
	padding: 0 0 56px;
	background: var(--qng-page-bg, #fff);
	position: relative;
	z-index: 1;
}

body.qng-body-certificate-page .qng-cert-page.page_section {
	z-index: 1;
	margin-top: 0;
}

.qng-cert-page .container {
	max-width: 1600px;
}

.qng-cert-page__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px 20px;
	padding: 36px 0 8px;
}

.qng-cert-page__card {
	background: #fff;
	border-radius: 14px;
	border: 1px solid #e5e7eb;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-width: 0;
	transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.qng-cert-page__card:hover {
	border-color: #d1d5db;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
	transform: translateY(-2px);
}

.qng-cert-page-card__trigger {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background:var(--qng-surface-soft,#f9fcff);
	cursor: zoom-in;
	text-align: left;
	position: relative;
}

.qng-cert-page__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 3 / 4;
	padding: 14px 12px;
	box-sizing: border-box;
}

.qng-cert-page__thumb img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	vertical-align: middle;
}

.qng-cert-page__zoom-hint {
	position: absolute;
	right: 10px;
	bottom: 10px;
	font-size: 11px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 7px 10px;
	border-radius: 999px;
	background: rgba(17, 24, 39, 0.72);
	color: #fff;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.qng-cert-page__card:hover .qng-cert-page__zoom-hint {
	opacity: 1;
}

.qng-cert-page__card-title {
	margin: 0;
	padding: 12px 12px 16px;
	font-size: 13px;
	line-height: 1.45;
	color: #374151;
	text-align: center;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 3.1em;
}

.qng-cert-page__pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	padding: 28px 0 0;
}

.qng-cert-page__page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 10px;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: #374151;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.qng-cert-page__page-link:hover {
	border-color: #04498c;
	color: #04498c;
}

.qng-cert-page__page-link.is-current {
	background: #04498c;
	border-color: #04498c;
	color: #fff;
	pointer-events: none;
}

.qng-cert-page-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(32px, 5vh, 56px) clamp(56px, 8vw, 80px);
	box-sizing: border-box;
}

.qng-cert-page-lightbox[hidden] {
	display: none !important;
}

.qng-cert-page-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.72);
	cursor: pointer;
}

.qng-cert-page-lightbox__nav {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.95);
	color: #04498c;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.qng-cert-page-lightbox__nav span {
	display: block;
	margin-top: -2px;
}

.qng-cert-page-lightbox__nav:hover,
.qng-cert-page-lightbox__nav:focus {
	background: #04498c;
	color: #fff;
	outline: none;
}

.qng-cert-page-lightbox__nav--prev {
	left: max(16px, calc(50% - min(46vw, 380px) - 56px));
}

.qng-cert-page-lightbox__nav--next {
	right: max(16px, calc(50% - min(46vw, 380px) - 56px));
}

.qng-cert-page-lightbox__nav[hidden] {
	display: none !important;
}

.qng-cert-page-lightbox__panel {
	position: relative;
	z-index: 1;
	width: auto;
	max-width: min(92vw, 760px);
	max-height: min(86vh, 900px);
	margin: 0 auto;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	align-self: center;
}

.qng-cert-page-lightbox__close {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 2;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	color: #111;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.qng-cert-page-lightbox__figure {
	margin: 0;
	padding: 44px 28px 22px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	overflow: auto;
	min-height: 0;
	max-height: min(86vh, 900px);
	box-sizing: border-box;
}

.qng-cert-page-lightbox__img {
	display: block;
	max-width: min(100%, 680px);
	width: auto;
	height: auto;
	max-height: min(calc(86vh - 88px), 720px);
	object-fit: contain;
	margin: 0 auto;
}

.qng-cert-page-lightbox__title {
	margin: 0;
	padding: 0 8px;
	font-size: 14px;
	line-height: 1.45;
	color: #6b7280;
	text-align: center;
	max-width: min(100%, 640px);
	flex-shrink: 0;
}

/* Tablet */
@media only screen and (max-width: 991px) {
	.qng-cert-page__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px 14px;
		padding-top: 28px;
	}
}

/* Phone */
@media only screen and (max-width: 576px) {
	.qng-cert-page {
		padding-bottom: 40px;
	}

	.qng-cert-page__grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.qng-cert-page__card:hover {
		transform: none;
	}

	.qng-cert-page__zoom-hint {
		opacity: 1;
	}

	.qng-cert-page-lightbox {
		padding: 24px 48px;
	}

	.qng-cert-page-lightbox__nav {
		width: 40px;
		height: 40px;
		font-size: 26px;
	}

	.qng-cert-page-lightbox__nav--prev {
		left: max(8px, calc(50% - min(47vw, 280px) - 48px));
	}

	.qng-cert-page-lightbox__nav--next {
		right: max(8px, calc(50% - min(47vw, 280px) - 48px));
	}

	.qng-cert-page-lightbox__panel {
		max-width: min(94vw, 560px);
		max-height: 88vh;
	}

	.qng-cert-page-lightbox__figure {
		padding: 40px 16px 18px;
		max-height: 88vh;
	}

	.qng-cert-page-lightbox__img {
		max-height: min(calc(88vh - 80px), 620px);
	}

	.qng-cert-page-lightbox__close {
		top: 6px;
		right: 6px;
	}
}
