/* ══════════════════════════════════════════════════════════
   NovaDz — منطقة الأعضاء (نسخة عربية RTL)
   ══════════════════════════════════════════════════════════ */

:root {
  /* لوحة مشتقّة من تدرّج شعار nova: كحلي ← سماوي.
     التباين مع الأبيض: brand ‎5.9:1‎ و brand-dark ‎8.4:1‎ */
  --brand: #0B6E85;
  --brand-dark: #085566;
  --brand-soft: #E8FAFE;
  --brand-tint: #D9F4FB;
  --brand-accent: #03CCEB;
  --ink: #102430;
  --body: #1f2937;
  --muted: #6b7280;
  --muted-soft: #9ca3af;
  --line: #f3f4f6;
  --line-2: #e5e7eb;
  --white: #fff;
  --wa: #25D366;
  --wa-dark: #128C7E;
  --shell: #f8fafc;

  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;

  --sh-card: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  --sh-card-hi: 0 25px 50px -12px rgb(0 0 0 / .25);
  --sh-soft: 0 8px 30px rgb(0 0 0 / .08);
  --sh-btn: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: 'Cairo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--body);
  background-color: var(--shell);
  background-image: url('https://i.ibb.co/N2CCGP8g/416957890-2df5129a-d3ae-442a-96a8-2034c858426c.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

.screen[hidden] {
  display: none !important;
}

/* ─── شعار nova ─────────────────────────────────── */

.wordmark {
  display: block;
  margin: 0 0 1rem;
  line-height: 0;
}

.wordmark img {
  width: clamp(140px, 44vw, 185px);
  height: auto;
  margin-inline: auto;
}

.wordmark-lg {
  margin-bottom: 1.75rem;
}

.wordmark-lg img {
  width: clamp(190px, 56vw, 300px);
}

/* ─── الأزرار ──────────────────────────────────────────── */

.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  border-radius: var(--r-sm);
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
  line-height: 1.2;
}

.btn:hover {
  transform: scale(1.04);
}

.btn:active {
  transform: scale(.96);
}

.btn:focus-visible {
  outline: 3px solid rgb(11 110 133 / .35);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--sh-btn);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-ghost {
  background: #f3f4f6;
  color: #1f2937;
  box-shadow: 0 1px 2px rgb(0 0 0 / .05);
}

.btn-ghost:hover {
  background: #e5e7eb;
}

.btn-block {
  width: 100%;
}

.btn-pill {
  border-radius: 999px;
  padding: .8rem 1.6rem;
}

.ico {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ══════════════════════════════════════════════════════════
   1) شاشة تسجيل الدخول
   ══════════════════════════════════════════════════════════ */

.screen-login {
  position: fixed;
  inset: 0;
  background: var(--shell);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: auto;
  z-index: 40;
}

.login-card {
  width: 100%;
  max-width: 28rem;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-soft);
  padding: 1.75rem;
  animation: pop .45s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.login-head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-title {
  font-size: clamp(1.5rem, 5vw, 1.875rem);
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 .5rem;
  letter-spacing: .5px;
}

.login-sub {
  color: var(--muted);
  font-weight: 500;
  font-size: .95rem;
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field label {
  display: block;
  font-size: .875rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .5rem;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  padding-inline-start: 1rem;
  display: flex;
  align-items: center;
  pointer-events: none;
  color: var(--muted-soft);
}

.input-icon svg {
  width: 20px;
  height: 20px;
}

.input-wrap input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: #1f2937;
  background: var(--white);
  padding: .8rem 1rem;
  padding-inline-start: 2.9rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  outline: none;
  transition: box-shadow .18s ease, border-color .18s ease;
}

.input-wrap input::placeholder {
  color: var(--muted-soft);
  font-family: 'Cairo', sans-serif;
}

.input-wrap input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--brand);
}

.field-error {
  margin: .5rem 0 0;
  color: #dc2626;
  font-size: .8125rem;
  font-weight: 600;
}

.field-error[hidden] {
  display: none;
}

.input-wrap.is-invalid input {
  border-color: #fca5a5;
  box-shadow: 0 0 0 2px rgb(220 38 38 / .25);
}

