/* ================================
   TarqatBab - custom.css
   آخر تحديث: 2025-10-25
   هذا الملف يكمل Tailwind CDN ولا يستبدله
=================================== */

/* ---------- الألوان / الرموز البصرية ---------- */
:root {
  --brand-dark: #1C1C1C;
  --brand-main: #F17E07;
  --brand-warm: #FFAA52;

  --bg-page: #FAFAFA;          /* قريب من neutral-50 */
  --text-body: #4B5563;        /* تقريباً slate-600 */
  --text-dim: #6B7280;         /* تقريباً slate-500 */

  --border-soft: #E5E7EB;      /* neutral-200 */
  --border-mid: #D1D5DB;       /* neutral-300 */

  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;

  --transition-fast: 0.18s;
  --transition-mid: 0.24s;
}

/* ---------- أساس الصفحة ---------- */

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--brand-dark);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* لتنعيم اختيار النص إذا المتصفح ما فهم كلاس Tailwind */
::selection {
  background-color: rgb(241 126 7 / 0.2); /* brand-main/20 */
  color: var(--brand-dark);
}

/* الصور دائماً مرنة */
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* الأزرار بدون ظل أزرق مزعج في الموبايل */
button {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

/* إزالة الأسهم من input[type=number] */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* ---------- كلاسات ألوان/نصوص مخصصة (fallback لـ Tailwind) ---------- */

.text-brand-dark {
  color: var(--brand-dark) !important;
}
.text-brand-main {
  color: var(--brand-main) !important;
}
.text-brand-warm {
  color: var(--brand-warm) !important;
}

.bg-brand-main {
  background-color: var(--brand-main) !important;
  color: #fff;
}
.bg-brand-warm {
  background-color: var(--brand-warm) !important;
  color: #1C1C1C;
}
.bg-brand-dark {
  background-color: var(--brand-dark) !important;
  color: #fff;
}

/* خلفيات خفيفة بلون الهوية */
.bg-brand-main\/10 {
  background-color: rgb(241 126 7 / 0.1) !important;
  color: var(--brand-main);
}

/* بوردر */
.border-brand-main {
  border-color: var(--brand-main) !important;
}
.border-brand-main\/50 {
  border-color: rgb(241 126 7 / 0.5) !important;
}

/* ألوان هوفر */
.hover\:text-brand-main:hover {
  color: var(--brand-main) !important;
}
.hover\:text-brand-warm:hover {
  color: var(--brand-warm) !important;
}

.hover\:bg-brand-warm:hover {
  background-color: var(--brand-warm) !important;
  color: #1C1C1C;
}

/* حلقات focus عامة */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgb(241 126 7 / 0.3);
  border-color: rgb(241 126 7 / 0.5);
}

/* ---------- Util ناقصة في Tailwind CDN ---------- */

.h-18 {
  height: 4.5rem; /* 72px */
}

/* أحجام نص مخصصة */
.text-\[10px\] {
  font-size: 10px;
  line-height: 1.3;
}
.text-\[11px\] {
  font-size: 11px;
  line-height: 1.35;
}
.text-\[12px\] {
  font-size: 12px;
  line-height: 1.4;
}

/* ظل بسيط للكروت */
.shadow-sm {
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.05),
    0 1px 1px rgb(0 0 0 / 0.03);
}

/* زوايا */
.rounded-xl {
  border-radius: var(--radius-xl);
}
.rounded-2xl {
  border-radius: var(--radius-2xl);
}

/* ألوان بوردر/خلفية ونص محايدة (fallback) */
.border-neutral-200 {
  border-color: #e5e7eb !important;
}
.border-neutral-300 {
  border-color: #d1d5db !important;
}

.bg-neutral-50 {
  background-color: #fafafa !important;
}
.bg-neutral-100 {
  background-color: #f5f5f5 !important;
}
.bg-white {
  background-color: #ffffff !important;
}

.text-neutral-600 {
  color: #4b5563 !important;
}
.text-neutral-500 {
  color: #6b7280 !important;
}
.text-neutral-400 {
  color: #9ca3af !important;
}
.text-neutral-300 {
  color: #d1d5db !important;
}

/* footer borders/text */
.border-white\/10 {
  border-color: rgb(255 255 255 / 0.1) !important;
}

.text-white\/70 {
  color: rgb(255 255 255 / 0.7) !important;
}
.text-white\/80 {
  color: rgb(255 255 255 / 0.8) !important;
}
.text-white\/90 {
  color: rgb(255 255 255 / 0.9) !important;
}

