/* ==========================================================
   FabricJ App Grid — scoped styles
   All selectors are prefixed with "fjag-" and nested under
   .fjag-apps so this stylesheet cannot leak into, or be
   overridden by, theme or other plugin CSS.

   Specificity strategy (important — read before editing):
   - "Structural" rules below (display:grid/flex, box-sizing,
     list resets, link resets, positioning) are boosted with a
     repeated ".fjag-apps.fjag-apps" selector + !important. These
     only ever need to beat the THEME, and never touch a property
     that an Elementor Style-tab control also sets — so they can
     never block a customization.
   - Any property that a Style-tab control in the widget also
     sets (colors, padding, border, radius, gap, typography,
     width/height) stays on a plain single-class selector, which
     Elementor's own {{WRAPPER}}+class output (higher specificity)
     always overrides correctly. Do NOT add !important or extra
     classes to those rules, or per-widget customization breaks.
   ========================================================== */

/* ---- Reset layer: neutralises theme defaults that commonly
   leak into widgets (headings, lists, links, buttons, images) ---- */
.fjag-apps.fjag-apps {
	position: relative;
	isolation: isolate;
	width: 100%;
}

.fjag-apps.fjag-apps,
.fjag-apps.fjag-apps *,
.fjag-apps.fjag-apps *::before,
.fjag-apps.fjag-apps *::after {
	box-sizing: border-box !important;
}

.fjag-apps.fjag-apps h1,
.fjag-apps.fjag-apps h2,
.fjag-apps.fjag-apps h3,
.fjag-apps.fjag-apps h4 {
	font-family: inherit;
}

.fjag-apps.fjag-apps ul,
.fjag-apps.fjag-apps li {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.fjag-apps.fjag-apps a {
	text-decoration: none !important;
	box-shadow: none !important;
	background: none;
}

.fjag-apps.fjag-apps img {
	max-width: 100%;
	height: auto;
	border: 0 !important;
	vertical-align: middle;
}

.fjag-apps.fjag-apps button {
	font-family: inherit;
	cursor: pointer;
}

/* ---- Section ---- */
.fjag-apps {
	padding: 90px 5%;
	background: #171923;
	background-repeat: no-repeat;
	box-sizing: border-box;
}

.fjag-apps::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}

.fjag-title,
.fjag-grid,
.fjag-global-cta {
	position: relative;
	z-index: 1;
}

.fjag-title {
	max-width: 720px;
	margin: 0 auto 60px auto;
	text-align: center;
}

.fjag-badge {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 40px;
	background: rgba(106, 98, 255, .12);
	color: #7B72FF;
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 20px 0 !important;
	line-height: 1.4;
}

.fjag-heading {
	font-size: clamp(28px, 4vw, 52px);
	font-weight: 800;
	color: #fff;
	line-height: 1.15;
	margin: 0 0 18px 0 !important;
}

.fjag-description {
	color: #b9bfd4;
	font-size: 18px;
	line-height: 1.8;
	margin: 0 !important;
}

/* ---- Grid (structural: display only — column layout stays
   single-class so the Columns / Auto-fit controls always win) ---- */
.fjag-apps.fjag-apps .fjag-grid {
	display: grid !important;
	width: 100%;
}

.fjag-grid {
	grid-template-columns: repeat(4, 1fr);
	gap: 28px;
}

/* ---- Card (structural: flex/position only — background, border,
   radius, padding, alignment stay single-class for Style tab) ---- */
.fjag-apps.fjag-apps .fjag-card {
	display: flex !important;
	flex-direction: column;
	position: relative;
	overflow: hidden;
	cursor: pointer;
	width: 100%;
	min-width: 0;
	color: inherit;
}

.fjag-card {
	background: rgba(255, 255, 255, .04);
	border: 1px solid rgba(255, 255, 255, .08);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border-radius: 26px;
	padding: 38px 25px;
	text-align: center;
	align-items: center;
	transition: transform .35s, border-color .35s, box-shadow .35s;
}

/* Hover effect variants — toggled via a class on .fjag-apps set from
   the "Card Hover Effect" control, so nothing fires when set to None. */
