/* ===== CSS Variables ===== */
:root {
  --main-color: #00afef;
  --second-color: #003399;
  --third-color: #333333;
  --light-bg: #f6f6f6;
  --text-dark: #000000;
  --text-light: #777;
  --font-family: "Work Sans", Arial, sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 2, 0.6, 1);
  --border-radius: 8px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  --box-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
}

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

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  background: #fff;
  color: var(--text-dark);
  font-family: var(--font-family);
  font-size: 16px;
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}

a,
a:focus,
a:active {
  text-decoration: none;
}

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

/* ===== Header ===== */
.header {
  background: #fff;
  padding: 12px 0 0 0;
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}

.header.scrolled {
  background: #f7f7f7;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.09);
}

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

.logo {
  width: 130px;
}

/* ===== Navigation ===== */
.links {
  position: relative;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  height: 24px;
}

.menu-toggle .bar {
  background: var(--third-color);
  height: 3px;
  margin: 4px 0;
  border-radius: 2px;
  width: 25px;
  display: block;
  transition: all 0.3s ease;
}

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

.nav-menu li a {
  color: var(--third-color);
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: color var(--transition);
}

.nav-menu li a::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--main-color);
  transition: width var(--transition);
}

.nav-menu li a:hover,
.nav-menu li a:focus {
  /* تم تضمين :focus هنا للحفاظ على السلوك المطلوب */
  color: var(--main-color);
}

.nav-menu li a:hover::before,
.nav-menu li a:focus::before {
  /* تم تضمين :focus هنا للحفاظ على السلوك المطلوب */
  width: 100%;
}

/* ===== Mobile Navigation ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 60px;
    right: 0;
    flex-direction: column;
    width: 200px;
    background: var(--light-bg);
    box-shadow: var(--box-shadow-hover);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    display: none;
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 1001;
  }

  .nav-menu.open {
    display: flex;
    transform: translateX(0);
  }

  .nav-menu li {
    border-bottom: 1px solid #eee;
  }

  .nav-menu li:last-child {
    border: none;
  }

  .nav-menu li a {
    padding: 15px;
    display: block;
  }
}

/* ===== Landing Section ===== */
.landing {
  min-height: 60vh;
  background: linear-gradient(90deg, #e3f2fd 0%, #fff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.landing .intro-text {
  background: rgba(255, 255, 255, 0.94);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 90%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}

.landing.loaded .intro-text {
  opacity: 1;
  transform: translateY(0);
}

.landing h1 {
  color: var(--main-color);
  font-size: 2rem;
  margin-bottom: 12px;
}

.landing p {
  color: var(--text-dark);
  font-size: 1.08rem;
}
    /* Map Section */
    .map-section {
      padding: 6rem 0;
      background: var(--background-light);
    }

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

    .map-header {
      text-align: center;
      margin-bottom: 3rem;
    }

    .map-header h2 {
      font-family: 'Work Sans', sans-serif;
      font-size: clamp(2rem, 4vw, 2.5rem);
      font-weight: 600;
      color: var(--second-color);
      margin-bottom: 1rem;
    }

    .map-header p {
      font-size: 1.1rem;
      color: var(--text-light);
      max-width: 600px;
      margin: 0 auto;
    }

    .map-wrapper {
      position: relative;
      margin-bottom: 2rem;
      box-shadow: var(--shadow-light);
    }

    .map-wrapper iframe {
      width: 100%;
      height: 450px;
      border: none;
      display: block;
    }

    .map-actions {
      text-align: center;
    }

    .map-actions .btn {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 1rem 2rem;
      background: #cbcbcb;
      color: #000000;
      text-decoration: none;
      font-weight: 500;
      font-size: 0.9rem;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      transition: var(--transition);
    }

    .map-actions .btn:hover {
      background: var(--secondary-color);
      transform: translateY(-2px);
    }

/* ===== Section Headings ===== */
.special-heading {
  text-align: center;
  font-size: 2.3rem;
  color: var(--second-color);
  margin: 0 0 10px 0;
  font-weight: 800;
  letter-spacing: -1px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
}

.special-heading.visible {
  opacity: 1;
  transform: translateY(0);
}

.special-heading + p {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  margin-top: -16px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
}

.special-heading.visible + p {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Features Section ===== */
.features {
  background: var(--light-bg);
  padding: 60px 0;
}

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

.feat {
  background: #fff;
  border-radius: var(--border-radius);
  text-align: center;
  padding: 20px 12px;
  box-shadow: var(--box-shadow);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s 0.1s, transform 0.5s 0.1s, box-shadow 0.3s;
}

.feat.visible {
  opacity: 1;
  transform: translateY(0);
}

.feat:hover {
  box-shadow: var(--box-shadow-hover);
}

.feat i {
  font-size: 2rem;
  color: var(--second-color);
  margin-bottom: 10px;
  transition: transform 0.3s;
}

.feat:hover i,
.feat:focus i {
  /* تم تضمين :focus هنا للحفاظ على السلوك المطلوب */
  transform: scale(1.1);
}

.feat h2 {
  margin: 18px 0 7px 0;
  font-size: 1.2rem;
}

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

/* ===== Services Section ===== */
.services {
  padding: 60px 0;
}

.services-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 40px;
  justify-content: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .services-content {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

.service-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  padding: 32px 24px;
  min-width: 220px;
  max-width: 100%;
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.3s, box-shadow 0.3s;
  justify-content: center;
}

.service-box:hover,
.service-box:focus-within {
  transform: translateY(-7px) scale(1.03);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.11);
}

.srv {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
}

.srv.visible {
  opacity: 1;
  transform: translateY(0);
}

.srv i {
  color: var(--main-color);
  font-size: 2.2rem;
  min-width: 40px;
  transition: color 0.3s, transform 0.3s;
}

.srv h3 {
  margin: 0 0 8px 0;
  color: var(--second-color);
  font-size: 1.2rem;
  font-weight: 700;
}

.srv p {
  color: #555;
  font-size: 1rem;
  margin: 0;
}

/* ===== Projects Portfolio ===== */
.projects-modern {
  padding: 60px 0;
}

.projects-modern-container {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: flex-end;
  margin: 60px auto 0 auto;
  max-width: 1200px;
  flex-wrap: wrap;
}

.project-modern {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.09);
  width: 320px;
  min-width: 220px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s var(--transition), box-shadow 0.4s;
  opacity: 0;
  transform: translateY(60px) scale(0.97);
}

