/* القالب المشترك لصفحات التطبيقات. لون التطبيق يُضبط بصنف على body (app--naqra ...). */

.app--naqra { --app: var(--app-naqra); }
.app--nafitha { --app: var(--app-nafitha); }
.app--upsell { --app: var(--app-upsell); }
.app--fiu { --app: var(--app-fiu); }
.app--mostawda { --app: var(--app-mostawda); }
.app--rasd { --app: var(--app-rasd); }
.app--mudif { --app: var(--app-mudif); }

.brand__sep--soft {
  background: var(--line-strong);
}

.brand__name--bold {
  font-weight: 700;
  letter-spacing: 0;
}

.btn--bold {
  font-weight: 700;
}

/* ===== رأس الصفحة ===== */

.app-hero {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: clamp(70px, 11vh, 130px);
  padding-bottom: clamp(56px, 9vh, 100px);
}

.crumbs {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--ink);
}

.app-hero__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.app-hero__title img {
  flex: none;
}

.app-hero__title h1 {
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 800;
  line-height: 1.1;
}

.app-badge {
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--app);
  color: var(--white);
  font-size: 14px;
}

.app-hero__lead {
  max-width: 680px;
  font-size: clamp(19px, 1.8vw, 23px);
  line-height: 1.8;
  color: var(--ink-soft);
}

.app-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.facts__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px 0;
  border-left: 1px solid var(--line);
}

.facts__item:first-child {
  padding-right: 0;
}

.facts__item:last-child {
  border-left: 0;
}

.facts__label {
  font-size: 13px;
  color: var(--muted);
}

.facts__value {
  font-size: 18px;
  font-weight: 600;
}

/* ===== الميزات والأمثلة ===== */

.features {
  background: var(--bg-alt);
}

.features__inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-block: clamp(70px, 11vh, 120px);
}

.features__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.features__title {
  max-width: 26ch;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 700;
  line-height: 1.45;
}

.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
  transition: transform .12s ease, opacity .15s ease;
}

.tab:hover {
  opacity: .9;
}

.tab:active {
  transform: scale(.97);
}

.tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 36px;
}

.feature__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature__text h3 {
  font-size: 30px;
  font-weight: 700;
}

.feature__text p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* لوحة المثال */
.demo {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 10px 30px var(--shadow-panel);
}

.demo-note {
  font-size: 13px;
  color: var(--muted);
}

/* أنماط متكررة داخل لوحات الأمثلة */
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-row);
}

.row__main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.row__title {
  font-size: 15px;
  font-weight: 700;
}

.row__sub {
  font-size: 13px;
  color: var(--muted);
}

.pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pill--info { background: var(--info-bg); color: var(--info-ink); }
.pill--ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill--warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill--danger { background: var(--danger-bg); color: var(--danger-ink); }

.status-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-dot--danger { background: var(--danger); }
.status-dot--success { background: var(--success); }
.status-dot--warn { background: var(--warn); }

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-row);
}

.stat__label {
  font-size: 12px;
  color: var(--muted);
}

.stat__value {
  font-size: 21px;
  font-weight: 700;
}

/* ===== كيف تبدأ ===== */

.start {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-block: clamp(70px, 11vh, 120px);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 2px solid var(--ink);
}

.steps__num {
  font-size: 14px;
  font-weight: 700;
  color: var(--app);
}

/* لون مُضيف كحلي، فأرقامه بالأزرق كما في التصميم */
.app--mudif .steps__num {
  color: var(--blue);
}

.steps__item h3 {
  font-size: 26px;
  font-weight: 700;
}

.steps__item p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 28px;
  border-radius: 18px;
  background: var(--cta-bg);
  color: var(--cta-ink);
}

.cta__text {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 22px;
  font-weight: 700;
}

.cta__text img {
  flex: none;
}

.btn--cta,
.btn--cta:hover {
  min-height: 50px;
  padding: 0 24px;
  border-color: var(--cta-btn-bg);
  background: var(--cta-btn-bg);
  color: var(--cta-btn-ink);
  font-size: 16px;
  font-weight: 700;
}

.cta .btn[data-salla].is-soon {
  border-color: var(--cta-ink);
  color: var(--cta-ink);
}

/* ===== التذييل ===== */

.app-footer {
  border-top: 1px solid var(--line);
}

.app-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-block: 24px;
  font-size: 14px;
  color: var(--muted);
}

.app-footer a {
  color: var(--muted);
}

/* ===== الشاشات الأصغر ===== */

@media (max-width: 860px) {
  .feature,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature {
    gap: 24px;
  }
}

@media (max-width: 720px) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts__item,
  .facts__item:first-child {
    padding: 16px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .facts__item:last-child {
    border-bottom: 0;
  }

  .tablist {
    flex-wrap: nowrap;
    margin-inline: calc(-1 * clamp(20px, 5vw, 80px));
    padding-inline: clamp(20px, 5vw, 80px);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tablist::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: none;
  }

  .feature__text h3 {
    font-size: 26px;
  }

  .demo {
    padding: 16px;
  }

  .cta {
    padding: 22px;
  }

  .cta__text {
    font-size: 19px;
  }
}
