/* ===== Header Styles ===== */

:root {
  --ink: #0f1222;
  --muted: #8b8fa3;
  --border: #e8e8ee;
  --blue: #873EFF;
  --orange-bg: #fdeccb;
  --orange-text: #a9660a;
  --purple-bg: #f1e6ff;
  --purple-text: #873EFF;
  --green: #1e8e3e;
  --radius: 20px;
  --radius-sm: 10px;
  --page-radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--ink);
  overflow-x: hidden;
}

/* ===== Arabic / RTL support ===== */
body[dir="rtl"] {
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
}

body[dir="rtl"] .nav-links,
body[dir="rtl"] .header-cta,
body[dir="rtl"] .hero-actions,
body[dir="rtl"] .demo-hero-ctas,
body[dir="rtl"] .footer-social,
body[dir="rtl"] .connect-list li,
body[dir="rtl"] .feature-card .f-icon,
body[dir="rtl"] .faq-q {
  direction: rtl;
}

body[dir="rtl"] .logo .dot {
  order: 2;
}

body[dir="rtl"] .btn-nav-solid svg,
body[dir="rtl"] .btn-hero svg {
  transform: scaleX(-1);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  width: 100%;
}

/* Fix sticky when admin bar is present */
body.admin-bar .site-header {
  top: 32px;
}

@media(max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

.site-header .inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.5px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.logo .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
}

.custom-logo-link {
  display: flex;
  align-items: center;
}

.custom-logo,
.site-logo {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 1;
}

.nav-links a {
  color: #3d3f52;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--blue);
}

/* Header CTA */
.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.lang-switch:hover svg {
  fill: var(--blue);
}

.lang-switch svg {
  width: 26px;
  height: 26px;
  fill: #3d3f52;
  transition: fill .15s;
}

.btn-nav {
  height: 42px;
  padding: 0 20px;
  border-radius: var(--page-radius);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-nav-ghost {
  color: var(--ink);
  background: transparent;
}

.btn-nav-solid {
  background: var(--blue);
  color: #fff;
}

.btn-nav-solid:hover {
  background: #6f2fd6;
}

/* ===== Tablet ===== */
@media(max-width:1024px) {
  .site-header .inner {
    padding: 14px 20px;
    gap: 16px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 14px;
  }

  .custom-logo,
  .site-logo {
    height: 36px;
    max-width: 150px;
  }
}

/* ===== Mobile: logo + lang switch + buy button only ===== */
@media(max-width:860px) {
  .nav-links {
    display: none !important;
  }

  .site-header .inner {
    justify-content: space-between;
  }
}

/* ===== Small Mobile ===== */
@media(max-width:560px) {
  .site-header .inner {
    padding: 12px 16px;
    gap: 10px;
  }

  .custom-logo,
  .site-logo {
    height: 30px;
    max-width: 120px;
  }

  .lang-switch {
    width: 34px;
    height: 34px;
  }

  .lang-switch svg {
    width: 24px;
    height: 24px;
  }

  .btn-nav {
    height: 36px;
    padding: 0 14px;
    font-size: 12.5px;
  }
}

/* ===== Extra Small ===== */
@media(max-width:380px) {
  .site-header .inner {
    padding: 10px 12px;
    gap: 8px;
  }

  .custom-logo,
  .site-logo {
    height: 26px;
    max-width: 100px;
  }

  .btn-nav {
    height: 34px;
    padding: 0 12px;
    font-size: 11.5px;
  }

  .lang-switch {
    width: 30px;
    height: 30px;
  }

  .lang-switch svg {
    width: 20px;
    height: 20px;
  }
}
