:root {
  --primary-color: #1b2631; /* Deep Navy/Dark Grey */
  --primary-light: #2c3e50;
  --accent-color: #d4af37; /* Metallic Gold */
  --accent-hover: #b5952f;
  --secondary-bg: #ecf0f1; /* Silver/Light Grey */
  --text-color: #333333;
  --text-light: #7f8c8d;
  --white: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", sans-serif; /* Default for Arabic */
  background-color: var(--white);
  color: var(--text-color);
  line-height: 1.8;
  overflow-x: hidden;
}

/* Scroll Reveal Animation Classes */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

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

/* English Font Override */
[lang="en"] body {
  font-family: "Roboto", sans-serif;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Layout Utilities */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.divider {
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  margin: 0 auto;
  border-radius: 2px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

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

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

/* Header */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  height: 80px;
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo img {
  height: 50px; /* Slightly smaller to balance with text */
  width: auto;
}

.logo-text-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-main {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.1;
}

.logo-sub {
  font-size: 1rem;
  font-weight: bold;
  color: var(--accent-color); /* Gold color for subtitle */
  line-height: 1.2;
  margin-top: 4px;
}

.nav-list {
  display: flex;
  gap: 30px;
}

.nav-list li a {
  font-weight: 600;
  color: var(--primary-color);
  position: relative;
}

.nav-list li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0; /* LTR default, will be flipped by logical props if supported or direction */
  right: 0;
  margin: auto;
  background-color: var(--accent-color);
  transition: var(--transition);
}

.nav-list li a:hover {
  color: var(--accent-color);
}

.nav-list li a:hover::after {
  width: 100%;
}

.lang-mobile {
  display: none;
}

.desktop-lang {
  display: block;
}

.lang-switch button {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.lang-switch button:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.mobile-menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
}

/* Hero Section */
.hero {
  height: 100vh;
  background: linear-gradient(
      135deg,
      rgba(27, 38, 49, 0.95) 0%,
      rgba(27, 38, 49, 0.7) 100%
    ),
    url("https://images.unsplash.com/photo-1504917595217-d4dc5ebe6122?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80"); /* Placeholder Industrial Image */
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Parallax effect */
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--white);
  margin-top: 0; /* Reset if needed */
  padding-top: 80px; /* Account for fixed header */
}

.hero-content {
  max-width: 800px;
}

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

.hero p {
  font-size: 1.5rem;
  margin-bottom: 40px;
  opacity: 0.9;
}

/* About Section */
.about {
  background-color: var(--white);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 30px;
  font-size: 1.1rem;
}

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

.feature-item {
  text-align: center;
  padding: 20px;
  background-color: var(--secondary-bg);
  border-radius: 8px;
  transition: var(--transition);
}

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

.feature-item i {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 10px;
}

.feature-item span {
  display: block;
  font-weight: 600;
  color: var(--primary-color);
}

/* Services Section */
.services {
  background-color: var(--secondary-bg);
}

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

.service-card {
  background-color: var(--white);
  padding: 40px 30px;
  border-radius: 8px;
  text-align: center;
  transition: var(--transition);
  border-bottom: 4px solid transparent;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border-bottom-color: var(--accent-color);
}

