/* Allomed homepage category grid — matches premium reference layout */

.allomed-cat-grid {
	--allomed-yellow: #ffc400;
	--allomed-navy: #071d3b;
	--allomed-cat-radius: 18px;
	--allomed-cat-gap: 18px;
	--allomed-cat-height: 250px;
	width: 100%;
	padding: 28px 0 8px;
	box-sizing: border-box;
}

.allomed-cat-grid__inner {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--allomed-cat-gap);
	max-width: 1520px;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}

.allomed-cat-card {
	position: relative;
	display: block;
	height: var(--allomed-cat-height);
	border-radius: var(--allomed-cat-radius);
	overflow: hidden;
	text-decoration: none;
	color: #fff;
	isolation: isolate;
	background: #1a2a3a;
}

.allomed-cat-card:focus-visible {
	outline: 2px solid var(--allomed-yellow);
	outline-offset: 3px;
}

.allomed-cat-card__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
}

.allomed-cat-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transform: scale(1);
	transition: transform 250ms ease;
	will-change: transform;
}

.allomed-cat-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background:
		linear-gradient(135deg, #243447 0%, #1a2a3a 55%, #0f1c28 100%);
}

.allomed-cat-card__placeholder-label {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.75;
	border: 1px dashed rgba(255, 255, 255, 0.35);
	padding: 8px 12px;
	border-radius: 999px;
}

.allomed-cat-card__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 16, 32, 0.52);
	transition: background-color 250ms ease;
	pointer-events: none;
}

.allomed-cat-card__content {
	position: relative;
	z-index: 1;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 20px 16px;
	text-align: center;
	box-sizing: border-box;
}

.allomed-cat-card__title {
	font-family: inherit;
	font-size: clamp(15px, 1.15vw, 20px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	max-width: 92%;
}

.allomed-cat-card__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 22px;
	border: 1.5px solid rgba(255, 255, 255, 0.92);
	border-radius: 8px;
	background: transparent;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	transition:
		background-color 250ms ease,
		border-color 250ms ease,
		color 250ms ease;
	pointer-events: none; /* whole card is the hit target */
}

.allomed-cat-card:hover .allomed-cat-card__img,
.allomed-cat-card:focus-visible .allomed-cat-card__img {
	transform: scale(1.04);
}

.allomed-cat-card:hover .allomed-cat-card__overlay,
.allomed-cat-card:focus-visible .allomed-cat-card__overlay {
	background: rgba(0, 10, 24, 0.68);
}

.allomed-cat-card:hover .allomed-cat-card__btn,
.allomed-cat-card:focus-visible .allomed-cat-card__btn {
	background: var(--allomed-yellow);
	border-color: var(--allomed-yellow);
	color: var(--allomed-navy);
}

.allomed-cat-card.is-unlinked {
	cursor: default;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
	.allomed-cat-grid {
		--allomed-cat-gap: 14px;
		--allomed-cat-height: 230px;
		padding-top: 22px;
	}

	.allomed-cat-grid__inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		padding: 0 16px;
	}

	.allomed-cat-card__title {
		font-size: 15px;
	}
}

/* Narrow mobile: still 2 columns when space allows */
@media (max-width: 640px) {
	.allomed-cat-grid {
		--allomed-cat-gap: 10px;
		--allomed-cat-height: 190px;
		padding-top: 16px;
	}

	.allomed-cat-grid__inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		padding: 0 12px;
	}

	.allomed-cat-card__title {
		font-size: 12px;
		letter-spacing: 0.04em;
	}

	.allomed-cat-card__btn {
		min-height: 32px;
		padding: 0 12px;
		font-size: 10px;
		border-radius: 6px;
	}

	.allomed-cat-card__content {
		gap: 10px;
		padding: 12px 8px;
	}
}

/* Very small phones: 1 column */
@media (max-width: 380px) {
	.allomed-cat-grid {
		--allomed-cat-height: 210px;
	}

	.allomed-cat-grid__inner {
		grid-template-columns: 1fr;
	}
}