.bg-white\/10 {
  background-color: rgb(255 255 255 / 0.1) !important;
}

/* backdrop-blur للهيدر */
.backdrop-blur {
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}

/* لمس مريحة في الموبايل */
.touch-target {
  min-height: 44px;
  min-width: 44px;
}

/* =========================
   الهيدر الثابت
========================= */

header.fixed {
  z-index: 50;
  background-color: rgb(255 255 255 / 0.8);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}

/* مينو الجوال */
#mobileMenu {
  transition: max-height var(--transition-mid) ease, opacity var(--transition-mid) ease;
  overflow: hidden;
}
#mobileMenu a {
  transition:
    background-color var(--transition-fast) ease,
    color var(--transition-fast) ease;
}

/* =========================
   أزرار رئيسية
========================= */

#downloadAppBtn,
#downloadAppBtnMobile,
#sendBtn {
  font-weight: 600;
  background-color: var(--brand-main);
  color: #fff;
  border-radius: var(--radius-xl);
  border: 0;
  line-height: 1.3;
  transition:
    background-color var(--transition-fast) ease,
    box-shadow var(--transition-fast) ease;
}

#downloadAppBtn:hover,
#downloadAppBtnMobile:hover,
#sendBtn:hover {
  background-color: var(--brand-warm);
  color: #1C1C1C;
}

/* =========================
   كروت الهيرو / الحالة
========================= */

.hero-card,
[id="hero"] .hero-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-2xl);
  background-color: #fff;
  box-shadow:
    0 12px 24px rgb(0 0 0 / 0.04),
    0 4px 12px rgb(0 0 0 / 0.03);
}

/* مربعات الحالة الصغيرة */
.status-tile {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background-color: #fff;
  font-size: 11px;
  line-height: 1.35;
  padding: 0.75rem;
}

@media (max-width: 640px) {
  .status-tile {
    font-size: 10px;
    padding: 0.65rem;
  }
}

/* شريحة ملاحظة رمادية */
.note-tile {
  background-color: #fafafa;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  font-size: 12px;
  line-height: 1.4;
  color: var(--brand-dark);
}

/* =========================
   كروت المميزات (Feature Cards)
========================= */

.feature-card {
  border: 1px solid var(--border-soft);
  background-color: #fff;
  border-radius: var(--radius-xl);
  box-shadow:
    0 8px 16px rgb(0 0 0 / 0.03),
    0 2px 4px rgb(0 0 0 / 0.04);
  transition:
    box-shadow var(--transition-fast) ease,
    border-color var(--transition-fast) ease;
}

.feature-card:hover {
  border-color: rgb(241 126 7 / 0.4);
  box-shadow:
    0 12px 24px rgb(0 0 0 / 0.04),
    0 4px 12px rgb(0 0 0 / 0.06);
}

/* أيقونة داخل الكرت */
.feature-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-xl);
  background-color: rgb(241 126 7 / 0.10);
  color: var(--brand-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

/* =========================
   الفورم (تواصل معنا)
========================= */

form input[type="text"],
form input[type="tel"],
form textarea {
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-mid);
  background-color: #fff;
  font-size: 0.875rem;
  line-height: 1.4;
  padding: 0.75rem 1rem;
  color: var(--brand-dark);
  transition:
    border-color var(--transition-fast) ease,
    box-shadow var(--transition-fast) ease;
  direction: rtl;
  text-align: right;
}

form input[type="text"]::placeholder,
form input[type="tel"]::placeholder,
form textarea::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

form input[type="text"]:focus,
form input[type="tel"]:focus,
form textarea:focus {
  border-color: rgb(241 126 7 / 0.5);
  box-shadow: 0 0 0 4px rgb(241 126 7 / 0.3);
  outline: none;
}

/* ملاحظة صغيرة تحت الزر */
#formNote {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim);
}

/* =========================
   الفوتر
========================= */

footer {
  background-color: var(--brand-dark);
  color: #fff;
}

footer a {
  text-decoration: none;
  transition: color var(--transition-fast) ease;
}

footer a:hover {
  color: var(--brand-warm);
}

/* روابط السوشال في الفوتر */
.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.3;
  font-weight: 500;
  color: rgb(255 255 255 / 0.9);
  transition: color var(--transition-fast) ease;
}

