body {
    margin: 0;
    font-family: "Tajawal", sans-serif;
    background-color: #435E56;
    direction: rtl;
}

header {
    background: hsl(0, 0%, 100%);
    padding: 10px 0;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    height: 60px;
}

.container {
    width: 90%;
    margin: auto;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
}

nav .submenu {
    display: none;
    position: absolute;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-top: 10px;
    padding: 10px;
    flex-direction: column;
}

nav .dropdown:hover .submenu {
    display: flex;
}

.hero {
    background-image: url('./uploads/banner.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    height: 100vh;
    position: relative;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.overlay {
    background-color: rgba(0, 0, 0, 0.5); /* تعتيم للصورة */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 40px;
    margin-bottom: 15px;
    color: #ffffff;
}

.hero-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #d0d0d0;
}

.hero-content p {
    font-size: 16px;
    margin-bottom: 30px;
    max-width: 600px;
    color: #f0f0f0;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.button {
    background-color: #435E56;
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.button:hover {
    background-color: #2f443d;
}

.button-outline {
    background-color: #eeeeee; /* ✅ لون رمادي فاتح */
    border: 2px solid #ccc;
    color: #333;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.button-outline:hover {
    background-color: #ddd; /* أغمق قليلًا عند التحويم */
    color: #000;
    border-color: #aaa;
}


.section {
    padding: 60px 0;
    background-color: #fff;
    text-align: center;
}

.services-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.service, .project-card {
    background: #f2f2f2;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.project-card img {
    width: 100%;
    height: 250px;          /* ارتفاع ثابت */
    object-fit: cover;      /* لتغطية الصورة بشكل مناسب داخل المربع */
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    aspect-ratio: 1 / 1;    /* يجعل الصورة مربع */
}


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

form button {
    padding: 10px 30px;
    background: #435E56; /* ← اللون الأخضر من الشعار */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}
form button:hover {
    background: #2f443d; /* لون أغمق قليلاً عند التحويم */
}


footer {
  background: #435E56;
  color: white;
  padding: 40px 20px 20px 20px;
  font-family: "Tajawal", sans-serif;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
  flex-wrap: wrap;
  gap: 30px;
  text-align: right;
  direction: rtl;
}

.footer-left, .footer-right {
  flex: 1 1 300px;
  min-width: 280px;
}

.footer-logo {
  height: 70px;
  vertical-align: middle;
  margin-left: 15px;
}

.company-info h3, .footer-right h3 {
  margin-top: 0;
  font-size: 22px;
  color: #f0f0f0;
}

.company-info p {
  margin: 10px 0 15px 0;
  line-height: 1.6;
  color: #d0d0d0;
}

.facebook-link img {
  width: 32px;
  height: 32px;
}

/*.facebook-link:hover img {
  filter: none;
}*/

.footer-right p {
  margin: 8px 0;
  font-size: 16px;
}

.footer-right a {
  color: #f0f0f0;
  text-decoration: none;
}

.footer-right a:hover {
  text-decoration: underline;
}

/* حقوق الطبع */
footer > p {
  margin-top: 30px;
  font-size: 14px;
  text-align: center;
  color: #ddd;
}


.stats-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: nowrap; /* منع التفاف */
    width: 100vw; /* ملء عرض الشاشة بالكامل */
    max-width: 100%; /* منع التقييد بعرض الحاوية */
    padding: 0 10px; /* هامش داخلي من الجوانب */
    box-sizing: border-box;
}

.stat {
    flex: 0 0 calc((100% / 3) - 13.33px); /* حساب عرض تقريبي لكل بطاقة مع خصم الفجوات */
    background-color: #f8f8f8;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 30px 20px;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    min-width: 0; /* لمنع تجاوز العرض */
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat h2 {
    font-size: 42px;
    color: #435E56;
    margin-bottom: 10px;
    font-weight: bold;
}

.stat p {
    font-size: 18px;
    color: #333;
}
.about-container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap; /* للسماح بالتجاوب */
    padding: 20px 0;
}

.about-text {
    flex: 1 1 450px;
    min-width: 280px;
    text-align: right;
    direction: rtl;
}

.about-text h2 {
    color: #435E56;
    font-size: 36px;
    margin-bottom: 15px;
}

.about-text h3 {
    color: #2f443d;
    font-size: 24px;
    margin-top: 25px;
    margin-bottom: 10px;
}

.about-text p {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

.about-image {
    flex: 1 1 400px;
    min-width: 280px;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

.about-title {
    color: #435E56;
    font-size: 36px;
    margin-top: 60px;
    margin-bottom: 15px;
    font-weight: bold;
}

.about-intro {
    font-size: 20px;
    color: #435E56;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.5;
    font-weight: 600;

}
/* البطاقات الجديدة لخدماتنا */
.service-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 20px;
    text-align: right;
    direction: rtl;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.service-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.service-card h3 {
    font-size: 22px;
    color: #2f443d;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 15px;
    color: #444;
    margin-bottom: 10px;
    line-height: 1.6;
}

.service-card ul {
    list-style: disc inside;
    padding-right: 0;
    color: #333;
    font-size: 14px;
    line-height: 1.7;
}

/* العنوان الرئيسي للقسم */
.section-title {
    font-size: 36px;
    color: #435E56;
    margin-bottom: 40px;
    text-align: center;
    font-weight: bold;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* بطاقتين بالسطر */
    gap: 30px;
    width: 100%;
    max-width: 100%;
}
/* نوافذ منبثقة */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0; right: 0; bottom: 0; left: 0;
  background-color: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  padding: 30px 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  direction: rtl;
}

.modal-content h3 {
  margin-bottom: 20px;
  color: #435E56;
}

.modal-content p, .modal-content a {
  font-size: 16px;
  color: #333;
}

.modal-content form input,
.modal-content form textarea {
  width: 100%;
  margin-bottom: 15px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: "Tajawal", sans-serif;
}

.modal-content form button {
  width: 100%;
  padding: 10px;
}
/* توسيط المحتوى داخل قسم تواصل معنا */
.contact-centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#contact {
  background-color: rgba(167, 187, 181, 0.849); /* أخضر فاتح مع شفافية */
  padding: 40px 0; /* مساحات مناسبة */
  color: #020202; /* لون نص مناسب */
}

/* توسيط النص داخل النوافذ */
.modal-content h3,
.modal-content p,
.modal-content form {
  text-align: center;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  align-items: center;
}



/* تصميم متجاوب للجوالات */
@media (max-width: 768px) {
    /* جعل الحاوية تأخذ عرض أوسع */
    .container {
        width: 95%;
        padding: 0 10px;
    }

    /* تكديس عناصر التنقل رأسياً */
    nav ul {
        flex-direction: row; /* إبقائها أفقية */
        gap: 10px;
        justify-content: center;
    }

    /* عداد الإحصائيات: بطاقات عمودية */
    .stats-grid {
        flex-wrap: wrap; /* السماح بالانتقال لسطر جديد */
    }
    .stat {
        max-width: 100%; /* كل بطاقة تأخذ العرض كامل */
        margin-bottom: 20px;
    }

    /* النصوص في الهيدر والبطاقات */
    .hero-content h1 {
        font-size: 28px;
    }
    .hero-content h3 {
        font-size: 18px;
    }
    .hero-content p {
        font-size: 14px;
    }

    /* أزرار الهيرو */
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    /* خدمات ومشاريع الشبكة */
    .services-grid,
    .projects-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
        gap: 20px;
        margin-top: 30px;
    }

    /* تصغير الشعار في الهيدر وتوسيطه */
    .logo {
        height: 45px;
        display: block;
        margin: 0 auto;
    }

    /* ترتيب محتويات الهيدر عمودياً مع توسيط */
    header .container {
        flex-direction: column;
        align-items: center;
    }

    /* ضبط قائمة التنقل لتكون متوسطة العرض */
    nav ul {
        justify-content: center;
        margin-top: 10px;
    }
    .footer-container {
    flex-direction: column;
    text-align: center;
    direction: rtl;
  }

  .footer-left, .footer-right {
    min-width: auto;
  }

  .footer-logo {
    margin: 0 auto 15px auto;
  }
}
