:root {
  --bg: #050608;
  --bg-2: #0a0c10;
  --bg-3: #10141a;
  --gold: #d4af37;
  --gold-2: #f0d78c;
  --gold-dim: rgba(212, 175, 55, 0.14);
  --cyan: #00c8f0;
  --cyan-2: #5ee7ff;
  --cyan-dim: rgba(0, 200, 240, 0.16);
  --sand: #ead9b8;
  --muted: #a9b4c0;
  --line: rgba(212, 175, 55, 0.28);
  --ok: var(--cyan-2);
  --danger: #c45c4a;
  --white: #f4fbff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html[dir="rtl"] body { font-family: "Noto Sans Arabic", "Manrope", sans-serif; }

body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--bg);
  color: var(--sand);
  line-height: 1.6;
}

img { max-width: 100%; }
a { color: var(--gold-2); text-decoration: none; }
button, input, select, textarea { font: inherit; }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.display {
  font-family: "Cinzel", serif;
  letter-spacing: 0.12em;
}

h1.display {
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 18px;
  letter-spacing: 0.06em;
  color: #f3dd8a;
  text-shadow:
    0 1px 0 rgba(255, 248, 220, 0.45),
    0 2px 0 #7c6116,
    0 0 18px rgba(0, 200, 240, 0.22);
}

h1.display::before,
h1.display::after {
  content: "☥";
  font-family: "Cinzel", serif;
  font-size: 0.42em;
  font-weight: 700;
  color: var(--cyan);
  margin: 0 0.22em;
  vertical-align: 0.18em;
  text-shadow: 0 0 10px rgba(0, 200, 240, 0.55);
}

.section-head h2.display,
.hero-card h2.display {
  color: var(--gold-2);
  letter-spacing: 0.1em;
}

[hidden] { display: none !important; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(5, 6, 8, 0.86);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.mark {
  width: auto;
  height: 72px;
  display: block;
  filter: drop-shadow(0 0 10px rgba(0, 200, 240, 0.25));
}

.brand-city {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav a {
  color: var(--sand);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.lang-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lang-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
select.lang-btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--gold-2);
  border-radius: 999px;
  padding: 7px 28px 7px 12px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-2) 50%), linear-gradient(135deg, var(--gold-2) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.menu-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--gold-2);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
}

.btn-gold {
  background: linear-gradient(180deg, #f0d78c, var(--gold));
  color: #1a1408;
}

.btn-ghost {
  background: transparent;
  color: var(--sand);
  border: 1px solid var(--line);
}

.btn-cyan {
  background: linear-gradient(180deg, #5ee7ff, var(--cyan));
  color: #031016;
}

.nav a:hover { color: var(--cyan-2); }

.nav a.nav-portal { color: var(--gold-2); }
.card-action { margin-top: 14px; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 36px;
  background:
    radial-gradient(520px 280px at 82% 18%, rgba(0, 200, 240, 0.18), transparent 62%),
    radial-gradient(700px 340px at 12% 0%, rgba(212, 175, 55, 0.14), transparent 58%),
    linear-gradient(180deg, #07090d, var(--bg));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,200,240,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, black, transparent 85%);
  pointer-events: none;
}

.hero-visual {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.hero-logo {
  width: min(360px, 100%);
  height: auto;
  filter: drop-shadow(0 0 28px rgba(0, 200, 240, 0.28)) drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55));
}

.hero-card {
  width: 100%;
  margin-top: -18px;
  background: linear-gradient(180deg, rgba(16, 20, 26, 0.96), rgba(8, 10, 14, 0.96));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 200, 240, 0.08);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.kicker {
  color: var(--gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 11px;
  margin: 0 0 12px;
}

.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 18px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.stat {
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.18);
  border-radius: 14px;
  padding: 14px;
}

.stat b {
  display: block;
  color: var(--gold-2);
  font-size: 22px;
}

.stat span { color: var(--muted); font-size: 12px; }

.hero-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--white);
}

.quick-search {
  display: grid;
  gap: 10px;
}

.quick-search input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0f0d0a;
  color: var(--white);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid rgba(0, 200, 240, 0.35);
  background: var(--cyan-dim);
  color: var(--cyan-2);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

/* Sections */
section { padding: 72px 0; }
.section-head { margin-bottom: 28px; }
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
}
.section-head p { margin: 0; color: var(--muted); max-width: 70ch; }

.checker {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filters {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.hardware-select {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 12px;
}

.hardware-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--white);
  border-radius: 14px;
  padding: 14px 10px;
  font-family: "Cinzel", "Manrope", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 14px;
  cursor: pointer;
}

.hardware-btn.is-active {
  border-color: rgba(212, 175, 55, 0.9);
  background: rgba(212, 175, 55, 0.16);
  color: var(--gold-2);
}

.hw-group-label {
  margin: 18px 0 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.hw-group-label:first-of-type {
  margin-top: 0;
}

.protocol-checks {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 0 0 12px;
}

.protocol-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.protocol-check input {
  accent-color: var(--gold);
}

.protocol-check:has(input:checked) {
  border-color: rgba(212, 175, 55, 0.9);
  background: rgba(212, 175, 55, 0.16);
}

.hw-hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f0d0a;
  color: var(--white);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.results {
  display: grid;
  gap: 10px;
}

.result {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(150px, 1fr) minmax(160px, 1.3fr) 132px;
  gap: 12px;
  align-items: center;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.result-side {
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: end;
}
.result-side a { font-size: 12px; }

.result b { color: var(--white); display: block; }
.result small { color: var(--muted); }
.ecu { font-family: ui-monospace, Consolas, monospace; color: var(--gold-2); }

.tool-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-size: 11px;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--sand);
}

.badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  background: var(--cyan-dim);
  color: var(--cyan-2);
  white-space: nowrap;
}

.empty {
  text-align: center;
  padding: 36px 16px;
  border: 1px dashed var(--line);
  border-radius: 20px;
}

.pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

/* Cards */
.grid-3, .grid-2, .tools-grid {
  display: grid;
  gap: 16px;
}

.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
}

.card h3 { margin: 0 0 8px; color: var(--white); font-size: 20px; }
.card p { margin: 0; color: var(--muted); }

.hd-banner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  background:
    linear-gradient(120deg, rgba(0, 200, 240, 0.16), transparent 50%),
    var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  margin-bottom: 18px;
}

.brand-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-list span {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.2);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
}

.contact-form {
  display: grid;
  gap: 10px;
}

.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f0d0a;
  color: var(--white);
}

.contact-form textarea { min-height: 120px; resize: vertical; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-brand img {
  height: 28px;
  width: auto;
}

.note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

.hours-note {
  margin: 0;
  font-size: 12px;
  color: var(--cyan-2);
}

.portal-hero {
  padding: 48px 0 12px;
  background:
    radial-gradient(520px 240px at 88% 0%, rgba(0, 200, 240, 0.16), transparent 62%),
    radial-gradient(600px 260px at 8% 0%, rgba(212, 175, 55, 0.14), transparent 58%);
}

.portal-hero .lede { margin-bottom: 0; }

.portal-mark {
  width: min(100%, 280px);
  height: auto;
  display: block;
  margin: 0 0 18px;
  filter: drop-shadow(0 0 28px rgba(0, 200, 240, 0.28)) drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}

.portal-body { padding-top: 28px; }

.portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 48px;
}

.portal-form { display: grid; gap: 8px; }

.portal-block {
  border: 0;
  margin: 0 0 22px;
  padding: 0;
}

.portal-block legend {
  font-family: "Cinzel", serif;
  color: var(--gold-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 18px;
  margin-bottom: 8px;
}

.field-hint {
  display: block;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.platform-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.platform-grid + .hw-group-label { margin-top: 18px; }

.platform-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.platform-card:has(input:checked) {
  border-color: rgba(212, 175, 55, 0.9);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.28);
  background: rgba(212, 175, 55, 0.14);
}

.platform-name { color: var(--white); font-weight: 800; }
.platform-desc { color: var(--muted); font-size: 13px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-span { grid-column: 1 / -1; }

.portal-form .field input,
.portal-form .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f0d0a;
  color: var(--white);
}

.portal-form .field textarea { min-height: 120px; resize: vertical; }

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  color: var(--sand);
}

.check input {
  margin-top: 3px;
  accent-color: var(--gold);
}

.check:has(input:checked) {
  border-color: rgba(212, 175, 55, 0.7);
  background: rgba(212, 175, 55, 0.12);
}

.file-status {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.check-confirm { margin-top: 0; }

.dropzone {
  position: relative;
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  padding: 28px 16px;
  border: 1px dashed rgba(212, 175, 55, 0.45);
  border-radius: 16px;
  background: rgba(212, 175, 55, 0.06);
  cursor: pointer;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone strong { color: var(--white); }
.dropzone span { color: var(--muted); font-size: 13px; }
.dropzone.is-over {
  border-color: var(--cyan);
  background: rgba(0, 200, 240, 0.1);
}

.file-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  color: var(--cyan-2);
  font-size: 13px;
}

.portal-submit { width: 100%; margin-top: 6px; }

.form-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.form-status.is-ok {
  background: var(--cyan-dim);
  color: var(--cyan-2);
}

.form-status.is-err {
  background: rgba(196, 92, 74, 0.16);
  color: #f0b0a4;
}

.need-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.need-list li { margin: 0 0 8px; }
.need-list strong { color: var(--gold-2); }

.portal-aside { display: grid; gap: 16px; }
.portal-aside .btn { margin-top: 12px; }

.honeypot {
  position: absolute;
  left: -10000px;
  height: 0;
  overflow: hidden;
}

@media (max-width: 900px) {
  .hero-grid, .filters, .result, .grid-3, .grid-2, .tools-grid, .hd-banner, .contact-grid, .hardware-select, .protocol-checks, .portal-layout, .platform-grid, .form-grid, .check-grid {
    grid-template-columns: 1fr;
  }
  .hardware-select,
  .protocol-checks {
    grid-template-columns: 1fr 1fr;
  }
  .hero-logo { width: min(280px, 70%); }
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 20px;
    left: 20px;
    padding: 16px;
    background: #10141a;
    border: 1px solid var(--line);
    border-radius: 16px;
  }
  html[dir="rtl"] .nav.open { right: 20px; left: 20px; }
  .menu-btn { display: inline-flex; }
  .stats { grid-template-columns: 1fr; }
  .result-side { justify-items: start; text-align: start; }
}
