/* ==========================
   Smart Trader Main Styles
   ========================== */

:root {
  --bg-page: #020617;
  --bg-card: #0b1120;
  --bg-soft: #020818;
  --accent: #06b6d4;
  --accent2: #22c55e;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border: rgba(148, 163, 184, 0.4);
  --radius-lg: 20px;
  --radius-md: 14px;
}

/* RESET */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body.page {
  font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #020617 0, #020617 45%, #000000 100%);
  color: var(--text-main);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===================== HEADER ===================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.9), transparent);
  border-bottom: 1px solid rgba(15, 23, 42, 0.85);
}

.site-header__container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.site-header__logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.site-header__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-header__title {
  font-weight: 700;
  font-size: 1rem;
}

.site-header__subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.site-header__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

.site-header__link {
  color: var(--text-muted);
  position: relative;
  padding-block: 0.15rem;
}

.site-header__link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -0.25rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.site-header__link:hover {
  color: var(--text-main);
}

.site-header__link:hover::after {
  transform: scaleX(1);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.8rem;
}

.site-header__lang {
  color: var(--text-muted);
}

.site-header__lang a {
  color: var(--accent);
  font-weight: 600;
}

.site-header__btn {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #020617;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.site-header__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(15, 118, 110, 0.8);
}

@media (max-width: 900px) {
  .site-header__nav {
    display: none;
  }

  .site-header__container {
    padding-inline: 1rem;
  }
}

@media (max-width: 600px) {
  .site-header__container {
    align-items: flex-start;
  }

  .site-header__brand {
    flex: 1;
  }

  .site-header__actions {
    gap: 0.4rem;
    margin-top: 0.35rem;
  }

  .site-header__btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.5);
  }

  .site-header__title {
    font-size: 0.9rem;
  }
}

/* ===================== HERO ===================== */

.hero-section {
  padding: 3.5rem 0 3rem;
  position: relative;
  --hero-bg-pos: 0%;
  background: radial-gradient(
    circle at 50% var(--hero-bg-pos),
    rgba(37, 99, 235, 0.35),
    transparent 55%
  );
}

/* Hero full-width background, content centered */
.hero-section__container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.7fr); /* النص أكبر، الموبايل أضيق */
  gap: 1.2rem;                                              /* يقربوا من بعض شوية */
  align-items: center;
}

.hero-section__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.7);
  background: rgba(8, 47, 73, 0.7);
  color: #e0f2fe;
  margin-bottom: 1rem;
}

.hero-section__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.18);
}

.hero-section__title {
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin-bottom: 0.8rem;
  font-weight: 800;
}

.hero-section__title span {
  display: block;
  color: var(--accent);
}

.hero-section__subtitle {
  font-size: 0.98rem;
  line-height: 1.9;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.hero-section__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
}

.hero-section__tag {
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.9);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hero-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #020617;
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.65);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(15, 118, 110, 0.85);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-main);
}

.btn--ghost:hover {
  background: rgba(15, 23, 42, 0.9);
}

/* Store badges */

.hero-section__store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
  margin-bottom: 0.6rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  max-width: 32%;
}

.store-badge img {
  width: 100%;
  height: auto;
}

/* Note + logos */

.hero-section__note {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.9;
}

.hero-section__logos {
  margin-top: 1.7rem;
  padding: 0.9rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
}

.hero-section__logos-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-section__logos-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
}

.hero-section__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Smaller logos, CFI slightly bigger */
.hero-section__logo img {
  max-height: 20px;
}
.hero-section__logos-row .hero-section__logo:first-child img {
  max-height: 26px;
}

