/*
Theme Name: m-challenge-2026
Description: תבנית מותאמת אישית ל-M-Challenge — שירותי מחשוב, ענן ואבטחת מידע לעסקים. עברית RTL, נגיש לפי תקן ישראלי 5568.
Version: 1.0.0
Text Domain: mch
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
	--green:       #15803D;
	--green-600:   #16A34A;
	--green-400:   #4ADE80;
	--green-200:   #BBF7D0;
	--green-50:    #F0FDF4;

	--ink:         #0B1220;
	--ink-800:     #1C2534;
	--ink-600:     #4B5768;
	--muted:       #7A8595;

	--line:        #E3E8EE;
	--surface:     #F6F8FA;
	--bg:          #FFFFFF;

	--warn:        #E4A11B;

	--font-body:    "Assistant", "Segoe UI", system-ui, sans-serif;
	--font-display: "Heebo", "Assistant", system-ui, sans-serif;

	--radius:      1rem;
	--pill:        999px;
	--wrap:        1180px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--ink-800);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
	font-family: var(--font-display);
	color: var(--ink);
	line-height: 1.25;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0 0 .5em;
}

h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-600); }

img, svg, video, iframe { max-width: 100%; height: auto; }

/* Visible keyboard focus — required for IS 5568 */
:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 3px solid var(--green);
	outline-offset: 2px;
	border-radius: 4px;
}

.mch-skip {
	position: absolute;
	inset-inline-start: -9999px;
	top: 0;
	z-index: 200;
	background: var(--ink);
	color: #fff;
	padding: .75rem 1.25rem;
}
.mch-skip:focus { inset-inline-start: 1rem; top: 1rem; }

.sr-only {
	position: absolute; width: 1px; height: 1px;
	padding: 0; margin: -1px; overflow: hidden;
	clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   3. Layout
   ========================================================================== */

.mch-wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: 1.25rem;
}

.mch-section { padding-block: clamp(3rem, 7vw, 6rem); }
.mch-section--surface { background: var(--surface); }

