/* Certifikace a laboratorní testy (návrh homepage, „Certifikace“). */

.as-certifikace { padding: 88px 0; }
.as-certifikace .as-sekce-hlava { margin-bottom: 48px; }
.as-certifikace .as-sekce-hlava__nadpis { font-size: 42px; }
.as-certifikace .as-sekce-hlava__podnadpis { max-width: 620px; }

.as-cert__seznam {
	list-style: none;
	margin: 0 0 72px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)); /* tři karty na všech šířkách, bez díry po čtvrté (David 23. 10.) */
	gap: 20px;
}
.as-cert {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background: var(--as-bila);
	border: var(--as-ramecek);
	border-radius: 20px;
	padding: 28px;
	box-shadow: var(--as-stin-5);
}
/* Loga o pětinu větší než v návrhu (David 23. 10.: „zvětši ty loga o 20 %“): 52 → 62 px, mobil 38 → 46 px. */
.as-cert__logo { height: 62px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.as-cert__logo img { height: 62px; width: auto; max-width: 100%; object-fit: contain; }
.as-cert__kolecko {
	width: 62px;
	height: 62px;
	border-radius: 50%;
	background: var(--as-merunka);
	color: var(--as-inkoust);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 16px;
	letter-spacing: .04em;
}
.as-cert__nadpis { font-size: 14.5px; font-weight: 800; color: var(--as-inkoust); margin-bottom: 4px; }
.as-cert--logo .as-cert__nadpis { display: none; }
.as-cert__text { font-size: 13.5px; line-height: 1.55; color: var(--as-text); }

.as-testy { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; scroll-margin-top: 90px; }
.as-testy__nadpis { font-size: 27px; letter-spacing: -.015em; margin: 0 0 12px; }
.as-testy__text p { font-size: 15px; line-height: 1.65; color: var(--as-text); margin: 0; }
.as-testy__obrazky { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.as-testy__obr {
	display: block;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #CDD3E3;
	background: var(--as-bila);
	box-shadow: 6px 6px 0 var(--as-levandule-tmava);
	transition: transform .15s ease;
}
.as-testy__obr:hover { transform: translateY(-3px); }
.as-testy__obr img { width: 100%; height: 240px; object-fit: cover; object-position: center top; display: block; }

/* Lightbox protokolů (<dialog> otevírá asva.js): obrázek se vejde do okna, šipky a křížek
   v prvcích návrhu. Bez podpory <dialog> zůstane odkaz na obrázek v novém okně. */
.as-lightbox {
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 56px 72px;
	border: 0;
	background: transparent;
	overflow: hidden;
}
.as-lightbox::backdrop { background: rgba(35, 43, 82, .82); }
.as-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.as-lightbox__obsah { margin: 0; display: grid; justify-items: center; gap: 12px; max-width: 100%; max-height: 100%; }
.as-lightbox__obr {
	max-width: min(100%, 1000px);
	max-height: calc(100vh - 150px);
	width: auto;
	height: auto;
	object-fit: contain;
	background: var(--as-bila);
	border-radius: 10px;
	box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55);
}
.as-lightbox__popis { font-size: 14px; font-weight: 700; color: var(--as-bila); }
.as-lightbox__tl {
	position: fixed;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 2px solid var(--as-bila);
	background: var(--as-inkoust);
	color: var(--as-bila);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}
.as-lightbox__tl svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.as-lightbox__tl:hover,
.as-lightbox__tl:focus-visible { background: var(--as-terakota); border-color: var(--as-terakota); outline: none; }
.as-lightbox__tl--x { top: 18px; right: 18px; }
.as-lightbox__tl--zpet { left: 18px; top: 50%; transform: translateY(-50%); }
.as-lightbox__tl--dal { right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 1024px) {
	.as-certifikace { padding: 72px 0; }
	.as-certifikace .as-sekce-hlava__nadpis { font-size: 36px; }
	.as-cert__seznam { margin-bottom: 56px; }
	.as-testy { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* Mobil: karty 2 × 2 jen s krátkým nadpisem, protokoly v řadě s posunem do strany. */
@media (max-width: 768px) {
	.as-certifikace { padding: 48px 0; }
	.as-certifikace .as-sekce-hlava { margin-bottom: 26px; }
	.as-certifikace .as-sekce-hlava__nadpis { font-size: 28px; }
	.as-certifikace .as-sekce-hlava__podnadpis { display: none; }
	.as-cert__seznam { gap: 12px; margin-bottom: 36px; }
	.as-cert { border-radius: 16px; padding: 16px 12px; box-shadow: 4px 4px 0 var(--as-merunka); }
	.as-cert__logo { height: 46px; margin-bottom: 10px; }
	.as-cert__logo img { height: 46px; }
	.as-cert__kolecko { width: 46px; height: 46px; font-size: 13px; }
	.as-cert__nadpis,
	.as-cert--logo .as-cert__nadpis { display: block; font-size: 12.5px; line-height: 1.45; font-weight: 400; color: var(--as-text); margin: 0; }
	.as-cert__text { display: none; }
	.as-testy { gap: 0; }
	.as-testy__nadpis { font-size: 21px; margin-bottom: 6px; }
	.as-testy__text p { font-size: 14px; line-height: 1.55; margin-bottom: 16px; }
	.as-testy__obrazky {
		display: flex;
		gap: 12px;
		overflow-x: auto;
		scrollbar-width: none;
		margin: 0 calc(-1 * var(--as-okraj));
		padding: 0 var(--as-okraj) 10px;
	}
	.as-testy__obrazky::-webkit-scrollbar { display: none; }
	.as-testy__obr { flex: 0 0 150px; box-shadow: 5px 5px 0 var(--as-levandule-tmava); }
	.as-testy__obr img { height: 200px; }
	.as-lightbox { padding: 64px 12px 72px; }
	.as-lightbox__obr { max-height: calc(100vh - 160px); }
	.as-lightbox__tl--zpet,
	.as-lightbox__tl--dal { top: auto; bottom: 14px; transform: none; }
	.as-lightbox__tl--zpet { left: calc(50% - 56px); }
	.as-lightbox__tl--dal { right: calc(50% - 56px); }
}
