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

:root {
  /* Color Palette */
  --primary-color: #6a11cb;
  --secondary-color: #2575fc;
  --accent-color: #ff0844;
  --bg-color-dark: #f8fafc;
  --bg-color-light: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.9);
  
  /* Typography */
  --font-main: 'Tajawal', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  
  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 15px rgba(106, 17, 203, 0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  direction: rtl;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

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

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

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

ul {
  list-style: none;
}

/* Gradients & Text Effects */
.text-gradient {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

/* Glassmorphism */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-panel:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-glow);
}

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

.btn-outline:hover {
  background: var(--secondary-color);
  color: white;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-normal);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.8rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-img {
  height: 55px;
  width: auto;
  border-radius: 4px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 600;
  font-size: 1.1rem;
  position: relative;
  color: #333333;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  right: 0;
  background: var(--secondary-color);
  transition: width var(--transition-normal);
}

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

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333333;
  background: none;
  border: none;
}

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

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  top: -100px;
  right: -200px;
  opacity: 0.15;
  filter: blur(60px);
  z-index: -1;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
  bottom: 100px;
  left: -100px;
  opacity: 0.15;
  filter: blur(50px);
  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.25rem;
  margin-bottom: 2rem;
}

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

/* Image Placeholder / Graphic */
.hero-graphic {
  position: relative;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.floating-element {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  width: 300px;
  height: 300px;
  animation: float 6s ease-in-out infinite;
  box-shadow: var(--shadow-glow);
  position: relative;
}

@keyframes float {
  0% { transform: translateY(0) rotate(0deg); border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  50% { transform: translateY(-20px) rotate(10deg); border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
  100% { transform: translateY(0) rotate(0deg); border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  text-align: center;
  padding: 3rem 2rem;
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

/* Features Section */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.feature-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: rgba(37, 117, 252, 0.1);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--secondary-color);
  font-size: 1.5rem;
}

/* Portfolio Section */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.portfolio-item {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #ffffff;
  padding: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  border: 1px solid var(--border-color);
}

.portfolio-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-glow);
}

.portfolio-img {
  width: 100%;
  height: 350px;
  object-fit: contain;
  display: block;
  background: transparent;
  border-radius: 8px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col ul li a {
  color: var(--text-secondary);
}

.footer-col ul li a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-graphic {
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--bg-color-light);
    flex-direction: column;
    padding: 6rem 2rem;
    transition: var(--transition-normal);
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .mobile-menu-btn {
    display: block;
    z-index: 1001;
  }
  
  .section {
    padding: 3rem 0;
  }
}

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

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

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.5);
  z-index: 9999;
  transition: transform var(--transition-normal), background-color var(--transition-normal), box-shadow var(--transition-normal);
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-3px);
  background-color: #128C7E;
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@media (max-width: 768px) {
  .whatsapp-float {
    width: 55px;
    height: 55px;
    font-size: 1.75rem;
    bottom: 20px;
    right: 20px;
  }
}