.icon-box {
  width: 80px;
  height: 80px;
  background-color: rgba(212, 175, 55, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
}

.icon-box i {
  font-size: 2.5rem;
  color: var(--accent-color);
}

.service-card h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.service-card p {
  color: var(--text-light);
}

/* Why Us Section */
.why-us {
  background-color: var(--primary-color);
  color: var(--white);
}

.why-us .section-header h2 {
  color: var(--white);
}

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

.why-card {
  text-align: center;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: var(--transition);
}

.why-card:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.why-card i {
  font-size: 3rem;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.why-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.why-card p {
  opacity: 0.8;
}

/* Contact Section */
.contact {
  background-color: var(--white);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch; /* Ensure both columns are same height */
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: flex-start; /* Align to top so it doesn't float in middle if map is taller */
  height: 100%;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background-color: var(--white);
  padding: 25px;
  border-radius: 12px;
  transition: var(--transition);
  border: 1px solid #eee;
  box-shadow: var(--shadow);
}

.contact-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-color);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  border-radius: 12px; /* Soft square instead of circle */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.contact-item:hover .contact-icon {
  background-color: var(--accent-color);
}

.contact-icon i {
  font-size: 1.4rem;
  color: var(--white); /* White icon on dark bg */
}

.contact-details {
  flex: 1;
}

.contact-details h4 {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-details p,
.contact-details a:not(.phone-link) {
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 700;
}

.phone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.phone-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 15px;
  background-color: var(--secondary-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color) !important;
  transition: var(--transition);
}

.phone-link i {
  font-size: 0.9rem;
  color: var(--accent-color);
  transition: var(--transition);
}

.phone-link:hover {
  background-color: var(--primary-color);
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.phone-link:hover i {
  color: var(--white);
}

.map-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 100%;
  min-height: 500px; /* Ensure it's tall enough even if contact info is short */
}

.map-container iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* Footer (optimized) */
.footer {
  background-color: #0f1619;
  color: #e6eef2;
  padding: 40px 0 18px;
  text-align: right; /* Default RTL */
}

[dir="ltr"] .footer {
  text-align: left;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
  align-items: start;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.footer-logo img {
  height: 44px;
  margin: 0;
}
.footer-logo .logo-text-container {
  display: flex;
  flex-direction: column;
}
.footer-logo .logo-main {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.05;
}
.footer-logo .logo-sub {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-top: 4px;
}

.footer-desc {
  opacity: 0.85;
  line-height: 1.6;
  font-size: 0.98rem;
  max-width: 42ch;
}

.footer-col h4 {
  color: var(--accent-color);
  font-size: 1.05rem;
  margin-bottom: 14px;
  position: relative;
  padding-bottom: 8px;
}
.footer-col h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0; /* RTL */
  width: 36px;
  height: 2px;
  background-color: var(--accent-color);
}

.footer-highlights .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  font-size: 0.88rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  transition: var(--transition);
}

.badge:hover {
  background: var(--accent-color);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-footer {
  padding: 8px 14px;
  background: var(--accent-color);
  color: var(--white);
  border-radius: 6px;
  font-weight: 700;
  transition: var(--transition);
}

.btn-footer:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.link-top {
  color: #9fb3c8;
  transition: var(--transition);
}
.link-top:hover {
  color: var(--white);
}

[dir="ltr"] .footer-col h4::after {
  right: auto;
  left: 0;
}

.footer-links ul li {
  margin-bottom: 10px;
}
.footer-links ul li a {
  opacity: 0.88;
  transition: var(--transition);
  display: inline-block;
}

[dir="rtl"] .footer-links ul li a:hover {
  opacity: 1;
  color: var(--accent-color);
  transform: translateX(-4px);
}
[dir="ltr"] .footer-links ul li a:hover {
  transform: translateX(4px);
}

.footer-contact ul li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  opacity: 0.9;
}
.footer-contact ul li i {
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  margin: 0 5px;
  transition: var(--transition);
  color: var(--white);
}

.social-links a:hover {
  background-color: var(--accent-color);
  color: var(--white);
  transform: translateY(-3px);
}

.copyright {
  opacity: 0.65;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .about-content,
  .contact-wrapper {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav.open {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }

  .nav.open {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    gap: 20px;
  }

  .lang-mobile {
    display: block;
  }

  .desktop-lang {
    display: none;
  }

  .lang-mobile .lang-switch {
    width: 100%;
    text-align: center;
  }

  .lang-mobile .lang-switch button {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }

  .mobile-menu-toggle {
    display: block;
  }

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

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

  .logo-main {
    font-size: 0.9rem;
  }

  .logo-sub {
    font-size: 0.7rem;
  }
}

/* RTL Specific Adjustments */
/* Most layout is handled by Flexbox/Grid which respects 'dir', but some margins need flipping if not using logical properties everywhere */

[dir="rtl"] .contact-item {
  text-align: right;
}

[dir="ltr"] .contact-item {
  text-align: left;
}

/* Logical Properties for Margins/Paddings (Modern Browser Support) */
.contact-item {
  margin-inline-start: 0;
}
