/**
 * ICM carousel — responsive navigation & pagination defaults.
 * Elementor per-widget controls override these via generated CSS.
 */

.icm-carousel,
.icm-slider,
.icm-selected-slider,
.icm-collections-slider,
.icm-filter-slider,
.icm-guide-slider,
.icm-popular-slider,
.icm-related-slider,
.icm-archive-feature-slider,
.icm-webinar-slider,
.icm-past-webinars-shell,
[data-icm-popular-slider],
[data-icm-related-slider] {
	--icm-carousel-dots-space: 28px;
	box-sizing: border-box !important;
	max-width: 100% !important;
}

/* Reserve space ONLY when dots are absolutely overlaid (see hero slider below).
 * Flow-dot carousels use margin-top on the dots themselves — padding-bottom here
 * double-counted and created a white empty strip under featured/webinar/popular rails. */
.icm-selected-slider.icm-carousel--has-dots,
.icm-collections-slider.icm-carousel--has-dots,
.icm-filter-slider.icm-carousel--has-dots,
.icm-guide-slider.icm-carousel--has-dots,
.icm-popular-slider.icm-carousel--has-dots,
.icm-related-slider.icm-carousel--has-dots,
.icm-archive-feature-slider.icm-carousel--has-dots,
.icm-webinar-slider.icm-carousel--has-dots,
.icm-past-webinars-shell.icm-carousel--has-dots,
[data-icm-popular-slider].icm-carousel--has-dots,
[data-icm-related-slider].icm-carousel--has-dots {
	padding-bottom: 0 !important;
}

/*
 * Hero featured slider: dots overlay the media card.
 * Never reserve padding-bottom — that created the white empty strip under the slide on mobile.
 */
.icm-slider.icm-carousel--has-dots,
.icm-slider.icm-carousel {
	padding-bottom: 0 !important;
}
.icm-slider .icm-slide {
	inset: 0 !important;
}
.icm-slider .icm-slider__dots,
.icm-slider .icm-carousel__dots {
	bottom: var(--icm-carousel-dots-bottom, 12px) !important;
	margin-top: 0 !important;
	z-index: 12;
}
.icm-slider .icm-slide__visual {
	overflow: hidden !important;
}
.icm-slider .icm-slide__visual img,
.icm-slider .icm-slide__visual .wp-post-image {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain !important;
	object-position: center center !important;
}

/* Past webinars: dots sit in normal flow (fix12) — do not double-reserve shell padding. */
.icm-past-webinars-shell.icm-carousel--has-dots,
.icm-fix12-past-webinars .icm-past-webinars-shell.icm-carousel--has-dots,
.elementor-widget-icm_academy_completed_webinar_banners .icm-past-webinars-shell.icm-carousel--has-dots {
	padding-bottom: 0 !important;
}

