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

:root {
  --primary-color: #0a5640; /* Dark green from logo */
  --secondary-color: #d91e29; /* Red from logo */
  --light-green: #1a7d5a;
  --very-light-green: #e6f4f0;
  --dark-green: #053b2b;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --gray: #888888;
  --dark-gray: #333333;
  --black: #000000;
  --transition-speed: 0.3s;
  --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --vh: 1vh; /* For iOS Safari 100vh fix */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Language Toggle */
.language-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  gap: 5px;
  background-color: var(--white);
  padding: 5px;
  border-radius: 20px;
  box-shadow: var(--box-shadow);
}

.language-toggle button {
  border: none;
  background: none;
  padding: 5px 10px;
  border-radius: 15px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-speed);
}

.language-toggle button.active {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Language Text Display */
.ar-text,
.en-text {
  display: none;
}

body[lang="ar"] .ar-text {
  display: block;
}

body[lang="en"] .en-text {
  display: block;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--light-green));
  color: var(--white);
  padding: 100px 20px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.logo-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 30px;
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 2;
  animation: float 3s ease-in-out infinite;
}

.logo-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  z-index: 1;
  animation: pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.4;
  }
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
}

.header-content h1 {
  font-size: 3.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1s ease-out;
}

.header-content p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
  animation: fadeInUp 1s ease-out 0.3s forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navigation */
nav {
  background-color: var(--white);
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all var(--transition-speed);
}

nav.scrolled {
  padding: 5px 0;
  background-color: rgba(255, 255, 255, 0.95);
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

nav ul li {
  margin: 0;
  position: relative;
}

nav ul li a {
  display: flex;
  align-items: center;
  padding: 20px 15px;
  color: var(--dark-gray);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-speed);
  position: relative;
}

nav ul li a i {
  margin-right: 8px;
  color: var(--primary-color);
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background-color: var(--secondary-color);
  transition: all var(--transition-speed);
  transform: translateX(-50%);
}

nav ul li a:hover {
  color: var(--primary-color);
}

nav ul li a:hover::after {
  width: 80%;
}

nav ul li a.active {
  color: var(--primary-color);
}

nav ul li a.active::after {
  width: 80%;
}

/* Main Content */
main {
  padding: 40px 0;
}

.section {
  padding: 80px 20px;
  scroll-margin-top: 80px;
}

.section:nth-child(even) {
  background-color: var(--very-light-green);
}

.section-content {
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 15px;
}

.section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--secondary-color);
}

/* Animation Containers */
.animation-container {
  position: relative;
  height: 150px;
  margin: 40px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pulse-circle {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: rgba(10, 86, 64, 0.1);
  animation: pulse-grow 2s infinite;
}

.animation-icon {
  font-size: 3rem;
  color: var(--primary-color);
  z-index: 2;
}

@keyframes pulse-grow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.3;
  }
}

.floating-element {
  animation: float 3s ease-in-out infinite;
}

/* Goals Section */
.goals-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.goal-item {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  transition: all var(--transition-speed);
  transform: translateY(0);
}

.goal-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.goal-icon {
  background-color: var(--primary-color);
  color: var(--white);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 20px;
  flex-shrink: 0;
}

.goal-icon i {
  font-size: 1.5rem;
}

.goal-text p {
  margin: 0;
}

/* Services Section */
.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: var(--primary-color);
  transition: all var(--transition-speed);
}

.service-card:hover::before {
  height: 10px;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
  width: 70px;
  height: 70px;
  background-color: var(--very-light-green);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px;
}

.service-icon i {
  font-size: 2rem;
  color: var(--primary-color);
}

.service-card h3 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.service-card ul {
  list-style: none;
  padding: 0;
}

.service-card ul li {
  padding: 8px 0;
  position: relative;
  padding-right: 25px;
}

.service-card ul li::before {
  content: "✓";
  position: absolute;
  right: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

/* Tech Section */
.tech-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.tech-item {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  transition: all var(--transition-speed);
}

.tech-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.tech-icon {
  background-color: var(--very-light-green);
  color: var(--primary-color);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 20px;
  flex-shrink: 0;
}

.tech-icon i {
  font-size: 1.5rem;
}

.tech-details h3 {
  margin-bottom: 5px;
  color: var(--primary-color);
}

.tech-details p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray);
}