.footer-social-link:hover {
  color: var(--brand-main);
}

.footer-social-icon-bg {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-lg);
  background-color: rgb(255 255 255 / 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

/* شريط الحقوق */
.footer-bottom {
  font-size: 11px;
  line-height: 1.5;
  color: #6b7280;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  padding-top: 1.5rem;
}

#year {
  font-variant-numeric: tabular-nums;
}

/* =========================
   SR Only (للإتاحة)
========================= */

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* =========================
   App Flow Steps (Hero Steps)
========================= */

#appFlowSteps {
  counter-reset: appflow;
}

/* الكرت لكل خطوة */
.app-flow-step {
  position: relative;
  border-radius: var(--radius-xl);
  background-color: #fff;
  border: 1px solid var(--border-soft);
  padding: 0.75rem;
  box-shadow:
    0 8px 16px rgb(0 0 0 / 0.02),
    0 2px 4px rgb(0 0 0 / 0.03);
  cursor: default;
  transition:
    box-shadow var(--transition-fast) ease,
    border-color var(--transition-fast) ease,
    background-color var(--transition-fast) ease,
    transform var(--transition-fast) ease;
}

/* ديسكتوب: نضمن طول مناسب و خط بسيط بين الخطوات */
@media (min-width: 768px) {
  .app-flow-step {
    min-height: 100%;
  }

  .app-flow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2px;
    background-image: linear-gradient(
      to left,
      rgb(241 126 7 / 0.4) 0%,
      rgb(241 126 7 / 0.0) 80%
    );
    left: -1rem; /* موصل للخطوة اللي بعدها (RTL) */
  }
}

/* البادج */
.app-flow-badge {
  background-color: rgb(241 126 7 / 0.08);
  color: var(--brand-main);
  min-width: 2.25rem;
  min-height: 2.25rem;
  line-height: 1;
  border-radius: var(--radius-xl);
  box-shadow:
    0 4px 8px rgb(0 0 0 / 0.04),
    0 1px 2px rgb(0 0 0 / 0.06);
  border: 1px solid rgb(241 126 7 / 0.4);
  font-variant-numeric: tabular-nums;
  text-align: center;
  transition:
    background-color var(--transition-fast) ease,
    color var(--transition-fast) ease,
    box-shadow var(--transition-fast) ease,
    border-color var(--transition-fast) ease,
    transform var(--transition-fast) ease;
}

/* نصوص الخطوة */
.app-flow-body {
  display: flex;
  flex-direction: column;
  row-gap: 0.25rem;
  text-align: start;
}
.app-flow-title {
  font-weight: 600;
  color: var(--brand-dark);
  line-height: 1.4;
  font-size: 0.9rem;
}
@media (min-width:768px){
  .app-flow-title{
    font-size: 1rem;
  }
}
.app-flow-desc {
  color: var(--text-dim);
  line-height: 1.5;
  font-size: 0.8rem;
}
@media (min-width:768px){
  .app-flow-desc{
    font-size: 0.82rem;
  }
}

/* حالة نشطة */
.app-flow-step.is-active {
  background-color: rgb(241 126 7 / 0.06);
  border-color: rgb(241 126 7 / 0.6);
  box-shadow:
    0 16px 32px rgb(241 126 7 / 0.15),
    0 4px 12px rgb(0 0 0 / 0.08);
  transform: translateY(-2px);
}
.app-flow-step.is-active .app-flow-badge {
  background-color: var(--brand-main);
  color: #fff;
  border-color: var(--brand-main);
  box-shadow:
    0 12px 24px rgb(241 126 7 / 0.4),
    0 4px 8px rgb(0 0 0 / 0.12);
  transform: scale(1.05);
}
.app-flow-step.is-active .app-flow-title {
  color: var(--brand-main);
}
.app-flow-step.is-active .app-flow-desc {
  color: var(--brand-dark);
}

/* هوفر (ديسكتوب) */
@media (hover:hover) {
  .app-flow-step:hover {
    border-color: rgb(241 126 7 / 0.6);
    box-shadow:
      0 16px 32px rgb(241 126 7 / 0.15),
      0 4px 12px rgb(0 0 0 / 0.08);
    transform: translateY(-2px);
  }
  .app-flow-step:hover .app-flow-badge {
    transform: scale(1.05);
  }
}

