@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
  --bg-color: #080b12; /* Deep night blue / black */
  --bg-card: #111726;
  --bg-card-hover: #1a2235;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary-color: #10b981; /* Emerald Green */
  --primary-hover: #059669;
  --secondary-color: #3b82f6; /* Blue */
  --secondary-hover: #2563eb;
  --accent-red: #ef4444; /* Live red */
  --border-color: #1e293b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  
  --transition: all 0.3s ease;
  
  --header-height: 70px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  direction: rtl;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

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

ul {
  list-style: none;
}

/* =========================================
   Typography & Utilitaires
========================================= */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.text-red { color: var(--accent-red); }
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

.section-padding { padding: 5rem 0; }
.bg-alt { background-color: #0b0f19; }

/* =========================================
   Buttons
========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  color: #fff;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--text-muted);
  transform: translateY(-2px);
  color: var(--text-main);
}

/* =========================================
   Header & Navigation
========================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(8, 11, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary-color);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* =========================================
   Hero Section
========================================= */
.hero {
  padding: calc(var(--header-height) + 4rem) 0 4rem;
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(8, 11, 18, 0) 70%);
  z-index: -1;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  margin-bottom: 1.5rem;
}

.hero-text p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  position: relative;
  z-index: 2;
}

.floating-badge {
  position: absolute;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 3;
  animation: float 4s ease-in-out infinite;
}

.badge-1 { top: 10%; right: -20px; animation-delay: 0s; }
.badge-2 { bottom: 20%; left: -30px; animation-delay: 2s; }

.live-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent-red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-red);
  animation: pulse 2s infinite;
}

/* =========================================
   Features Cards (Under Hero)
========================================= */
.features-mini {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: -3rem;
  position: relative;
  z-index: 10;
}

.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  background-color: var(--bg-card-hover);
}

.feature-icon {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--primary-color);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-text h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.feature-text p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =========================================
   General Sections & Cards
========================================= */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  display: inline-block;
  position: relative;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: var(--transition);
  height: 100%;
}

.card:hover {
  border-color: var(--secondary-color);
  background-color: var(--bg-card-hover);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}
.card-icon svg {
  width: 30px;
  height: 30px;
}

.content-block p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* =========================================
   Step by Step (Installation)
========================================= */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step-item {
  display: flex;
  gap: 1.5rem;
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.step-number {
  background-color: var(--primary-color);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.step-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.step-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* =========================================
   FAQ Accordion
========================================= */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  transition: var(--transition);
}

.faq-question:hover {
  color: var(--primary-color);
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-muted);
}

.faq-item.active .faq-answer {
  padding-bottom: 1.5rem;
  max-height: 500px;
}

/* =========================================
   Table of Contents
========================================= */
.toc {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 3rem;
}

.toc h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.toc a {
  color: var(--text-muted);
  font-size: 0.95rem;
  display: inline-block;
  position: relative;
  padding-right: 1rem;
}

.toc a::before {
  content: '•';
  position: absolute;
  right: 0;
  color: var(--primary-color);
}

.toc a:hover {
  color: var(--primary-color);
}

/* =========================================
   Breadcrumbs
========================================= */
.breadcrumbs {
  padding: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--primary-color);
}

.breadcrumbs span {
  margin: 0 0.5rem;
}

/* =========================================
   Footer
========================================= */
.footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-about p {
  color: var(--text-muted);
  margin-top: 1rem;
  font-size: 0.95rem;
  max-width: 400px;
}

.footer-links h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
  padding-right: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-disclaimer {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* =========================================
   Animations
========================================= */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Responsive Media Queries
========================================= */
@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-text p {
    margin: 0 auto 2rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .grid-2.reverse {
    direction: rtl;
  }
  .grid-2.reverse > *:nth-child(1) {
    order: 2;
  }
  .grid-2.reverse > *:nth-child(2) {
    order: 1;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-about p {
    margin: 1rem auto;
  }
  .footer-links a:hover {
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-150%);
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  }
  
  .nav-links.active {
    transform: translateY(0);
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .features-mini {
    margin-top: 2rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
