/* ===== Reset ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6c63ff;
  --primary-dark: #5a52d5;
  --primary-glow: rgba(108, 99, 255, 0.3);
  --primary-light: rgba(108, 99, 255, 0.1);
  --bg: #0f0f1a;
  --bg-card: #1a1a2e;
  --text: #eaeaea;
  --text-muted: #a0a0b8;
  --border: #2a2a40;
  --glass-bg: rgba(26, 26, 46, 0.6);
  --glass-border: rgba(108, 99, 255, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --radius: 16px;
  --radius-sm: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-bg: rgba(15, 15, 26, 0.85);
  --nav-mobile-bg: rgba(15, 15, 26, 0.98);
}

[data-theme="light"] {
  --primary: #6c63ff;
  --primary-dark: #5a52d5;
  --primary-glow: rgba(108, 99, 255, 0.15);
  --primary-light: rgba(108, 99, 255, 0.08);
  --bg: #f4f6f9;
  --bg-card: #ffffff;
  --text: #1e1e2d;
  --text-muted: #5e6278;
  --border: #e4e6ef;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(108, 99, 255, 0.12);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  --header-bg: rgba(244, 246, 249, 0.85);
  --nav-mobile-bg: rgba(244, 246, 249, 0.98);
}

html {
  scroll-behavior: smooth;
  direction: rtl;
}

body {
  font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .btn, .stat-number {
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 55px;
}

/* ===== Glass Card ===== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.glass-card:hover {
  border-color: rgba(108, 99, 255, 0.25);
  transform: translateY(-6px);
  box-shadow: 0 12px 48px rgba(108, 99, 255, 0.12);
}

/* ===== Scroll Reveal ===== */
.reveal-hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== Header ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 70px;
}

nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

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

.nav-links a.active::after,
.nav-links a:hover::after {
  width: 100%;
}

.lang-switch {
  background: var(--primary-light);
  border: 1px solid rgba(108, 99, 255, 0.2);
  color: var(--primary) !important;
  padding: 2px 12px !important;
  border-radius: 6px;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  transition: all var(--transition) !important;
}

.lang-switch::after { display: none !important; }

.lang-switch:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

.theme-switch {
  background: var(--primary-light);
  border: 1px solid rgba(108, 99, 255, 0.2);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.theme-switch:hover {
  background: var(--primary);
  color: #fff;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--text);
  border-radius: 4px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #8b7aff);
  color: #fff;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--primary-glow);
}

.btn-lg {
  padding: 18px 48px;
  font-size: 1.15rem;
}

/* ===== Ripple ===== */
.ripple-btn {
  overflow: hidden;
  position: relative;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 70px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1;
  max-width: 640px;
}

.hero-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(108, 99, 255, 0.15);
}

.hero-text h1 {
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), #e040fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.trust-bar span {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-image {
  flex-shrink: 0;
}

.avatar-wrapper {
  width: 340px;
  height: 340px;
  background: linear-gradient(135deg, var(--primary), #e040fb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 80px var(--primary-glow);
  animation: float 5s ease-in-out infinite;
  overflow: hidden;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transform: scale(1.12);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

/* ===== Statistics ===== */
.stats {
  padding: 60px 0;
  background: var(--bg-card);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.stat-card {
  text-align: center;
  padding: 24px 16px;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), #e040fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1.2;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 4px;
  display: block;
}

/* ===== Services ===== */
.services {
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  padding: 32px 24px;
  text-align: center;
}

.service-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  background: var(--primary-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--primary);
  transition: var(--transition);
}

.service-card:hover .service-icon {
  background: var(--primary);
  color: #fff;
  transform: scale(1.08);
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.service-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}

.service-link:hover {
  gap: 10px;
}

/* ===== Why Choose Me ===== */
.why {
  background: var(--bg-card);
}

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

.why-card {
  padding: 28px 24px;
  text-align: center;
}

.why-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  color: var(--primary);
}

.why-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.why-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Target Users ===== */
.target-users {
  background: var(--bg);
}

.target-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.target-card {
  text-align: center;
  padding: 44px 32px;
}

.target-icon {
  font-size: 3.6rem;
  margin-bottom: 16px;
}

.target-card h3 {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.target-card p {
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Projects ===== */
.projects {
  background: var(--bg-card);
}

.projects-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-family: "Tajawal", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

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

.project-card {
  overflow: hidden;
  transition: all var(--transition);
}

.project-card.hide {
  display: none;
}

.project-img {
  height: 200px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  color: var(--primary);
}

.project-info {
  padding: 22px;
}

.project-info h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.project-info p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-tags span {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ===== Workflow Timeline ===== */
.workflow {
  background: var(--bg);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  right: 35px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary), #e040fb, transparent);
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  padding: 20px 0;
  position: relative;
}

.step-number {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8b7aff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 24px var(--primary-glow);
}

.step-content {
  flex: 1;
  padding-top: 14px;
}

.step-content h4 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

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

/* ===== FAQ ===== */
.faq {
  background: var(--bg-card);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: "Cairo", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition);
  text-align: right;
}

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

.faq-question i {
  transition: transform var(--transition);
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  padding: 0 22px 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== CTA ===== */
.cta {
  background: linear-gradient(135deg, var(--bg), #15152a);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -30%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-content p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 540px;
  margin: 0 auto 36px;
}

/* ===== Contact ===== */
.contact {
  background: var(--bg);
}

.contact-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 50px;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px 20px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.contact-form button {
  align-self: flex-start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.contact-item i {
  width: 22px;
  color: var(--primary);
  font-size: 1.1rem;
}

.contact-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* ===== WhatsApp Float ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all var(--transition);
  animation: pulse 2s ease-in-out infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.55);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 40px rgba(37, 211, 102, 0.6); }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1e8e3e;
  color: #fff;
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 9999;
  font-size: 0.95rem;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 30px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }
  .hero-text h1 {
    font-size: 2.6rem;
  }
  .hero-desc {
    margin: 0 auto 30px;
  }
  .hero-btns { justify-content: center; }
  .trust-bar { justify-content: center; }
  .avatar-wrapper {
    width: 240px;
    height: 240px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .stat-number { font-size: 2.2rem; }
  .target-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }
  .contact-content {
    grid-template-columns: 1fr;
  }
  .contact-form button { align-self: center; }
  .contact-info { align-items: center; }
  .timeline::before { right: 27px; }
  .step-number {
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
  }
  .section-title { font-size: 2rem; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--nav-mobile-bg);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    padding: 36px 0;
    gap: 28px;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.45s ease;
  }
  .nav-links.open {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  .hamburger { display: flex; }
  .hero-text h1 { font-size: 2rem; }
  .hero-desc { font-size: 1rem; }
  .section-title { font-size: 1.7rem; }
  .btn-lg {
    padding: 14px 36px;
    font-size: 1rem;
  }
  .cta-content h2 { font-size: 1.9rem; }
  .projects-filter {
    gap: 8px;
  }
  .filter-btn {
    font-size: 0.78rem;
    padding: 6px 14px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .timeline-step {
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.7rem; }
  .avatar-wrapper {
    width: 180px;
    height: 180px;
  }
  .trust-bar span { font-size: 0.75rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-number { font-size: 1.8rem; }
  section { padding: 60px 0; }
  .services-grid {
    grid-template-columns: 1fr;
  }
}