.project-modern.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.project-modern:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.project-modern-img {
  width: 100%;
  height: 280px;
  overflow: hidden;
  position: relative;
}

.project-modern-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--transition);
  opacity: 0;
  transform: scale(0.97);
}

.project-modern.visible .project-modern-img img {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.7s, transform 0.7s;
}

.project-modern:hover .project-modern-img img,
.project-modern:focus-within .project-modern-img img {
  /* تم تضمين :focus-within هنا للحفاظ على السلوك المطلوب */
  transform: scale(1.04);
}

.project-modern-info {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 24px 20px 18px 20px;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.55) 60%,
    rgba(0, 0, 0, 0) 100%
  );
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.project-modern-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.project-modern-icon {
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  background: rgba(0, 0, 0, 0.18);
  transition: background 0.3s, color 0.3s;
}

.project-modern:hover .project-modern-icon,
.project-modern:focus-within .project-modern-icon {
  /* تم تضمين :focus-within هنا للحفاظ على السلوك المطلوب */
  background: var(--main-color);
  color: #fff;
  border-color: var(--main-color);
}

/* ===== About Us Section ===== */
.about-us {
  padding: 80px 0;
  background: var(--light-bg);
}

.about-us .container {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.about-image {
  flex: 1;
}

.about-image img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
}

.about-content {
  flex: 1;
}

.about-content h2 {
  font-size: 2rem;
  color: var(--second-color);
  margin-bottom: 20px;
}

.about-content p {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
}

/* ===== Contact Section ===== */
#contact {
  padding: 60px 0;
  background: var(--light-bg);
}

#contact .container {
  max-width: 900px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  gap: 40px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.contact-info .service-box {
  flex: 1 1 320px;
  min-width: 260px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  padding: 24px 20px;
  margin-bottom: 0;
}

.big-heading {
  font-size: 1.8rem;
  color: var(--second-color);
  margin-bottom: 18px;
  font-weight: 700;
  text-align: left;
}

.branch {
  margin-bottom: 20px;
}

.branch h4 {
  color: var(--main-color);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.branch p {
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== Contact Form ===== */
#contact-form {
  background: #fff;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin: 0 auto;
  max-width: 600px;
}

#contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e7e7e7;
  border-radius: 5px;
  font-size: 1rem;
  margin-bottom: 15px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#contact-form input:focus,
#contact-form textarea:focus {
  outline: none; /* يتم إزالة الـ outline الافتراضي هنا */
  border-color: var(--main-color);
  box-shadow: 0 0 0 3px rgba(0, 175, 239, 0.1); /* يتم إضافة ظل بدلاً من outline للحفاظ على مؤشر التركيز */
}

#contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

#contact-form button {
  background: var(--main-color);
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  margin-top: 8px;
}

#contact-form button:hover,
#contact-form button:focus {
  background: var(--second-color);
  transform: translateY(-2px);
}

/* ===== Social Icons ===== */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.social-icons a {
  font-size: 1.5rem;
  color: #222;
  transition: transform 0.3s, color 0.3s;
}

.social-icons a:hover,
.social-icons a:focus {
  transform: scale(1.2);
  color: var(--main-color);
}

/* ===== Social Bar Fixed ===== */
.social-bar-simple {
  background: #fff;
  padding: 13px 7px;
  border-radius: 5px;
  position: fixed;
  top: 50%;
  left: 1px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
  box-shadow: var(--box-shadow);
}

