

:root {
  --background: #f4f6f5;
  --foreground: #15191d;
  --muted: #68727d;
  --line: #dfe4e7;
  --brand: #e00000;
  --brand-dark: #b90000;
  --teal: #008f7a;
  --green: #17844f;
  --blue: #1268a8;
  --amber: #b77900;
  --ink: #1f2933;
  --panel: #ffffff;
  --soft: #eef4f2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0, var(--background) 360px),
    var(--background);
  color: var(--foreground);
  font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
}

.site-shell {
  min-height: 100vh;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 70px;
  padding: 10px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid rgba(223, 228, 231, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #111820;
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 -4px 0 var(--brand);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 20px;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2vw, 26px);
  color: #3f4851;
  font-size: 15px;
  font-weight: 800;
}

.main-nav a {
  padding: 8px 0;
}

.main-nav a:hover {
  color: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.plain-btn,
.icon-btn,
.post-btn,
.search-btn,
.mode-tabs button {
  border: 0;
  white-space: nowrap;
}

.plain-btn,
.icon-btn {
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.plain-btn {
  padding: 9px 10px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.icon-btn:hover {
  border-color: #c9d1d6;
  color: var(--brand);
}

.menu-btn {
  display: none;
}

.post-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(224, 0, 0, 0.18);
}

.post-btn:hover,
.search-btn:hover {
  background: var(--brand-dark);
}

.post-btn svg,
.search-btn svg {
  width: 18px;
  height: 18px;
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(224, 0, 0, 0.08), transparent 28%),
    linear-gradient(225deg, rgba(0, 143, 122, 0.1), transparent 30%),
    #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(330px, 0.94fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 70px);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 62px) 0;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  color: #111820;
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 650px;
  margin: 18px 0 24px;
  color: #4b5661;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.8;
}

.search-panel {
  display: grid;
  grid-template-columns: 1.3fr 0.75fr 0.72fr auto;
  align-items: end;
  gap: 0;
  overflow: hidden;
  min-width: 0;
  max-width: 980px;
  border: 1px solid #cfd8dd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(21, 25, 29, 0.12);
}

.mode-tabs {
  display: flex;
  grid-column: 1 / -1;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: #f7faf9;
}

.mode-tabs button {
  flex: 1;
  min-height: 36px;
  border-radius: 7px;
  background: transparent;
  color: #4b5661;
  font-weight: 900;
}

.mode-tabs .active {
  background: #111820;
  color: #fff;
}

.search-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px 16px;
  border-left: 1px solid var(--line);
}

