/* Standards section. Shared tokens, title rule and fonts come from ags-tokens.css. */

.ags-std {
	--ags-std-radius: 16px;
	padding: var(--ags-pad-y) 0;
	background: var(--ags-std-bg, #f0f1f3);
	color: var(--ags-secondary);
}

.ags-std__inner {
	max-width: var(--ags-max);
	margin-inline: auto;
	padding-inline: var(--ags-pad-x);
}

.ags-std__card {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

/* ---- Dark column ---- */
.ags-std__side {
	position: relative;
	overflow: hidden;
	padding: 48px 40px 40px;
	color: var(--ags-white);
	border-radius: var(--ags-std-radius) 0 0 var(--ags-std-radius);
	background:
		linear-gradient(rgba(19, 31, 40, .88), rgba(19, 31, 40, .94)),
		var(--ags-secondary) var(--ags-std-side-bg, none) center / cover no-repeat;
}

.ags-std__eyebrow {
	margin: 0 0 16px;
	font-size: var(--ags-eyebrow-size);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ags-primary);
}

/* 10em sits between "QUALITY YOU CAN" (9.04em) and "... RELY" (11.66em), so the
   headline breaks before "RELY ON." at every size, since em scales with the font. */
.ags-std__title {
	max-width: 10em;
	margin: 0;
	font-weight: 700;
	line-height: 1.15;
	color: var(--ags-white);
}

.ags-std__text {
	margin: 20px 0 0;
	font-size: var(--ags-text-size);
	line-height: 1.6;
	color: var(--ags-white);
	opacity: .85;
}

.ags-std__text.ags-std__lead {
	margin-top: 14px;
	font-weight: 600;
	opacity: 1;
}

/* Three certificates fanned like a hand of cards; the outer two splay on hover. */
.ags-std__stack {
	position: relative;
	height: 250px;
	margin-top: 34px;
}

.ags-std__stack img {
	position: absolute;
	bottom: 0;
	width: 150px;
	height: auto;
	/* All three cards share one shape, so a certificate scanned at a different
	   page ratio is fitted inside it instead of changing the card's height. */
	aspect-ratio: 900 / 1300;
	object-fit: contain;
	border: 3px solid #fff;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 14px 30px -8px rgba(0, 0, 0, .6);
	transition: transform .35s;
}

.ags-std__stack img:nth-child(1) {
	left: 0;
	transform: rotate(-8deg);
}

.ags-std__stack img:nth-child(2) {
	left: calc(50% - 75px);
	transform: translateY(-14px);
	z-index: 2;
}

.ags-std__stack img:nth-child(3) {
	right: 0;
	transform: rotate(8deg);
}

.ags-std__stack:hover img:nth-child(1) {
	transform: rotate(-12deg) translateX(-10px);
}

.ags-std__stack:hover img:nth-child(3) {
	transform: rotate(12deg) translateX(10px);
}

/* ---- White column ---- */
.ags-std__main {
	min-width: 0;
	padding: 36px 40px;
	background: #fff;
	border: 1px solid rgba(19, 31, 40, .1);
	border-left: 0;
	border-radius: 0 var(--ags-std-radius) var(--ags-std-radius) 0;
}

.ags-std__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.ags-std__tab {
	padding: 8px 16px;
	border: 1px solid rgba(19, 31, 40, .18);
	border-radius: 999px;
	background: none;
	color: var(--ags-secondary);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .2s, border-color .2s, color .2s;
}

.ags-std__tab:hover,
.ags-std__tab.is-active {
	background: var(--ags-primary);
	border-color: var(--ags-primary);
	color: #fff;
}

.ags-std__row {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr) auto;
	gap: 20px;
	align-items: center;
	padding: 18px 16px;
	border-bottom: 1px solid rgba(19, 31, 40, .1);
	border-radius: 8px;
	transition: background-color .25s;
}

.ags-std__row[hidden] {
	display: none;
}

.ags-std__row:hover {
	background: var(--ags-wash, #f0f1f3);
}

.ags-std__code {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--ags-primary);
}

.ags-std__name {
	font-size: 15px;
	font-weight: 500;
}

.ags-std__name small {
	display: block;
	margin-bottom: 2px;
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	opacity: .55;
}

.ags-std__for {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px;
}

.ags-std__for span {
	padding: 4px 10px;
	border-radius: 6px;
	background: var(--ags-wash, #f0f1f3);
	font-size: 11.5px;
	font-weight: 600;
}

.ags-std__pages {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 22px;
}

.ags-std__pages[hidden] {
	display: none;
}

.ags-std__page {
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid rgba(19, 31, 40, .18);
	border-radius: 999px;
	background: none;
	color: var(--ags-secondary);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .2s, border-color .2s, color .2s;
}

.ags-std__page:hover,
.ags-std__page[aria-current="page"] {
	background: var(--ags-primary);
	border-color: var(--ags-primary);
	color: #fff;
}

/* ---- Stacked ---- */
@media (max-width: 1024px) {
	.ags-std__card {
		grid-template-columns: minmax(0, 1fr);
	}

	.ags-std__side {
		border-radius: var(--ags-std-radius) var(--ags-std-radius) 0 0;
	}

	.ags-std__main {
		padding: 24px 20px;
		border-left: 1px solid rgba(19, 31, 40, .1);
		border-top: 0;
		border-radius: 0 0 var(--ags-std-radius) var(--ags-std-radius);
	}
}

@media (max-width: 700px) {
	.ags-std__side {
		padding: 36px 22px;
	}

	/* No sideways shift on hover, so the splayed outer cards stay inside the
	   column's padding instead of running off its edge. */
	.ags-std__stack {
		height: 190px;
	}

	.ags-std__stack img {
		width: 110px;
	}

	.ags-std__stack img:nth-child(2) {
		left: calc(50% - 55px);
	}

	.ags-std__stack:hover img:nth-child(1) {
		transform: rotate(-11deg);
	}

	.ags-std__stack:hover img:nth-child(3) {
		transform: rotate(11deg);
	}

	.ags-std__row {
		grid-template-columns: minmax(0, 1fr);
		gap: 6px;
	}

	.ags-std__for {
		justify-content: flex-start;
	}
}