.social-bar-simple a {
  color: #222;
  margin-bottom: 10px;
  font-size: 1.5em;
  text-decoration: none;
  transition: color var(--transition), transform var(--transition);
}

.social-bar-simple a:last-child {
  margin-bottom: 0;
}

.social-bar-simple a:hover,
.social-bar-simple a:focus {
  color: var(--main-color);
  transform: scale(1.12);
}

/* ===== Footer ===== */
.footer {
  background: #fff;
  padding: 24px 0 8px 0;
  text-align: center;
  color: var(--second-color);
  font-size: 1rem;
  margin-top: 20px;
  border-top: 1px solid #f2f2f2;
}

/* ===== Loader Overlay ===== */
#loader-overlay {
  position: fixed;
  z-index: 99999;
  background: #fff;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s;
}

#loader-overlay .loader-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#loader-overlay img {
  width: 80px;
  margin-bottom: 18px;
  animation: pop 1.2s infinite alternate;
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.08);
  }
}

.loader-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid var(--main-color);
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: block;
}

@keyframes spin {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}

#loader-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

/* ===== Scroll To Top Button ===== */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--main-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--box-shadow);
  transition: background 0.3s, transform 0.3s;
  z-index: 1000;
}

.scroll-to-top:hover,
.scroll-to-top:focus {
  background: var(--second-color);
  transform: translateY(-3px);
}

/* ===== Utility Classes ===== */
.visible {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

.hidden {
  opacity: 0 !important;
  transform: translateY(30px) scale(0.97) !important;
}

/* ===== Success Message ===== */
.form-success,
#success-msg {
  margin-top: 20px;
  font-size: 1rem;
  color: green;
  opacity: 0;
  transition: opacity 0.4s;
  text-align: center;
  display: block;
}

.form-success.visible,
#success-msg.visible {
  opacity: 1;
}

/* ===== Project Images ===== */
.main-project-img,
.vision-hero-img img,
.vision-img img,
.section-img {
  width: 100%;
  max-width: 800px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: var(--box-shadow);
  display: block;
  transition: transform 0.4s, box-shadow 0.3s, opacity 0.6s;
  opacity: 0;
  transform: translateY(30px) scale(0.97);
}

.main-project-img.visible,
.vision-hero-img img.visible,
.vision-img img.visible,
.section-img.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.main-project-img:hover,
.vision-hero-img img:hover,
.vision-img img:hover,
.section-img:hover {
  transform: scale(1.02);
  box-shadow: var(--box-shadow-hover);
  cursor: pointer;
}

/* ===== Responsive Design ===== */
@media (max-width: 1100px) {
  .projects-modern-container {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .project-modern {
    width: 92vw;
    max-width: 400px;
  }

  .project-modern-img {
    height: 200px;
  }
}

@media (max-width: 900px) {
  .contact-info {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
    max-width: 100%;
  }

  .about-us .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 700px) {
  .social-bar-simple {
    left: 4px;
    padding: 7px 4px;
  }

  .social-bar-simple a {
    font-size: 1.18em;
    margin-bottom: 7px;
  }

  .special-heading {
    font-size: 1.8rem;
  }

  .landing h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 10px;
    max-width: 100vw;
  }

  .features .container,
  .services-content,
  .projects-modern-container,
  .about-us .container,
  .contact-info {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    display: flex;
  }

  .service-box,
  .project-modern,
  .about-image,
  .about-content {
    max-width: 100%;
    width: 100%;
  }

  .project-modern-img {
    height: 140px;
  }

  .special-heading {
    font-size: 1.5rem;
  }

  .footer {
    font-size: 0.9rem;
  }

  #contact-form {
    padding: 20px;
    max-width: 95vw;
  }

  .social-bar-simple {
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    flex-direction: row;
    padding: 8px 12px;
    border-radius: 12px 12px 0 0;
  }

  .social-bar-simple a {
    font-size: 1.1em;
    margin-bottom: 0;
    margin-right: 12px;
  }

  .social-bar-simple a:last-child {
    margin-right: 0;
  }
}

/* ===== Performance Optimizations ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Focus Indicators ===== */
/* هذا الكود سيزيل مؤشر التركيز تمامًا من جميع العناصر.
   لا ينصح به بشكل عام لأسباب إمكانية الوصول،
   ولكنه الحل إذا كنت ترغب في إزالته بالكامل. */
*:focus {
  outline: none !important; /* هذا السطر هو الأهم: يزيل الـ outline تمامًا */
  box-shadow: none !important; /* لضمان عدم وجود أي ظل بديل إذا كان موجودًا */
  border-color: initial !important; /* لإعادة لون الحدود الأصلية إذا كان قد تغير */
}

/* لو عايز تشيله من الروابط بس (معظم المشاكل بتظهر فيها) */
a:focus {
  outline: none !important;
}

/* لو عايز تشيله من الأزرار وحقول الإدخال بس */
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: initial !important;
}
