/*
 * Editorial — Final: the last refinement layer over V3 (home page "Premium Final"). Loaded after editorial-v3.css only
 * on pages whose sections use the variant 'editorial-final' (marom-core/inc/editorial.php); every rule is scoped to
 * body.m3-final and kept at V3's specificity (:where()), so V3 itself is untouched and Style controls still win.
 */
:where(.m3-final) .m3 { --m3-header: 88px; }
@media (max-width: 1279px) { :where(.m3-final) .m3 { --m3-header: 72px; } }

/* ── the header joins the hero's entrance (one orchestrated moment): it fades in with the first line ── */
@keyframes m3f-in { from { opacity: 0; transform: translateY(-8px); } }
html.mx-js body.m3-final .mp-header { animation: m3f-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards; } /* backwards only: no transform is left on the bar afterwards (it would trap the fixed phone menu) */

/* ── practice areas: "למידע נוסף" as a quiet link with a round arrow that fills on the row's hover ── */
:where(.m3-final .m3-index) .m3-index__more { gap: 0.75rem; padding-block-start: 0.35rem; }
:where(.m3-final .m3-index) .m3-index__more .m3-arrow {
	box-sizing: content-box;
	inline-size: 1rem;
	block-size: 1rem;
	padding: 0.7rem;
	border: 1px solid var(--m3-line-gold);
	border-radius: 50%;
	transition: background-color 0.45s var(--m3-ease), border-color 0.45s var(--m3-ease), color 0.45s var(--m3-ease), transform 0.5s var(--m3-ease);
}
:where(.m3-final .m3-index) .m3-index__link:hover .m3-arrow,
:where(.m3-final .m3-index) .m3-index__link:focus-visible .m3-arrow { background-color: var(--m3-gold); border-color: var(--m3-gold); color: var(--m3-night); transform: translateX(-4px); }

