:root {
    --main-color: #228b22;
    --transparent-color: #00ff00;
    --section-padding: 100px;
}
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: "Open Sans", sans-serif;
}
ul {
    list-style: none;
}
.container {
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}
/* اللغة العربية (RTL) */
body[dir="rtl"] {
    direction: rtl;
    text-align: right;
    font-family: "Cairo", sans-serif; /* خط يدعم العربية */
}
/* اللغة الإنجليزية (LTR) */
body[dir="ltr"] {
    direction: ltr;
    text-align: left;
    font-family: "Open Sans", sans-serif; /* خط يدعم الإنجليزية */
}
.language-toggle {
    background-color: transparent;
    color: var(--main-color);
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s;
}

.language-toggle:hover {
    color: var(--transparent-color); /* لون مختلف عند التمرير */
}
/* Small */
@media (min-width: 768px) {
    .container {
        width: 750px;
    }
}
/* Medium */
@media (min-width: 992px) {
    .container {
        width: 970px;
    }
}
/* Large */
@media (min-width: 1200px) {
    .container {
        width: 1170px;
    }
}
/* Start Header */
header {
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 2;
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 97px;
}
header .container::after {
    content: "";
    position: absolute;
    height: 1px;
    background-color: #a2a2a2;
    bottom: 0;
    width: calc(100% - 30px);
    left: 15px;
}
header .logo img {
    height: 60px;
    background-color: rgba(255, 255, 255, 0.384);
    border-radius: 8px;
}
header nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
header nav .toggle-menu {
    color: rgb(0, 0, 0);
    font-size: 22px;
}
@media (min-width: 768px) {
    header nav .toggle-menu {
        display: none;
    }
}
header nav ul {
    display: flex;
}
@media (max-width: 768px) {
    header nav ul {
        display: none;
    }
    header nav .toggle-menu:hover + ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(240, 240, 240, 0.815);
    }
    header nav ul li a {
        padding: 15px !important;
    }
}
header nav ul li a {
    display: block;
    color: rgb(0, 0, 0);
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
    padding: 40px 10px;
    position: relative;
    z-index: 3;
}
header nav ul li a.active,
header nav ul li a:hover {
    color: var(--main-color);
    border-bottom: 1px solid var(--main-color);
}
header nav .form {
    width: 40px;
    height: 30px;
    position: relative;
    margin-left: 30px;
    border-left: 1px solid white;
}
header nav .form i {
    color: white;
    position: absolute;
    font-size: 20px;
    top: 50%;
    transform: translateY(-50%);
    right: 0;
}
nav ul {
    display: none;
}
nav ul.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}
header {
    position: relative;
    z-index: 2;
}
/* زر تبديل اللغة */
.language-toggle {
    background-color: transparent;
    color: rgb(0, 0, 0);
    border: none;
    font-size: 14px;
    padding: 40px 10px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    z-index: 3;
}

/* تأثير التمرير على زر تبديل اللغة */
.language-toggle:hover {
    color: var(--main-color);
    border-bottom: 1px solid var(--main-color);
}
/* End Header */
/* Start Image Section*/
.swiper-container {
    width: 1150px;
    height: 400px;
    margin: 50px auto;
    position: relative;
    padding-bottom: 50px; /* مساحة إضافية تحت السلايدر للنقاط */
    overflow: hidden; /* منع أي محتوى زائد عن الحاوية */
    background-color: #ffffff; /* لون خلفية الحاوية */
}