/* Hi-tech hero: near-black with a subtle dot grid and a green glow. */
.mch-section--tint {
	position: relative;
	background: var(--ink);
	color: #fff;
	overflow: hidden;
}
.mch-section--tint::before {
	content: "";
	position: absolute; inset: 0;
	background-image: radial-gradient(circle, rgba(255,255,255,.07) 1px, transparent 1px);
	background-size: 26px 26px;
	pointer-events: none;
}
.mch-section--tint::after {
	content: "";
	position: absolute;
	inset-inline-end: -12%;
	top: -35%;
	width: 46rem; height: 46rem;
	background: radial-gradient(circle, rgba(74,222,128,.18), transparent 62%);
	pointer-events: none;
}
.mch-section--tint > * { position: relative; z-index: 1; }
.mch-section--tint h1,
.mch-section--tint h2,
.mch-section--tint h3 { color: #fff; }
.mch-section--tint .mch-lead { color: rgba(255,255,255,.72); }
.mch-section--tint .mch-meta { color: rgba(255,255,255,.55); }
.mch-section--tint a:not(.mch-btn) { color: var(--green-400); }
.mch-section--tint .mch-stats { border-top-color: rgba(255,255,255,.15); }
.mch-section--tint .mch-stats dt { color: rgba(255,255,255,.55); }
.mch-section--tint .mch-stats dd { color: #fff; }
.mch-section--tint .mch-btn--ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.mch-section--tint .mch-btn--ghost:hover { background: rgba(255,255,255,.08); border-color: var(--green-400); color: #fff; }

.mch-section--dark { background: var(--ink); color: #fff; }
.mch-section--dark h1,
.mch-section--dark h2,
.mch-section--dark h3 { color: #fff; }

.mch-grid { display: grid; gap: 1.5rem; }
.mch-grid--2 { grid-template-columns: 1fr; }
.mch-grid--3 { grid-template-columns: 1fr; }
@media (min-width: 700px) {
	.mch-grid--2 { grid-template-columns: repeat(2, 1fr); }
	.mch-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
	.mch-grid--3 { grid-template-columns: repeat(3, 1fr); }
}
.mch-grid__full { grid-column: 1 / -1; }

/* ==========================================================================
   4. Components
   ========================================================================== */

.mch-eyebrow {
	display: inline-block;
	font-family: var(--font-display);
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .14em;
	color: var(--green);
	margin: 0;
	padding: .35rem .85rem;
	border: 1px solid var(--green-200);
	border-radius: var(--pill);
	background: var(--green-50);
}
.mch-section--tint .mch-eyebrow,
.mch-section--dark .mch-eyebrow {
	color: var(--green-400);
	background: rgba(74,222,128,.1);
	border-color: rgba(74,222,128,.3);
}

.mch-lead { font-size: 1.1875rem; color: var(--ink-600); max-width: 42rem; }

.mch-btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .8rem 1.9rem;
	border-radius: var(--pill);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.0625rem;
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}

.mch-btn--primary {
	background: var(--green);
	color: #fff;
	box-shadow: 0 6px 20px -6px rgba(21,128,61,.45);
}
.mch-btn--primary:hover { background: var(--green-600); color: #fff; transform: translateY(-1px); }

.mch-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.mch-btn--ghost:hover { border-color: var(--green-200); background: var(--green-50); color: var(--ink); }

.mch-card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: .75rem;
	padding: 1.75rem;
	position: relative;
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.mch-card::before {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline: 1.5rem;
	height: 2px;
	background: var(--green);
	opacity: 0;
	transition: opacity .2s ease;
}
.mch-card:hover::before { opacity: 1; }
.mch-card:hover {
	border-color: var(--green-200);
	box-shadow: 0 18px 40px -24px rgba(11,18,32,.35);
	transform: translateY(-3px);
}
.mch-card h3 { margin-top: 0; }
.mch-card--tint { background: var(--green-50); border-color: var(--green-200); }

.mch-section--dark .mch-card {
	background: rgba(255,255,255,.05);
	border-color: rgba(255,255,255,.15);
	color: #fff;
}

.mch-stats { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); padding-top: 2.5rem; margin-top: 3.5rem; }
@media (min-width: 900px) { .mch-stats { grid-template-columns: repeat(4, 1fr); } }
.mch-stats dt { font-size: .9375rem; color: var(--muted); }
.mch-stats dd { margin: 0; font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; color: var(--ink); }

/* ==========================================================================
   5. Header
   ========================================================================== */

.mch-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255,255,255,.95);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
}

.mch-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: 1rem;
}

.mch-logo { display: flex; align-items: center; gap: .65rem; text-decoration: none; flex-shrink: 0; }
.mch-logo__mark { width: 2.1rem; height: 2.1rem; display: block; flex: 0 0 auto; }
.mch-logo__text { display: flex; flex-direction: column; gap: .18rem; align-items: flex-end; }
.mch-logo__name { font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; color: var(--ink); line-height: 1; letter-spacing: -.025em; white-space: nowrap; }
.mch-logo__name span { color: var(--green); }
.mch-logo__sub  { font-family: var(--font-display); font-weight: 600; font-size: .58rem; letter-spacing: .24em; color: var(--muted); line-height: 1; white-space: nowrap; }

.mch-nav ul { display: flex; gap: 1.35rem; list-style: none; margin: 0; padding: 0; }
.mch-nav li { white-space: nowrap; }
.mch-nav a {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: .9375rem;
	color: var(--ink);
	text-decoration: none;
	transition: color .15s ease;
}
.mch-nav a:hover { color: var(--green); }

.mch-header__cta { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.mch-tel { font-family: var(--font-display); font-weight: 700; color: var(--ink); text-decoration: none; direction: ltr; }
.mch-tel:hover { color: var(--green); }

.mch-burger { display: none; background: none; border: 0; padding: .5rem; margin: -.5rem; color: var(--ink); cursor: pointer; }

.mch-mobile { display: none; border-top: 1px solid var(--line); background: var(--bg); }
.mch-mobile ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mch-mobile a { display: block; padding: .75rem 0; font-family: var(--font-display); font-weight: 500; color: var(--ink); text-decoration: none; }
.mch-mobile__cta { display: flex; flex-direction: column; gap: .75rem; padding-top: 1.25rem; margin-top: 1rem; border-top: 1px solid var(--line); }
.mch-mobile.is-open { display: block; }

@media (max-width: 1023px) {
	.mch-nav, .mch-header__cta { display: none; }
	.mch-burger { display: block; }
}

/* ==========================================================================
   6. Footer
   ========================================================================== */

.mch-footer { margin-top: 6rem; background: var(--ink); color: #fff; }
.mch-footer__grid { display: grid; gap: 3rem; padding-block: 4rem; }
@media (min-width: 800px) { .mch-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.mch-footer h2 { font-size: 1.15rem; color: #fff; margin-bottom: 1rem; }
.mch-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .65rem; }
.mch-footer a { color: rgba(255,255,255,.7); text-decoration: none; }
.mch-footer a:hover { color: #fff; }
.mch-footer p { color: rgba(255,255,255,.7); }
.mch-footer__bottom {
	border-top: 1px solid rgba(255,255,255,.15);
	padding-block: 1.75rem;
	display: flex; flex-wrap: wrap; gap: .75rem;
	justify-content: space-between;
	font-size: .9375rem;
	color: rgba(255,255,255,.5);
}
.mch-footer__bottom p { margin: 0; color: inherit; }

/* ==========================================================================
   7. Article body
   ========================================================================== */

.mch-prose { max-width: 46rem; font-size: 1.09rem; line-height: 1.85; }
.mch-prose > *:first-child { margin-top: 0; }
.mch-prose ul, .mch-prose ol { padding-inline-start: 1.35em; }
.mch-prose li::marker { color: var(--green); }
.mch-prose strong { color: var(--ink); }
.mch-prose a { font-weight: 600; }

/* ── Legacy content reset ─────────────────────────────────────────────────
   661 posts carry inline styling, alignment and font sizes left over from
   Avada / Fusion Builder. Without this, old articles render centred, in the
   wrong font, at arbitrary sizes. Specificity is deliberately high because
   the offending rules are inline `style` attributes in post_content.
   ─────────────────────────────────────────────────────────────────────── */
.mch-prose p,
.mch-prose li,
.mch-prose h2,
.mch-prose h3,
.mch-prose h4,
.mch-prose div,
.mch-prose span {
	text-align: start !important;
	font-family: inherit !important;
	color: inherit;
	max-width: 100%;
}
.mch-prose h2, .mch-prose h3, .mch-prose h4 { color: var(--ink); }
.mch-prose p span,
.mch-prose li span { font-size: inherit !important; line-height: inherit !important; }
.mch-prose [style*="text-align"] { text-align: start !important; }
.mch-prose img { height: auto !important; }
.mch-prose iframe { max-width: 100%; }

.mch-prose h2 { font-size: 1.6rem; margin-block: 1.6em .5em; }
.mch-prose h3 { font-size: 1.25rem; margin-block: 1.4em .4em; }
.mch-prose ul, .mch-prose ol { padding-inline-start: 1.4em; margin-block: 1em; }
.mch-prose li { margin-block: .35em; }
.mch-prose img { border-radius: var(--radius); }
.mch-prose figure { margin: 2rem 0; }
.mch-prose figcaption { font-size: .875rem; color: var(--muted); margin-top: .5rem; }
.mch-prose blockquote {
	border-inline-start: 4px solid var(--green);
	padding-inline-start: 1.25rem;
	margin-inline: 0;
	color: var(--ink-600);
	font-size: 1.1875rem;
}
.mch-prose table { width: 100%; border-collapse: collapse; margin-block: 1.5rem; }
.mch-prose th, .mch-prose td { border: 1px solid var(--line); padding: .65rem .85rem; text-align: start; }
.mch-prose th { background: var(--surface); font-family: var(--font-display); }

/* ==========================================================================
   8. Forms
   ========================================================================== */

.mch-field { display: block; margin-bottom: 1rem; }
.mch-label { display: block; font-size: .9375rem; color: var(--ink-600); margin-bottom: .35rem; }
.mch-input, .mch-textarea {
	width: 100%;
	font: inherit;
	padding: .75rem 1rem;
	border: 1px solid var(--line);
	border-radius: .625rem;
	background: #fff;
	color: var(--ink);
}
.mch-input:focus, .mch-textarea:focus { border-color: var(--green); }
.mch-honeypot { position: absolute; left: -9999px; }

/* Dark-section form variant — the contact block sits on near-black. */
.mch-section--dark .mch-label { color: rgba(255,255,255,.7); }
.mch-section--dark .mch-input,
.mch-section--dark .mch-textarea {
	background: rgba(255,255,255,.07);
	border-color: rgba(255,255,255,.18);
	color: #fff;
}
.mch-section--dark .mch-input::placeholder,
.mch-section--dark .mch-textarea::placeholder { color: rgba(255,255,255,.4); }
.mch-section--dark .mch-input:focus,
.mch-section--dark .mch-textarea:focus { border-color: var(--green-400); background: rgba(255,255,255,.1); }
.mch-section--dark .mch-meta { color: rgba(255,255,255,.55); }
.mch-section--dark .mch-card--tint { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.15); }
.mch-section--dark .mch-notice { color: #fff; }
.mch-section--dark .mch-notice--ok { background: rgba(74,222,128,.12); border-color: rgba(74,222,128,.4); }
.mch-notice { border-radius: .625rem; padding: .85rem 1rem; margin-bottom: 1.25rem; }
.mch-notice--ok   { background: var(--green-50); border: 1px solid var(--green-200); }
.mch-notice--err  { background: #FEF6E7; border: 1px solid var(--warn); }

/* ==========================================================================
   9. Pagination + misc
   ========================================================================== */

.mch-pagination { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 3.5rem; }
.mch-pagination .page-numbers {
	padding: .5rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--pill);
	text-decoration: none;
	color: var(--ink);
}
.mch-pagination .current { background: var(--green); border-color: var(--green); color: #fff; }

.mch-meta { font-size: .9375rem; color: var(--muted); }

/* Article layout: readable column + sticky sidebar, centred on wide screens. */
.mch-article { display: grid; gap: 3rem; align-items: start; }
@media (min-width: 1000px) {
	.mch-article { grid-template-columns: minmax(0, 46rem) 320px; justify-content: center; }
	.mch-aside { position: sticky; top: 6.5rem; }
}
.mch-card--brand { background: var(--green-50); border-color: var(--green-200); }

.mch-searchform { display: flex; gap: .5rem; max-width: 28rem; }
.mch-searchform input[type="search"] {
	flex: 1; font: inherit; padding: .75rem 1.25rem;
	border: 1px solid var(--line); border-radius: var(--pill);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
	html { scroll-behavior: auto; }
}
