/* ==========================================================================
   MediMix — home.css (front page only)
   ========================================================================== */

/* Hero: campaign slider (first image is the LCP) + two side cards (offers,
   categories), then the service promises as a slim strip.
   ≥1100: slider | cards stacked to the slider's height · 600–1099 and phones: cards in a row under it. */
.mx-hero { padding-top: var(--mx-s3); }
@media (min-width: 900px) { .mx-hero { padding-top: var(--mx-s5); } }
.mx-hero__grid { display: grid; gap: var(--mx-s3); }
/* The campaign art is tall (≈3:2): at 5/8 of the row the slider stays within a laptop screen. */
@media (min-width: 1100px) { .mx-hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 3fr); gap: var(--mx-s4); } }
.mx-hero__main { position: relative; min-width: 0; }
.mx-hero__viewport {
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
	border-radius: 20px; background: var(--mx-surface);
}
.mx-hero__viewport::-webkit-scrollbar { display: none; }
.mx-hero__track { display: flex; margin: 0; padding: 0; list-style: none; }
.mx-hero__slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.mx-hero__slide a { display: block; }
.mx-hero__img { width: 100%; height: auto; aspect-ratio: 2001 / 1301; object-fit: cover; } /* campaign art keeps its own ratio: its text is never cropped */