.icm-selected-controls,
.icm-collections-controls,
.icm-filter-controls,
.icm-popular-controls,
.icm-related-controls {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Dots layout — Elementor «موقعیت نقطه‌ها» drives these custom properties on the carousel root. */
.icm-slider__dots,
.icm-selected-dots,
.icm-collections-dots,
.icm-filter-dots,
.icm-guide-dots,
.icm-archive-feature-dots,
.icm-webinar-dots,
.icm-popular-dots,
.icm-related-dots,
.icm-past-webinars__pagination,
.icm-carousel__dots {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	min-height: 24px;
	margin-top: var(--icm-carousel-dots-margin-top, 12px);
	justify-content: var(--icm-carousel-dots-justify, center);
}

.icm-slider__dots,
.icm-past-webinars__pagination {
	position: absolute;
	left: 0;
	right: 0;
	bottom: var(--icm-carousel-dots-bottom, 0);
	margin-top: var(--icm-carousel-dots-margin-top, 0);
}

/* Past webinars pagination stays in document flow (no absolute overlay gap). */
.icm-fix12-past-webinars .icm-past-webinars__pagination,
.elementor-widget-icm_academy_completed_webinar_banners .icm-past-webinars__pagination,
.icm-past-webinars-shell .icm-past-webinars__pagination.icm-carousel__dots {
	position: static !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	margin-top: 10px !important;
}

.icm-selected-dots,
.icm-collections-dots,
.icm-filter-dots,
.icm-guide-dots,
.icm-archive-feature-dots,
.icm-webinar-dots,
.icm-popular-dots,
.icm-related-dots,
.icm-carousel__dots {
	position: relative;
}

/* Default spec: desktop/tablet = dots only, mobile = arrows + dots */
.icm-carousel__arrows,
.icm-slider__prev,
.icm-slider__next,
.icm-selected-controls,
.icm-collections-controls,
.icm-filter-controls,
.icm-archive-feature-prev,
.icm-archive-feature-next,
.icm-webinar-nav,
.icm-popular-prev,
.icm-popular-next,
.icm-related-prev,
.icm-related-next,
.icm-guide-nav {
	display: none;
}

/* Elementor popular widget: panel controls own arrow visibility (override global hide). */
.elementor-widget-icm_articles_popular .icm-popular-controls {
	display: flex;
}

.elementor-widget-icm_articles_popular .icm-popular-prev,
.elementor-widget-icm_articles_popular .icm-popular-next {
	display: grid;
}

.icm-carousel--nav-mobile-arrows .icm-popular-controls,
.icm-carousel--nav-all-arrows .icm-popular-controls {
	display: flex;
}

.icm-carousel--nav-mobile-arrows .icm-carousel__arrows,
.icm-carousel--nav-mobile-arrows .icm-slider__prev,
.icm-carousel--nav-mobile-arrows .icm-slider__next,
.icm-carousel--nav-mobile-arrows .icm-selected-controls,
.icm-carousel--nav-mobile-arrows .icm-collections-controls,
.icm-carousel--nav-mobile-arrows .icm-filter-controls,
.icm-carousel--nav-mobile-arrows .icm-archive-feature-prev,
.icm-carousel--nav-mobile-arrows .icm-archive-feature-next,
.icm-carousel--nav-mobile-arrows .icm-webinar-nav,
.icm-carousel--nav-mobile-arrows .icm-popular-prev,
.icm-carousel--nav-mobile-arrows .icm-popular-next,
.icm-carousel--nav-mobile-arrows .icm-related-prev,
.icm-carousel--nav-mobile-arrows .icm-related-next,
.icm-carousel--nav-mobile-arrows .icm-guide-nav {
	display: flex;
}

@media (min-width: 768px) {
	.icm-carousel--nav-mobile-arrows .icm-carousel__arrows,
	.icm-carousel--nav-mobile-arrows .icm-slider__prev,
	.icm-carousel--nav-mobile-arrows .icm-slider__next,
	.icm-carousel--nav-mobile-arrows .icm-selected-controls,
	.icm-carousel--nav-mobile-arrows .icm-collections-controls,
	.icm-carousel--nav-mobile-arrows .icm-filter-controls,
	.icm-carousel--nav-mobile-arrows .icm-archive-feature-prev,
	.icm-carousel--nav-mobile-arrows .icm-archive-feature-next,
	.icm-carousel--nav-mobile-arrows .icm-webinar-nav,
	.icm-carousel--nav-mobile-arrows .icm-popular-prev,
	.icm-carousel--nav-mobile-arrows .icm-popular-next,
	.icm-carousel--nav-mobile-arrows .icm-related-prev,
	.icm-carousel--nav-mobile-arrows .icm-related-next,
	.icm-carousel--nav-mobile-arrows .icm-guide-nav {
		display: none !important;
	}
}

.icm-carousel--nav-all-arrows .icm-carousel__arrows,
.icm-carousel--nav-all-arrows .icm-slider__prev,
.icm-carousel--nav-all-arrows .icm-slider__next,
.icm-carousel--nav-all-arrows .icm-selected-controls,
.icm-carousel--nav-all-arrows .icm-collections-controls,
.icm-carousel--nav-all-arrows .icm-filter-controls,
.icm-carousel--nav-all-arrows .icm-archive-feature-prev,
.icm-carousel--nav-all-arrows .icm-archive-feature-next,
.icm-carousel--nav-all-arrows .icm-webinar-nav,
.icm-carousel--nav-all-arrows .icm-popular-prev,
.icm-carousel--nav-all-arrows .icm-popular-next,
.icm-carousel--nav-all-arrows .icm-related-prev,
.icm-carousel--nav-all-arrows .icm-related-next,
.icm-carousel--nav-all-arrows .icm-guide-nav {
	display: flex;
}

.icm-carousel--no-dots .icm-slider__dots,
.icm-carousel--no-dots .icm-selected-dots,
.icm-carousel--no-dots .icm-collections-dots,
.icm-carousel--no-dots .icm-filter-dots,
.icm-carousel--no-dots .icm-guide-dots,
.icm-carousel--no-dots .icm-archive-feature-dots,
.icm-carousel--no-dots .icm-webinar-dots,
.icm-carousel--no-dots .icm-popular-dots,
.icm-carousel--no-dots .icm-related-dots,
.icm-carousel--no-dots .icm-past-webinars__pagination,
.icm-carousel--no-dots .icm-carousel__dots {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.icm-slider__dots,
	.icm-selected-dots,
	.icm-collections-dots,
	.icm-filter-dots,
	.icm-guide-dots,
	.icm-archive-feature-dots,
	.icm-webinar-dots,
	.icm-popular-dots,
	.icm-related-dots,
	.icm-past-webinars__pagination {
		display: none !important;
	}
}

/* Row widgets: Elementor per-breakpoint layout overrides theme fixed breakpoints. */
.icm-row-rail::-webkit-scrollbar {
	display: none;
}

.icm-filter-slider,
.icm-collections-slider,
.icm-selected-slider,
.icm-popular-slider,
.icm-related-slider,
.icm-guide-slider {
	position: relative;
	max-width: 100% !important;
	overflow: hidden;
}

/* Popular rail: Elementor widget must stay a horizontal slider (override legacy grid rules). */
.icm-popular-slider .icm-popular-row {
	display: flex !important;
	flex-wrap: nowrap;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	gap: var(--icm-pop-gap, 0px);
	border-top: 1px solid var(--icm-border, #dfe5ea);
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

.icm-popular-slider .icm-popular-row::-webkit-scrollbar {
	display: none;
}

.icm-popular-slider .icm-popular {
	flex: 0 0 calc((100% - (var(--icm-pop-visible, 4) - 1) * var(--icm-pop-gap, 0px)) / var(--icm-pop-visible, 4));
	scroll-snap-align: start;
	min-width: 0;
	box-sizing: border-box !important;
}

.icm-popular-slider .icm-popular-controls {
	position: absolute;
	top: -46px;
	inset-inline-end: 0;
	z-index: 2;
}

@media (max-width: 1024px) {
	.icm-popular-slider .icm-popular-row {
		gap: var(--icm-pop-gap-tablet, var(--icm-pop-gap, 0px));
		--icm-pop-visible: var(--icm-pop-visible-tablet, 2);
	}
}

@media (max-width: 767px) {
	.icm-popular-slider .icm-popular-row {
		gap: var(--icm-pop-gap-mobile, var(--icm-pop-gap-tablet, var(--icm-pop-gap, 0px)));
		--icm-pop-visible: var(--icm-pop-visible-mobile, 1);
	}
	.icm-popular-slider .icm-popular {
		min-width: 0;
		width: 100% !important;
	}

	/* تنظیم ابعاد لمسی استاندارد برای کنترل‌ها در موبایل (Tap Targets) */
	.icm-slider__prev,
	.icm-slider__next,
	.icm-popular-prev,
	.icm-popular-next,
	.icm-related-prev,
	.icm-related-next,
	.icm-guide-nav button,
	.icm-webinar-nav button {
		min-width: 44px !important;
		min-height: 44px !important;
		touch-action: manipulation;
	}
}

.icm-guide-slider--has-nav .icm-guide-nav {
	display: flex;
}

/* 2026.227.3: deterministic slider arrow placement.
   Keeps arrows inside the visible slider frame on desktop and mobile, while
   preserving each widget's existing show/hide controls. */
.icm-slider,
.icm-archive-feature-slider,
.icm-webinar-slider,
.icm-past-webinars-shell,
.icm-popular-slider,
.icm-related-slider,
.icm-guide-slider {
	overflow: visible !important;
}

.icm-filter-slider .icm-row-rail,
.icm-collections-slider .icm-row-rail,
.icm-selected-slider .icm-row-rail,
.icm-popular-slider .icm-row-rail,
.icm-related-slider .icm-row-rail,
.icm-guide-slider .icm-row-rail {
	overflow: hidden;
}

.icm-slider__prev,
.icm-slider__next,
.icm-archive-feature-prev,
.icm-archive-feature-next,
.icm-selected-prev,
.icm-selected-next,
.icm-popular-prev,
.icm-popular-next,
.icm-related-prev,
.icm-related-next,
.icm-guide-nav--left,
.icm-guide-nav--right,
.icm-webinar-nav--prev,
.icm-webinar-nav--next,
.icm-slider-arrow--left,
.icm-slider-arrow--right {
	position: absolute !important;
	top: var(--icm-carousel-nav-top, 50%) !important;
	transform: translateY(calc(-50% + var(--icm-carousel-nav-y-adjust, 0px))) !important;
	width: var(--icm-carousel-nav-size, 38px) !important;
	height: var(--icm-carousel-nav-size, 38px) !important;
	min-width: var(--icm-carousel-nav-size, 38px) !important;
	min-height: var(--icm-carousel-nav-size, 38px) !important;
	z-index: 30 !important;
	align-items: center !important;
	justify-content: center !important;
}

.icm-slider__prev,
.icm-archive-feature-prev,
.icm-selected-prev,
.icm-popular-prev,
.icm-related-prev,
.icm-guide-nav--left,
.icm-webinar-nav--prev,
.icm-slider-arrow--left {
	left: var(--icm-carousel-nav-offset, 12px) !important;
	right: auto !important;
}

.icm-slider__next,
.icm-archive-feature-next,
.icm-selected-next,
.icm-popular-next,
.icm-related-next,
.icm-guide-nav--right,
.icm-webinar-nav--next,
.icm-slider-arrow--right {
	right: var(--icm-carousel-nav-offset, 12px) !important;
	left: auto !important;
}

@media (max-width: 767px) {
	.icm-slider__prev,
	.icm-slider__next,
	.icm-archive-feature-prev,
	.icm-archive-feature-next,
	.icm-selected-prev,
	.icm-selected-next,
	.icm-popular-prev,
	.icm-popular-next,
	.icm-related-prev,
	.icm-related-next,
	.icm-guide-nav--left,
	.icm-guide-nav--right,
	.icm-webinar-nav--prev,
	.icm-webinar-nav--next,
	.icm-slider-arrow--left,
	.icm-slider-arrow--right {
		--icm-carousel-nav-size: 44px;
		--icm-carousel-nav-offset: 8px;
	}
}

.icm-selected-slider .icm-selected-controls,
.icm-collections-slider .icm-collections-controls,
.icm-filter-slider .icm-filter-controls,
.icm-popular-slider .icm-popular-controls,
.icm-related-slider .icm-related-controls {
	position: absolute !important;
	left: 0 !important;
	right: 0 !important;
	inset-inline: 0 !important;
	top: var(--icm-carousel-nav-top, 50%) !important;
	transform: translateY(calc(-50% + var(--icm-carousel-nav-y-adjust, 0px))) !important;
	width: 100% !important;
	z-index: 31 !important;
	justify-content: space-between !important;
	pointer-events: none;
	padding-inline: var(--icm-carousel-nav-offset, 12px) !important;
	box-sizing: border-box !important;
}

.icm-selected-slider .icm-selected-controls button,
.icm-collections-slider .icm-collections-controls button,
.icm-filter-slider .icm-filter-controls button,
.icm-popular-slider .icm-popular-controls button,
.icm-related-slider .icm-related-controls button {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	inset: auto !important;
	transform: none !important;
	width: var(--icm-carousel-nav-size, 38px) !important;
	height: var(--icm-carousel-nav-size, 38px) !important;
	min-width: var(--icm-carousel-nav-size, 38px) !important;
	min-height: var(--icm-carousel-nav-size, 38px) !important;
	pointer-events: auto;
}

@media (max-width: 767px) {
	.icm-selected-slider .icm-selected-controls,
	.icm-collections-slider .icm-collections-controls,
	.icm-filter-slider .icm-filter-controls,
	.icm-popular-slider .icm-popular-controls,
	.icm-related-slider .icm-related-controls {
		--icm-carousel-nav-size: 44px;
		--icm-carousel-nav-offset: 8px;
	}
}
