/* Monteli Elementor widgets – shared core (grid, carousel, helpers). Logical properties → RTL safe. */

.m-grid { display: grid; grid-template-columns: repeat(var(--m-cols, 3), minmax(0, 1fr)); gap: var(--m-gap, 24px); }
.m-grid__item { min-width: 0; }

/* Carousel: native scroll-snap + core.js for arrows / dots / autoplay. */
.m-carousel { position: relative; --m-cols: 3; --m-gap: 24px; }
.m-carousel__track {
	display: grid; grid-auto-flow: column; gap: var(--m-gap);
	grid-auto-columns: calc((100% - var(--m-gap) * (var(--m-cols) - 1)) / var(--m-cols));
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none; padding-block: 6px 10px; margin-block: -6px -10px; /* room for shadows without extra space */
}
.m-carousel__track::-webkit-scrollbar { display: none; }
.m-carousel__slide { min-width: 0; scroll-snap-align: start; }
.m-carousel__nav {
	position: absolute; inset-block-start: 50%; z-index: 3; display: grid; place-items: center;
	width: 44px; height: 44px; padding: 0; margin-block-start: -22px; color: var(--m-heading, #0f172a);
	background: var(--m-bg, #fff); border: 1px solid var(--m-border, rgba(15, 23, 42, .1)); border-radius: 50%;
	box-shadow: 0 10px 24px -10px rgba(15, 23, 42, .35); cursor: pointer; transition: all .2s;
}
.m-carousel__nav:hover { color: #fff; background: var(--m-primary, #4f46e5); border-color: var(--m-primary, #4f46e5); }
.m-carousel__nav[disabled] { opacity: .35; cursor: default; }
.m-carousel__nav svg { width: 18px; height: 18px; }
.m-carousel__prev { inset-inline-start: -18px; }
.m-carousel__next { inset-inline-end: -18px; }
[dir="rtl"] .m-carousel__nav svg { transform: scaleX(-1); }
.m-carousel__dots:empty { display: none; }
.m-carousel__dots { display: flex; justify-content: center; gap: 8px; margin-block-start: 24px; }
.m-carousel__dots button {
	width: 9px; height: 9px; padding: 0; background: var(--m-border, rgba(15, 23, 42, .18)); border: 0; border-radius: 999px;
	cursor: pointer; transition: all .25s;
}
.m-carousel__dots button.is-active { width: 26px; background: var(--m-primary, #4f46e5); }
@media (max-width: 767px) { .m-carousel__prev { inset-inline-start: 4px; } .m-carousel__next { inset-inline-end: 4px; } }

/* Shared helpers */
.m-hover-lift-yes .m-card { transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; }
.m-hover-lift-yes .m-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -24px rgba(15, 23, 42, .35); }
.m-card { height: 100%; background: var(--m-bg, #fff); border: 1px solid var(--m-border, rgba(15, 23, 42, .1)); border-radius: var(--m-radius, 12px); overflow: hidden; }
.m-icon { display: inline-flex; line-height: 1; }
.m-icon svg { width: 1em; height: 1em; fill: currentColor; }
.m-empty { padding: 24px; text-align: center; color: #64748b; background: #f8fafc; border: 2px dashed #cbd5e1; border-radius: 12px; }
.m-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8em 1.6em; font-weight: 700; line-height: 1.4;
	color: #fff; background: var(--m-primary, #4f46e5); border: 2px solid var(--m-primary, #4f46e5); border-radius: calc(var(--m-radius, 12px) * .75);
	text-decoration: none !important; transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.m-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(var(--m-primary-rgb, 79, 70, 229), .6); }
.m-btn--outline { color: var(--m-primary, #4f46e5); background: transparent; }
.m-btn--outline:hover { background: var(--m-primary, #4f46e5); }
.m-btn--light { color: var(--m-primary, #4f46e5); background: #fff; border-color: #fff; }
.m-btn--light:hover { color: var(--m-primary, #4f46e5); }
.m-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { .m-carousel__track { scroll-behavior: auto; } }
/* Slider widgets take the full width of their container: as "fit-content" flex items the browser measured
   their height at a different width (extra space under the cards, or cards spilling out). Low specificity,
   so Elementor width settings still win. */
:where(.elementor-widget:has(.m-carousel, .m-qs, .m-pc-wrap)) { width: 100%; }
