
/* =========== CSS Variables =========== */
:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #60a5fa;
  --text-color: #1f2937;
  --light-bg: #f3f4f6;
  --dark-bg: #111827;
  --white: #ffffff;
  --gray: #9ca3af;
}

/* =========== General Styles =========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

body.ltr {
  direction: ltr;
}

/* =========== Header =========== */
header {
  background-color: var(--white);
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo img {
  height: 60px;
  margin-left: 10px;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 1.5rem;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.language-selector {
  display: flex;
  align-items: center;
  color: var(--text-color);
}

.language-selector select {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--gray);
  padding: 0.3rem;
  border-radius: 4px;
  margin-right: 0.5rem;
  cursor: pointer;
}

.language-selector select option {
  background-color: var(--white);
  color: var(--text-color);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* =========== Hero Section =========== */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  padding: 8rem 2rem 6rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  background-color: var(--white);
  color: var(--primary-color);
  padding: 0.8rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.3s, box-shadow 0.3s;
  margin: 0 0.5rem;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.secondary-cta {
  background-color: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

/* =========== Section Common Styles =========== */
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2rem;
  color: var(--primary-color);
}

.section-subtitle {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.8;
}

/* =========== Services Section =========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-icon {
  background-color: var(--light-bg);
  padding: 2rem;
  text-align: center;
  font-size: 2rem;
  color: var(--primary-color);
}

.service-content {
  padding: 2rem;
}

.service-content h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* =========== Projects Section =========== */
.projects {
  background-color: var(--light-bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.project-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.project-content {
  padding: 2rem;
}

.project-content h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.project-tag {
  background-color: var(--light-bg);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-left: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-color);
}

/* =========== Technologies Section =========== */
.technologies {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 120px;
  transition: transform 0.3s;
}

.tech-item:hover {
  transform: translateY(-5px);
}

.tech-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light-bg);
  border-radius: 50%;
  color: var(--primary-color);
  font-size: 1.5rem;
}

/* =========== Vision Section =========== */
.vision {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  padding: 5rem 2rem;
  text-align: center;
}

.vision-content {
  max-width: 800px;
  margin: 0 auto;
}

.vision h2 {
  margin-bottom: 2rem;
  font-size: 2rem;
}

/* =========== Contact Section =========== */
#contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-family: inherit;
}

#contact-form textarea {
  min-height: 150px;
}

#contact-form button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.3s;
}

#contact-form button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
}

/* =========== Footer =========== */
footer {
  background-color: var(--dark-bg);
  color: var(--white);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content .logo {
  margin: 0 auto;
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.footer-links a {
  color: var(--accent-color);
  margin: 0 1rem;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--white);
}

.social-icons {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.5rem;
  color: var(--white);
  text-decoration: none;
  transition: background-color 0.3s, transform 0.3s;
}

.social-icon:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

/* =========== Responsive Design =========== */
@media (max-width: 768px) {
  .mobile-menu-btn {
      display: block;
  }

  .nav-links {
      position: fixed;
      right: -100%;
      top: 70px;
      flex-direction: column;
      background-color: var(--white);
      width: 100%;
      text-align: center;
      transition: 0.3s;
      box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
      padding: 1rem 0;
  }

  .nav-links.active {
      right: 0;
  }

  .nav-links li {
      margin: 1rem 0;
  }

  .hero h1 {
      font-size: 2rem;
  }

  .hero p {
      font-size: 1rem;
  }

  .projects-grid {
      grid-template-columns: 1fr;
  }
  
  .form-row {
      grid-template-columns: 1fr;
  }
}

/* =========== Language-specific Overrides =========== */
.ltr .nav-links li {
  margin-left: 0;
  margin-right: 1.5rem;
}

.ltr .language-selector select {
  margin-left: 0;
  margin-right: 0.5rem;
}

.ltr .project-tag {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* Arabic Font */
[lang="ar"] .logo, 
[lang="ar"] .hero h1, 
[lang="ar"] .section-title, 
[lang="ar"] .service-content h3, 
[lang="ar"] .project-content h3, 
[lang="ar"] .vision h2 {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Portuguese Font */
[lang="pt"] .logo, 
[lang="pt"] .hero h1, 
[lang="pt"] .section-title, 
[lang="pt"] .service-content h3, 
[lang="pt"] .project-content h3, 
[lang="pt"] .vision h2 {
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* =========== Animations =========== */
@keyframes fadeIn {
  from {
      opacity: 0;
  }
  to {
      opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 1s ease-in-out;
}

@keyframes slideInFromBottom {
  from {
      transform: translateY(50px);
      opacity: 0;
  }
  to {
      transform: translateY(0);
      opacity: 1;
  }
}

.slide-in {
  animation: slideInFromBottom 0.5s ease-out;
}