/* ═══════════════════════════════════════════════════════════════
   Storismo — Visual Identity
   استعمل خط XB Niloofar (يجب رفعه محلياً) مع Cairo كاحتياطي
   ═══════════════════════════════════════════════════════════════ */

/* ─── 1) تحميل خط XB Niloofar ─── */
@font-face {
  font-family: 'XB Niloofar';
  src: url('fonts/XB Niloofar.woff2') format('woff2'),
       url('fonts/XB Niloofar.woff') format('woff'),
       url('fonts/XB Niloofar.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'XB Niloofar';
  src: url('fonts/XB Niloofar Bold.woff2') format('woff2'),
       url('fonts/XB Niloofar Bold.woff') format('woff'),
       url('fonts/XB Niloofar Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ─── الألوان الأساسية للهوية ─── */
  --pri:        #2563EB;
  --pri-2:      #1E40AF;
  --pri-light:  #DBEAFE;
  --pri-bg:     #EFF6FF;
  --accent:     #F59E0B;
  --accent-orange: #FB923C;

  /* ─── ألوان الـ Hero (مطابقة للصفحة الرئيسية) ─── */
  --c-cyan:         #0EA5E9;
  --c-gradient:     linear-gradient(135deg, #0EA5E9 0%, #2563EB 50%, #1D4ED8 100%);
  --c-gradient-soft:linear-gradient(135deg, rgba(14,165,233,.12) 0%, rgba(29,78,216,.12) 100%);
  --c-glow:         0 0 40px rgba(14,165,233,.35);

  /* خلفية فاتحة بدرجات ـ نفس الـ Hero */
  --bg-soft:    #F0F7FF;
  --bg-card:    #FFFFFF;
  --bg-page:    linear-gradient(180deg, #F0F7FF 0%, #E0EFFF 100%);

  /* رمادي */
  --gray-50:#F8FAFC; --gray-100:#F1F5F9; --gray-200:#E2E8F0;
  --gray-300:#CBD5E1; --gray-400:#94A3B8; --gray-500:#64748B;
  --gray-600:#475569; --gray-700:#334155; --gray-800:#1E293B; --gray-900:#0F172A;

  --success:#10B981; --warning:#F59E0B; --danger:#EF4444;

  /* أنصاف أقطار */
  --r-sm:8px; --r-md:12px; --r-lg:16px; --r-xl:20px; --r-2xl:28px;

  /* ظلال زرقاء ناعمة (مثل التصميم الأصلي) */
  --s0: 0 1px 2px rgba(37,99,235,.04);
  --s1: 0 2px 8px rgba(37,99,235,.08);
  --s2: 0 8px 24px rgba(37,99,235,.10);
  --s3: 0 16px 40px rgba(37,99,235,.14);
  --s4: 0 24px 60px rgba(37,99,235,.18);

  --t-fast:150ms cubic-bezier(.4,0,.2,1);
  --t-base:280ms cubic-bezier(.4,0,.2,1);
  --t-slow:500ms cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'XB Niloofar', 'Tajawal', 'Cairo', sans-serif;
  background: var(--bg-page);
  color: var(--gray-800);
  margin: 0;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ─── خلفية الفقاعات الزرقاء (مثل Hero الموقع) ─── */
.bubbles-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.9), rgba(186,217,255,.4) 60%, rgba(147,197,253,.15));
  box-shadow: inset 0 0 40px rgba(255,255,255,.6), 0 4px 30px rgba(37,99,235,.08);
  animation: float 18s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0) translateX(0) scale(1); }
  33%     { transform: translateY(-30px) translateX(20px) scale(1.05); }
  66%     { transform: translateY(20px) translateX(-15px) scale(.97); }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'XB Niloofar', 'Cairo', sans-serif;
  font-weight: 700;
  color: var(--gray-900);
}
a { text-decoration: none; color: inherit; }

/* ═══════════ Navbar ═══════════ */
.nav-top {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(219,234,254,.6);
  position: sticky; top: 0; z-index: 1020;
  box-shadow: var(--s0);
}
.nav-top .container {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; max-width: 1400px; margin: 0 auto;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand .brand-mark {
  height: 44px; width: 44px; border-radius: 50%;
  object-fit: cover; box-shadow: var(--s1);
}
.nav-brand .brand-word { height: 28px; width: auto; }

.nav-back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  background: var(--pri); color: #fff;
  font-weight: 700; font-size: 14px;
  transition: var(--t-base);
  box-shadow: var(--s1);
}
.nav-back:hover {
  background: var(--pri-2); color: #fff;
  transform: translateX(4px);
  box-shadow: var(--s2);
}

@media (max-width: 520px) {
  .nav-brand .brand-word { display: none; }
  .nav-back span { display: none; }
  .nav-back { padding: 9px 12px; }
}

