/* ============================================================
   منصة مواثيق — نظام التصميم
   الهوية: كحلي + تركواز + لمسة ذهبية، بروح "ملف قانوني موثّق"
   ============================================================ */

:root{
  --navy: #1E3A5F;
  --navy-dark: #0F1F33;
  --teal: #2BA8C4;
  --gold: #F5A623;
  --bg: #F6F8FA;
  --surface: #FFFFFF;
  --border: #E3E9EF;
  --text: #16232F;
  --text-muted: #5C6B7A;
  --success: #1E8E5A;
  --danger: #C7492A;
  --radius: 10px;
  --serif: 'Cairo', 'IBM Plex Sans Arabic', sans-serif;
  --body-font: 'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--body-font);
  line-height:1.7;
  font-size:16px;
}
body.lang-en{ font-family:'IBM Plex Sans', sans-serif; }

h1,h2,h3,h4{
  font-family:var(--serif);
  font-weight:800;
  color:var(--navy-dark);
  line-height:1.35;
  margin:0 0 .5em;
}
h1{ font-size:clamp(2rem, 4vw, 3.1rem); }
h2{ font-size:clamp(1.6rem, 3vw, 2.3rem); }
h3{ font-size:1.25rem; }
p{ margin:0 0 1em; color:var(--text-muted); }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