.login-help {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.help-title {
  color: var(--ink);
  font-weight: 700;
  font-size: .8125rem;
  margin: 0 0 .9rem;
  letter-spacing: .5px;
}

.help-box {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 1rem 1.1rem;
  text-align: start;
}

.help-box p {
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.8;
  margin: 0;
}

.help-box p + p {
  margin-top: .6rem;
}

.help-box strong {
  color: #374151;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════
   2) منطقة الأعضاء
   ══════════════════════════════════════════════════════════ */

.screen-members {
  min-height: 100vh;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.topbar {
  width: 100%;
  max-width: 80rem;
  display: flex;
  justify-content: flex-end;
}

.signout {
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: .875rem;
  color: var(--muted);
  padding: .35rem .25rem;
  transition: color .18s ease;
}

.signout:hover {
  color: #1f2937;
}

.site-header {
  text-align: center;
  max-width: 48rem;
  margin: 2rem 0 4rem;
  animation: rise .5s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.tagline {
  font-size: clamp(1.1rem, 3.4vw, 1.5rem);
  font-weight: 500;
  color: #4b5563;
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.9;
}

.tagline-strong {
  color: var(--brand);
  font-weight: 700;
}

.header-cta {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

/* ─── الشريط الدوّار ───────────────────────────────────── */

.carousel-wrap {
  width: 100%;
  max-width: 80rem;
  position: relative;
}

.carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 1rem 2rem;
  scroll-snap-type: x mandatory;
  /* التمرير السلس يُدار من app.js — تفعيله هنا يتعارض مع الالتقاط في وضع RTL */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.card {
  flex: none;
  width: 280px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-card);
  text-decoration: none;
  scroll-snap-align: start;
  transition: box-shadow .3s ease, transform .3s ease;
  animation: rise .5s ease both;
}

.card:hover {
  box-shadow: var(--sh-card-hi);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card-veil {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgb(0 0 0 / 0);
  transition: background-color .3s ease;
}

.card:hover .card-veil {
  background: rgb(0 0 0 / .05);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
}

.card:hover .card-media img {
  transform: scale(1.1);
}

.card-body {
  padding: 1.5rem;
  text-align: center;
}

.card-body h3 {
  color: var(--brand);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.6;
  transition: color .18s ease;
}

.card:hover .card-body h3 {
  color: var(--brand-dark);
}

.card-badge {
  margin-top: .75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .4rem 1rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .5px;
}

/* ─── أزرار التنقّل ────────────────────────────────────── */

.nav-side {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
}

/* في الاتجاه من اليمين لليسار: «السابق» يمينًا و«التالي» يسارًا */
.nav-prev {
  inset-inline-start: -1rem;
}

.nav-next {
  inset-inline-end: -1rem;
}

.nav-btn {
  background: rgb(255 255 255 / .8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  box-shadow: var(--sh-btn);
  color: var(--brand);
  border-radius: 999px;
  padding: .75rem;
  cursor: pointer;
  display: flex;
  transition: transform .18s ease, background-color .18s ease;
}

.nav-btn:hover {
  background: var(--white);
  transform: scale(1.1);
}

.nav-btn:focus-visible {
  outline: 3px solid rgb(11 110 133 / .35);
  outline-offset: 2px;
}

.nav-btn svg {
  width: 24px;
  height: 24px;
}

/* ─── بطاقة الدعم والتذييل ─────────────────────────────── */

.support-card {
  position: relative;
  margin-top: 3rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 1px 3px rgb(0 0 0 / .08);
  padding: 1.5rem;
  max-width: 24rem;
  width: 100%;
  text-align: center;
  animation: rise .5s ease both;
}

.support-card p {
  margin: 0;
  color: #374151;
  font-weight: 500;
  font-size: .95rem;
}

.support-arrow {
  position: absolute;
  bottom: -2rem;
  inset-inline-start: 2rem;
  color: var(--wa);
  animation: bounce 1s infinite;
}

.support-arrow svg {
  width: 28px;
  height: 28px;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(-12%);
    animation-timing-function: cubic-bezier(.8, 0, 1, 1);
  }

  50% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, .2, 1);
  }
}

.site-footer {
  margin-top: 4rem;
  padding-bottom: 1rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 500;
}

.wa-float {
  position: fixed;
  bottom: 1.5rem;
  inset-inline-start: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--wa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgb(0 0 0 / .25);
  z-index: 30;
  transition: transform .2s ease, background-color .2s ease;
}

.wa-float:hover {
  background: var(--wa-dark);
  transform: scale(1.08);
}

.wa-float svg {
  width: 30px;
  height: 30px;
}

/* ══════════════════════════════════════════════════════════
   3) نافذة تثبيت التطبيق
   ══════════════════════════════════════════════════════════ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / .5);
  animation: fade .2s ease both;
}

@keyframes fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-card {
  position: relative;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-soft);
  padding: 2rem 1.75rem 1.75rem;
  width: 100%;
  max-width: 26rem;
  max-height: 90vh;
  overflow: auto;
  text-align: center;
  animation: pop .3s cubic-bezier(.16, 1, .3, 1) both;
}

.modal-x {
  position: absolute;
  top: .85rem;
  inset-inline-end: .85rem;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--muted-soft);
  padding: .25rem;
  display: flex;
  border-radius: 8px;
  transition: color .18s ease, background-color .18s ease;
}

.modal-x:hover {
  color: #374151;
  background: var(--line);
}

.modal-x svg {
  width: 20px;
  height: 20px;
}

.modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto .9rem;
  border-radius: 16px;
}

.modal-card h3 {
  margin: 0 0 .5rem;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--ink);
}

.modal-sub {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: .9rem;
}

.modal-steps {
  display: grid;
  gap: .75rem;
  margin-bottom: 1.25rem;
  text-align: start;
}

.step-group {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: .9rem 1rem;
}

.step-head {
  margin: 0 0 .35rem;
  font-weight: 700;
  font-size: .8125rem;
  color: var(--brand);
}

.step-group p:not(.step-head) {
  margin: 0;
  font-size: .8125rem;
  color: var(--muted);
  line-height: 1.8;
}

.step-group strong {
  color: #374151;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════
   الشاشات الأكبر
   ══════════════════════════════════════════════════════════ */

@media (min-width: 640px) {
  .login-card {
    padding: 2rem;
  }

  .login-head {
    margin-bottom: 2rem;
  }

  .login-form {
    gap: 1.5rem;
  }

  .login-help {
    margin-top: 2rem;
    padding-top: 2rem;
  }

  .help-box p {
    font-size: .875rem;
  }
}

@media (min-width: 768px) {
  .screen-members {
    padding: 3rem;
  }

  .card {
    width: 320px;
  }

  .nav-prev {
    inset-inline-start: -3rem;
  }

  .nav-next {
    inset-inline-end: -3rem;
  }

  .card-body h3 {
    font-size: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
