/* ================= GLOBAL STYLES ================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  /* لمنع السكرول العرضي الزائد */
}

/* جعل جميع الصور متجاوبة تلقائياً */
img {
  max-width: 100%;
  height: auto;
}

/* ================= TOP BAR ================= */
.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  flex-wrap: wrap;
  /* يسمح بالعناصر بالنزول للأسفل */
}

.left,
.right {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.right a {
  margin: 7px;
  display: inline-block;
}

.one,
.two {
  margin-left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ================= NAVBAR ================= */
.navbar {
  background: linear-gradient(to right, #6A0DAD, #BA55D3);
  padding: 10px 0;
}

.navbar .container {
  justify-content: space-between;
}

.nav-link {
  text-decoration: none;
  color: #d4c8e8;
  font-family: 'Courier New', Courier, monospace;
  font-size: 18px;
  display: flex;
  padding: 0;
  margin: 0;
  list-style-type: none;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-link li a {
  color: #d4c8e8;
  text-decoration: none;
  transition: 0.3s;
}

.nav-link li a:hover {
  color: #3e234a;
}

/* ================= HERO SECTION (First Child) ================= */
.parent {
  width: 100%;
  overflow: hidden;
}

.first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  /* مهم جداً للموبايل */
  padding: 20px;
}

/* تنسيق النصوص */
.text-container {
  padding: 50px 20px;
  /* تم تقليل الـ padding الضخم */
  text-align: left;
  flex: 1;
  /* يأخذ مساحة متاحة */
  min-width: 300px;
}

.text-container h5 {
  color: #673ab7;
  font-size: 20px;
  font-weight: bold;
}

.text-container h1 {
  font-size: 40px;
  /* تصغير الخط قليلاً */
  font-weight: bold;
  padding: 10px 0;
  line-height: 1.2;
}

.color {
  background: linear-gradient(to right, #6A0DAD, #BA55D3);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.btn {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(to right, #6A0DAD, #BA55D3);
  color: #fff;
  border: none;
}

.btn-outline-primary {
  background-color: transparent;
  color: #6A0DAD;
  border: 2px solid #6A0DAD;
  margin-left: 10px;
}

/* إخفاء الصور الجانبية الكبيرة في الموبايل أو تعديلها */
.left-banner {
  display: none;
  /* hidden on small screens */
}

@media (min-width: 992px) {
  .left-banner {
    display: block;
  }
}

/* ================= SERVICES SECTION ================= */
.om {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 20px;
}

.lft-banner {
  max-width: 40%;
  width: 100%;
  height: auto;
  margin-top: 50px;
}

.ebn {
  flex: 1;
  margin-top: 20px;
  padding-left: 20px;
  min-width: 300px;
  /* لضمان عدم انضغاط النص */
}

.boo {
  background: linear-gradient(to right, #6A0DAD, #BA55D3);
  height: 2px;
  border: none;
  width: 100px;
  margin: 10px 0;
}

.container-one {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.icon {
  border: 2px solid gray;
  border-radius: 25px;
  padding: 20px;
  text-align: center;
  transition: 0.3s;
}

.icon:hover {
  box-shadow: 0 15px 30px rgba(138, 43, 226, 0.4);
  transform: translateY(-5px);
}

/* ================= PROJECTS SECTION ================= */
.container-two {
  text-align: center;
  margin-bottom: 30px;
}

#one {
  width: 150px;
  margin: 10px auto;
  border-color: #6f42c1;
}

.container-three {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  /* السماح للكروت بالنزول سطر جديد */
  justify-content: center;
  background: linear-gradient(to right, #6A0DAD, #BA55D3);
  padding: 40px 20px;
  border-radius: 15px;
}

.card {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.kk {
  display: block;
  padding: 15px;
  text-align: center;
  font-size: 18px;
}

/* ================= FOOTER ================= */
.main-footer {
  background: linear-gradient(to right, #6A0DAD, #BA55D3);
  color: white;
  padding: 40px 20px;
  margin-top: 50px;
}

.footer-content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto 40px auto;
}

.footer-map-section,
.footer-contact-form-section {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  flex: 1 1 400px;
  min-width: 300px;
}

.card-img-top {
  width: 100%;
  height: auto;
  display: block;
}

.right-banner {
  max-width: 50%;
  width: 100%;
  height: auto;
}

.footer-map-section iframe {
  width: 100%;
  height: 100%;
  min-height: 240px;
  border: 0;
}

.contact-form .form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.contact-form .send-message-btn {
  background: linear-gradient(to right, #6A0DAD, #BA55D3);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  width: 100%;
  cursor: pointer;
}

.footer-info-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  gap: 20px;
}

.info-item {
  text-align: center;
  flex: 1;
  min-width: 150px;
}

.info-item i {
  display: block;
  font-size: 24px;
  margin-bottom: 10px;
  color: #ffd700;
}

/* ================= MEDIA QUERIES (MOBILE) ================= */
@media (max-width: 768px) {

  /* تعديل النافبار */
  .container {
    flex-direction: column;
    text-align: center;
  }

  .nav-link {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  /* عكس ترتيب الهيرو (الصورة تحت النص) */
  .first-child {
    flex-direction: column-reverse;
    text-align: center;
  }

  .text-container {
    padding: 20px;
    font-size: 16px;
  }

  .text-container h1 {
    font-size: 28px;
  }

  .right-banner {
    max-width: 100%;
    margin-top: 20px;
  }

  /* قسم الخدمات */
  .om {
    flex-direction: column;
  }

  .lft-banner {
    display: none;
    /* إخفاء الصورة الكبيرة في الخدمات للموبايل */
  }

  .ebn {
    margin-right: 0;
    padding: 0;
    width: 100%;
  }

  .container-one {
    grid-template-columns: 1fr;
    /* single column on small screens */
  }

  /* الفوتر */
  .contact-form .form-row {
    flex-direction: column;
  }

  .footer-info-bar {
    flex-direction: column;
  }
}

/* Larger screens adjustments */
@media (min-width: 1200px) {
  .text-container h1 {
    font-size: 56px;
  }

  .text-container {
    padding: 60px 40px;
  }

  .right-banner {
    max-width: 55%;
  }
}
