/**
 * JuryBoard Platform Cards — frontend styles.
 *
 * Same contract as the other JuryBoard widgets: every value an Elementor
 * control can change is a custom property on .jb-platform-cards, and the
 * controls write those properties on {{WRAPPER}} .jb-platform-cards. The values
 * below are defaults only.
 *
 * Do not add responsive overrides here for anything a control sets a default
 * for — Elementor emits its desktop value at a higher specificity and would win
 * at every breakpoint. Responsive defaults belong in the PHP control definitions.
 */

.jb-platform-cards {
	/* Layout */
	--jb-pc-columns: 4;
	--jb-pc-col-gap: 22px;
	--jb-pc-row-gap: 22px;
	--jb-pc-align: center;
	--jb-pc-items: center;

	/* Card */
	--jb-pc-card-bg: #f6f6f6;
	--jb-pc-card-bg-hover: #f1f3f6;
	--jb-pc-border-width: 0px;
	--jb-pc-border-color: #e6eaf1;
	--jb-pc-border-color-hover: #dde3ec;
	--jb-pc-radius: 10px;
	--jb-pc-pad-top: 30px;
	--jb-pc-pad-right: 24px;
	--jb-pc-pad-bottom: 30px;
	--jb-pc-pad-left: 24px;
	--jb-pc-min-height: 0px;
	--jb-pc-shadow: none;
	--jb-pc-shadow-hover: 0 10px 26px rgba(15, 23, 42, .1);
	--jb-pc-lift: -3px;

	/* Icon */
	--jb-pc-icon-size: 54px;
	--jb-pc-icon-color: #c0392b;
	--jb-pc-icon-gap: 16px;
	--jb-pc-image-width: 48px;

	/* Title */
	--jb-pc-title-color: #1d2226;
	--jb-pc-title-size: 24px;
	--jb-pc-title-weight: 600;
	--jb-pc-title-lh: 1.25;
	--jb-pc-title-ls: -.01em;
	--jb-pc-title-gap: 12px;

	/* Description */
	--jb-pc-text-color: #454f5b;
	--jb-pc-text-size: 15px;
	--jb-pc-text-lh: 1.65;

	/* Lightbox — inherited by the trigger and copied onto .jb-vl by the JS.
	   Anything beyond these two falls back to the lightbox stylesheet. */
	--jb-vl-ratio: 16 / 9;
	--jb-vl-max-width: 980px;

	display: grid;
	grid-template-columns: repeat(var(--jb-pc-columns), minmax(0, 1fr));
	column-gap: var(--jb-pc-col-gap);
	row-gap: var(--jb-pc-row-gap);
	width: 100%;
}

/* ---------------------------------------------------------------- Card */

.jb-platform-cards .jb-pc-card {
	display: flex;
	flex-direction: column;
	align-items: var(--jb-pc-items);
	text-align: var(--jb-pc-align);
	box-sizing: border-box;
	min-height: var(--jb-pc-min-height);
	padding: var(--jb-pc-pad-top) var(--jb-pc-pad-right) var(--jb-pc-pad-bottom) var(--jb-pc-pad-left);
	background: var(--jb-pc-card-bg);
	border: var(--jb-pc-border-width) solid var(--jb-pc-border-color);
	border-radius: var(--jb-pc-radius);
	box-shadow: var(--jb-pc-shadow);
	color: inherit;
	text-decoration: none;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
}

/* Only cards with somewhere to go are anchors, so this never dresses up a
   card that does nothing. */
.jb-platform-cards .jb-pc-card--link {
	cursor: pointer;
}

.jb-platform-cards .jb-pc-card--link:hover,
.jb-platform-cards .jb-pc-card--link:focus-visible {
	background: var(--jb-pc-card-bg-hover);
	border-color: var(--jb-pc-border-color-hover);
	box-shadow: var(--jb-pc-shadow-hover);
	transform: translateY(var(--jb-pc-lift));
}

.jb-platform-cards .jb-pc-card--link:focus-visible {
	outline: 2px solid var(--jb-pc-icon-color);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------- Icon */

.jb-platform-cards .jb-pc-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: var(--jb-pc-icon-gap);
	color: var(--jb-pc-icon-color);
	font-size: var(--jb-pc-icon-size);
	line-height: 1;
}

/* Covers Elementor's icon-library SVG output and a custom SVG upload alike;
   both are fill-based, which is what makes them recolourable from the panel. */
.jb-platform-cards .jb-pc-card__icon svg {
	width: var(--jb-pc-icon-size);
	height: var(--jb-pc-icon-size);
	fill: currentColor;
}

.jb-platform-cards .jb-pc-card__icon i {
	font-size: var(--jb-pc-icon-size);
	color: currentColor;
}

/* An uploaded raster image carries its own colours, so it sizes off its own
   control rather than the icon size and ignores the colour control. */
.jb-platform-cards .jb-pc-card__icon img {
	display: block;
	width: var(--jb-pc-image-width);
	height: auto;
	max-width: 100%;
}

/* --------------------------------------------------------------- Text */

.jb-platform-cards .jb-pc-card__title {
	margin: 0 0 var(--jb-pc-title-gap);
	padding: 0;
	color: var(--jb-pc-title-color);
	font-size: var(--jb-pc-title-size);
	font-weight: var(--jb-pc-title-weight);
	line-height: var(--jb-pc-title-lh);
	letter-spacing: var(--jb-pc-title-ls);
}

.jb-platform-cards .jb-pc-card__title:last-child {
	margin-bottom: 0;
}

.jb-platform-cards .jb-pc-card__text {
	margin: 0;
	padding: 0;
	color: var(--jb-pc-text-color);
	font-size: var(--jb-pc-text-size);
	line-height: var(--jb-pc-text-lh);
}

@media (prefers-reduced-motion: reduce) {
	.jb-platform-cards .jb-pc-card {
		transition: none;
	}

	.jb-platform-cards .jb-pc-card--link:hover,
	.jb-platform-cards .jb-pc-card--link:focus-visible {
		transform: none;
	}
}