/* Comparison Section */
.comparison-container {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

.comparison-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background-color: var(--primary-color);
  color: var(--white);
  font-weight: bold;
  padding: 15px;
}

.comparison-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 15px;
  border-bottom: 1px solid var(--light-gray);
  transition: all var(--transition-speed);
}

.comparison-row:last-child {
  border-bottom: none;
}

.comparison-row:hover {
  background-color: var(--very-light-green);
}

.comparison-traditional {
  color: var(--gray);
}

.comparison-smart {
  color: var(--primary-color);
  font-weight: 600;
}

/* Future Section */
.future-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.future-item {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  text-align: center;
  transition: all var(--transition-speed);
}

.future-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.future-icon {
  width: 80px;
  height: 80px;
  background-color: var(--very-light-green);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px;
}

.future-icon i {
  font-size: 2rem;
  color: var(--primary-color);
}

/* Conclusion Section */
.conclusion-content {
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.8;
}

.cta-container {
  text-align: center;
  margin-top: 40px;
}

.cta-button {
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 15px 40px;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  transition: all var(--transition-speed);
  box-shadow: 0 5px 15px rgba(217, 30, 41, 0.3);
}

.cta-button:hover {
  background-color: #c01824;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(217, 30, 41, 0.4);
}

/* Footer */
footer {
  background-color: var(--dark-green);
  color: var(--white);
  padding: 60px 20px 20px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo-img {
  width: 100px;
  margin-bottom: 15px;
}

.footer-links h3,
.footer-contact h3 {
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h3::after,
.footer-contact h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--secondary-color);
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

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

.footer-links ul li a {
  color: var(--light-gray);
  text-decoration: none;
  transition: all var(--transition-speed);
}

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

.footer-contact p {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.footer-contact p i {
  margin-right: 10px;
  color: var(--secondary-color);
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  transition: all var(--transition-speed);
}

.social-icon:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-content h1 {
    font-size: 2.5rem;
  }

  nav ul li a {
    padding: 15px 10px;
    font-size: 0.9rem;
  }

  .section {
    padding: 60px 20px;
  }

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

  .comparison-header,
  .comparison-row {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .header-content h1 {
    font-size: 2rem;
  }

  nav ul {
    flex-direction: column;
  }

  nav ul li {
    width: 100%;
  }

  nav ul li a {
    justify-content: center;
  }

  .section h2 {
    font-size: 1.8rem;
  }

  .comparison-header,
  .comparison-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .comparison-aspect,
  .comparison-traditional,
  .comparison-smart {
    padding: 5px 0;
  }

  .comparison-aspect {
    font-weight: bold;
    background-color: var(--very-light-green);
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 1s ease-out forwards;
}

.slide-in-left {
  animation: slideInLeft 1s ease-out forwards;
}

.slide-in-right {
  animation: slideInRight 1s ease-out forwards;
}

.zoom-in {
  animation: zoomIn 1s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* RTL Specific Styles */
[dir="rtl"] .goal-icon,
[dir="rtl"] .tech-icon {
  margin-right: 0;
  margin-left: 20px;
}

[dir="rtl"] .service-card ul li {
  padding-right: 0;
  padding-left: 25px;
}

[dir="rtl"] .service-card ul li::before {
  right: auto;
  left: 0;
}

[dir="rtl"] nav ul li a i {
  margin-right: 0;
  margin-left: 8px;
}

[dir="rtl"] .footer-contact p i {
  margin-right: 0;
  margin-left: 10px;
}

/* Add these styles at the end of the file */

/* Mobile Navigation */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--box-shadow);
}

.mobile-menu-toggle i {
  font-size: 1.2rem;
}

/* Enhanced Responsive Design */
@media (max-width: 992px) {
  .section {
    padding: 60px 15px;
  }

  .tech-container,
  .services-container,
  .goals-list,
  .future-container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    height: 100vh; /* Fallback */
    height: calc(var(--vh, 1vh) * 100);
  }

  nav.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    padding: 80px 0 0;
    height: 100%;
    overflow-y: auto;
  }

  nav ul li {
    width: 100%;
  }

  nav ul li a {
    padding: 15px 25px;
    justify-content: flex-start;
    border-bottom: 1px solid var(--light-gray);
    padding: 18px 25px;
  }

  .header-content h1 {
    font-size: 2.2rem;
  }

  .header-content p {
    font-size: 1rem;
  }

  .section h2 {
    font-size: 1.8rem;
  }

  .goal-item,
  .tech-item {
    padding: 15px;
  }

  .goal-icon,
  .tech-icon {
    width: 50px;
    height: 50px;
  }

  .service-card {
    padding: 20px;
  }

  .comparison-header,
  .comparison-row {
    padding: 10px;
  }

  .footer-content {
    gap: 30px;
  }

  .language-toggle button {
    padding: 8px 15px;
  }
}

