/* Copyright (c) 2026 Spacetech-KW. All rights reserved. See LICENSE. */
/* Moqawelon home page. Logical properties everywhere, so Arabic (rtl) and English (ltr) share one stylesheet. */
:root { --blue:#1e63d6; --blue-l:#4c8df6; --blue-d:#0b3a8f; --orange:#f97316; --ink:#0f2744; --muted:#5a6b85; --card:#fff; --line:#e0e8f4; --soft:#eef4fd; --bg:#f6f9fd; --ok:#16a34a; }
@media (prefers-color-scheme: dark) { :root { --ink:#e6ecf5; --muted:#9fb1cc; --card:#0f1a2b; --line:#223452; --soft:#122340; --bg:#0a1220; --ok:#4ade80; } }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body { font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.65; -webkit-text-size-adjust: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.ic { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
html[lang="ar"] [data-l="en"], html[lang="en"] [data-l="ar"] { display: none !important; }
html[dir="rtl"] .flip { transform: scaleX(-1); }
bdi.n { direction: ltr; unicode-bidi: isolate; }
a[hidden] { display: none !important; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---- header ---- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 21px; direction: ltr; color: var(--ink); }
.brand svg { width: 36px; height: 36px; }
.nav .links { display: flex; gap: 4px; margin-inline-start: 14px; }
.nav .links a { text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 10px; color: var(--muted); }
.nav .links a:hover { background: var(--soft); color: var(--ink); }
.nav .sp { flex: 1; }
#lang { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.nav-cta { display: flex; gap: 8px; align-items: center; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 22px; border-radius: 14px; border: 2px solid transparent; font: inherit; font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn.orange { background: var(--orange); color: #fff; }
.btn.orange:hover { filter: brightness(1.06); }
.btn.blue { background: var(--blue); color: #fff; }
.btn.line { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn.ghost { color: var(--ink); padding-inline: 14px; }
.btn.white { background: #fff; color: var(--blue-d); }
.btn.sm { padding: 8px 16px; font-size: 15px; border-radius: 12px; }
.btn.off { background: var(--soft); color: var(--muted); pointer-events: none; }
@media (prefers-color-scheme: dark) { .btn.line { border-color: var(--blue-l); color: var(--blue-l); } }

/* ---- hero ---- */
.hero { background: linear-gradient(150deg, #0b3a8f 0%, #1e63d6 55%, #4c8df6 100%); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 85% 10%, rgba(249,115,22,.28), transparent 70%), radial-gradient(500px 280px at 5% 90%, rgba(255,255,255,.12), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; padding: 54px 0 46px; max-width: 820px; text-align: center; }
.hero h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.2; font-weight: 800; letter-spacing: -.3px; }
.hero .lead { margin: 14px auto 26px; max-width: 640px; font-size: clamp(16px, 2.4vw, 19px); opacity: .95; }
.search { display: flex; background: #fff; border-radius: 18px; padding: 6px; gap: 6px; box-shadow: 0 18px 40px rgba(0,0,0,.28); max-width: 680px; margin-inline: auto; }
.search .ic { color: var(--muted); align-self: center; margin-inline: 12px 2px; width: 22px; height: 22px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: #0f2744; padding: 12px 6px; }
.search input::placeholder { color: #6b7c96; }
.search .btn { border-radius: 13px; padding-inline: 26px; }
.popular { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; font-size: 15px; }
.popular b { opacity: .85; font-weight: 700; }
.popular a { text-decoration: none; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; padding: 3px 14px; font-weight: 700; }
.popular a:hover { background: rgba(255,255,255,.18); }
.hero .or { margin-top: 22px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- trust strip ---- */
.strip { background: var(--card); border-bottom: 1px solid var(--line); }
.strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px 0; }
.strip .it { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; justify-content: center; }
.strip .it .ic { color: var(--blue); width: 24px; height: 24px; }
@media (prefers-color-scheme: dark) { .strip .it .ic { color: var(--blue-l); } }

/* ---- sections ---- */
section.s { padding: 56px 0 8px; }
section.s h2 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; line-height: 1.3; }
section.s .sub { color: var(--muted); margin-top: 6px; font-size: 17px; max-width: 680px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.head .more { font-weight: 800; color: var(--blue); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
@media (prefers-color-scheme: dark) { .head .more { color: var(--blue-l); } }

/* categories */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@media (min-width: 1000px) { .cats { grid-template-columns: repeat(7, 1fr); } }
.cat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 12px 14px; text-align: center; text-decoration: none; font-weight: 800; font-size: 15px; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.cat:hover { transform: translateY(-3px); border-color: var(--blue-l); box-shadow: 0 12px 26px rgba(30,99,214,.14); }
.cat .bub { width: 54px; height: 54px; border-radius: 16px; background: var(--soft); color: var(--blue); display: grid; place-items: center; }
.cat .bub .ic { width: 26px; height: 26px; }
@media (prefers-color-scheme: dark) { .cat .bub { color: var(--blue-l); } }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: st; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px 22px; position: relative; }
.step .n { width: 40px; height: 40px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 19px; margin-bottom: 12px; }
.step h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.step p { color: var(--muted); }

/* contractors */
.pros { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pro { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.pro:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(30,99,214,.16); }
.pro .ph { height: 150px; background: linear-gradient(135deg, var(--blue-l), var(--blue-d)); display: grid; place-items: center; color: #fff; font-size: 44px; font-weight: 800; overflow: hidden; }
.pro .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pro .bd { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pro .nm { font-weight: 800; font-size: 18px; display: flex; gap: 6px; align-items: center; }
.pro .lic { display: flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 800; color: var(--muted); }
.pro .lic .ic { width: 16px; height: 16px; }
.pro .lic.ok { color: var(--ok); }
.pro .hl { color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.2em; }
.pro .meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; font-weight: 700; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.pro .meta .ic { width: 15px; height: 15px; vertical-align: -2px; }
.pro .star { color: #f59e0b; }
.pro .star .ic { fill: #f59e0b; }
.empty { background: var(--card); border: 2px dashed var(--line); border-radius: 22px; padding: 30px 22px; text-align: center; color: var(--muted); }
.empty .btn { margin-top: 14px; }

/* features */
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.feat .bub { width: 46px; height: 46px; border-radius: 14px; background: var(--soft); color: var(--blue); display: grid; place-items: center; margin-bottom: 10px; }
@media (prefers-color-scheme: dark) { .feat .bub { color: var(--blue-l); } }
.feat h3 { font-size: 17px; font-weight: 800; margin-bottom: 3px; }
.feat p { color: var(--muted); font-size: 15px; }

/* safety */
.safe { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 30px 26px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 28px; align-items: center; }
.safe ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.safe li { display: flex; gap: 12px; align-items: flex-start; }
.safe li .ic { color: var(--ok); margin-top: 4px; width: 22px; height: 22px; }
.safe li b { display: block; font-size: 16.5px; }
.safe li span { color: var(--muted); font-size: 15px; }

/* contractors call */
.cta { background: linear-gradient(140deg, #0b3a8f, #1e63d6); color: #fff; border-radius: 28px; padding: 38px 30px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: center; }
.cta h2 { font-size: clamp(24px, 4vw, 32px); }
.cta ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 9px; }
.cta li { display: flex; gap: 10px; align-items: flex-start; }
.cta li .ic { color: #bfdbfe; margin-top: 4px; }
.cta .side { text-align: center; display: grid; gap: 12px; }
.cta .side p { opacity: .9; font-size: 15px; }

/* faq */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 800; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--blue); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); padding: 0 0 16px; }

/* app */
.apps { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

footer { margin-top: 64px; background: var(--card); border-top: 1px solid var(--line); padding: 30px 0 38px; color: var(--muted); font-size: 14.5px; }
footer .cols { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .links { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 8px; }
footer .copy { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

@media (max-width: 880px) {
  .nav .links { display: none; }
  .strip .wrap { grid-template-columns: 1fr 1fr; }
  .steps, .feats { grid-template-columns: 1fr; }
  .safe, .cta { grid-template-columns: 1fr; }
  .search { flex-wrap: wrap; }
  .search .btn { width: 100%; }
  .nav-cta .btn.ghost { display: none; }
}
@media (max-width: 460px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .nav-cta .btn.orange { padding: 8px 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .cat, .pro { transition: none; } }
