: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(0 0 0 / 50%);
  }
  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 Product Description Section */
.product-description {
  direction: rtl;
  text-align: right;
  padding: 40px 20px;
  background-color: #f9f9f9;
}

.product-content {
  display: flex;
  flex-wrap: nowrap;
  gap: 80px;
  align-items: flex-start;
  flex-direction: row-reverse;
}

.product-image {
  flex: 1 1 50%;
}

.product-image img {
  width: 800px;
  height: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.product-details {
  flex: 1 1 50%;
}

.breadcrumb {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 10px;
}

.breadcrumb a {
  color: #007bff;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.product-details h1 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 15px;
}

.product-details p {
  font-size: 1rem;
  color: #555;
}

.product-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-details ul li {
  margin-bottom: 8px;
  font-size: 1rem;
  color: #555;
}

.product-details hr {
  margin: 15px 0;
  border: none;
  border-top: 1px solid var(--main-color);
}

/* End Product Description Section */

/* Start Related Products Section */
.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(300px, 1fr));
  gap: 10px;
}
.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%;
  max-width: 100%;
    height: 70%;
}
.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 Related Products Section */

/* 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 */
/* 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 */
 

/* الشاشات الأكبر (أجهزة اللابتوب) */
@media (min-width: 992px) {
  .container {
    width: 970px;
  }

  .product-content {
    flex-direction: row-reverse; /* رجوع التصميم الأصلي */
  }

  .related-products .product-cards {
    flex-direction: row; /* عرض الأفقي للبطاقات */
    gap: 20px;
  }
}

/* الشاشات الكبيرة جداً (شاشات 4K وما فوق) */
@media (min-width: 1400px) {
  .container {
    width: 1320px; /* توسيع العرض */
  }

  .product-content {
    gap: 120px; /* زيادة المسافة بين الصورة والنصوص */
  }

  .related-products .card {
    width: 250px; /* تكبير البطاقات */
  }

  .footer-content {
    gap: 40px; /* مسافة إضافية لعناصر الفوتر */
  }
}

@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;
  }
}
