.g12-apc {
	--g12-apc-accent: #ff4b0b;
	--g12-apc-inactive-bg: #ededed;
	--g12-apc-active-bg: #111;
	--g12-apc-inactive-text: #171717;
	--g12-apc-active-text: #fff;
	--g12-apc-radius: 18px;
	--g12-apc-hover-lift: -2px;
	--g12-apc-overlay-top: rgba(0, 0, 0, 0.25);
	--g12-apc-overlay-middle: rgba(0, 0, 0, 0.72);
	--g12-apc-overlay-bottom: rgba(0, 0, 0, 0.98);
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	width: 100%;
}

.g12-apc__card {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-height: 400px;
	padding: 20px;
	border-radius: var(--g12-apc-radius);
	background: var(--g12-apc-inactive-bg);
	color: var(--g12-apc-inactive-text);
	transition: color 220ms ease, background 220ms ease, transform 220ms ease;
}

.g12-apc__card:hover {
	transform: translateY(var(--g12-apc-hover-lift));
}

.g12-apc__media {
	position: absolute;
	inset: 0;
	/* z-index: -2; */
	/* opacity: 0; */
	transition: opacity 220ms ease;
}

.g12-apc__overlay {
	position: absolute;
	inset: 0;
    z-index: 1;
    opacity: 1;
	transition: opacity 220ms ease;
	background: linear-gradient(180deg, var(--g12-apc-overlay-top) 0%, var(--g12-apc-overlay-middle) 58%, var(--g12-apc-overlay-bottom) 100%);
}

.g12-apc__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.g12-apc__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
}

.g12-apc__label {
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 7px 14px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--g12-apc-inactive-text);
	font-size: 16px;
	line-height: 1.2;
	transition: border-color 220ms ease, color 220ms ease, background 220ms ease;
}

.g12-apc__number {
	color: var(--g12-apc-accent);
	font-size: 25px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0;
	transition: opacity 220ms ease, transform 220ms ease;
}

.g12-apc__star {
	display: none;
	color: var(--g12-apc-accent);
	font-size: 54px;
	font-weight: 600;
	line-height: 0.75;
}

.g12-apc__body {
	position: relative;
	z-index: 1;
	width: 100%;
	margin-top: auto;
}

.g12-apc__title-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.g12-apc__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	position: relative;
	color: var(--g12-apc-accent);
	font-size: 21px;
	line-height: 1;
	width: 24px;
	height: 24px;
	z-index: 2;
}

.g12-apc__icon i,
.g12-apc__icon svg {
	display: block;
	width: 1em;
	height: 1em;
	color: currentColor;
	fill: currentColor;
}

.g12-apc__icon:has(i:empty)::before {
	content: "";
	display: block;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2.5h8.5L15 5v10.5H4z'/%3E%3Cpath d='M12.5 2.5V5H15'/%3E%3Cpath d='M7 8h5'/%3E%3Cpath d='M7 11h5'/%3E%3Cpath d='M7 14h3'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2.5h8.5L15 5v10.5H4z'/%3E%3Cpath d='M12.5 2.5V5H15'/%3E%3Cpath d='M7 8h5'/%3E%3Cpath d='M7 11h5'/%3E%3Cpath d='M7 14h3'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.g12-apc__title {
	margin: 0;
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: 0;
}

.g12-apc__description {
	max-width: 250px;
	margin: 16px 0 0;
	color: rgba(255, 255, 255, 0.82);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.45;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 220ms ease, transform 220ms ease;
}

.g12-apc__link {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin-top: 20px;
	color: var(--g12-apc-accent);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 220ms ease, transform 220ms ease;
}

.g12-apc__link:hover,
.g12-apc__link:focus {
	color: var(--g12-apc-accent);
	text-decoration: none;
}

.g12-apc__link-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
}

.g12-apc__link-icon svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* .g12-apc__card.is-active,
.g12-apc__card:hover {
	background: var(--g12-apc-active-bg);
	color: var(--g12-apc-active-text);
} */

.g12-apc__card.is-active .g12-apc__media,
.g12-apc__card.is-active .g12-apc__overlay,
.g12-apc__card:hover .g12-apc__media,
.g12-apc__card:hover .g12-apc__overlay {
	opacity: 1;
}