.search-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.search-field input,
.search-field select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.search-btn {
  display: inline-flex;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  background: var(--brand);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.quick-links a {
  padding: 8px 12px;
  border: 1px solid #dfe5e8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #34404b;
  font-size: 14px;
  font-weight: 800;
}

.quick-links a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.hero-visual {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.visual-image {
  position: relative;
  overflow: hidden;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  background: #fff;
  aspect-ratio: 4 / 3.1;
  box-shadow: 0 24px 60px rgba(21, 25, 29, 0.12);
}

.visual-image::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(0deg, rgba(17, 24, 32, 0.72), transparent);
}

.visual-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

.signal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.signal-row span {
  min-height: 72px;
  padding: 12px;
  border: 1px solid #dbe2e6;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.signal-row strong {
  display: block;
  color: #111820;
  font-size: 22px;
}

.section,
.tools-band,
.dashboard-band {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 42px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2,
.dashboard-band h2 {
  margin: 0;
  color: #15191d;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.25;
  letter-spacing: 0;
}

.section-heading a {
  color: var(--brand);
  font-weight: 900;
  white-space: nowrap;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(21, 25, 29, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.category-card:hover {
  border-color: #c4ced4;
  transform: translateY(-2px);
}

.category-icon,
.tool-card span,
.city-grid span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #edf2f1;
  color: #111820;
}

.category-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
}

.category-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.category-card em,
.city-grid em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.category-card.teal .category-icon,
.tool-card:nth-child(1) span {
  background: #e5f6f2;
  color: var(--teal);
}

.category-card.green .category-icon,
.tool-card:nth-child(2) span {
  background: #e8f5ee;
  color: var(--green);
}

.category-card.red .category-icon,
.tool-card:nth-child(3) span {
  background: #fff0f0;
  color: var(--brand);
}

.category-card.blue .category-icon {
  background: #e9f3fb;
  color: var(--blue);
}

.category-card.amber .category-icon {
  background: #fff5d9;
  color: var(--amber);
}

.category-card.ink .category-icon {
  background: #eef1f4;
  color: var(--ink);
}

.listing-section {
  padding-top: 18px;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.listing-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(21, 25, 29, 0.07);
}

.listing-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e9eef1;
}

.listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-image.car img {
  object-position: 5% 62%;
}

.listing-image.property img {
  object-position: 42% 48%;
}

.listing-image.device img {
  object-position: 66% 66%;
}

.listing-image span {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(21, 25, 29, 0.12);
}

.listing-body {
  padding: 16px;
}

.listing-body h3 {
  min-height: 52px;
  margin: 0 0 10px;
  color: #15191d;
  font-size: 18px;
  line-height: 1.45;
}

.listing-body strong {
  display: block;
  color: var(--brand);
  font-size: 20px;
}

.listing-body p {
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.listing-body div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.listing-body small {
  padding: 6px 8px;
  border-radius: 6px;
  background: #f0f3f4;
  color: #47525d;
  font-weight: 900;
}

.tools-band {
  padding: 34px;
  border: 1px solid #d7e2df;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 143, 122, 0.11), transparent 46%),
    #f7fbfa;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  min-height: 178px;
  padding: 20px;
  border: 1px solid rgba(21, 25, 29, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.tool-card strong {
  display: block;
  margin-top: 16px;
  font-size: 20px;
}

.tool-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
  font-weight: 750;
}

.dashboard-band {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
  margin-top: 38px;
  padding: 34px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(224, 0, 0, 0.18), transparent 42%),
    #111820;
  color: #fff;
}

.dashboard-band h2 {
  color: #fff;
}

.dashboard-band p:not(.eyebrow) {
  max-width: 620px;
  color: #dbe3e6;
  line-height: 1.85;
  font-weight: 750;
}

.mini-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-dashboard div {
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.mini-dashboard strong {
  display: block;
  color: #fff;
  font-size: 34px;
}

.mini-dashboard span {
  color: #dbe3e6;
  font-weight: 800;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.city-grid a {
  display: grid;
  grid-template-columns: 46px 1fr;
  grid-template-areas:
    "icon title"
    "icon total";
  gap: 2px 12px;
  align-items: center;
  min-height: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.city-grid span {
  grid-area: icon;
  background: #fff2f2;
  color: var(--brand);
}

.city-grid strong {
  grid-area: title;
  font-size: 20px;
}

.city-grid em {
  grid-area: total;
}

.footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 30px 16px 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.footer strong {
  color: var(--ink);
}

@media (max-width: 1040px) {
  .topbar {
    grid-template-columns: auto 1fr;
  }

  .main-nav {
    display: none;
  }

  .menu-btn {
    display: grid;
  }

  .header-actions .plain-btn,
  .header-actions .icon-btn:not(.menu-btn) {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual {
    max-width: 680px;
  }

  .search-panel {
    grid-template-columns: 1fr 1fr;
  }

  .main-field,
  .search-btn {
    grid-column: 1 / -1;
  }

  .search-field {
    border-bottom: 1px solid var(--line);
  }

  .search-btn {
    min-height: 58px;
  }

  .category-grid,
  .listing-grid,
  .tool-grid,
  .city-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    gap: 10px;
    min-height: 64px;
    padding: 10px 12px;
  }

  .brand small,
  .user-only {
    display: none;
  }

  .brand strong {
    font-size: 17px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .post-btn {
    min-height: 40px;
    padding: 9px 11px;
    font-size: 14px;
  }

  .hero-grid,
  .section,
  .tools-band,
  .dashboard-band {
    width: min(1180px, calc(100% - 24px));
  }

  .hero-grid {
    padding: 30px 0;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .search-panel,
  .category-grid,
  .listing-grid,
  .tool-grid,
  .city-grid,
  .mini-dashboard {
    grid-template-columns: 1fr;
  }

  .mode-tabs {
    overflow: hidden;
  }

  .mode-tabs button {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 4px;
    font-size: 13px;
  }

  .search-field {
    border-left: 0;
  }

  .quick-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .quick-links a {
    flex: 0 0 auto;
  }

  .signal-row {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-card {
    grid-template-columns: 46px 1fr;
  }

  .category-card em {
    grid-column: 2;
  }

  .tools-band,
  .dashboard-band {
    padding: 22px;
  }

  .footer {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }
}