/* Arrows (pointer devices) and dots, inside the frame. */
.mx-hero__arrow {
	position: absolute; top: 50%; z-index: 2; display: none; place-items: center; width: 44px; height: 44px; margin-top: -22px; padding: 0;
	border: 0; border-radius: 50%; background: rgb(255 255 255 / 88%); color: var(--mx-ink); box-shadow: var(--mx-shadow-sm); cursor: pointer;
	opacity: 0; transition: opacity .2s, background .15s;
}
.mx-hero__arrow--prev { inset-inline-start: var(--mx-s4); }
.mx-hero__arrow--next { inset-inline-end: var(--mx-s4); }
.mx-hero__arrow:hover { background: #fff; }
@media (hover: hover) and (pointer: fine) {
	.mx-hero__arrow { display: grid; }
	.mx-hero__main:hover .mx-hero__arrow, .mx-hero__arrow:focus-visible { opacity: 1; }
}
.mx-hero__dots {
	position: absolute; bottom: var(--mx-s3); left: 50%; z-index: 2; transform: translateX(-50%);
	display: flex; gap: 2px; padding: 2px 6px; border-radius: var(--mx-r-pill); background: rgb(20 20 24 / 35%);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.mx-hero__dot { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.mx-hero__dot::before { content: ""; width: 7px; height: 7px; border-radius: var(--mx-r-pill); background: rgb(255 255 255 / 60%); transition: width .2s, background-color .2s; }
.mx-hero__dot[aria-current="true"]::before { width: 20px; background: #fff; }

/* Side cards */
.mx-hero__side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mx-s3); min-width: 0; }
@media (min-width: 1100px) { .mx-hero__side { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; gap: var(--mx-s4); } }
.mx-hero-card {
	position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: stretch; gap: var(--mx-s2);
	min-height: 150px; padding: var(--mx-s4); border-radius: 20px; color: var(--mx-ink); text-decoration: none;
	transition: transform .25s var(--mx-ease), box-shadow .25s var(--mx-ease);
}
.mx-hero-card:hover { transform: translateY(-3px); box-shadow: var(--mx-shadow-md); color: var(--mx-ink); }
.mx-hero-card::before { content: ""; position: absolute; z-index: -1; width: 220px; height: 220px; bottom: -90px; inset-inline-end: -60px; border-radius: 50%; background: rgb(255 255 255 / 55%); }
.mx-hero-card--offers { background: linear-gradient(145deg, #fcebeb 0%, #f8dcdc 100%); }
.mx-hero-card--cats { background: linear-gradient(145deg, var(--mx-brand-soft) 0%, var(--mx-surface-2) 100%); }
.mx-hero-card__text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: 1; min-width: 0; }
.mx-hero-card__eyebrow { display: inline-flex; align-items: center; gap: 5px; font-size: var(--mx-fs-xs); font-weight: 700; color: var(--mx-brand-ink); }
.mx-hero-card--offers .mx-hero-card__eyebrow { color: var(--mx-accent); }
.mx-hero-card__title { font-size: 1.35rem; font-weight: 700; line-height: 1.3; }
.mx-hero-card__meta { font-size: var(--mx-fs-sm); color: var(--mx-ink-2); }
.mx-hero-card__go {
	display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding: 7px 14px;
	border-radius: var(--mx-r-pill); background: #fff; font-size: var(--mx-fs-sm); font-weight: 700; white-space: nowrap;
	transition: background .2s, color .2s, gap .2s;
}
.mx-hero-card:hover .mx-hero-card__go { background: var(--mx-ink); color: #fff; gap: 10px; }
.mx-hero-card--offers:hover .mx-hero-card__go { background: var(--mx-accent); }
.mx-hero-card__media { flex: 0 0 42%; align-self: flex-end; max-width: 160px; aspect-ratio: 1; margin-bottom: calc(var(--mx-s2) * -1); mix-blend-mode: multiply; }
.mx-hero-card__media img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s var(--mx-ease); }
.mx-hero-card:hover .mx-hero-card__media img { transform: scale(1.06) rotate(-3deg); }
/* Four category images, overlapping discs. */
.mx-hero-card__stack { align-self: flex-end; display: flex; flex: none; padding-inline-start: 14px; }
.mx-hero-card__stack > span {
	width: 58px; height: 58px; margin-inline-start: -14px; overflow: hidden; border-radius: 50%;
	background: #fff; box-shadow: 0 0 0 3px #fff, var(--mx-shadow-sm);
}
.mx-hero-card__stack img { width: 100%; height: 100%; object-fit: cover; }
/* Wide screens: text beside the picture, all in normal flow, centred in the card's height. */
@media (min-width: 1100px) {
	.mx-hero-card { align-items: center; gap: var(--mx-s4); padding: var(--mx-s5) var(--mx-s6); }
	.mx-hero-card__text { justify-content: center; gap: 6px; }
	.mx-hero-card__title { font-size: clamp(1.35rem, 1rem + 0.8vw, 1.75rem); }
	.mx-hero-card__go { margin-top: var(--mx-s3); padding: 9px 18px; }
	.mx-hero-card__media { align-self: center; flex-basis: 42%; max-width: 190px; margin: 0; }
	.mx-hero-card__stack { align-self: center; flex-wrap: wrap; width: 132px; padding: 0; gap: 8px; }
	.mx-hero-card__stack > span { width: 62px; height: 62px; margin: 0; }
	.mx-hero-card::before { width: 260px; height: 260px; bottom: -110px; inset-inline-end: -70px; }
}
/* Phones: the slider's dots sit under the art (its own text runs along the bottom),
   and the two cards become compact tiles side by side — picture on top, then the
   text, and a plain text link instead of the pill so nothing overlaps. */
@media (max-width: 599px) {
	.mx-hero__viewport { border-radius: 16px; }
	.mx-hero__dots { position: static; transform: none; justify-content: center; width: max-content; margin: 4px auto 0; padding: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
	.mx-hero__dot::before { background: var(--mx-line); }
	.mx-hero__dot[aria-current="true"]::before { background: var(--mx-ink); }
	.mx-hero__grid { gap: var(--mx-s2); }

	.mx-hero__side { gap: var(--mx-s2); }
	.mx-hero-card { flex-direction: column; align-items: stretch; gap: var(--mx-s2); min-height: 0; padding: var(--mx-s3); border-radius: 16px; }
	.mx-hero-card::before { width: 140px; height: 140px; bottom: auto; top: -60px; inset-inline-end: -50px; }
	.mx-hero-card__media, .mx-hero-card__stack { order: -1; align-self: flex-start; height: 56px; }
	.mx-hero-card__media { flex: none; width: 56px; max-width: none; margin: 0; }
	.mx-hero-card__stack { align-items: center; padding-inline-start: 10px; }
	.mx-hero-card__stack > span { width: 40px; height: 40px; margin-inline-start: -10px; box-shadow: 0 0 0 2px #fff; }
	.mx-hero-card__stack > span:nth-child(n+4) { display: none; }
	.mx-hero-card__text { gap: 2px; }
	.mx-hero-card__eyebrow { font-size: 11px; }
	.mx-hero-card__title { font-size: 1.05rem; }
	.mx-hero-card__meta { font-size: var(--mx-fs-xs); line-height: 1.5; }
	.mx-hero-card__go { margin-top: var(--mx-s2); padding: 0; background: none; font-size: var(--mx-fs-xs); color: var(--mx-brand-ink); }
	.mx-hero-card--offers .mx-hero-card__go { color: var(--mx-accent); }
	.mx-hero-card:hover .mx-hero-card__go, .mx-hero-card--offers:hover .mx-hero-card__go { background: none; color: inherit; }
	.mx-hero-card:hover { transform: none; }

	.mx-hero__trust { margin-top: var(--mx-s2); }
}

/* Service promises under the hero */
.mx-hero__trust { margin-top: var(--mx-s3); }
@media (min-width: 900px) { .mx-hero__trust { margin-top: var(--mx-s4); } }
.mx-trust--hero .mx-trust__link { background: #fff; border: 1px solid var(--mx-line-2); }
.mx-trust--hero .mx-trust__icon { background: var(--mx-brand-soft); }
@media (prefers-reduced-motion: reduce) {
	.mx-hero-card, .mx-hero-card__media img { transition: none; }
	.mx-hero-card:hover, .mx-hero-card:hover .mx-hero-card__media img { transform: none; }
}

/* Category circles */
.mx-section--cats { padding-block: var(--mx-s6); }
.mx-cat-circles {
	display: grid; grid-auto-flow: column; grid-auto-columns: 88px; gap: var(--mx-s3);
	margin: 0; padding: 0 0 4px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
}
.mx-cat-circles::-webkit-scrollbar { display: none; }
.mx-cat-circles > li { scroll-snap-align: start; }
@media (min-width: 900px) {
	.mx-cat-circles { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); grid-auto-columns: auto; overflow: visible; gap: var(--mx-s4); }
}
.mx-cat-circle { display: flex; flex-direction: column; align-items: center; gap: var(--mx-s2); text-decoration: none; color: var(--mx-ink); text-align: center; }
.mx-cat-circle__img {
	display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%;
	background: var(--mx-surface); border: 1px solid var(--mx-line-2); color: var(--mx-brand-ink); transition: border-color .15s, transform .15s;
}
@media (min-width: 900px) { .mx-cat-circle__img { width: 104px; height: 104px; } }
.mx-cat-circle__img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mx-cat-circle:hover .mx-cat-circle__img { border-color: var(--mx-brand); transform: translateY(-2px); }
.mx-cat-circle__name { font-size: var(--mx-fs-sm); font-weight: 500; line-height: 1.4; }
.mx-cat-circle:hover { color: var(--mx-ink); }


/* Promo banners */
/* Category promo cards (banners that link to a category). Phones: a sideways strip; ≥600: a row. */
.mx-promos {
	display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: var(--mx-s3);
	margin: 0 calc(var(--mx-gutter) * -1); padding: 2px var(--mx-gutter) 6px; list-style: none;
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--mx-gutter); scrollbar-width: none;
}
.mx-promos::-webkit-scrollbar { display: none; }
.mx-promos > li { scroll-snap-align: start; min-width: 0; }
.mx-promos--1 { grid-auto-columns: 100%; }
@media (min-width: 600px) {
	.mx-promos { grid-auto-flow: row; grid-auto-columns: auto; margin: 0; padding: 0; overflow: visible; }
	.mx-promos--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mx-promos--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) { .mx-promos { gap: var(--mx-s4); } }

.mx-promo {
	--tone: #f5efe4; --tone-ink: #74603a;
	position: relative; isolation: isolate; overflow: hidden;
	display: flex; align-items: stretch; height: 100%; min-height: 172px; padding: var(--mx-s5);
	border-radius: 20px; background: var(--tone); color: var(--mx-ink); text-decoration: none;
	transition: transform .25s var(--mx-ease), box-shadow .25s var(--mx-ease);
}
.mx-promo--t2 { --tone: #fbeef0; --tone-ink: #9b3346; }
.mx-promo--t3 { --tone: #e9f2ec; --tone-ink: #2f6a47; }
.mx-promo--t4 { --tone: #eaf0f8; --tone-ink: #2f5580; }
.mx-promo--t5 { --tone: #f1ede5; --tone-ink: #5f5446; }
.mx-promo--t6 { --tone: #f2eef8; --tone-ink: #5b4687; }
/* A soft white disc behind the photo. */
.mx-promo::before {
	content: ""; position: absolute; z-index: -1; width: 210px; height: 210px; bottom: -70px; inset-inline-end: -40px;
	border-radius: 50%; background: rgb(255 255 255 / 55%);
}
.mx-promo:hover { transform: translateY(-3px); box-shadow: var(--mx-shadow-md); color: var(--mx-ink); }
.mx-promo__text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: 1 1 58%; min-width: 0; }
.mx-promo__meta { font-size: var(--mx-fs-xs); font-weight: 700; color: var(--tone-ink); }
.mx-promo__title { font-size: 1.3rem; font-weight: 700; line-height: 1.3; }
.mx-promo__kids { font-size: var(--mx-fs-xs); color: var(--mx-ink-2); line-height: 1.6; }
.mx-promo__go {
	display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding: 7px 14px;
	border-radius: var(--mx-r-pill); background: #fff; font-size: var(--mx-fs-sm); font-weight: 700;
	transition: background .2s, color .2s, gap .2s;
}
.mx-promo:hover .mx-promo__go { background: var(--mx-ink); color: #fff; gap: 10px; }
.mx-promo__media { flex: 0 0 40%; align-self: flex-end; max-width: 170px; margin: 0 0 calc(var(--mx-s2) * -1); aspect-ratio: 1; mix-blend-mode: multiply; }
.mx-promo__media img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s var(--mx-ease); }
.mx-promo:hover .mx-promo__media img { transform: scale(1.06) rotate(-2deg); }
@media (min-width: 600px) and (max-width: 1099px) {
	/* Three across on tablets: photo tucked into the corner so the text keeps its width. */
	.mx-promos--3 .mx-promo__media { position: absolute; bottom: 4px; inset-inline-end: 4px; width: 42%; max-width: 130px; margin: 0; z-index: 0; opacity: .95; }
	.mx-promos--3 .mx-promo__text { flex-basis: 100%; }
	.mx-promos--3 .mx-promo__kids { display: none; }
	.mx-promos--3 .mx-promo__title { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
	.mx-promo, .mx-promo__media img { transition: none; }
	.mx-promo:hover, .mx-promo:hover .mx-promo__media img { transform: none; }
}

/* Plain image banner (a banner that doesn't point at a category). */
.mx-banner { display: block; overflow: hidden; border-radius: 20px; background: var(--mx-surface); }
.mx-banner img { width: 100%; height: 100%; min-height: 172px; object-fit: cover; transition: transform .35s var(--mx-ease); }
a.mx-banner:hover img { transform: scale(1.02); }

/* Brand logos: logo card + name. Phones: a two-row strip that scrolls sideways
   (the next column peeks in); wider screens: a grid. */
.mx-brands {
	display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 112px; gap: var(--mx-s3) var(--mx-s2);
	margin: 0 calc(var(--mx-gutter) * -1); padding: 2px var(--mx-gutter) 6px; list-style: none;
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--mx-gutter); scrollbar-width: none;
}
.mx-brands::-webkit-scrollbar { display: none; }
.mx-brands > li { scroll-snap-align: start; min-width: 0; }
@media (min-width: 600px) {
	.mx-brands {
		grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(4, minmax(0, 1fr));
		margin: 0; padding: 0; overflow: visible;
	}
}
@media (min-width: 900px) { .mx-brands { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--mx-s4) var(--mx-s3); } }
.mx-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--mx-ink); }
.mx-brand__logo {
	position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
	border: 1px solid var(--mx-line-2); border-radius: var(--mx-r-lg); background: #fff;
	transition: border-color .15s, box-shadow .15s, transform .15s var(--mx-ease);
}
.mx-brand__logo img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 12%; object-fit: contain; }
.mx-brand:hover .mx-brand__logo { border-color: var(--mx-brand); box-shadow: var(--mx-shadow-sm); transform: translateY(-2px); }
.mx-brand__name { max-width: 100%; overflow: hidden; font-size: var(--mx-fs-xs); font-weight: 500; color: var(--mx-ink-2); text-align: center; white-space: nowrap; text-overflow: ellipsis; }
.mx-brand:hover .mx-brand__name { color: var(--mx-ink); }
@media (prefers-reduced-motion: reduce) { .mx-brand__logo { transition: none; } .mx-brand:hover .mx-brand__logo { transform: none; } }

/* Closing CTA */
/* Closing CTA: the ordering steps on a warm card (the text of «طريقة الطلب», condensed). */
.mx-cta {
	position: relative; isolation: isolate; overflow: hidden;
	display: grid; gap: var(--mx-s6); align-items: center; padding: var(--mx-s6) var(--mx-s5);
	border-radius: 24px; color: var(--mx-ink);
	background:
		radial-gradient(420px 260px at 0% 100%, rgb(255 255 255 / 70%), transparent 70%),
		linear-gradient(135deg, var(--mx-brand-soft) 0%, var(--mx-surface-2) 100%);
	border: 1px solid var(--mx-line-2);
}
/* Soft red rings in the corner: decoration only. */
.mx-cta::before {
	content: ""; position: absolute; z-index: -1; width: 340px; height: 340px; top: -170px; inset-inline-start: -120px;
	border-radius: 50%; border: 40px solid rgb(236 84 84 / 10%);
}
@media (min-width: 900px) {
	.mx-cta { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--mx-s10); padding: var(--mx-s10); }
}
.mx-cta__eyebrow {
	display: inline-flex; align-items: center; gap: var(--mx-s2); margin: 0 0 var(--mx-s2);
	font-size: var(--mx-fs-sm); font-weight: 700; color: var(--mx-brand-ink);
}
.mx-cta__eyebrow::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: var(--mx-brand); }
.mx-cta__title { margin: 0 0 var(--mx-s3); font-size: var(--mx-fs-h2); line-height: 1.35; color: var(--mx-ink); }
.mx-cta__lead { margin: 0 0 var(--mx-s5); color: var(--mx-ink-2); }
.mx-cta__actions { display: flex; flex-wrap: wrap; gap: var(--mx-s2); margin: 0; }
.mx-cta__actions .mx-btn--outline { --_bg: rgb(255 255 255 / 60%); }
.mx-cta__actions .mx-btn--outline:hover { --_bg: #fff; }
@media (max-width: 599px) { .mx-cta__actions .mx-btn { flex: 1 1 auto; justify-content: center; } }

.mx-cta__steps { display: grid; gap: var(--mx-s3); margin: 0; padding: 0; list-style: none; counter-reset: none; }
@media (min-width: 600px) { .mx-cta__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mx-cta__step {
	position: relative; display: flex; align-items: flex-start; gap: var(--mx-s3); padding: var(--mx-s4);
	border-radius: var(--mx-r-lg); background: #fff; box-shadow: 0 1px 2px rgb(20 20 24 / 5%), 0 8px 24px rgb(212 61 61 / 8%);
}
.mx-cta__num {
	position: absolute; top: 10px; inset-inline-end: 14px;
	font-size: 1.75rem; font-weight: 700; line-height: 1; color: var(--mx-brand-soft); font-variant-numeric: tabular-nums;
}
.mx-cta__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--mx-ink); color: #fff; }
.mx-cta__step-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-inline-end: 24px; line-height: 1.55; }
.mx-cta__step-text strong { font-size: var(--mx-fs-md); }
.mx-cta__step-text span { font-size: var(--mx-fs-sm); color: var(--mx-muted); }
/* Phones: a vertical timeline, the icons joined by a dashed line. */
@media (max-width: 599px) {
	.mx-cta__steps { gap: 0; }
	.mx-cta__step { padding: var(--mx-s3) 0; background: none; box-shadow: none; border-radius: 0; }
	.mx-cta__step + .mx-cta__step::before {
		content: ""; position: absolute; top: -12px; inset-inline-start: 21px; height: 24px;
		border-inline-start: 2px dashed rgb(236 84 84 / 45%);
	}
	.mx-cta__num { display: none; }
	.mx-cta__step-text { padding-inline-end: 0; }
}
