/* Makhazen public site — ported from the "Makhazen Website" design.
   Square corners, 2px navy rules, gold accent. Logical properties throughout,
   so one stylesheet serves Arabic (rtl) and English (ltr). */

:root {
  --mk-navy: #0D223D;
  --mk-navy-hover: #1C3A5E;
  --mk-ink: #1F2937;
  --mk-gold: #C9A46A;
  --mk-gold-hover: #D8B988;
  --mk-gold-active: #B38D52;
  --mk-green: #2E7D68;
  --mk-muted: #6B7280;
  --mk-soft: #F1F3F5;
  --mk-line: #D5D9DF;
  --mk-navy-line: #2A4466;
  --mk-white: #FFFFFF;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--mk-white); color: var(--mk-ink);
  font-family: Inter, Cairo, system-ui, sans-serif;
  font-variant-numeric: tabular-nums; min-height: 100vh;
}
html[lang="ar"] body { font-family: Cairo, Inter, system-ui, sans-serif; }
a { color: var(--mk-navy); text-decoration: none; }
a:hover { color: var(--mk-green); }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--mk-gold); outline-offset: 2px; }
::selection { background: var(--mk-gold); color: var(--mk-navy); }
img { display: block; max-width: 100%; }

.mk-wrap { max-width: 1280px; margin: 0 auto; padding-inline: 32px; }
@media (max-width: 640px) { .mk-wrap { padding-inline: 16px; } }

/* — header — */
.mk-header { position: sticky; top: 0; z-index: 20; background: var(--mk-white); border-bottom: 2px solid var(--mk-navy); }
.mk-header .mk-wrap { display: flex; align-items: stretch; gap: 32px; min-height: 72px; flex-wrap: wrap; }
.mk-brand { display: flex; align-items: center; gap: 10px; color: var(--mk-navy); }
.mk-brand img { width: 40px; height: 40px; }
.mk-brand-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.mk-brand-ar { font-family: Cairo, sans-serif; font-weight: 800; font-size: 22px; }
.mk-brand-en { font-family: Inter, sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 0.08em; }
.mk-nav { display: flex; }
.mk-nav a {
  display: flex; align-items: center; padding: 0 16px; font-weight: 600; font-size: 15px;
  color: var(--mk-navy); border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.mk-nav a:hover { background: var(--mk-soft); color: var(--mk-navy); }
.mk-nav a.is-active { border-bottom-color: var(--mk-gold); }
.mk-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; padding-block: 12px; flex-wrap: wrap; }
.mk-link { padding: 8px 12px; font-weight: 600; font-size: 14px; border: 2px solid transparent; }
.mk-link:hover { border-color: var(--mk-navy); color: var(--mk-navy); }

/* — buttons — */
.mk-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 2px solid var(--mk-navy); padding: 10px 16px; font-weight: 700; font-size: 14px;
  cursor: pointer; text-align: start; background: var(--mk-navy); color: var(--mk-white);
}
.mk-btn:hover { background: var(--mk-navy-hover); border-color: var(--mk-navy-hover); color: var(--mk-white); }
.mk-btn:active { background: var(--mk-ink); }
.mk-btn-lg { padding: 16px 20px; font-size: 16px; min-width: 220px; gap: 32px; }
.mk-btn-outline { background: transparent; color: var(--mk-navy); }
.mk-btn-outline:hover { background: var(--mk-soft); color: var(--mk-navy); border-color: var(--mk-navy); }
.mk-btn-gold { background: var(--mk-gold); border-color: var(--mk-gold); color: var(--mk-navy); font-weight: 800; }
.mk-btn-gold:hover { background: var(--mk-gold-hover); border-color: var(--mk-gold-hover); color: var(--mk-navy); }
.mk-btn-gold:active { background: var(--mk-gold-active); }
.mk-btn-block { width: 100%; }
html[dir="rtl"] .mk-arrow { transform: scaleX(-1); }