@media (max-width: 900px) {
  .hero-section {
    padding-top: 2.6rem;
  }

  .hero-section__container {
    max-width: 100%;
    padding: 0 1.2rem;
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-section__app {
    order: 1;
    margin-top: 0;
    margin-bottom: 1.5rem;
  }

  .hero-section__text {
    order: 2;
    text-align: center;
  }

  .hero-section__note {
    margin-inline: auto;
  }

  .hero-section__store-badges {
    justify-content: center;
  }

  .store-badge {
    max-width: 40%;
  }
}

@media (max-width: 600px) {
  .hero-section__logos {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .hero-section__logos-row {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ===================== APP / MOBILE PREVIEW ===================== */

.hero-section__app {
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 1400px;
    margin-top: -20px;   /* ارفع الموبايل لفوق شوية */
}


/* الكونتينر الرئيسي للموبايل */
.app-preview {
  width: 320px;
  max-width: 100%;
  position: relative;          /* مهم عشان الـ z-index يشتغل مظبوط */
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateX(10deg);
  pointer-events: none;
}

/* الفريم */
.app-preview__frame {
  position: relative;
  width: 100%;
}

/* صورة الفريم فوق كل حاجة */
.app-preview__frame-img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;                  /* الفريم فوق */
}

/* الاسكرين تحت الفريم، من غير أي padding ومن غير فراغ */
.app-preview__screen {
  position: absolute;
  top: 2%;      /* تنزل تحت شوية */
  left: 3%;     /* تروح ناحية الشمال شوية */
  width: 94%;   /* عشان لما نزقها ما تطلعش برا الفريم */
  height: 96%;  /* تقلل الطول شوية لنفس السبب */
  border-radius: 15px;
  overflow: hidden;
  background: #020617;
  z-index: 1;
}

/* صورة الاسكرين نفسها */
.app-preview__image {
  width: 100%;
  height: 100%;
  object-fit: cover;           /* مفيش padding – بتغطي الفريم كله */
  display: block;
}

.app-preview__caption {
  margin-top: 0.8rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 260px;
}

@media (max-width: 480px) {
  .app-preview {
    width: 260px;
  }
}

/* ===================== SECTIONS COMMON ===================== */

.section {
  padding: 3.5rem 1.5rem;
}

.section--light {
  background: linear-gradient(to bottom, #020617, #020617, #020617);
}

.section__container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.section__header {
  text-align: center;
  margin-bottom: 2rem;
}

.section__title {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.section__text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 680px;
}

.section__text--center {
  margin: 0 auto;
  text-align: center;
}

.section__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .section__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.section__block {
  margin-bottom: 1rem;
}

.section__card {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.5rem 1.4rem;
}

.section__subtitle {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.section__list {
  list-style: disc;
  padding-inline-start: 1.2rem;
  margin-top: 1rem;
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.9;
}

.section__list--compact li {
  margin-bottom: 0.35rem;
}

/* ===================== FEATURES ===================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.feature-card {
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.3rem 1.2rem;
  font-size: 0.93rem;
}

.feature-card__title {
  font-size: 1.02rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.feature-card__text {
  color: var(--text-muted);
  line-height: 1.9;
}

/* ===================== BROKERS ===================== */

.brokers-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .brokers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .brokers-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.broker-card {
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.broker-card__logo {
  height: 40px;
  display: flex;
  align-items: center;
}

.broker-card__logo img {
  max-height: 34px;
}

.broker-card__name {
  font-size: 1rem;
  font-weight: 600;
}

.broker-card__text {
  color: var(--text-muted);
  line-height: 1.8;
}

.broker-card__btn {
  margin-top: 0.5rem;
  width: 100%;
}

.brokers-note {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 850px;
}

.brokers-note strong {
  color: #f97316;
}

/* ===================== FAQ ===================== */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.faq-list {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.4rem 1.3rem;
}

.faq-item {
  padding-block: 0.6rem;
  border-bottom: 1px solid rgba(31, 41, 55, 0.8);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item__q {
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  padding-inline-end: 1.4rem;
}

.faq-item__q::before {
  content: "＋";
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.faq-item--open .faq-item__q::before {
  content: "−";
}

.faq-item__a {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-top: 0.3rem;
  display: none;
}

.faq-item--open .faq-item__a {
  display: block;
}

/* ===================== SEO SECTION ===================== */

.section--seo {
  background: #020617;
  border-top: 1px solid rgba(15, 23, 42, 0.9);
}

.seo-article {
  border-radius: 16px;
  background: #0b1120;
  border: 1px solid var(--border);
  padding: 1rem 1rem;
  margin-bottom: 1rem;
}

.seo-article__toggle {
  width: 100%;
  text-align: inherit;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.seo-article__toggle::after {
  content: "▼";
  font-size: 0.75rem;
  color: var(--text-muted);
}

.seo-article__body {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.9;
  display: none;
}

.seo-article__body ul {
  list-style: disc;
  padding-inline-start: 1.2rem;
  margin: 0.6rem 0;
}

.seo-article__body--open {
  display: block;
}

/* ===================== RISK SECTION ===================== */

.risk-section {
  padding: 2.4rem 1.5rem 2.7rem;
  background: #020617;
}

.risk-card {
  max-width: 1120px;
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid rgba(248, 113, 113, 0.7);
  background: radial-gradient(circle at top, #7f1d1d, #020617 70%);
  padding: 1.1rem 1.2rem 1.3rem;
  color: #fee2e2;
}

.risk-card__title {
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: #fecaca;
}

.risk-card__body {
  font-size: 0.55rem;
  line-height: 1.8;
  margin-top: 0.1rem;
}

/* ===================== FOOTER ===================== */

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  background: rgba(2, 6, 23, 0.97);
  padding: 1.4rem 1.5rem 1.2rem;
}

.site-footer__container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.site-footer__links a:hover {
  color: var(--text-main);
}

.site-footer__support {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  justify-content: center;
}

@media (max-width: 700px) {
  .site-footer__container {
    align-items: center;
  }
}

/* ===================== REVEAL (GSAP HOOKS) ===================== */

.hero-section__reveal,
.section__reveal {
  opacity: 0;
  transform: translateY(26px);
}