/* ═══════════ Hero (مطابق للصفحة الرئيسية) ═══════════ */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 100px 0 80px;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 991px) {
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero { min-height: auto; padding: 70px 0 50px; }
}

/* ─── النصوص (يمين في RTL) ─── */
.hero-content {
  text-align: center;
}
@media (min-width: 992px) {
  .hero-content {
    text-align: start;
    /* في RTL: المحتوى على اليمين */
    grid-column: 1;
    order: 2;
  }
  .hero-visual {
    grid-column: 2;
    order: 1;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 22px;
  background: rgba(14,165,233,.1);
  color: var(--c-cyan);
  border: 1px solid rgba(14,165,233,.3);
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 26px;
  box-shadow: 0 4px 16px rgba(14,165,233,.12);
}
.hero-badge i {
  animation: pulse 2s ease-in-out infinite;
  color: var(--c-cyan);
}
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.2)} }

.hero h1 {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}
.hero h1 .grad {
  background: var(--c-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: gradShift 5s ease-in-out infinite;
}
@keyframes gradShift {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

.hero p {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--gray-600);
  margin-bottom: 36px;
  line-height: 1.85;
  max-width: 560px;
}
@media (max-width: 991px) {
  .hero p { margin-inline: auto; }
}

/* ─── الأزرار (pill كبيرة بتدرّج) ─── */
.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
@media (max-width: 991px) {
  .hero-btns { justify-content: center; }
}

.btn-grad {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--c-gradient);
  color: #fff !important;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(37,99,235,.35);
  transition: var(--t-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn-grad:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(37,99,235,.45);
  color: #fff !important;
}
.btn-grad i { font-size: 14px; }

.btn-outline-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  background: #fff;
  color: var(--pri) !important;
  border: 2px solid var(--pri);
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: var(--t-base);
  cursor: pointer;
}
.btn-outline-brand:hover {
  background: var(--c-gradient);
  color: #fff !important;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(37,99,235,.35);
}

/* ─── الصاروخ ─── */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.rocket-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14,165,233,.25) 0%, transparent 65%);
  filter: blur(40px);
  animation: rocketGlowPulse 5s ease-in-out infinite;
}
@keyframes rocketGlowPulse {
  0%,100% { transform: scale(1); opacity: .8; }
  50%     { transform: scale(1.15); opacity: 1; }
}

.rocket-img {
  width: min(380px, 80vw);
  height: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 20px 60px rgba(37,99,235,.4));
  animation: rocketFloat 5s ease-in-out infinite;
}
@keyframes rocketFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-22px); }
}

/* ─── صاروخ CSS احتياطي إن غاب الصورة ─── */
.rocket-css {
  width: 220px;
  height: 320px;
  position: relative;
  animation: rocketFloat 5s ease-in-out infinite;
  z-index: 1;
}
.rocket-body {
  width: 90px;
  height: 180px;
  background: linear-gradient(180deg, #2563EB 0%, #1E40AF 100%);
  border-radius: 60px 60px 16px 16px;
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  box-shadow: 0 12px 40px rgba(37,99,235,.45);
}
.rocket-window {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  border: 4px solid rgba(255,255,255,.6);
  position: absolute;
  left: 50%;
  top: 48px;
  transform: translateX(-50%);
  box-shadow: inset 0 -3px 8px rgba(37,99,235,.2);
}
.rocket-fin {
  position: absolute;
  bottom: 60px;
  width: 36px;
  height: 70px;
  background: linear-gradient(180deg, #1E40AF, #2563EB);
  border-radius: 4px 0 12px 0;
}
.rocket-fin.left  { left:  calc(50% - 70px); transform: skewY(14deg); }
.rocket-fin.right { right: calc(50% - 70px); transform: skewY(-14deg) scaleX(-1); }
.rocket-flame {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 80px;
}
.rocket-flame::before, .rocket-flame::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}
.rocket-flame::before {
  width: 44px;
  height: 80px;
  background: linear-gradient(180deg, #FBBF24 0%, #F97316 50%, transparent 100%);
  animation: flameFlicker .15s ease-in-out infinite alternate;
}
.rocket-flame::after {
  width: 24px;
  height: 50px;
  background: linear-gradient(180deg, #fff 0%, #FBBF24 60%, transparent 100%);
  animation: flameFlicker .12s ease-in-out infinite alternate-reverse;
}
@keyframes flameFlicker {
  from { transform: translateX(-50%) scaleY(1); }
  to   { transform: translateX(-50%) scaleY(.85) scaleX(1.1); }
}

/* ─── خلفية الفقاعات (شفّافة بمؤثر زجاجي) ─── */
.bubbles-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%,
    rgba(255,255,255,.6) 0%,
    rgba(186,217,255,.25) 40%,
    rgba(147,197,253,.08) 100%);
  border: 1px solid rgba(255,255,255,.5);
  backdrop-filter: blur(2px);
  box-shadow: inset 0 0 30px rgba(255,255,255,.4),
              0 4px 30px rgba(37,99,235,.06);
  animation: floatBubble var(--dur, 8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes floatBubble {
  0%,100% { transform: translate(0, 0) scale(1); }
  25%     { transform: translate(8px, -22px) scale(1.02); }
  50%     { transform: translate(-6px, -12px) scale(.98); }
  75%     { transform: translate(4px, -28px) scale(1.03); }
}

/* ─── إحصائيات الـ Hero (تحت الصاروخ في mobile، تحت العنوان في desktop) ─── */
.hero-stats-row {
  margin-top: 50px;
  padding: 28px;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  border: 1px solid rgba(37,99,235,.12);
  box-shadow: 0 8px 32px rgba(37,99,235,.08);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  position: relative;
  z-index: 2;
}
@media (max-width: 540px) {
  .hero-stats-row { grid-template-columns: 1fr; gap: 14px; padding: 22px; }
}

.hero-stat {
  text-align: center;
  position: relative;
}
.hero-stat + .hero-stat::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(37,99,235,.18), transparent);
}
@media (max-width: 540px) {
  .hero-stat + .hero-stat::before { display: none; }
}

.hero-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--c-gradient-soft);
  border: 1px solid rgba(37,99,235,.15);
  color: var(--pri);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}