@media (max-width: 576px) {
  .language-toggle {
    top: 20px;
    left: 20px;
    z-index: 1001;
  }

  header {
    padding: 80px 15px 40px;
  }

  .logo-container {
    width: 120px;
    height: 120px;
  }

  .header-content h1 {
    font-size: 1.8rem;
  }

  .section {
    padding: 50px 15px;
  }

  .section h2 {
    font-size: 1.6rem;
    margin-bottom: 30px;
  }

  .goal-item,
  .tech-item {
    flex-direction: column;
    text-align: center;
  }

  .goal-icon,
  .tech-icon {
    margin: 0 auto 15px;
  }

  .service-icon {
    width: 60px;
    height: 60px;
  }

  .service-card h3 {
    font-size: 1.2rem;
  }

  .cta-button {
    padding: 12px 30px;
    font-size: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-logo {
    align-items: center;
  }

  .footer-links h3::after,
  .footer-contact h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-contact p {
    justify-content: center;
  }

  .social-icons {
    justify-content: center;
  }
}

/* Fix for RTL on mobile */
@media (max-width: 768px) {
  [dir="rtl"] .mobile-menu-toggle {
    right: auto;
    left: 20px;
  }

  [dir="rtl"] nav {
    right: auto;
    left: -100%;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
  }

  [dir="rtl"] nav.active {
    right: auto;
    left: 0;
  }

  [dir="rtl"] .language-toggle {
    left: auto;
    right: 20px;
  }

  [dir="rtl"] .goal-item,
  [dir="rtl"] .tech-item {
    flex-direction: column;
  }

  [dir="rtl"] .goal-icon,
  [dir="rtl"] .tech-icon {
    margin: 0 auto 15px;
  }
}

/* Overlay for mobile menu */
.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.menu-overlay.active {
  display: block;
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
  .service-card,
  .goal-item,
  .tech-item,
  .future-item {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .cta-button {
    padding: 15px 40px;
    min-height: 50px; /* Ensure touch target is large enough */
  }

  .social-icon {
    width: 50px;
    height: 50px;
  }
}

/* Add active state for touch interactions */
.service-card.active,
.goal-item.active,
.tech-item.active,
.future-item.active {
  transform: scale(0.98);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Improve form elements for touch */
input,
button,
select,
textarea {
  font-size: 16px !important; /* Prevents iOS zoom on focus */
}

/* Fix for sticky elements on iOS */
.sticky {
  position: -webkit-sticky;
  position: sticky;
}

/* Comparison Section - Mobile Specific Styles */
@media (max-width: 768px) {
  #comparison {
    background-color: #f5f5f5;
    padding: 40px 0 20px;
  }

  #comparison .section-content {
    padding: 0;
  }

  #comparison h2 {
    margin-bottom: 20px;
    padding: 0 15px;
  }

  /* Hide desktop comparison on mobile */
  .comparison-container {
    display: none;
  }

  /* Simple mobile comparison */
  .simple-comparison {
    display: block;
    margin: 0 15px;
  }

  .comparison-title {
    background-color: #0a5640;
    color: white;
    text-align: center;
    padding: 15px;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 8px 8px 0 0;
    margin-bottom: 5px;
  }

  .comparison-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .comparison-label {
    background-color: #e6f4f0;
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
  }

  .comparison-old {
    background-color: white;
    padding: 15px;
    text-align: center;
    color: #666;
    border-bottom: 1px solid #eee;
  }

  .comparison-old-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #888;
  }

  .comparison-new {
    background-color: white;
    padding: 15px;
    text-align: center;
    color: #0a5640;
    font-weight: 600;
  }

  .comparison-new-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #0a5640;
  }
}

/* Desktop Comparison Styles */
@media (min-width: 769px) {
  .simple-comparison {
    display: none;
  }
}