/* أنيميشن ظهور */
@keyframes appFlowFadeUp {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.app-flow-step {
  animation: appFlowFadeUp 0.4s var(--transition-fast) both;
}
.app-flow-step:nth-child(1) { animation-delay: 0.00s; }
.app-flow-step:nth-child(2) { animation-delay: 0.07s; }
.app-flow-step:nth-child(3) { animation-delay: 0.14s; }
.app-flow-step:nth-child(4) { animation-delay: 0.21s; }

/* =========================
   سير عمل التطبيق (Timeline RTL)
   - جوال: عمودي
   - ديسكتوب: أفقي
========================= */

/* الحاوية العامة */
.flow-steps-row {
  position: relative;
  display: flex;
  flex-direction: column;  /* موبايل: عمودي */
  align-items: stretch;
  gap: 1rem;
  direction: rtl;
  overflow: visible;
  padding-top: 1rem;
  padding-bottom: 0.5rem;
  padding-right: 2.75rem;  /* مساحة للخط والنقطة */
}

/* خط التايملاين العمودي (جوال) */
.flow-steps-row::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  width: 2px;
  height: calc(100% - 1rem);
  background-image: linear-gradient(
    to bottom,
    rgb(241 126 7 / 0.8) 0%,
    rgb(241 126 7 / 0.0) 90%
  );
  border-radius: 999px;
  pointer-events: none;
}

/* ديسكتوب: أفقي + في منتصف الصفحة عشان شكل الواجهة يكون أنظف */
@media (min-width: 768px) {
  .flow-steps-row {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    padding-right: 0;
    max-width: 960px;
    margin-inline: auto; /* مركز على الشاشات العريضة */
  }

  .flow-steps-row::before {
    display: none;
  }
}

/* بطاقة كل خطوة */
.flow-step {
  position: relative;
  background-color: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow:
    0 8px 16px rgb(0 0 0 / 0.03),
    0 2px 4px rgb(0 0 0 / 0.04);
  padding: 1rem 1rem 0.9rem 1rem;
  width: 100%;
  flex-shrink: 0;
  transition:
    box-shadow var(--transition-fast) ease,
    border-color var(--transition-fast) ease,
    transform var(--transition-fast) ease;
}

/* نقطة الربط على الجوال */
.flow-step::before {
  content: "";
  position: absolute;
  top: 1rem;
  right: -1.75rem;  /* تصطف على خط التايملاين عند right:1rem */
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background-color: #fff;
  border: 2px solid rgb(241 126 7 / 0.9);
  box-shadow:
    0 4px 8px rgb(241 126 7 / 0.4),
    0 1px 2px rgb(0 0 0 / 0.12);
  pointer-events: none;
}

/* ديسكتوب: نخفي النقاط الفردية ونعمل خط أفقي بين البطاقات */
@media (min-width:768px){
  .flow-step::before {
    display: none;
  }

  .flow-step {
    min-width: 12rem;
    flex: 1;
  }

  .flow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -2.5rem;
    transform: translateY(-50%);
    width: 2rem;
    height: 2px;
    background-image: linear-gradient(
      to left,
      rgb(241 126 7 / 0.6) 0%,
      rgb(241 126 7 / 0) 80%
    );
    pointer-events: none;
  }
}

/* رأس البطاقة */
.flow-step-head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.3;
}

/* بادج رقم */
.flow-step-badge {
  background-color: rgb(241 126 7 / 0.08);
  color: var(--brand-main);
  border: 1px solid rgb(241 126 7 / 0.4);
  min-width: 2rem;
  min-height: 2rem;
  border-radius: var(--radius-xl);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1;
  box-shadow:
    0 4px 8px rgb(0 0 0 / 0.04),
    0 1px 2px rgb(0 0 0 / 0.06);
  font-variant-numeric: tabular-nums;
}

/* عنوان الخطوة */
.flow-step-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-dark);
  line-height: 1.4;
}

@media (min-width:768px){
  .flow-step-title {
    font-size: 1rem;
  }
}

/* الوصف */
.flow-step-desc {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

@media (min-width:768px){
  .flow-step-desc {
    font-size: 0.82rem;
  }
}

/* هوفر (ديسكتوب فقط) */
@media (hover:hover) and (min-width:768px) {
  .flow-step:hover {
    border-color: rgb(241 126 7 / 0.6);
    box-shadow:
      0 16px 32px rgb(241 126 7 / 0.15),
      0 4px 12px rgb(0 0 0 / 0.08);
    transform: translateY(-2px);
  }
}