.container{ max-width:1180px; margin:0 auto; padding:0 24px; }
.section{ padding:88px 0; }
.section-alt{ background:var(--surface); border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.section-dark{ background:var(--navy-dark); color:#D7E0E8; }
.section-dark h2, .section-dark h3{ color:#fff; }
.section-dark p{ color:#9FB1C1; }

.section-head{ max-width:640px; margin:0 auto 48px; text-align:center; }
.section-head .eyebrow{ color:var(--teal); font-weight:700; font-size:.85rem; letter-spacing:.02em; margin-bottom:.6em; display:block; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 26px; border-radius:8px; font-weight:700; font-size:.95rem;
  border:1.5px solid transparent; cursor:pointer; transition:transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:active{ transform:scale(.98); }
.btn-primary{ background:var(--navy); color:#fff; }
.btn-primary:hover{ background:var(--navy-dark); }
.btn-gold{ background:var(--gold); color:#20130a; }
.btn-gold:hover{ background:#e0941b; }
.btn-outline{ background:transparent; border-color:var(--border); color:var(--navy-dark); }
.btn-outline:hover{ border-color:var(--navy); }
.btn-outline-light{ background:transparent; border-color:rgba(255,255,255,.35); color:#fff; }
.btn-outline-light:hover{ border-color:#fff; }
.btn-block{ width:100%; }

/* ---------- Header ---------- */
/* Three fixed zones — brand | nav | actions — on one row of a fixed height.
   Every zone is `flex:none` and every label is `white-space:nowrap`, so the nav
   can never be squeezed into wrapping its own text (which is what produced the
   ragged three-line menu). When the row genuinely runs out of width the links
   collapse into the mobile panel at the breakpoint below instead of shrinking. */
.site-header{
  position:sticky; top:0; z-index:50; background:rgba(246,248,250,.94); backdrop-filter:blur(8px);
  border-bottom:1px solid var(--border);
}
.site-header .container{ display:flex; align-items:center; justify-content:space-between; height:78px; gap:20px; }
/* The mobile menu button ships here so the marketing header still opens its
   navigation when the enhancement layer (enterprise.css) is unavailable. */
.nav-toggle{ display:none; }
.brand{ display:flex; align-items:center; gap:10px; flex:none; font-family:var(--serif); font-weight:800; font-size:1.25rem; line-height:1; color:var(--navy-dark); }
.brand img{ height:40px; width:auto; flex:none; }
.main-nav{ display:flex; align-items:center; justify-content:center; flex:1 1 auto; min-width:0; gap:16px; }
.main-nav a{
  flex:none; white-space:nowrap; font-weight:600; font-size:.9rem; color:var(--text);
  padding:7px 4px; border-radius:7px; border-bottom:2px solid transparent;
  transition:color .18s ease, border-color .18s ease, background .18s ease;
}
.main-nav a:hover{ color:var(--teal); border-bottom-color:var(--teal); }
.main-nav a[aria-current="page"], .main-nav a.is-active{ color:var(--navy-dark); border-bottom-color:var(--gold); }
.main-nav a:focus-visible, .header-actions a:focus-visible, .nav-toggle:focus-visible{
  outline:2px solid var(--teal); outline-offset:2px;
}
.header-actions{ display:flex; align-items:center; gap:10px; flex:none; }
/* The social row is the widest single block in the header. It is sized down here
   and dropped on narrower screens rather than allowed to squeeze the navigation;
   the footer keeps the full-size version. */
.header-actions .social-row{ gap:4px !important; }
.header-actions .social-row a{ width:26px !important; height:26px !important; }
.header-actions .social-row svg{ width:13px !important; height:13px !important; }
.lang-switch{
  border:1.5px solid var(--border); border-radius:20px; padding:6px 14px; font-weight:700; font-size:.82rem; cursor:pointer; background:#fff;
}
.badge-live{
  display:inline-flex; align-items:center; gap:6px; background:rgba(43,168,196,.1); color:var(--teal);
  padding:5px 12px; border-radius:20px; font-size:.78rem; font-weight:700;
}
.badge-live::before{ content:''; width:7px; height:7px; border-radius:50%; background:var(--teal); animation:pulse 1.6s infinite; }
@keyframes pulse{ 0%,100%{opacity:1} 50%{opacity:.3} }

/* ---------- Hero ---------- */
.hero{ padding:64px 0 40px; overflow:hidden; position:relative; }
.hero-grid{ display:grid; grid-template-columns:1fr 1fr; gap:56px; align-items:center; }
.hero-copy .badge-live{ margin-bottom:22px; }
.hero-copy h1{ margin-bottom:.4em; }
.hero-copy p.lead{ font-size:1.1rem; margin-bottom:2em; max-width:520px; }
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; }

/* شريط شبيه بملف مستندات — نافذة محادثة حية */
.chat-mock{
  background:var(--surface); border:1px solid var(--border); border-radius:16px;
  box-shadow:0 24px 60px -30px rgba(15,31,51,.35);
  padding:22px; position:relative;
}
.chat-mock::before{
  content:''; position:absolute; inset-inline-start:-14px; top:26px; bottom:26px; width:4px;
  background:linear-gradient(180deg,var(--gold),var(--teal)); border-radius:4px;
}
.chat-row{ display:flex; margin-bottom:14px; }
.chat-row.user{ justify-content:flex-end; }
.chat-bubble{
  max-width:82%; padding:12px 16px; border-radius:12px; font-size:.9rem; line-height:1.65;
}
.chat-row.user .chat-bubble{ background:var(--navy); color:#fff; border-end-end-radius:2px; }
.chat-row.bot .chat-bubble{ background:#F0F4F7; color:var(--text); border-end-start-radius:2px; }

/* ---------- Feature cards (ملفّات لا بطاقات SaaS معتادة) ---------- */
.features-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:2px; background:var(--border); border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.feature-card{ background:var(--surface); padding:34px 28px; border-inline-start:3px solid transparent; transition:border-color .2s; }
.feature-card:hover{ border-inline-start-color:var(--teal); }
.feature-card .f-icon{
  width:46px; height:46px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  background:var(--navy-dark); color:var(--gold); font-size:1.3rem; margin-bottom:18px;
}
.feature-card h3{ margin-bottom:.4em; font-size:1.08rem; }
.feature-card p{ font-size:.92rem; margin:0; }

/* ---------- Steps (تسلسل فعلي) ---------- */
.steps{ display:grid; grid-template-columns:repeat(4,1fr); gap:0; position:relative; }
.steps::before{ content:''; position:absolute; top:26px; inset-inline:60px; height:2px; background:var(--border); z-index:0; }
.step{ position:relative; z-index:1; text-align:center; padding:0 14px; }
.step .num{
  width:52px; height:52px; margin:0 auto 18px; border-radius:50%; background:var(--surface); border:2px solid var(--navy);
  color:var(--navy); font-family:var(--serif); font-weight:800; display:flex; align-items:center; justify-content:center; font-size:1.15rem;
}
.step h3{ font-size:1rem; }
.step p{ font-size:.87rem; }

/* ---------- Lawyers / Corporate split ---------- */
.split{ display:grid; grid-template-columns:1fr 1fr; gap:56px; align-items:center; }
.check-list{ list-style:none; margin:26px 0; padding:0; display:grid; gap:12px; }
.check-list li{ display:flex; align-items:flex-start; gap:10px; font-weight:600; font-size:.95rem; }
.check-list li::before{ content:'✓'; color:var(--teal); font-weight:900; }

.mini-card-grid{ display:grid; gap:16px; }
.mini-card{ background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:22px; border-top:3px solid var(--gold); }
.mini-card h3{ font-size:1rem; margin-bottom:.3em; }
.mini-card p{ font-size:.88rem; margin:0; }

/* ---------- Testimonials ---------- */
.testi-grid{ display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.testi-card{ background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:32px; position:relative; }
.testi-card .quote-mark{ font-family:var(--serif); font-size:2.6rem; color:var(--gold); line-height:1; }
.testi-card p.q{ color:var(--text); font-size:1.02rem; margin:.4em 0 1.4em; }
.testi-who{ display:flex; align-items:center; gap:10px; }
.testi-avatar{ width:38px; height:38px; border-radius:50%; background:var(--navy); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; }
.testi-name{ font-weight:700; font-size:.92rem; }
.testi-role{ font-size:.8rem; color:var(--text-muted); }

/* ---------- Pricing ---------- */
.pricing-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; align-items:stretch; }
.price-card{ background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:32px; display:flex; flex-direction:column; }
.price-card.featured{ border-color:var(--navy); box-shadow:0 20px 50px -28px rgba(15,31,51,.4); position:relative; }
.price-card .pop-tag{ position:absolute; top:-13px; inset-inline-start:24px; background:var(--gold); color:#20130a; font-size:.75rem; font-weight:800; padding:4px 12px; border-radius:20px; }
.price-card h3{ margin-bottom:.2em; }
.price-amount{ font-family:var(--serif); font-weight:800; font-size:2.3rem; color:var(--navy-dark); margin:.2em 0; }
.price-amount span{ font-size:.95rem; font-weight:600; color:var(--text-muted); }
.price-feats{ list-style:none; padding:0; margin:20px 0 26px; display:grid; gap:10px; flex:1; }
.price-feats li{ font-size:.88rem; display:flex; gap:8px; }
.price-feats li::before{ content:'—'; color:var(--teal); }

/* ---------- FAQ ---------- */
.faq-list{ max-width:760px; margin:0 auto; display:grid; gap:2px; background:var(--border); border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.faq-item{ background:var(--surface); }
.faq-item summary{ cursor:pointer; padding:20px 24px; font-weight:700; font-size:.98rem; list-style:none; display:flex; justify-content:space-between; align-items:center; }
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{ content:'+'; font-size:1.4rem; color:var(--teal); font-weight:400; }
.faq-item[open] summary::after{ content:'−'; }
.faq-item .faq-a{ padding:0 24px 22px; color:var(--text-muted); font-size:.92rem; margin:0; }

/* ---------- Final CTA ---------- */
.final-cta{ text-align:center; padding:96px 0; }
.final-cta h2{ color:#fff; max-width:600px; margin-inline:auto; }

/* ---------- Footer ---------- */
.site-footer{ background:var(--navy-dark); color:#93A5B5; padding:56px 0 28px; }
.footer-grid{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:32px; padding-bottom:32px; border-bottom:1px solid rgba(255,255,255,.08); }
.footer-brand .brand{ color:#fff; }
.footer-links{ display:flex; gap:26px; flex-wrap:wrap; }
.footer-links a:hover{ color:#fff; }
.footer-bottom{ padding-top:24px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size:.82rem; }
.wa-float{
  position:fixed; bottom:24px; inset-inline-end:24px; z-index:60; width:56px; height:56px; border-radius:50%;
  background:#25D366; display:flex; align-items:center; justify-content:center; color:#fff; font-size:1.5rem;
  box-shadow:0 10px 26px -8px rgba(0,0,0,.4);
}

/* ---------- Forms (auth, admin) ---------- */
/* Login / register / password screens. These pages ship style.css only, so the
   whole auth look lives here (nothing is inherited from enterprise.css).
   Goals: a clear card, comfortable spacing, readable labels and errors, and a
   real touch target on every control — on phones as well as on desktop. */
.auth-wrap{
  min-height:100vh; min-height:100dvh; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(1200px 600px at 50% -10%, #1b3252 0%, var(--navy-dark) 60%);
  padding:28px 18px;
}
.auth-card{
  background:#fff; border-radius:18px; padding:38px; width:100%; max-width:440px;
  box-shadow:0 24px 60px rgba(8,17,32,.28); border:1px solid rgba(255,255,255,.06);
}
.auth-card .brand{ justify-content:center; margin-bottom:6px; }
.auth-card .brand img{ height:40px; width:auto; }
.auth-card h1{ text-align:center; font-size:1.35rem; margin:8px 0 22px; color:var(--navy-dark); }
.auth-card .field label{ font-size:.86rem; }
.auth-card .field input, .auth-card .field select{ min-height:48px; font-size:.95rem; }
.auth-card .field-hint{ line-height:1.6; }
.auth-card .form-alert{ display:flex; align-items:flex-start; gap:8px; border:1px solid transparent; line-height:1.7; }
.auth-card .form-alert.error{ border-color:#F2C9BE; }
.auth-card .form-alert.success{ border-color:#BFE3D0; }
.auth-card .btn-block{ min-height:48px; font-size:.98rem; border-radius:10px; }
.auth-card .muted-link{ line-height:1.8; }
.auth-card .muted-link a{ display:inline-block; padding:6px 2px; }
/* "Forgot password?" sits under the password field: right-aligned, with a
   comfortable tap area instead of a 19px text box. */
.auth-inline-link{ text-align:end; margin:-8px 0 16px; }
.auth-inline-link a{ display:inline-block; padding:8px 2px; font-size:.84rem; font-weight:700; color:var(--teal); }

/* بوابة الدخول: تمييز واضح بين مسار العميل ومسار المحامي */
.auth-role-note{
  text-align:center; font-size:.82rem; line-height:1.7; color:var(--text-muted);
  margin:-6px 0 18px; padding:0 4px;
}
.auth-card .form-alert.notice{ border-color:#C7D8F5; background:#EAF1FC; color:var(--navy-dark); }
.auth-switch{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px 10px;
  margin-top:16px; padding-top:16px; border-top:1px solid var(--border);
  font-size:.86rem; color:var(--text-muted); text-align:center;
}
.auth-switch a{ display:inline-flex; align-items:center; min-height:44px; padding:0 6px; font-weight:700; color:var(--teal); }
.type-tabs{ margin-bottom:20px; }
.type-tabs a{ min-height:44px; display:flex; align-items:center; justify-content:center; }
.field{ margin-bottom:18px; }
.field label{ display:block; font-weight:700; font-size:.88rem; margin-bottom:6px; }
.field input, .field select, .field textarea{
  width:100%; padding:12px 14px; border:1.5px solid var(--border); border-radius:8px; font-size:.95rem; font-family:inherit; background:#fff;
}
.field input:focus, .field select:focus, .field textarea:focus{ outline:2px solid var(--teal); outline-offset:1px; border-color:var(--teal); }
.form-alert{ padding:12px 16px; border-radius:8px; font-size:.88rem; margin-bottom:18px; }
.form-alert.error{ background:#FBEAE5; color:var(--danger); }
.form-alert.success{ background:#E6F4ED; color:var(--success); }
.muted-link{ text-align:center; margin-top:18px; font-size:.9rem; color:var(--text-muted); }
.muted-link a{ color:var(--teal); font-weight:700; }

/* ---------- صفحة التسجيل الاحترافية (split screen) ---------- */
body.auth-body{ background:var(--surface); }
.auth-split{ min-height:100vh; display:grid; grid-template-columns:minmax(320px,38%) 1fr; }
.auth-side{
  background:linear-gradient(160deg, var(--navy-dark), var(--navy) 70%);
  color:#fff; padding:56px 48px; display:flex; flex-direction:column; justify-content:center; gap:22px;
}
.brand-light{ color:#fff !important; }
.brand-light img{ filter:brightness(0) invert(1); }
.auth-side h1{ color:#fff; font-size:1.7rem; max-width:380px; }
.auth-side-lead{ color:rgba(255,255,255,.78); font-size:.98rem; max-width:380px; line-height:1.8; }
.auth-side-points{ list-style:none; padding:0; margin:8px 0 0; display:flex; flex-direction:column; gap:14px; }
.auth-side-points li{ font-size:.92rem; color:rgba(255,255,255,.92); display:flex; align-items:center; gap:10px; }
.auth-main{ display:flex; align-items:center; justify-content:center; padding:48px 24px; background:var(--bg); }
.auth-card-pro{ width:100%; max-width:480px; background:#fff; border-radius:18px; padding:40px; box-shadow:0 10px 40px rgba(15,31,51,.08); border:1px solid var(--border); }
.auth-card-head h2{ font-size:1.5rem; margin-bottom:4px; }
.auth-card-head p{ color:var(--text-muted); font-size:.9rem; margin:0 0 24px; }

.type-cards{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:26px; }
.type-card{
  display:flex; flex-direction:column; align-items:center; text-align:center; gap:4px;
  border:1.5px solid var(--border); border-radius:14px; padding:18px 10px; text-decoration:none; color:var(--text-muted);
  transition:all .15s ease; background:#fff;
}
.type-card:hover{ border-color:var(--teal); }
.type-card.active{ border-color:var(--navy); background:#F0F5FA; box-shadow:0 0 0 3px rgba(30,58,95,.08); }
.type-icon{ font-size:1.5rem; }
.type-title{ font-weight:800; color:var(--navy-dark); font-size:.95rem; }
.type-sub{ font-size:.76rem; }

.pro-form .form-row{ margin-bottom:18px; }
.pro-form .two-col{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.pro-form .two-col .field{ margin-bottom:0; }
.pro-input{
  width:100%; padding:13px 15px; border:1.5px solid var(--border); border-radius:10px; font-size:.95rem;
  font-family:inherit; background:#fff; transition:border-color .15s ease;
}
.pro-input:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(43,168,196,.12); }
.select-wrap{ position:relative; }
.pro-select{
  width:100%; padding:13px 15px; border:1.5px solid var(--border); border-radius:10px; font-size:.95rem;
  font-family:inherit; background:#fff; appearance:none; cursor:pointer;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9'><path d='M1 1l6 6 6-6' stroke='%235C6B7A' stroke-width='2' fill='none' fill-rule='evenodd'/></svg>");
  background-repeat:no-repeat; background-position:left 14px center;
}
html[dir="ltr"] .pro-select{ background-position:right 14px center; }
.pro-select:focus{ outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(43,168,196,.12); }
.btn-lg{ padding:15px; font-size:1rem; border-radius:10px; }

@media (max-width: 900px){
  .auth-split{ grid-template-columns:1fr; }
  .auth-side{ padding:36px 28px; }
  .auth-side-lead, .auth-side-points{ display:none; }
}
@media (max-width: 520px){
  .auth-card-pro{ padding:26px; border-radius:14px; }
  .pro-form .two-col{ grid-template-columns:1fr; }
  .type-cards{ gap:8px; }
}

/* ---------- بطاقة اكتمال الملف الشخصي (داخل حساب المحامي فقط) ---------- */
.completion-card{ background:#fff; border:1px solid var(--border); border-radius:16px; padding:26px; margin-bottom:24px; }
.completion-head{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.completion-head h3{ margin:0 0 4px; font-size:1.05rem; }
.completion-head p{ margin:0; color:var(--text-muted); font-size:.85rem; }
.completion-ring{
  --p:0; width:64px; height:64px; border-radius:50%; flex:none;
  background:conic-gradient(var(--teal) calc(var(--p)*1%), #EAEFF3 0);
  display:flex; align-items:center; justify-content:center; position:relative;
}
.completion-ring::before{ content:""; position:absolute; inset:6px; background:#fff; border-radius:50%; }
.completion-ring span{ position:relative; font-weight:800; font-size:.85rem; color:var(--navy-dark); }
.completion-list{ list-style:none; margin:0 0 18px; padding:0; display:grid; grid-template-columns:1fr 1fr; gap:10px 18px; }
.completion-list li{ display:flex; align-items:center; gap:8px; font-size:.86rem; color:var(--text-muted); }
.completion-list li .dot{
  width:19px; height:19px; border-radius:50%; border:1.5px solid var(--border); flex:none;
  display:flex; align-items:center; justify-content:center; font-size:.7rem; color:#fff;
}
.completion-list li.is-done{ color:var(--navy-dark); font-weight:600; }
.completion-list li.is-done .dot{ background:var(--success); border-color:var(--success); }
@media (max-width:560px){ .completion-list{ grid-template-columns:1fr; } }

/* ---------- روابط السوشيال ميديا (هيدر + فوتر) ---------- */
.social-row{ display:flex; align-items:center; gap:8px; }
.social-row-dark{ margin-top:14px; }
.social-row a{ transition:background .15s ease, color .15s ease; text-decoration:none; }
.social-row-dark a:hover{ background:var(--teal) !important; }
.social-row-light a:hover{ background:var(--teal) !important; color:#fff !important; }
.header-actions .social-row{ padding-inline-end:6px; margin-inline-end:6px; border-inline-end:1px solid var(--border); }
/* Below this width the header cannot hold the social row and the two call-to-action
   buttons without squeezing the row; the social icons stay available in the footer. */
@media (max-width: 1180px){ .header-actions .social-row{ display:none; } }

/* تبويب اختيار نوع الحساب بصفحة التسجيل */
.type-tabs{ display:flex; gap:8px; background:#F0F4F7; border-radius:10px; padding:4px; margin-bottom:22px; }
.type-tabs a{ flex:1; text-align:center; padding:10px; border-radius:8px; font-weight:700; font-size:.9rem; color:var(--text-muted); text-decoration:none; }
.type-tabs a.active{ background:#fff; color:var(--navy-dark); box-shadow:0 2px 6px rgba(0,0,0,.06); }

/* ---------- صورة الملف الشخصي في نموذج المحامي ---------- */
.profile-photo-row{ display:flex; align-items:center; gap:18px; margin-bottom:18px; }
.profile-photo-preview{ width:72px; height:72px; border-radius:50%; object-fit:cover; background:#EAEFF3; border:1px solid var(--border); flex:none; }

/* ---------- مكتبة الأنظمة: بطاقات التصنيفات ---------- */
.law-category-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(180px,1fr)); gap:14px; }
.law-category-card{ text-align:center; text-decoration:none; color:inherit; transition:transform .15s ease, box-shadow .15s ease; }
.law-category-card:hover{ transform:translateY(-2px); box-shadow:0 8px 20px rgba(15,31,51,.08); border-color:var(--teal); }
.law-category-icon{ display:block; font-size:1.8rem; margin-bottom:8px; }

/* حقل رقم الجوال: رمز الدولة + الرقم */
.phone-group{ display:flex; gap:8px; }
.phone-group select{ flex:0 0 148px; min-width:0; }
.phone-group input{ flex:1; min-width:0; }
.field-hint{ font-size:.78rem; color:var(--text-muted); margin-top:5px; }
.field-error{ font-size:.8rem; color:var(--danger,#C0392B); margin-top:5px; font-weight:600; }

/* شرائح اختيار التخصص */
.spec-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.spec-chip{
  display:inline-flex; align-items:center; gap:6px; border:1.5px solid var(--border); border-radius:20px;
  padding:8px 14px; font-size:.85rem; font-weight:600; cursor:pointer; background:#fff; color:var(--text-muted);
  transition:all .15s ease; user-select:none;
}
.spec-chip input{ position:absolute; opacity:0; width:0; height:0; }
.spec-chip:hover{ border-color:var(--teal); color:var(--navy-dark); }
.spec-chip:has(input:checked){ background:var(--navy); border-color:var(--navy); color:#fff; }
.spec-chip.is-checked{ background:var(--navy); border-color:var(--navy); color:#fff; }

/* شريط تقدّم الاكتمال */
.progress-wrap{ margin:14px 0; }
.progress-label{ display:flex; justify-content:space-between; font-size:.82rem; font-weight:700; color:var(--navy-dark); margin-bottom:6px; }
.progress-track{ height:9px; border-radius:5px; background:#EAEFF3; overflow:hidden; }
.progress-fill{ height:100%; border-radius:5px; transition:width .3s ease; }

/* تحسين شكل نماذج لوحة التحكم */
.modal-form{ background:#fff; border:1px solid var(--border); border-radius:14px; padding:26px; }
.modal-form h3{ font-size:1.05rem; color:var(--navy-dark); }
.form-section-title{ font-weight:700; font-size:.85rem; color:var(--navy); margin:22px 0 10px; text-transform:uppercase; letter-spacing:.03em; }
.password-input{display:flex;align-items:stretch;gap:8px}
.password-input input{flex:1;min-width:0}
.password-toggle{border:1px solid var(--border);border-radius:8px;background:#fff;color:var(--navy);padding:0 12px;font:inherit;font-size:.82rem;font-weight:700;cursor:pointer}
.password-toggle:focus-visible{outline:2px solid var(--teal);outline-offset:2px}

/* The links collapse into a panel below this width: eight nowrap labels plus the
   brand and the two buttons need ~1080px, so anything narrower would otherwise have
   to shrink or wrap them. The panel is absolutely positioned against `.site-header`
   (which is the nearest positioned ancestor) so it can never widen the document. */
@media (max-width: 1080px){
  .hero-grid, .split{ grid-template-columns:1fr; }
  .features-grid{ grid-template-columns:1fr; }
  .steps{ grid-template-columns:1fr 1fr; row-gap:36px; }
  .steps::before{ display:none; }
  .pricing-grid{ grid-template-columns:1fr; }
  .testi-grid{ grid-template-columns:1fr; }
  .main-nav{ display:none; }
  /* Marketing header on small screens: collapse the links into a dropdown that
     the menu button toggles, and keep the header actions on one row. */
  .site-header .container{ height:68px; gap:12px; }
  .nav-toggle{
    display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; flex:none;
    border:1.5px solid var(--border); border-radius:11px; background:#fff; color:var(--navy-dark); cursor:pointer;
  }
  .nav-toggle svg{ width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.9; stroke-linecap:round; }
  .main-nav{
    display:none; position:absolute; inset-inline:0; top:100%; flex-direction:column; align-items:stretch; gap:0;
    background:#fff; border-bottom:1px solid var(--border); box-shadow:0 6px 20px rgba(15,31,51,.07); padding:8px;
    max-height:calc(100vh - 68px); overflow-y:auto;
  }
  .main-nav.is-open{ display:flex; }
  .main-nav a{ padding:14px 16px; border-radius:11px; min-height:48px; display:flex; align-items:center; border-bottom:0; }
  .main-nav a:hover{ background:#F8FAFC; color:var(--teal); }
  .main-nav a[aria-current="page"], .main-nav a.is-active{ background:#F0F4F7; color:var(--navy-dark); }
  .header-actions .btn-outline{ display:none; }
  /* The panel already fills the row; a half-height toggle and a 44px tap target
     keep the control comfortable on a phone. */
  .brand img{ height:36px; }
}
@media (max-width: 480px){
  .site-header .container{ gap:10px; }
  .header-actions{ gap:8px; }
  .brand span{ font-size:1rem; }
  /* At 360px and below the wordmark is the first thing to go: the logo mark and the
     two call-to-action buttons are what the visitor needs, and the brand name is
     still announced to assistive technology through the image alt text. */
}
@media (max-width: 400px){
  .brand span{ display:none; }
  .site-header .container{ gap:8px; }
  .header-actions{ gap:6px; }
  .header-actions .btn{ padding:11px 14px; font-size:.88rem; }
  .lang-switch{ padding:6px 10px; font-size:.78rem; }
}

/* Auth screens on phones: the card fills the width, padding tightens and the
   buttons stay full-height so the form is comfortable to use one-handed. */
@media (max-width: 520px){
  .auth-wrap{ padding:16px 12px; align-items:flex-start; }
  .auth-card{ padding:24px 20px; border-radius:16px; max-width:none; }
  .auth-card h1{ font-size:1.2rem; margin:6px 0 18px; }
  .auth-card .brand img{ height:36px; }
  .type-tabs a{ padding:10px 8px; font-size:.85rem; }
  .type-tabs a span, .type-tabs a{ white-space:normal; }
  .password-toggle{ padding:0 10px; font-size:.78rem; }
  .muted-link{ font-size:.86rem; }
}
@media (max-width: 380px){
  .auth-card{ padding:20px 16px; }
  .auth-card h1{ font-size:1.1rem; }
}