.hero-stat-num {
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1;
  background: var(--c-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stat-label {
  font-size: 13px;
  color: var(--gray-600);
  margin-top: 6px;
  font-weight: 600;
}

/* Hero Search — أصغر وأقل بروزاً، تحت الإحصائيات */
.hero-search {
  max-width: 560px;
  margin: 30px auto 0;
  position: relative;
}
.hero-search input {
  width: 100%;
  padding: 16px 56px 16px 22px;
  border: 2px solid rgba(37,99,235,.15);
  border-radius: 999px;
  background: #fff;
  font-family: 'XB Niloofar', 'Tajawal', sans-serif;
  font-size: 15px;
  color: var(--gray-900);
  box-shadow: 0 4px 18px rgba(37,99,235,.08);
  transition: var(--t-base);
}
.hero-search input::placeholder { color: var(--gray-400); }
.hero-search input:focus {
  outline: none;
  border-color: var(--pri);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12), 0 8px 24px rgba(37,99,235,.15);
}
.hero-search i {
  position: absolute;
  inset-inline-end: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pri);
  font-size: 17px;
  pointer-events: none;
}

/* ═══════════ Filter Bar ═══════════ */
.filter-bar {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(219,234,254,.6);
  position: sticky;
  top: 73px;
  z-index: 1010;
  box-shadow: var(--s1);
}
.filter-inner {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1400px;
  margin: 0 auto;
}
.filter-row {
  display: flex; gap: 10px;
  align-items: center; flex-wrap: wrap;
}
.filter-chips {
  display: flex; gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
  flex: 1; min-width: 0;
}
.filter-chips::-webkit-scrollbar { height: 4px; }
.filter-chips::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--gray-700);
  font-family: 'XB Niloofar', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--t-fast);
  user-select: none;
}
.chip:hover {
  border-color: var(--pri);
  background: var(--pri-bg);
  color: var(--pri-2);
}
.chip.active {
  background: var(--pri);
  color: #fff;
  border-color: var(--pri);
  box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.chip i { font-size: 12px; }
.chip .count {
  background: rgba(255,255,255,.25);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.chip:not(.active) .count {
  background: var(--gray-100);
  color: var(--gray-600);
}

.filter-select {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--gray-200);
  background: #fff;
  color: var(--gray-700);
  font-family: 'XB Niloofar', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--t-fast);
}
.filter-select:hover { border-color: var(--pri); }
.filter-select:focus {
  outline: none;
  border-color: var(--pri);
  box-shadow: 0 0 0 3px var(--pri-light);
}

.btn-clear {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: transparent;
  color: var(--danger);
  border: 1.5px solid #FCA5A5;
  font-family: 'XB Niloofar', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--t-fast);
}
.btn-clear:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* ═══════════ Buttons ═══════════ */
.btn {
  padding: 11px 22px;
  border-radius: 999px;
  font-family: 'XB Niloofar', sans-serif;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--t-base);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--pri), var(--pri-2));
  color: #fff;
  box-shadow: var(--s2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--s3);
}
.btn-secondary {
  background: #fff;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
}
.btn-secondary:hover {
  background: var(--gray-100);
  border-color: var(--pri);
  color: var(--pri-2);
}
