: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;
}

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 */

/* About Section Styling */
.about-section {
    margin-top: 50px;
    margin-bottom: 50px;
    text-align: center;
}

.about-section .about-image {
    width: 1400px;
    height: 600px;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 10px;
}

.about-section .about-text {
    margin-top: 20px;
    line-height: 1.8;
    color: #555;
    text-align: justify;
}

/* Start contact us */
/* .contact-us {
  direction: rtl;
  text-align: right;
  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: rtl;
    text-align: right;
}
/* محتوى الفوتر */
.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;
        right: 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;
        right: 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;
        right: 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;
    }
}

 /* الأجهزة بين 400px و 768px */
@media (min-width: 100px) and (max-width: 400px)   {
  header nav .toggle-menu {
    position: absolute; 
    top: 20px;
    right: 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;
    right: 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;
   right: 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 {
        width: 100%; /* جعل العرض 100% */
        padding-left: 10px;
        padding-right: 10px;
    }

    header .container {
        flex-direction: column;
        align-items: flex-start;
    }


    header nav .toggle-menu {
        display: block;
    }

    header nav ul.show {
        display: flex;
    }

    .swiper-container {
        width: 100%; /* السلايدر يصبح ملء الشاشة */
        height: 300px; /* تعديل ارتفاع السلايدر */
    }

    .about-section .about-image {
        max-width: 100%; /* جعل الصورة تأخذ العرض الكامل */
    }

    .footer-content {
        flex-direction: column; /* جعل الفوتر عموديًا */
        align-items: flex-start;
        gap: 20px;
    }

    .scroll-to-top {
        width: 35px;
        height: 35px;
        font-size: 20px;
        bottom: 10px;
        right: 10px;
    }
}


@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;
  }
}

/* الأجهزة اللوحية - بين 768px و 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
    body {
        font-size: 15px;
    }

    .container {
        width: 90%; /* تضييق العرض */
        padding-left: 15px;
        padding-right: 15px;
    }

    header .container {
        flex-direction: row; /* ترتيب الهيدر أفقيًا */
        justify-content: space-between;
    }

    .swiper-container {
        height: 350px; /* تعديل ارتفاع السلايدر */
    }

    .about-section .about-image {
        max-width: 100%; /* تعديل عرض الصورة */
    }

    .footer-content {
        flex-direction: row; /* ترتيب الفوتر أفقيًا */
        justify-content: space-between;
    }
}

/* الأجهزة الكبيرة - أكبر من 1024px */
@media (min-width: 1024px) {
    body {
        font-size: 16px;
    }

    .container {
        max-width: 80%; /* تحديد عرض الصفحة بـ 80% */
        margin-left: auto;
        margin-right: auto;
    }

    .swiper-container {
        width: 100%;
        height: 400px; /* السلايدر بالحجم الطبيعي */
    }

    .about-section .about-image {
        max-width: 100%; /* تقليل عرض الصورة */
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        gap: 30px;
    }
}
