/* Massaa Toolkit — Instagram. Tokens are prefixed (--ms-*) so Elementor's
   own container variables never collide with them. */
.ms.ms-insta {
	--ms-ink: #3e0b27;
	--ms-muted: #6f4a5c;
	--ms-pink: #e30e7d;
	--ms-pink-h: #c80a6c;
	--ms-gap: 14px;
	--ms-r: 18px;
	--ms-font-display: "Barlow Condensed", "IBM Plex Sans Arabic", sans-serif;
	--ms-font-body: "IBM Plex Sans Arabic", system-ui, sans-serif;
	--ms-pad: 40px;
	background: #fff;
	color: var(--ms-ink);
	font-family: var(--ms-font-body);
	font-size: 16px;
	line-height: 1.6;
	padding: 96px 0 104px;
	text-align: left;
}
.ms.ms-insta *,
.ms.ms-insta *::before,
.ms.ms-insta *::after { box-sizing: border-box; }
.ms.ms-insta :where(h2, h3, p, ul, li) { margin: 0; padding: 0; }
.ms.ms-insta :where(ul) { list-style: none; }
.ms.ms-insta a { color: inherit; text-decoration: none; }
.ms.ms-insta a:focus-visible { outline: 2px solid var(--ms-pink); outline-offset: 3px; }

.ms-insta .ms-i__wrap { max-width: 1300px; margin: 0 auto; padding: 0 var(--ms-pad); }

/* header */
.ms-insta .ms-i__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 40px; flex-wrap: wrap; margin-bottom: 40px; }
.ms.ms-insta .ms-i__title {
	color: var(--ms-ink);
	font-family: var(--ms-font-display);
	font-size: clamp(48px, 5.4vw, 76px);
	font-weight: 600;
	line-height: .95;
	letter-spacing: -.01em;
	text-transform: none;
}
.ms.ms-insta .ms-i__lead { margin-top: 14px; max-width: 46ch; color: var(--ms-muted); font-size: 17px; }
.ms.ms-insta .ms-i__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 26px 0 22px;
	border: 1px solid transparent;
	border-radius: 60px;
	background: var(--ms-pink);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	transition: background-color .2s;
}
.ms.ms-insta .ms-i__btn:hover { background: var(--ms-pink-h); color: #fff; }
.ms.ms-insta .ms-i__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* mosaic: newest post large with an arched top, the rest square */
.ms-insta .ms-i__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--ms-gap); }
.ms-insta .ms-i__item { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: var(--ms-r); background: #f6e7ee; }
.ms-insta .ms-i__item.is-big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; border-radius: 50% 50% var(--ms-r) var(--ms-r) / 34% 34% var(--ms-r) var(--ms-r); }
.ms-insta .ms-i__item a { position: absolute; inset: 0; display: block; }
.ms-insta .ms-i__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.ms-insta .ms-i__item a::after { content: ""; position: absolute; inset: 0; background: rgba(62, 11, 39, 0); transition: background-color .3s; }
.ms-insta .ms-i__item a:hover img { transform: scale(1.05); }
.ms-insta .ms-i__item a:hover::after { background: rgba(62, 11, 39, .18); }
.ms-insta .ms-i__reel {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: var(--ms-ink);
}
.ms-insta .ms-i__item.is-big .ms-i__reel { top: auto; bottom: 16px; right: 16px; width: 38px; height: 38px; }
.ms-insta .ms-i__reel svg { width: 14px; height: 14px; fill: currentColor; margin-left: 2px; }
.ms.ms-insta .ms-i__notice { padding: 20px; border: 1px dashed var(--ms-pink); border-radius: 12px; color: var(--ms-muted); }

/* tablet: 4 columns (big + 8 posts = 3 full rows) */
@media (max-width: 1024px) {
	.ms-insta .ms-i__grid { grid-template-columns: repeat(4, 1fr); }
}

/* phone: a swipeable strip */
@media (max-width: 600px) {
	.ms.ms-insta { --ms-pad: 20px; padding: 64px 0 72px; }
	.ms-insta .ms-i__head { margin-bottom: 28px; }
	.ms.ms-insta .ms-i__title { font-size: 48px; }
	.ms.ms-insta .ms-i__lead { font-size: 16px; }
	.ms.ms-insta .ms-i__btn { width: 100%; justify-content: center; }
	.ms-insta .ms-i__grid {
		display: flex;
		gap: 12px;
		margin: 0 calc(var(--ms-pad) * -1);
		padding: 0 var(--ms-pad) 6px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding: 0 var(--ms-pad);
		overscroll-behavior-x: contain;
		scrollbar-width: none;
	}
	.ms-insta .ms-i__grid::-webkit-scrollbar { display: none; }
	.ms-insta .ms-i__item,
	.ms-insta .ms-i__item.is-big { flex: 0 0 62%; aspect-ratio: 4 / 5; scroll-snap-align: start; }
	.ms-insta .ms-i__item.is-big { flex-basis: 78%; }
}

@media (prefers-reduced-motion: reduce) {
	.ms.ms-insta *, .ms.ms-insta *::before, .ms.ms-insta *::after { transition: none !important; }
}