/* الشرائح */
.swiper-slide {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* النقاط */
.swiper-pagination {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
/* النقاط غير النشطة */
.swiper-container .swiper-pagination .swiper-pagination-bullet {
    background-color: #4d4d4d !important; /* لون رمادي للنقاط غير النشطة */
    opacity: 1 !important; /* تأكد من أن النقاط مرئية بشكل كامل */
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* النقطة النشطة */
.swiper-container .swiper-pagination .swiper-pagination-bullet-active {
    background-color: #007bff !important; /* لون أزرق للنقطة النشطة */
    transform: scale(1.3); /* تكبير النقطة النشطة */
}

/* End Image Section */
/* Start Top Products */
.articles {
    padding-top: var(--main-padding-top);
    padding-bottom: var(--main-padding-bottom);
    position: relative;
}
.main-title {
    text-align: center;
    margin-top: 80px;
    margin-bottom: 20px;
    font-size: 2rem;
    color: var(--main-color);
    font-weight: bold;
}
.articles .container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 40px;
}
.articles .box {
    box-shadow: 0 2px 15px rgb(0 0 0 / 10%);
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    transition: transform var(--main-transition),
    box-shadow var(--main-transition);
}
.articles .box:hover {
    transform: translateY(-10px);
    box-shadow: 0 2px 15px rgb(0 0 0 / 20%);
}
.articles .box img {
    width: 100%;
    aspect-ratio: 1 / 1;
}
.articles .box .content {
    padding: 20px;
}
.articles .box .content h3 {
    margin: 0;
}
.articles .box .content p {
    margin: 10px 0 0;
    line-height: 1.5;
    color: #777;
}
.articles .box .info {
    padding: 20px;
    border-top: 1px solid #e6e6e7;
    /* display: flex; */
    text-align: center;
    justify-content: space-between;
    align-items: center;
}
.articles .box .info a {
    color: var(--main-color);
    font-weight: bold;
}
.articles .box .info i {
    color: var(--main-color);
}
.articles .box:hover .info i {
    animation: moving-arrow 0.6s linear infinite;
}
/* End Top Products */
/* Start contact us */
/* .contact-us {
  direction: ltr;
  text-align: left;
  padding: 40px 20px;
  background-color: #f9f9f9;
}

.contact-us .main-title {
  margin-bottom: 30px;
  font-size: 2rem;
  color: var(--main-color);
  text-align: center;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-details .detail h3 {
  font-size: 1.2rem;
  color: var(--main-color);
  margin-bottom: 10px;
}

.contact-details .detail p,
.contact-details .detail a {
  font-size: 1rem;
  color: #555;
  text-decoration: none;
}

.contact-details .detail a:hover {
  color: #007bff;
}

@media (min-width: 768px) {
  .contact-details {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .contact-details .detail {
    flex: 1 1 calc(50% - 20px);
  }
} */
/* End contact us */

/* Start Footer */
.footer {
    background-color: #333; /* خلفية داكنة */
    color: #fff; /* لون النص أبيض */
    padding: 40px 20px;
    direction: ltr; /* تحويل النصوص إلى الاتجاه من اليسار إلى اليمين */
    text-align: left; /* محاذاة النصوص لليسار */
}

/* محتوى الفوتر */
.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between; /* توزيع العناصر بالتساوي */
    align-items: flex-start;
}

.footer-logo img {
    max-width: 100px; /* ضبط حجم الشعار */
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.footer-links ul {
    list-style: none; /* إزالة النقاط من القائمة */
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links ul li a {
    color: #fff;
    text-decoration: none;
}

.footer-links ul li a:hover {
    color: var(--main-color); /* لون عند التمرير */
    text-decoration: underline;
}

.footer-contact p,
.footer-contact a {
    font-size: 0.9rem;
    color: #ccc;
    margin: 5px 0;
    margin-bottom: 10px;
}

.footer-contact a:hover {
    color: var(--main-color);
}

.footer-bottom {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #aaa;
}
/* End Footer */

/* Start scroll-to-top */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 24px;
    display: none;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.scroll-to-top:hover {
    background-color: #228b22;
    transform: scale(1.1);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
}
/* End scroll-to-top  */


/* Media Queries */
/* الأجهزة بين 400px و 768px */
@media (min-width: 100px) and (max-width: 400px)   {
    header nav .toggle-menu {
        position: absolute;
        top: 20px;
        left: 300px;
        background-color: rgb(255, 255, 255);
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.062);
        z-index: 1000;
        display: block;
    }
}
@media (min-width: 400px) and (max-width: 700px)   {
    header nav .toggle-menu {
        position: absolute;
        top: 20px;
        left: 350px;
        background-color: rgb(255, 255, 255);
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.062);
        z-index: 1000;
        display: block;
    }
}
@media (min-width: 768px) and (max-width: 790px)   {
    header nav .toggle-menu {
        position: absolute;
        top: 20px;
        left: 600px;
        background-color: rgb(255, 255, 255);
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.062);
        z-index: 1000;
        display: block;
    }
}
@media (min-width: 800px)   {
    header nav .toggle-menu {
        display:none;
    }
}
/* الهواتف المحمولة - أقل من 768px */
@media (max-width: 768px) {
    body {
        font-size: 14px; /* تقليل حجم النص */
        padding: 10px; /* تقليل الحواف */
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    header .container {
        flex-direction: column; /* تحويل محتوى الهيدر إلى عمودي */
        align-items: flex-start;
        padding: 10px;
    }


    .swiper-container {
        width: 100%; /* السلايدر يصبح ملء الشاشة */
        height: 300px; /* تقليل الارتفاع */
    }

    .articles .container {
        grid-template-columns: 1fr; /* عرض عنصر واحد في الشبكة */
        gap: 20px;
    }

    .contact-details {
        flex-direction: column; /* جعل العناصر عمودية */
    }

    .footer-content {
        flex-direction: column; /* ترتيب عناصر الفوتر عموديًا */
        align-items: flex-start;
        gap: 15px;
    }

    .scroll-to-top {
        width: 35px;
        height: 35px;
        font-size: 20px;
        bottom: 10px; /* تقريب الزر من الحافة */
        right: 10px;
    }
}

/* الأجهزة اللوحية - بين 768px و 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
    body {
        font-size: 15px; /* تكبير حجم النص قليلاً */
    }

    .container {
        max-width: 90%; /* تضييق الحاوية قليلاً */
    }

    header .logo img {
        height: 50px; /* تصغير الشعار */
    }

    .swiper-container {
        height: 350px; /* تعديل ارتفاع السلايدر */
    }

    .articles .container {
        grid-template-columns: repeat(2, 1fr); /* عرض عنصرين في الشبكة */
    }

    .footer-content {
        gap: 20px; /* زيادة التباعد بين عناصر الفوتر */
    }

    .scroll-to-top {
        bottom: 15px;
        right: 15px;
    }
}

