:root {
  --primary: #CE0000;
  --primary-light: #ff4d4d;
  --primary-dark: #a30000;
  --secondary: #333333;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --transition: all 0.3s ease;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: 'Cairo', sans-serif;
  background-color: #fafafa;
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  text-align: right;
}

a {
  text-decoration: none;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
}

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

.container-fluid {
  width: 100%;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 40px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 4px;
  background: var(--primary);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
}

.section-title p {
  font-size: 1.2rem;
  color: var(--gray);
  max-width: 700px;
  margin: 20px auto 0;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
  font-size: 1rem;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

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

.btn-lg {
  padding: 15px 40px;
  font-size: 1.2rem;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

header.scrolled {
  padding: 10px 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

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

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-menu li {
  margin-left: 30px;
}

.nav-menu li a {
  font-weight: 600;
  position: relative;
  padding: 5px 0;
}

.nav-menu li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  background: var(--primary);
  bottom: 0;
  left: 0;
  transition: var(--transition);
}

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

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  background: transparent;
  border: none;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #CE0000 0%, #a30000 100%);
  color: white;
  padding: 180px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') no-repeat center center/cover;
  opacity: 0.1;
}

.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.95;
}

.hero-image {
  flex: 1;
  text-align: center;
  animation: float 6s ease-in-out infinite;
}

.hero-image img {
  max-width: 90%;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.typing-text {
  direction: rtl;
  text-align: right;
  display: inline-block;
  overflow: hidden;
  border-left: 2px solid white;
  white-space: nowrap;
  margin: 0 0 20px;
  padding-left: 6px;
  animation: blink-caret 0.8s step-end infinite;
}

/* Features */
.features {
  background: white;
}

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

.feature-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  padding: 40px 30px;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

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

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.service-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  padding: 30px 20px;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.service-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 20px;
}

/* Stats */
.stats {
  background: linear-gradient(135deg, #CE0000 0%, #a30000 100%);
  color: white;
  text-align: center;
}

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

.stat-item {
  padding: 30px 20px;
}

.stat-item .number {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1;
}

.stat-item .label {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Testimonials */
.testimonials {
  background: white;
}

.testimonial-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.testimonial-card {
  background: white;
  border-radius: 15px;
  box-shadow: var(--shadow);
  padding: 40px;
  text-align: center;
  margin: 0 20px;
}

.testimonial-text {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 30px;
  position: relative;
}

.testimonial-text::before,
.testimonial-text::after {
  content: '"';
  font-size: 4rem;
  color: rgba(206, 0, 0, 0.1);
  position: absolute;
  line-height: 1;
}

.testimonial-text::before {
  top: -20px;
  left: 10px;
}

.testimonial-text::after {
  bottom: -50px;
  right: 10px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  margin-left: 15px;
  border: 3px solid var(--primary);
}

.author-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info h4 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.author-info p {
  color: var(--gray);
}

/* CTA */
.cta {
  background: linear-gradient(135deg, #333333 0%, #111111 100%);
  color: white;
  text-align: center;
  padding: 100px 0;
}

.cta h2 {
  font-size: 2.8rem;
  margin-bottom: 20px;
}

.cta p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 40px;
  opacity: 0.9;
}

/* Footer */
footer {
  background: #111111;
  color: white;
  padding: 80px 0 30px;
}

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

.footer-col h3 {
  font-size: 1.5rem;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 3px;
  background: var(--primary);
  bottom: 0;
  right: 0;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 15px;
}

.footer-links li a {
  color: #aaa;
  transition: var(--transition);
}

.footer-links li a:hover {
  color: white;
  padding-right: 5px;
}

.social-links {
  display: flex;
  margin-top: 20px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-5px);
}

.copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaa;
  font-size: 0.9rem;
}

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

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: white; }
}

/* Responsive */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    margin-bottom: 50px;
  }

  .hero-text h1 {
    font-size: 2.8rem;
  }

  .section-title h2 {
    font-size: 2.2rem;
  }

  .hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    right: -100%;
    flex-direction: column;
    background: white;
    width: 80%;
    height: calc(100vh - 80px);
    padding: 40px 20px;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu li {
    margin: 0 0 20px 0;
  }

  .hero {
    padding: 150px 0 80px;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .section {
    padding: 60px 0;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .cta h2 {
    font-size: 2.2rem;
  }
}