/* softwares.bytafra.com — Tafra brand, light, Arabic first (logical properties everywhere). */
:root {
  --bg: #f4f6f7;
  --surface: #ffffff;
  --text: var(--tafra-gray-900, #10212d);
  --text-2: var(--tafra-gray-700, #34454f);
  --muted: var(--tafra-gray-500, #6b7b86);
  --border: var(--tafra-gray-200, #dde3e6);
  --primary: var(--tafra-brand-700, #087582);
  --teal: var(--tafra-brand-500, #0cbdca);
  --ink: var(--tafra-ink, #031927);
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--tafra-font); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* header / footer */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.top-nav { display: flex; align-items: center; gap: 4px; }
.top-nav a { text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 10px; color: var(--text-2); }
.top-nav a:hover { background: var(--bg); color: var(--ink); }
.top-nav .lang { border: 1px solid var(--border); }
.foot { margin-top: 56px; background: var(--ink); color: #c9d4da; }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; font-size: 0.92rem; }
.foot a { color: #fff; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--teal); }
/* Tafra rule: primary = ink text on teal, never white */
.btn-primary { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.btn-primary:hover { background: var(--tafra-brand-400, #3dcad5); }
.btn-wa { background: #25d366; border-color: #25d366; color: #052e16; }
.btn-wa:hover { background: #3ee07a; border-color: #3ee07a; }
.btn-lg { min-height: 54px; padding: 12px 24px; font-size: 1.05rem; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.is-disabled { opacity: 0.6; cursor: default; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions.center { justify-content: center; margin-top: 18px; }

/* hero */
.hero { padding: 48px 0 28px; text-align: center; }
.hero h1 { font-size: clamp(1.7rem, 4.2vw, 2.7rem); line-height: 1.3; color: var(--ink); max-width: 820px; margin: 0 auto; }
.hero p { color: var(--text-2); font-size: 1.1rem; max-width: 720px; margin: 12px auto 0; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 980px; margin: 26px auto 0; text-align: start; }
.steps li { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; font-weight: 600; color: var(--text-2); }
.steps span { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: var(--ink); display: grid; place-items: center; font-weight: 700; }

/* app cards: one big card per app */
.apps { display: flex; flex-direction: column; gap: 24px; padding-top: 12px; }
.app-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(3, 25, 39, 0.06); }
.app-card:nth-child(even) .car { order: 2; }
.app-card .car-slide img { aspect-ratio: auto; height: 100%; min-height: 340px; }
.app-body { padding: 26px 28px; display: flex; flex-direction: column; gap: 12px; }
.app-body h2 { font-size: 1.6rem; line-height: 1.35; }
.app-body h2 a { text-decoration: none; color: var(--ink); }
.app-body h2 a:hover { color: var(--primary); }
.pitch { color: var(--text-2); font-size: 1.05rem; }
.ticks { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ticks li { position: relative; padding-inline-start: 28px; font-weight: 600; }
.ticks li::before { content: ''; position: absolute; inset-inline-start: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23031927' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center / 12px no-repeat; }
.card-price { color: var(--text-2); }
.app-body .actions { margin-top: auto; padding-top: 6px; }

/* carousel */
.car { position: relative; background: #e7ecef; min-width: 0; }
.car-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; height: 100%; }
.car-track::-webkit-scrollbar { display: none; }
.car-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; }
.car-slide img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }
.car-slide figcaption { position: absolute; inset-inline: 0; bottom: 0; padding: 26px 18px 34px; background: linear-gradient(transparent, rgba(3, 25, 39, 0.82)); color: #fff; font-weight: 600; }
.car-empty { display: grid; place-items: center; aspect-ratio: 16 / 10; }
.car-btn { position: absolute; top: 50%; translate: 0 -50%; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); box-shadow: 0 4px 14px rgba(3, 25, 39, 0.2); cursor: pointer; display: grid; place-items: center; }
.car-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.car-prev { inset-inline-start: 12px; }
.car-next { inset-inline-end: 12px; }
/* the icon points right; previous points to the start side, next to the end side */
.car-prev svg, [dir='rtl'] .car-next svg { transform: scaleX(-1); }
[dir='rtl'] .car-prev svg { transform: none; }
.car-dots { position: absolute; bottom: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; }
.car-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.6); box-shadow: 0 0 0 1px rgba(3, 25, 39, 0.25); cursor: pointer; padding: 0; }
.car-dots button[aria-current='true'] { background: var(--teal); width: 22px; border-radius: 5px; }

/* app page */
.app-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 28px 0 34px; }
.app-hero-in { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr); gap: 32px; align-items: center; }
.app-hero .car { border-radius: var(--radius); overflow: hidden; box-shadow: 0 16px 40px rgba(3, 25, 39, 0.14); }
.app-intro { display: flex; flex-direction: column; gap: 14px; }
.app-intro h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.3; color: var(--ink); }
.back { color: var(--primary); font-weight: 700; text-decoration: none; }
.back::before { content: '← '; }
[dir='rtl'] .back::before { content: '→ '; }
.meta { color: var(--muted); font-size: 0.92rem; }
.price-box { display: inline-flex; flex-direction: column; align-self: flex-start; gap: 2px; padding: 12px 18px; border-radius: 14px; background: var(--tafra-brand-50, #e7f8fa); border: 1px solid var(--teal); }
.price-box span { color: var(--text-2); font-size: 0.9rem; font-weight: 600; }
.price-box b { font-size: 1.5rem; color: var(--ink); }
.price-box small { color: var(--muted); }
.block { margin-top: 40px; }
.block h2 { font-size: 1.6rem; margin-bottom: 16px; color: var(--ink); }
.pros { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pro { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; border-top: 4px solid var(--teal); }
.pro h3 { font-size: 1.08rem; margin-bottom: 4px; color: var(--ink); }
.pro p { color: var(--text-2); }
.table-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.compare th, .compare td { padding: 14px 18px; text-align: start; border-bottom: 1px solid var(--border); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--ink); color: #fff; font-weight: 700; }
.compare thead th:last-child { background: var(--primary); }
.compare tbody th { font-weight: 600; color: var(--text-2); }
.compare td:last-child { font-weight: 700; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.note { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.note h3 { font-size: 1.05rem; color: var(--ink); }
.note p { color: var(--text-2); }

@media (max-width: 900px) {
  .app-card, .app-hero-in { grid-template-columns: minmax(0, 1fr); }
  .app-card:nth-child(even) .car { order: 0; }
  .app-hero .car { order: -1; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .app-body { padding: 20px; }
  .app-card .car-slide img { aspect-ratio: 16 / 10; min-height: 0; }
}
@media (max-width: 480px) {
  .brand span { font-size: 1rem; }
  .top-nav a { padding: 8px 8px; }
  .top-nav a:first-child { display: none; }
  .btn, .btn-lg { width: 100%; }
  .hero { padding-top: 32px; }
  .car-btn { width: 36px; height: 36px; }
}
