/**
 * nl-category-grid – category tiles.
 *
 * Breakpoint template, see nl-base.css. Selectors use two classes so they win against
 * the Elementor kit (".elementor-kit-N h2") and the theme.
 */

/*
 * The tiles have no intrinsic width. In a wrapping flex container (Elementor's default on mobile)
 * the browser would size the widget at its content width and give it almost no height.
 * Same fix as Elementor's own video and divider widgets.
 */
.e-con-inner > .elementor-widget-nl-category-grid,
.e-con > .elementor-widget-nl-category-grid {
	width: var(--container-widget-width, 100%);
	--flex-grow: var(--container-widget-flex-grow);
}

.nl-category-grid .nl-category-grid__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nl-category-grid .nl-tile {
	position: relative;
	display: block;
	aspect-ratio: 16 / 11;
	overflow: hidden;
	border-radius: var(--nl-r-tile);
	background: #0b1424;
	text-decoration: none;
}

/* Backgrounds of the design for categories without an image, used in turn. */
.nl-category-grid .nl-tile--look-0 {
	background: radial-gradient(90% 70% at 25% 0%, rgba(0, 159, 227, 0.75), rgba(0, 159, 227, 0) 70%), radial-gradient(60% 50% at 85% 15%, rgba(110, 90, 255, 0.55), rgba(110, 90, 255, 0) 70%), #0b1424;
}

.nl-category-grid .nl-tile--look-1 {
	background: radial-gradient(40% 90% at 50% -10%, rgba(220, 235, 255, 0.75), rgba(220, 235, 255, 0) 70%), #070b14;
}

.nl-category-grid .nl-tile--look-2 {
	background: radial-gradient(70% 60% at 70% 10%, rgba(200, 60, 200, 0.55), rgba(200, 60, 200, 0) 70%), radial-gradient(60% 60% at 20% 20%, rgba(0, 159, 227, 0.5), rgba(0, 159, 227, 0) 70%), #120b1e;
}

.nl-category-grid .nl-tile--look-3 {
	background: radial-gradient(80% 60% at 50% 100%, rgba(140, 220, 255, 0.45), rgba(140, 220, 255, 0) 70%), radial-gradient(50% 60% at 15% 0%, rgba(0, 159, 227, 0.6), rgba(0, 159, 227, 0) 70%), #08121c;
}

.nl-category-grid .nl-tile__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.3s ease;
}

/* Darkens the lower part so the white text stays readable on any image. */
.nl-category-grid .nl-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(5, 8, 16, 0) 30%, rgba(5, 8, 16, 0.88) 100%);
}

.nl-category-grid .nl-tile__body {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 20px;
}

.nl-category-grid .nl-tile__title {
	font-family: var(--nl-font-tile);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	color: #fff;
	overflow-wrap: anywhere;
}

.nl-category-grid .nl-tile__button {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 32px;
	padding: 0 10px 0 14px;
	border-radius: var(--nl-r-pill);
	background: var(--nl-action);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	color: #fff;
	white-space: nowrap;
	transition: background-color 0.3s ease;
}

.nl-category-grid .nl-tile__button svg {
	flex: none;
	width: 14px;
	height: 14px;
}

.nl-category-grid .nl-tile:hover .nl-tile__image {
	transform: scale(1.04);
}

.nl-category-grid .nl-tile:hover .nl-tile__button {
	background: var(--nl-navy);
}

@media (prefers-reduced-motion: reduce) {
	.nl-category-grid .nl-tile__image,
	.nl-category-grid .nl-tile__button {
		transition: none;
	}

	.nl-category-grid .nl-tile:hover .nl-tile__image {
		transform: none;
	}
}

@media (max-width: 1024px) {
	.nl-category-grid .nl-category-grid__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.nl-category-grid .nl-category-grid__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.nl-category-grid .nl-tile {
		aspect-ratio: 1 / 1;
		border-radius: 27px;
	}

	.nl-category-grid .nl-tile__body {
		gap: 8px;
		padding: 12px;
	}

	.nl-category-grid .nl-tile__title {
		font-size: 16px;
	}

	.nl-category-grid .nl-tile__button {
		height: 30px;
		font-size: 12px;
	}
}