.fjag-hover-lift .fjag-card:hover {
	transform: translateY(-10px);
	border-color: #7B72FF;
	box-shadow: 0 25px 60px rgba(107, 99, 255, .30);
}

.fjag-hover-zoom .fjag-card:hover {
	transform: scale(1.04);
	border-color: #7B72FF;
	box-shadow: 0 25px 60px rgba(107, 99, 255, .30);
}

.fjag-hover-glow .fjag-card:hover {
	border-color: #7B72FF;
	box-shadow: 0 0 40px rgba(107, 99, 255, .35);
}

.fjag-hover-lift .fjag-card:hover::before,
.fjag-hover-zoom .fjag-card:hover::before,
.fjag-hover-glow .fjag-card:hover::before {
	opacity: .08;
}

.fjag-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #6B63FF, #7F6BFF, #A15CFF);
	opacity: 0;
	transition: .35s;
	pointer-events: none;
}

/* ---- Icon (structural: centering only — size/bg/shape are
   single-class for the Icon Size / Icon Shape / Icon Background controls) ---- */
.fjag-apps.fjag-apps .fjag-card-icon-wrap {
	display: flex !important;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 2;
	overflow: hidden;
	flex-shrink: 0;
}

.fjag-card-icon-wrap {
	width: 74px;
	height: 74px;
	margin: 0 auto 22px auto;
	border-radius: 18px;
}

.fjag-card-icon {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

/* ---- Badge / ribbon (position is structural, colors are Style-tab) ---- */
.fjag-apps.fjag-apps .fjag-card-badge {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
}

.fjag-card-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 30px;
	background: #7B72FF;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	line-height: 1.6;
}

/* ---- Card text ---- */
.fjag-card-title {
	position: relative;
	z-index: 2;
	font-size: 20px;
	font-weight: 700;
	color: #fff;
	line-height: 1.4;
	transition: color .35s;
	margin: 0 !important;
	width: 100%;
}

.fjag-card-description {
	position: relative;
	z-index: 2;
	font-size: 14px;
	line-height: 1.6;
	color: #b9bfd4;
	margin: 10px 0 0 0 !important;
	width: 100%;
}

.fjag-card:hover .fjag-card-title {
	color: #8F87FF;
}

/* ---- CTA buttons (structural: inline-block display only) ---- */
.fjag-apps.fjag-apps .fjag-cta-btn {
	display: inline-block !important;
	position: relative;
	z-index: 2;
	white-space: normal;
}

.fjag-cta-btn {
	margin-top: 20px;
	padding: 12px 24px;
	border-radius: 10px;
	background: #7B72FF;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	line-height: 1.4;
	transition: background-color .3s, color .3s, transform .3s;
}

a.fjag-cta-btn:hover {
	background: #8F87FF;
	transform: translateY(-2px);
}

.fjag-global-cta {
	text-align: center;
	margin-top: 50px;
}

.fjag-global-cta .fjag-cta-btn {
	margin-top: 0;
	padding: 14px 34px;
	font-size: 15px;
}

/* ==========================================================
   Responsive breakpoints — mobile-first fallbacks that apply
   whenever Elementor's own responsive controls aren't set,
   and align to Elementor's standard tablet/mobile breakpoints
   so this widget matches the rest of the page at every size.
   ========================================================== */

@media (max-width: 1024px) {
	.fjag-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 767px) {
	.fjag-apps {
		padding: 70px 20px;
	}

	.fjag-description {
		font-size: 16px;
	}

	.fjag-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}

	.fjag-card {
		padding: 30px 18px;
	}

	.fjag-card-icon-wrap {
		width: 60px;
		height: 60px;
	}

	.fjag-card-title {
		font-size: 17px;
	}
}

@media (max-width: 480px) {
	.fjag-grid {
		grid-template-columns: 1fr;
	}

	.fjag-card {
		padding: 28px 20px;
	}

	.fjag-global-cta .fjag-cta-btn {
		display: block !important;
		width: 100%;
	}
}