/* الأجهزة الكبيرة - أكبر من 1024px */
@media (min-width: 1024px) {
    body {
        font-size: 16px; /* النصوص بالحجم الطبيعي */
    }

    .container {
        max-width: 1320px; /* تحديد العرض الكامل للحاوية */
    }

    .swiper-container {
        width: 1150px; /* السلايدر بالحجم الطبيعي */
        height: 700px;
    }

    .articles .container {
        grid-template-columns: repeat(3, 1fr); /* عرض ثلاثة عناصر في الشبكة */
    }

    .footer-content {
        flex-direction: row; /* الفوتر يعود إلى التنسيق الأفقي */
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
  .container {
    width: 100%; /* العرض الكامل */
    padding-left: 10px;
    padding-right: 10px;
  }

  header .container {
    flex-direction: row; /* ترتيب رأسي للمحتوى */
    justify-content: center;
    text-align: center;
  }
  
  header .logo img {
    height: 50px; /* تصغير الشعار */
  }

  header nav ul li a {
    padding: 20px 5px; /* تقليل الحشو */
    font-size: 12px;
  }

  .product-content {
    flex-direction: column; /* جعل الصورة والنصوص رأسية */
  }

  .product-image img {
    width: 100%;
    height: auto; /* جعل الصورة مرنة */
  }

  .related-products .product-cards {
    flex-direction: row; /* العناصر تصبح رأسية */
    gap: 15px;
  }

  .contact-details .detail {
    flex: 1 1 100%; /* عرض كامل لكل عنصر */
  }
}

/* الشاشات المتوسطة (الأجهزة اللوحية) */
@media (min-width: 576px) and (max-width: 768px) {
  .container {
    width: 540px; /* عرض الجهاز اللوحي */
  }

  .product-content {
    flex-direction: column; /* ترتيب النصوص والصورة */
  }

  .product-image img {
    width: 100%;
    height: auto;
  }

  .related-products .product-cards {
    flex-wrap: wrap; /* ترتيب العناصر تلقائياً */
    gap: 15px;
    justify-content: space-between;
  }

  header nav ul li a {
    font-size: 13px;
  }
}
