@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Cairo:wght@400;600;700;800&display=swap");

:root {
  --primary: #1c68e9;
  --primary-light: rgba(28, 104, 233, 0.1);
  --primary-ultra-light: rgba(28, 104, 233, 0.04);
  --secondary: #1c68e9;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-light: #6b7280;
  --bg-white: #ffffff;
  --bg-gray: #f8fafc;
  --border-color: #f1f5f9;
  --error: #ef4444;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-primary: 0 10px 15px -3px rgba(28, 104, 233, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background-color: var(--primary-light);
  color: var(--primary);
}

body {
  font-family: "Outfit", sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-padding {
  padding: 80px 0;
}

.hero-section {
  padding: 40px 0 !important;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 120px 0;
  }
  .hero-section {
    padding: 60px 0 !important;
  }
}

.text-center {
  text-align: center;
}
.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.grid {
  display: grid;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  gap: 8px;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .btn {
    padding: 18px 28px;
    font-size: 16px;
  }
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -5px rgba(28, 104, 233, 0.25);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary-light);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-primary);
  padding: 10px 16px;
}

.btn-ghost:hover {
  color: var(--primary);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background-color: var(--primary-ultra-light);
  border: 1px solid var(--primary-light);
  color: var(--primary);
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .badge {
    padding: 8px 16px;
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 24px;
  }
}

/* Cards */
.card {
  background: white;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  padding: 32px;
  transition: var(--transition);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
}

@media (min-width: 768px) {
  .card {
    padding: 48px;
  }
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-xl);
}

/* Navigation */
nav {
  height: 80px;
  background: white;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

@media (max-width: 767px) {
  nav {
    height: 72px;
  }
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

@media (min-width: 768px) {
  .logo-text {
    font-size: 24px;
  }
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

@media (min-width: 1024px) {
  .nav-links {
    gap: 16px;
  }
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--primary);
  cursor: pointer;
  background: var(--bg-gray);
  border-radius: 12px;
  border: none;
  transition: var(--transition);
}

.menu-toggle:hover {
  background: var(--primary-light);
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

.mobile-menu {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  height: calc(100vh - 72px);
  background: white;
  padding: 32px 24px;
  display: none;
  flex-direction: column;
  gap: 20px;
  z-index: 2000;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .mobile-menu {
    top: 80px;
  }
}

.mobile-menu.active {
  display: flex;
}

.nav-links.desktop {
  display: none;
}

@media (min-width: 1024px) {
  .nav-links.desktop {
    display: flex;
    align-items: center;
  }
}

/* Typography Scale */
h1 { font-size: 32px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }

@media (min-width: 768px) {
  h1 { font-size: 48px; }
  h2 { font-size: 36px; }
  h3 { font-size: 24px; }
}

@media (min-width: 1024px) {
  h1 { font-size: 56px; }
  h2 { font-size: 42px; }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Concept Illustration Styles */
.concept-illustration-wrapper {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 auto;
}

.concept-illustration {
  position: relative;
  width: 90%;
  height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.illustration-orbit {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: orbitRotate 30s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes orbitRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.illustration-center {
  position: relative;
  width: 22%;
  height: 22%;
  background: white;
  border: 3px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 0 30px var(--primary-light);
}

.center-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--primary-light);
  border-radius: 50%;
  z-index: -1;
  animation: pulseNode 4s infinite ease-in-out;
}

@keyframes pulseNode {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.5); opacity: 0.1; }
}

.platform-nodes {
  position: absolute;
  width: 100%;
  height: 100%;
  /* Removed orbitRotate to keep beams aligned with static SVG paths */
}

.platform-node {
  position: absolute;
  width: 14%;
  height: 14%;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.platform-node img,
.platform-node i {
  width: 50%;
  height: 50%;
  /* Counter-rotate icons to keep them upright */
  animation: counterRotate 30s linear infinite;
}

@keyframes counterRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* Aligning nodes exactly with SVG path endpoints (400x400 grid) */
/* Node center must be at path end; offset by 28px (half of 56px) */
/* Polar distribution - radius 40% from center */
.node-fb { top: 3%; left: 43%; border-color: #1877f2; }
.node-ig { top: 23%; right: 9%; border-color: #e1306c; }
.node-yt { bottom: 23%; right: 9%; border-color: #ff0000; }
.node-tk { bottom: 3%; left: 43%; border-color: #000; }
.node-x  { bottom: 23%; left: 9%;  border-color: #000; }
.node-sh { top: 23%; left: 9%;  border-color: var(--primary); }

.platform-node:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

/* SVG Beams - Now inside orbital to stay aligned */
.illustration-beams {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.beam-track {
  fill: none;
  stroke: var(--primary-ultra-light);
  stroke-width: 1.5;
}

.beam-path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 20 180;
  filter: blur(1px);
  animation: beamTravel 4s infinite linear;
}

@keyframes beamTravel {
  from { stroke-dashoffset: 200; }
  to { stroke-dashoffset: 0; }
}

/* Staggered Beam Delays */
.beam-1 { animation-delay: 0s; }
.beam-2 { animation-delay: 0.7s; }
.beam-3 { animation-delay: 1.4s; }
.beam-4 { animation-delay: 2.1s; }
.beam-5 { animation-delay: 2.8s; }
.beam-6 { animation-delay: 3.5s; }

/* RTL Support */
[dir="rtl"] {
  font-family: "Cairo", sans-serif;
  text-align: right;
}

[dir="rtl"] .logo-container,
[dir="rtl"] .nav-links,
[dir="rtl"] .btn {
  flex-direction: row-reverse;
}

/* Language Switcher */
.lang-switcher {
  position: relative;
  display: inline-block;
}

.lang-btn {
  background: var(--bg-gray);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

@media (min-width: 768px) {
  .lang-btn {
    padding: 8px 16px;
    font-size: 14px;
  }
}

.lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  display: none;
  min-width: 180px;
  margin-top: 12px;
  z-index: 1001;
  overflow: hidden;
  padding: 8px 0;
}

[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

.lang-switcher:hover .lang-dropdown {
  display: block;
}

.lang-option {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  transition: var(--transition);
}

.lang-option:hover {
  background: var(--bg-gray);
  color: var(--primary);
}

.lang-option.active {
  color: var(--primary);
  font-weight: 700;
  background: var(--primary-ultra-light);
}