/* — shared type — */
.mk-kicker { display: inline-flex; align-items: center; gap: 8px; background: var(--mk-soft); color: var(--mk-navy); padding: 6px 10px; font-size: 13px; font-weight: 600; }
.mk-sq { display: inline-block; width: 8px; height: 8px; background: var(--mk-green); flex: none; }
.mk-num { font-family: Inter, sans-serif; font-weight: 700; font-size: 13px; color: var(--mk-green); letter-spacing: 0.08em; }
.mk-h1 { margin: 0; font-weight: 800; font-size: clamp(40px, 5.4vw, 68px); line-height: 1.15; color: var(--mk-navy); text-wrap: balance; }
.mk-h1-sm { font-size: clamp(32px, 3.6vw, 44px); line-height: 1.2; }
.mk-h2 { margin: 0; font-weight: 800; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.2; color: var(--mk-navy); }
.mk-h3 { margin: 0; font-weight: 800; font-size: 32px; color: var(--mk-navy); }
.mk-lead { margin: 0; font-size: 19px; line-height: 1.75; max-width: 560px; text-wrap: pretty; }
.mk-body { margin: 0; font-size: 17px; line-height: 1.75; max-width: 520px; }
.mk-note { font-size: 14px; color: var(--mk-muted); }

/* — grids of ruled cells — */
.mk-cells { display: grid; gap: 2px; background: var(--mk-white); border: 1px solid var(--mk-navy); }
.mk-cell { box-shadow: 0 0 0 1px var(--mk-navy); background: var(--mk-white); }

/* — home: hero — */
.mk-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 48px; padding-block: 72px 64px; align-items: start; }
.mk-hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.mk-row { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 8px; }

.mk-invoice { border: 2px solid var(--mk-navy); background: var(--mk-white); }
.mk-invoice-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; background: var(--mk-navy); color: var(--mk-white); font-weight: 700; font-size: 15px; }
.mk-invoice-head .mk-ref { font-family: Inter, sans-serif; font-weight: 600; font-size: 14px; color: var(--mk-gold); }
.mk-invoice-meta { display: flex; justify-content: space-between; gap: 16px; padding: 12px 20px; font-size: 13px; color: var(--mk-muted); border-bottom: 1px solid var(--mk-line); }
.mk-invoice-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--mk-line); font-size: 15px; align-items: baseline; }
.mk-invoice-line .qty { color: var(--mk-muted); font-size: 13px; }
.mk-invoice-line .amt { font-weight: 600; color: var(--mk-navy); min-width: 80px; text-align: end; }
.mk-invoice-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 20px; border-bottom: 2px solid var(--mk-navy); font-weight: 700; color: var(--mk-navy); }
.mk-invoice-total .amt { font-weight: 800; font-size: 24px; }
.mk-trace-title { padding: 16px 20px 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--mk-muted); }
.mk-trace { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 10px 20px; align-items: center; font-size: 14px; }
.mk-trace .mk-sq { width: 10px; height: 10px; }
.mk-trace .detail { color: var(--mk-muted); }
.mk-trace .ref { font-family: Inter, sans-serif; font-weight: 600; font-size: 13px; color: var(--mk-navy); }
.mk-invoice-foot { height: 12px; }

.mk-facts-band { border-block: 2px solid var(--mk-navy); }
.mk-facts { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px; }
.mk-fact { padding: 28px 32px; display: flex; flex-direction: column; gap: 8px; }
.mk-fact-title { font-weight: 800; font-size: 19px; color: var(--mk-navy); }
.mk-fact-body { font-size: 15px; line-height: 1.65; }

.mk-section { padding-top: 96px; }
.mk-section-last { padding-block: 96px; }
.mk-section-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 32px; padding-bottom: 40px; align-items: end; }
.mk-stack { display: flex; flex-direction: column; gap: 12px; }

