/* =========================================================
   Nice Cards for Elementor — stylesheet
   Design tokens are exposed as CSS custom properties on the
   wrapper (.nice-cards-wrapper) and on each card. Elementor's
   Style controls write values into these variables via the
   `selectors` mechanism, so every color / spacing / timing
   value below is user-editable without touching this file.
   ========================================================= */

.nice-cards-wrapper {
	--nc-columns: 3;
	--nc-gap: 28px;
	--nc-radius: 18px;
	--nc-card-bg: #ffffff;
	--nc-border-color: #ECEBF3;
	--nc-border-color-hover: transparent;
	--nc-title-color: #14141F;
	--nc-desc-color: #5B6072;
	--nc-accent: #6C5CE7;
	--nc-accent-2: #22D3EE;
	--nc-btn-text: #ffffff;
	--nc-image-height: 200px;
	--nc-lift: 10px;
	--nc-duration: 480ms;

	display: grid;
	grid-template-columns: repeat(var(--nc-columns), 1fr);
	gap: var(--nc-gap);
	width: 100%;
}

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

.nice-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--nc-card-bg);
	border-radius: var(--nc-radius);
	border: 1px solid var(--nc-border-color);
	overflow: hidden;
	isolation: isolate;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(20, 20, 31, 0.04);
	transition:
		transform var(--nc-duration) cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow var(--nc-duration) cubic-bezier(0.22, 1, 0.36, 1),
		border-color var(--nc-duration) ease;
	will-change: transform;
}

/* Soft colored glow ring that fades in behind the card on hover */
.nice-card::before {
	content: "";
	position: absolute;
	inset: -1px;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(135deg, var(--nc-accent), var(--nc-accent-2));
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity var(--nc-duration) ease;
	pointer-events: none;
	z-index: 3;
}

.nice-card:hover {
	transform: translateY(calc(var(--nc-lift) * -1));
	box-shadow:
		0 22px 40px -18px color-mix(in srgb, var(--nc-accent) 55%, transparent),
		0 8px 18px -10px rgba(20, 20, 31, 0.12);
	border-color: var(--nc-border-color-hover);
}

.nice-card:hover::before {
	opacity: 1;
}

/* Signature aurora sweep — a gradient bar that grows in from the left
   along the bottom edge of the card, then a soft light sweeps across it */
.nice-card__aurora {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	width: 0%;
	background: linear-gradient(90deg, var(--nc-accent), var(--nc-accent-2));
	transition: width calc(var(--nc-duration) * 1.15) cubic-bezier(0.22, 1, 0.36, 1);
	z-index: 4;
}

.nice-card:hover .nice-card__aurora {
	width: 100%;
}

.nice-card__shine {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(
		115deg,
		transparent 20%,
		color-mix(in srgb, var(--nc-accent-2) 22%, transparent) 45%,
		transparent 70%
	);
	transform: translateX(-120%) skewX(-12deg);
	transition: transform calc(var(--nc-duration) * 1.4) cubic-bezier(0.22, 1, 0.36, 1);
}

.nice-card:hover .nice-card__shine {
	transform: translateX(120%) skewX(-12deg);
}

/* ---------- Media ---------- */

.nice-card__media {
	position: relative;
	overflow: hidden;
	height: var(--nc-image-height);
	background: linear-gradient(135deg, color-mix(in srgb, var(--nc-accent) 12%, #f4f4f8), color-mix(in srgb, var(--nc-accent-2) 12%, #f4f4f8));
}

.nice-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: scale(1.001);
	transition: transform calc(var(--nc-duration) * 1.3) cubic-bezier(0.22, 1, 0.36, 1);
}

.nice-card:hover .nice-card__media img {
	transform: scale(1.08);
}

.nice-card__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 3;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #fff;
	background: color-mix(in srgb, var(--nc-accent) 88%, black 0%);
	border-radius: 999px;
	backdrop-filter: blur(4px);
}

/* ---------- Body ---------- */

.nice-card__body {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 26px 26px 24px;
}

.nice-card__title {
	margin: 0 0 10px;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--nc-title-color);
	transition: color calc(var(--nc-duration) * 0.6) ease;
}

.nice-card__desc {
	margin: 0 0 20px;
	font-size: 15px;
	line-height: 1.65;
	color: var(--nc-desc-color);
	flex-grow: 1;
}

/* ---------- Button ---------- */

.nice-card__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	color: var(--nc-btn-text);
	background: var(--nc-btn-bg, var(--nc-accent));
	border-radius: var(--nc-btn-radius, 999px);
	text-decoration: none;
	transition: background var(--nc-duration) ease, gap var(--nc-duration) ease, filter 200ms ease;
}

.nice-card__btn svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	transition: transform calc(var(--nc-duration) * 0.7) cubic-bezier(0.22, 1, 0.36, 1);
}

.nice-card:hover .nice-card__btn {
	gap: 12px;
	filter: brightness(1.08);
}

.nice-card:hover .nice-card__btn svg {
	transform: translateX(4px);
}

/* Toggled off via the widget's "Shine Sweep" switcher control */
.nice-cards-wrapper.nce-no-shine .nice-card__shine {
	display: none;
}

/* No-image variant: give the body a little more breathing room up top */
.nice-card--no-media .nice-card__body {
	padding-top: 30px;
}

/* ---------- Responsive fallback ----------
   Elementor's responsive controls already inject the correct
   grid-template-columns per breakpoint inline; these are a safety
   net for editors that don't set explicit values on small screens. */
@media (max-width: 767px) {
	.nice-cards-wrapper {
		grid-template-columns: repeat(1, 1fr);
	}
}

/* ---------- Motion & accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
	.nice-card,
	.nice-card::before,
	.nice-card__aurora,
	.nice-card__shine,
	.nice-card__media img,
	.nice-card__btn,
	.nice-card__btn svg {
		transition-duration: 1ms !important;
		animation-duration: 1ms !important;
	}
	.nice-card:hover {
		transform: none;
	}
}

.nice-card__btn:focus-visible,
.nice-card:focus-visible {
	outline: 2px solid var(--nc-accent);
	outline-offset: 3px;
}