/* ── testimonials on touch screens: a strip you swipe yourself (no moving rail you can't stop) ── */
@media (hover: none), (max-width: 767px) {
	:where(.m3-final .m3-voices) .m3-voices__rail { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
	:where(.m3-final .m3-voices) .m3-voices__rail::-webkit-scrollbar { display: none; }
	:where(.m3-final .m3-voices) .m3-voices__track { animation: none; padding-inline: var(--m3-gutter); gap: 0.875rem; }
	:where(.m3-final .m3-voices) .m3-quote { inline-size: min(82vw, 340px); scroll-snap-align: center; }
	:where(.m3-final .m3-voices) .m3-quote[aria-hidden="true"] { display: none; } /* the loop's copy is not needed */
}

@media (prefers-reduced-motion: reduce) { html.mx-js body.m3-final .mp-header { animation: none; } }

/* ── home page on phones: the classic parts read like a landing page — centred (06/11/2026).
      Long-form content stays right-aligned: testimonial quotes, article cards and the FAQ questions.
      Scoped to the home page (body.home) and to phones; desktop and tablet are unchanged. ── */
@media (max-width: 767px) {
	/* section heads: kicker (with a line on both sides), title, lead */
	:where(.home.m3-final) :is(.m3-hero__text, .m3-index .m3-split__aside, .m3-principles__head, .m3-counsel__body, .m3-voices__head, .m3-knowledge__head, .m3-questions .m3-split__aside, .m3-closing__grid) { text-align: center; }
	:where(.home.m3-final) :is(.m3-index, .m3-principles, .m3-counsel, .m3-voices, .m3-knowledge, .m3-questions) .m3-kicker::after { content: ""; inline-size: 2rem; block-size: 1px; background: currentColor; opacity: 0.7; }
	:where(.home.m3-final) .m3-lead { margin-inline: auto; }

	/* hero: badge, title, rule, lead and buttons on the centre line; the four figures centred in their cells */
	:where(.home.m3-final) .m3-hero__text { margin-inline: auto; }
	:where(.home.m3-final) .m3-hero .m3-rule { margin-inline: auto; transform-origin: center; }
	:where(.home.m3-final) .m3-hero .m3-actions { justify-content: center; }
	:where(.home.m3-final) .m3-ledger__item { align-items: center; text-align: center; }

	/* credentials strip: icon above its two lines */
	:where(.home.m3-final) .m3-credentials__item { flex-direction: column; align-items: center; gap: 0.7rem; padding-inline: 0.75rem; text-align: center; }
	:where(.home.m3-final) .m3-credentials__item:nth-child(even) { padding-inline: 0.75rem; }
	:where(.home.m3-final) .m3-credentials__text { align-items: center; }

	/* practice areas: each area as a centred card */
	:where(.home.m3-final) .m3-index__link { justify-items: center; text-align: center; }
	:where(.home.m3-final) .m3-index__head { align-items: center; }
	:where(.home.m3-final) .m3-index__body { align-items: center; margin-inline: auto; }
	:where(.home.m3-final) .m3-index__tags { justify-content: center; }
	:where(.home.m3-final) .m3-index__more { align-self: center; }

	/* why us: icon above title and text */
	:where(.home.m3-final) .m3-principles__item { grid-template-columns: 1fr; justify-items: center; text-align: center; }
	:where(.home.m3-final) .m3-principles__icon { grid-row: auto; }
	:where(.home.m3-final) .m3-principles__text { margin-inline: auto; }

	/* the attorney: one centred column (the stepped title lines line up on the centre) */
	:where(.home.m3-final) .m3-counsel__line:nth-child(n) { padding-inline-start: 0; }
	:where(.home.m3-final) .m3-counsel__id { align-items: center; }
	:where(.home.m3-final) :is(.m3-counsel__specs, .m3-counsel__links) { justify-content: center; }

	/* testimonials and articles: the head stacks, rating and "all articles" under the title */
	:where(.home.m3-final) :is(.m3-voices__head, .m3-knowledge__head) { flex-direction: column; align-items: center; }
	:where(.home.m3-final) .m3-voices__rating { justify-content: center; }

	/* FAQ: the side note under the title, centred */
	:where(.home.m3-final) .m3-questions__more { align-items: center; }

	/* closing call to action */
	:where(.home.m3-final) .m3-closing__body .m3-lead { margin-inline: auto; }
}

/* ── 2026-11-20 · client fixes ─────────────────────────────────────────────────────────────────────────────── */

/* ticker under the hero figures: drifts on every screen (script: premium-pages.js), pauses under the mouse,
   can be dragged with mouse or finger. Without the script the original CSS animation stays. */
.m3-ticker.is-live { cursor: grab; touch-action: pan-y; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.m3-ticker.is-live.is-dragging { cursor: grabbing; }
.m3-ticker.is-live .m3-ticker__track { animation: none !important; inline-size: max-content !important; flex-wrap: nowrap !important; justify-content: flex-start !important; gap: 0 !important; padding-inline: 0 !important; will-change: transform; -webkit-user-select: none; user-select: none; }
.m3-ticker.is-live .m3-ticker__item { padding-inline: 1.5rem !important; transition: color 0.3s ease !important; }
.m3-ticker.is-live :is([data-dup], .m3-ticker__sep) { display: inline-block !important; }
.m3-ticker.is-live .m3-ticker__item:hover { color: var(--m3-gold-soft, var(--m3-gold)); }

/* the attorney motto on the home page ("דיוק, עוצמה, אנושיות"): stepped lines on phones too */
@media (max-width: 767px) {
	body.home.m3-final .m3-counsel__line { inline-size: fit-content; margin-inline: auto; }
	body.home.m3-final .m3-counsel__line:nth-child(1) { transform: translateX(0.8em); }
	body.home.m3-final .m3-counsel__line:nth-child(3) { transform: translateX(-0.8em); }
}

/* about head: the founder's portrait on the left, the title and the introduction in one aligned column */
body.m3-final .m3-pagehead--about .m3-pagehead__foot { display: block; max-inline-size: 38rem; margin-block-start: 0; }
body.m3-final .m3-pagehead--about .m3-pagehead__foot .m3-rule { margin-block: clamp(1.75rem, 2.6vw, 2.25rem) 1.5rem; }
.m3-pagehead__photo { position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--m3-chamber, #0b1220); }
.m3-pagehead__photo .m3-pagehead__img { object-fit: cover; object-position: 50% 12%; }
@media (min-width: 1024px) {
	body.m3-final .m3-pagehead--photo .m3-pagehead__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 25rem); column-gap: clamp(40px, 6vw, 104px); align-items: center; }
	.m3-pagehead--photo .m3-pagehead__photo { max-block-size: 34rem; }
}
@media (max-width: 1023px) {
	body.m3-final .m3-pagehead.m3-pagehead--photo figure.m3-pagehead__photo { inline-size: min(100%, 16rem); margin: 2.75rem auto 0; } /* beats Elementor's figure { margin: 0 } */
}

/* footer: the articles column (menu location "פוטר — עמודה 4") spans the row, its links set in columns */
.mp-footer .elementor-repeater-item-artcol1 { grid-column: 1 / -1; }
.mp-footer .elementor-repeater-item-artcol1 .mp-footer__list:not([hidden]) { display: block; columns: 3; column-gap: clamp(24px, 3vw, 48px); }
.mp-footer .elementor-repeater-item-artcol1 .mp-footer__list li { break-inside: avoid; margin-block-end: 0.55rem; }
@media (max-width: 1023px) { .mp-footer .elementor-repeater-item-artcol1 .mp-footer__list:not([hidden]) { columns: 2; } }
@media (max-width: 599px) { .mp-footer .elementor-repeater-item-artcol1 .mp-footer__list:not([hidden]) { columns: 1; } }