.g12-apc__card.is-active .g12-apc__label,
.g12-apc__card:hover .g12-apc__label {
	border-color: rgba(255, 255, 255, 0.28);
	color: var(--g12-apc-active-text);
}

.g12-apc__card.is-active .g12-apc__description,
.g12-apc__card.is-active .g12-apc__link,
.g12-apc__card:hover .g12-apc__description,
.g12-apc__card:hover .g12-apc__link {
	opacity: 1;
	transform: translateY(0);
}

.g12-apc__card:not(.is-active) .g12-apc__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
}

.g12-apc__card:not(.is-active) .g12-apc__title {
	font-size: 22px;
	font-weight: 500;
	line-height: 1.25;
}

.g12-apc__card:not(.is-active) .g12-apc__description,
.g12-apc__card:not(.is-active) .g12-apc__link {
	display: none;
}

.g12-apc__card:not(.is-active) .g12-apc__number {
	position: absolute;
	top: 46%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: clamp(76px, 7vw, 104px);
	font-weight: 400;
	z-index: 1;
}

.g12-apc__card:not(.is-active) .g12-apc__star {
	display: inline-flex;
}

/* .g12-apc:has(.g12-apc__card:not(.is-active):hover) .g12-apc__card.is-active:not(:hover) {
	background: var(--g12-apc-inactive-bg);
	color: var(--g12-apc-inactive-text);
	transform: none;
} */

/* .g12-apc:has(.g12-apc__card:not(.is-active):hover) .g12-apc__card.is-active:not(:hover) .g12-apc__media,
.g12-apc:has(.g12-apc__card:not(.is-active):hover) .g12-apc__card.is-active:not(:hover) .g12-apc__overlay,
.g12-apc:has(.g12-apc__card:not(.is-active):hover) .g12-apc__card.is-active:not(:hover) .g12-apc__description,
.g12-apc:has(.g12-apc__card:not(.is-active):hover) .g12-apc__card.is-active:not(:hover) .g12-apc__link {
	opacity: 0;
} */

.g12-apc:has(.g12-apc__card:not(.is-active):hover) .g12-apc__card.is-active:not(:hover) .g12-apc__description,
.g12-apc:has(.g12-apc__card:not(.is-active):hover) .g12-apc__card.is-active:not(:hover) .g12-apc__link {
	display: none;
}

.g12-apc:has(.g12-apc__card:not(.is-active):hover) .g12-apc__card.is-active:not(:hover) .g12-apc__label {
	border-color: rgba(0, 0, 0, 0.18);
	color: var(--g12-apc-inactive-text);
}

.g12-apc:has(.g12-apc__card:not(.is-active):hover) .g12-apc__card.is-active:not(:hover) .g12-apc__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
}

.g12-apc:has(.g12-apc__card:not(.is-active):hover) .g12-apc__card.is-active:not(:hover) .g12-apc__title {
	font-size: 22px;
	font-weight: 500;
}

.g12-apc:has(.g12-apc__card:not(.is-active):hover) .g12-apc__card.is-active:not(:hover) .g12-apc__number {
	position: absolute;
	top: 46%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: clamp(76px, 7vw, 104px);
	font-weight: 400;
	z-index: 1;
}

.g12-apc:has(.g12-apc__card:not(.is-active):hover) .g12-apc__card.is-active:not(:hover) .g12-apc__star {
	display: inline-flex;
}

.g12-apc__card:hover .g12-apc__body {
	display: block;
}

.g12-apc__card:hover .g12-apc__description,
.g12-apc__card:hover .g12-apc__link {
	display: inline-flex;
}

.g12-apc__card:hover .g12-apc__description {
	display: block;
}

.g12-apc__card:hover .g12-apc__title {
	font-size: 24px;
	font-weight: 700;
}

.g12-apc__card:hover .g12-apc__number {
	position: static;
	transform: none;
	font-size: 25px;
	font-weight: 500;
}

.g12-apc__card:hover .g12-apc__star {
	display: none;
}

@media (max-width: 1024px) {
	.g12-apc {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.g12-apc {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.g12-apc__card {
		min-height: 330px;
	}
}