.mk-modules { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.mk-module { padding: 28px 28px 32px; display: flex; flex-direction: column; gap: 14px; min-height: 190px; }
.mk-module:hover { background: var(--mk-soft); }
.mk-module .n { font-family: Inter, sans-serif; font-weight: 600; font-size: 13px; color: var(--mk-muted); }
.mk-module .t { font-weight: 800; font-size: 22px; color: var(--mk-navy); }
.mk-module .b { font-size: 15px; line-height: 1.7; text-wrap: pretty; }

.mk-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); border-top: 2px solid var(--mk-navy); }
.mk-step { padding-block: 28px 8px; padding-inline: 0 28px; display: flex; flex-direction: column; gap: 12px; }
.mk-step .n { font-family: Inter, sans-serif; font-weight: 800; font-size: 56px; line-height: 1; color: var(--mk-gold); }
.mk-step .t { font-weight: 800; font-size: 24px; color: var(--mk-navy); }
.mk-step .b { font-size: 16px; line-height: 1.7; max-width: 340px; }

.mk-split { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.mk-split-copy { padding: 48px 40px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.mk-split-art { background: var(--mk-soft); padding: 48px 40px; display: flex; justify-content: center; align-items: center; }
.mk-receipt { width: 300px; max-width: 100%; background: var(--mk-white); color: #000; padding: 24px 22px; font-size: 13px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 0 var(--mk-line); }
.mk-receipt-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 10px; border-bottom: 1px dashed #000; }
.mk-receipt-head img { width: 40px; height: 40px; }
.mk-receipt-name { font-family: Cairo, sans-serif; font-weight: 800; font-size: 18px; line-height: 1; }
.mk-receipt-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.mk-receipt-total { display: flex; justify-content: space-between; border-top: 1px dashed #000; padding-top: 10px; font-weight: 800; font-size: 15px; }
.mk-barcode { height: 44px; margin-top: 6px; background: repeating-linear-gradient(90deg, #000 0 2px, #fff 2px 3px, #000 3px 4px, #fff 4px 7px, #000 7px 10px, #fff 10px 11px); }
.mk-motto { text-align: center; font-family: Cairo, sans-serif; font-weight: 700; }

.mk-poster { background: var(--mk-navy); color: var(--mk-white); }
.mk-poster .mk-wrap { padding-block: 96px; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.mk-poster img { width: 72px; height: 72px; }
.mk-poster h2 { margin: 0; font-weight: 800; font-size: clamp(40px, 6vw, 84px); line-height: 1.15; color: var(--mk-gold); text-wrap: balance; }
.mk-poster p { margin: 0; font-size: 19px; line-height: 1.7; max-width: 620px; }
.mk-poster .mk-btn { min-width: 260px; gap: 48px; padding: 18px 22px; font-size: 17px; }

/* — pricing — */
.mk-page { padding-block: 72px 96px; }
.mk-page-head { display: flex; flex-direction: column; gap: 16px; padding-bottom: 40px; }
.mk-page-head p { margin: 0; font-size: 18px; line-height: 1.7; max-width: 560px; }
.mk-plans { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
/* One or two plans keep the card width the design draws for three, instead of
   stretching a lone card across the page. */
.mk-plans-1 { max-width: 420px; }
.mk-plans-2 { max-width: 840px; }
.mk-plan { padding: 32px 28px; display: flex; flex-direction: column; gap: 20px; color: var(--mk-navy); }
.mk-plan-name { font-weight: 800; font-size: 24px; }
.mk-plan-desc { font-size: 15px; line-height: 1.6; color: var(--mk-muted); min-height: 24px; margin: 0; }
.mk-plan-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding-block: 8px; border-block: 2px solid var(--mk-navy); }
.mk-plan-price .p { font-family: Inter, sans-serif; font-weight: 800; font-size: 44px; line-height: 1.2; }
.mk-plan-price .per { font-weight: 600; font-size: 15px; }
.mk-plan-price .note { flex-basis: 100%; font-size: 13px; color: var(--mk-muted); padding-bottom: 6px; }
.mk-trial { align-self: flex-start; background: var(--mk-gold); color: var(--mk-navy); padding: 4px 8px; font-size: 12px; font-weight: 700; }
.mk-features { display: flex; flex-direction: column; gap: 12px; flex: 1; margin: 0; padding: 0; list-style: none; }
.mk-features li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; line-height: 1.5; color: var(--mk-ink); }
.mk-features .mk-sq { transform: translateY(-2px); }
.mk-features .v { font-weight: 700; color: var(--mk-navy); }
.mk-plan.is-featured { background: var(--mk-navy); color: var(--mk-white); }
.mk-plan.is-featured .mk-plan-desc, .mk-plan.is-featured .mk-plan-price .note { color: #D5DCE6; }
.mk-plan.is-featured .mk-plan-price { border-color: var(--mk-gold); }
.mk-plan.is-featured .mk-features li, .mk-plan.is-featured .mk-features .v { color: var(--mk-white); }
.mk-plan.is-featured .mk-sq { background: var(--mk-gold); }
.mk-empty { border: 2px solid var(--mk-navy); padding: 32px; text-align: center; font-weight: 600; color: var(--mk-navy); }

.mk-compare { padding-top: 80px; }
.mk-compare-scroll { overflow-x: auto; border-block: 2px solid var(--mk-navy); margin-top: 24px; }
.mk-compare table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.mk-compare th { text-align: start; padding: 14px 8px; border-bottom: 2px solid var(--mk-navy); font-weight: 800; color: var(--mk-navy); }
.mk-compare td { padding: 14px 8px; border-bottom: 1px solid var(--mk-line); color: var(--mk-navy); font-weight: 600; }
.mk-compare td:first-child { color: var(--mk-ink); font-weight: 400; }
.mk-compare tr:hover td { background: var(--mk-soft); }

.mk-faq { padding-top: 80px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 32px; }
.mk-faq-list { border-top: 2px solid var(--mk-navy); }
.mk-faq-item { padding: 20px 0; border-bottom: 1px solid var(--mk-line); display: flex; flex-direction: column; gap: 8px; }
.mk-faq-item .q { font-weight: 700; font-size: 17px; color: var(--mk-navy); }
.mk-faq-item .a { font-size: 15px; line-height: 1.7; }

/* — sign-up — */
.mk-form-cell { padding: 48px 40px; }
.mk-form { display: flex; flex-direction: column; gap: 20px; }
.mk-form-head { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.mk-form-head p { margin: 0; font-size: 17px; line-height: 1.7; }
.mk-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.mk-field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; color: var(--mk-navy); }
.mk-input {
  height: 48px; padding: 0 14px; border: 2px solid var(--mk-navy); background: var(--mk-white);
  color: var(--mk-ink); font-size: 16px; border-radius: 0; outline: none; text-align: start; width: 100%;
}
.mk-input:focus { border-color: var(--mk-green); background: var(--mk-soft); }
.mk-field-error { font-size: 13px; font-weight: 600; color: #B42318; }
.mk-alert { border: 2px solid #B42318; color: #B42318; padding: 12px 16px; font-weight: 600; }
.mk-alert-info { border-color: var(--mk-green); color: var(--mk-green); }
.mk-plan-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; border: 2px solid var(--mk-navy); }
.mk-plan-opt { position: relative; cursor: pointer; }
.mk-plan-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.mk-plan-opt span { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; height: 100%; background: var(--mk-white); color: var(--mk-navy); font-weight: 700; }
.mk-plan-opt small { font-weight: 600; font-size: 13px; color: var(--mk-muted); }
.mk-plan-opt input:checked + span { background: var(--mk-navy); color: var(--mk-white); }
.mk-plan-opt input:checked + span small { color: var(--mk-gold); }
.mk-plan-opt input:focus-visible + span { outline: 2px solid var(--mk-gold); outline-offset: -4px; }
.mk-plan-opt + .mk-plan-opt span { border-inline-start: 2px solid var(--mk-navy); }
.mk-have { font-size: 15px; }
.mk-have a { font-weight: 700; border-bottom: 2px solid var(--mk-gold); }

.mk-next { background: var(--mk-navy); color: var(--mk-white); padding: 48px 40px; display: flex; flex-direction: column; gap: 28px; }
.mk-next img { width: 56px; height: 56px; }
.mk-next h2 { margin: 0; font-weight: 800; font-size: 28px; color: var(--mk-gold); }
.mk-next ol { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--mk-gold); }
.mk-next li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--mk-navy-line); font-size: 16px; line-height: 1.6; }
.mk-next li .n { font-family: Inter, sans-serif; font-weight: 800; color: var(--mk-gold); }

.mk-done { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding-block: 24px; }
.mk-done-mark { width: 56px; height: 56px; background: var(--mk-green); color: var(--mk-white); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; }
.mk-resend { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
.mk-resend .mk-input { flex: 1; min-width: 220px; }

/* — footer — */
.mk-footer { border-top: 2px solid var(--mk-navy); }
.mk-footer .mk-wrap { padding-block: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; align-items: start; }
.mk-footer .mk-brand img { width: 36px; height: 36px; }
.mk-footer .mk-brand-ar { font-size: 18px; }
.mk-footer .mk-brand-en { font-size: 11px; }
.mk-footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--mk-muted); }
.mk-footer-col .mk-motto { text-align: start; color: var(--mk-navy); }

/* — small helpers — */
.mk-pb { padding-bottom: 40px; }
.mk-start { text-align: start; }
.mk-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.mk-legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--mk-navy); }

/* — pricing: head with the billing toggle — */
.mk-page-head-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px; align-items: end; }
.mk-page-head-split .mk-stack { gap: 16px; }
.mk-toggle { justify-self: end; display: flex; border: 2px solid var(--mk-navy); }
.mk-toggle label { display: flex; gap: 8px; align-items: center; padding: 12px 22px; font-weight: 700; font-size: 15px; cursor: pointer; background: var(--mk-white); color: var(--mk-navy); }
.mk-toggle label span { font-size: 12px; font-weight: 600; color: var(--mk-green); }
.mk-billing-input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
#billing-monthly:checked ~ .mk-page-head .mk-toggle-monthly,
#billing-yearly:checked ~ .mk-page-head .mk-toggle-yearly { background: var(--mk-navy); color: var(--mk-white); }
#billing-yearly:checked ~ .mk-page-head .mk-toggle-yearly span { color: var(--mk-gold); }
#billing-monthly:focus-visible ~ .mk-page-head .mk-toggle-monthly,
#billing-yearly:focus-visible ~ .mk-page-head .mk-toggle-yearly { outline: 2px solid var(--mk-gold); outline-offset: -4px; }
.mk-when-yearly { display: none; }
#billing-yearly:checked ~ .mk-plans .mk-when-monthly { display: none; }
#billing-yearly:checked ~ .mk-plans .mk-when-yearly { display: flex; }
@media (max-width: 900px) { .mk-toggle { justify-self: start; } }

/* — pricing: card top row and the featured badge — */
.mk-plan-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 28px; }
.mk-badge { background: var(--mk-gold); color: var(--mk-navy); padding: 4px 8px; font-size: 12px; font-weight: 700; }
.mk-plan .mk-plan-desc { min-height: 48px; }
.mk-plans-3 .mk-plan { min-height: 100%; }

/* — sign-up: segmented choices (branches, billing), as the design draws them — */
.mk-seg { display: inline-flex; flex-wrap: wrap; border: 2px solid var(--mk-navy); align-self: flex-start; }
.mk-seg-opt { position: relative; cursor: pointer; }
.mk-seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.mk-seg-opt span { display: flex; flex-direction: column; gap: 2px; min-width: 72px; padding: 12px 22px; background: var(--mk-white); color: var(--mk-navy); text-align: start; }
.mk-seg-opt b { font-weight: 700; font-size: 15px; }
.mk-seg-opt small { font-weight: 600; font-size: 12px; color: var(--mk-muted); }
.mk-seg-opt input:checked + span { background: var(--mk-navy); color: var(--mk-white); }
.mk-seg-opt input:checked + span small { color: var(--mk-gold); }
.mk-seg-opt input:focus-visible + span { outline: 2px solid var(--mk-gold); outline-offset: -4px; }
.mk-form .mk-btn-block { justify-content: space-between; }
