.fmcert {
	--fm-accent: #e85941;
	--fm-dark: #2e3f50;
	--fm-dark-deep: #1a2832;
	--fm-text: #18191d;
	--fm-muted: #6b7a88;
	--fm-line: rgba(46, 63, 80, 0.1);
	--fm-radius: 18px;
	--fm-ease: 0.32s cubic-bezier(0.22, 1, 0.36, 1);
	width: 100%;
	max-width: var(--fm-site);
	margin: 0 auto;
	padding: 1.5rem var(--fm-page-gutter) 3rem;
	font-family: "Yekan Bakh", Tahoma, sans-serif;
	direction: rtl;
	color: var(--fm-text);
	box-sizing: border-box;
}

.fmcert *,
.fmcert *::before,
.fmcert *::after {
	box-sizing: border-box;
}

.fmcert__eyebrow {
	display: inline-block;
	margin-bottom: 0.5rem;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--fm-accent);
}

.fmcert__title {
	margin: 0 0 0.65rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
	line-height: 1.45;
	color: var(--fm-dark);
}

.fmcert__subtitle {
	margin: 0 0 1rem;
	font-size: 1rem;
	color: var(--fm-muted);
}

.fmcert__intro {
	max-width: 72ch;
	margin-bottom: 1.25rem;
}

.fmcert__intro p {
	margin: 0 0 0.85rem;
	line-height: 1.9;
	color: var(--fm-muted);
	font-size: 0.94rem;
}

.fmcert__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-bottom: 2rem;
}

.fmcert__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.72rem 1.15rem;
	border-radius: 10px;
	font: inherit;
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: none;
	border: 1px solid transparent;
	transition: all var(--fm-ease);
}

.fmcert__btn--primary {
	background: var(--fm-accent);
	color: #fff !important;
}

.fmcert__btn--primary:hover {
	background: #d14a34;
}

.fmcert__btn--ghost {
	background: #fff;
	color: var(--fm-dark) !important;
	border-color: var(--fm-line);
}

.fmcert__btn--ghost:hover {
	border-color: rgba(232, 89, 65, 0.35);
	color: var(--fm-accent) !important;
}

.fmcert__section {
	margin-bottom: 2.25rem;
}

.fmcert__section-title {
	margin: 0 0 1rem;
	padding-bottom: 0.65rem;
	border-bottom: 2px solid rgba(232, 89, 65, 0.2);
	font-size: 1.1rem;
	color: var(--fm-dark);
}

.fmcert__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.fmcert__item {
	margin: 0;
}

.fmcert__thumb {
	display: block;
	width: 100%;
	padding: 0;
	border: 1px solid var(--fm-line);
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	cursor: zoom-in;
	transition: transform var(--fm-ease), box-shadow var(--fm-ease);
}

.fmcert__thumb:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(24, 25, 29, 0.08);
}

.fmcert__thumb img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

.fmcert__caption {
	margin-top: 0.55rem;
	font-size: 0.84rem;
	font-weight: 600;
	color: var(--fm-dark);
	text-align: center;
}

.fmcert__empty {
	padding: 2rem;
	border-radius: var(--fm-radius);
	background: #f8fafc;
	border: 1px dashed var(--fm-line);
	text-align: center;
	color: var(--fm-muted);
}

.fmcert__lightbox {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: rgba(26, 40, 50, 0.88);
	overflow: auto;
}

.fmcert__lightbox[hidden] {
	display: none !important;
}

.fmcert__lightbox-close {
	position: absolute;
	top: 1rem;
	left: 1rem;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}

.fmcert__lightbox-img {
	max-width: min(92vw, 900px);
	max-height: min(78vh, 100%);
	width: auto;
	height: auto;
	border-radius: 12px;
	object-fit: contain;
}

.fmcert__lightbox-caption {
	margin: 0.85rem 0 0;
	padding-inline: 0.75rem;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	text-align: center;
}

@media (min-width: 480px) {
	.fmcert__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 768px) {
	.fmcert__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.fmcert__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 575px) {
	.fmcert {
		padding: 1.15rem var(--fm-page-gutter) 2.5rem;
	}

	.fmcert__lightbox {
		padding: 1rem;
	}

	.fmcert__lightbox-close {
		top: 0.65rem;
		left: 0.65rem;
	}

	.fmcert__lightbox-img {
		max-width: 96vw;
		max-height: 70vh;
	}
}

.elementor-widget-shortcode:has(.fmcert),
.elementor-widget-shortcode:has(.fmcert) .elementor-widget-container,
.elementor-element:has(.fmcert) {
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	align-self: stretch !important;
}
