:root {
  --main-color: #ad9551;
  --secondary-color: #e6dec6;
  --text-color: #333;
  --transition: 0.3s;
  --section-padding: 100px;
}

html {
  scroll-behavior: smooth;
}

    body {
  font-family: "Cairo", sans-serif;
  margin: 0;
  padding: 0;
  direction: rtl;
  background-color: #fff;
  overflow-x: hidden;

}


 /* Start Components */
 .main-heading {
  text-align: center;
}
.main-heading h2 {
  font-weight: bold;
  font-size: 40px;
  position: relative;
  padding-top: 35px;
  margin-bottom: 45px;
  text-transform: uppercase;
}

.main-heading span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px; /* مسافة بين الخط والنص */
  font-size: 18px;
  color: #444;
  font-weight: normal;
  margin-top: 15px;
  margin-bottom: 30px;
}

.main-heading span::before,
.main-heading span::after {
  content: "";
  display: block;
  height: 1px;
  background-color: #ccc;
  width: 34%; /* ✨ العرض الثابت للخطان */
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--main-color);
  cursor: pointer;
}
/* End Components */
.container-header {
  position: relative; /* لجعل الهيدر عائمًا */
  top: 17px;
  left: 0;
  right: 0;
  max-width: 80%; /* تحديد العرض الأقصى للهيدر */
  margin: 0 auto 0 auto; /* توسيط الهيدر تلقائيًا */
  background-color: white;
  border-radius: 43px;
padding: 0 50px;
  z-index: 9999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
  box-shadow: 0px 0px 5px 0px;
}
.container {
      margin-top: 100px;
}
.header {
  background-color: white;
  position: sticky;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 0px 0px 1px 0
}
a {
  text-decoration: none;
  color: #ad9551;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
}

.header .logo {
  display: flex;
  align-items: center;
  gap: 25px;
  color: #ad9551;
  font-size: 15px;
}
.header .logo-img {
  height: 70px;
}
/* Dropdown Menu */
.nav-item {
  position: relative;
}
#otherLinksDropdown {
  position: absolute;
  top: 86px;
  right: -50px;
  background-color: white;
  border: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 200px;
  padding: 10px 0;
  border-radius: 5px;
  z-index: 1000;
}
#otherLinksDropdown a {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background var(--transition);
  align-items: center;
}
#otherLinksDropdown a i {
  margin-right: 8px;
  margin-left: 10px;
  font-size: 1rem;
  color: var(--text-color);
}
#otherLinksDropdown a:hover {
  background-color: var(--main-color);
  color: white;
}
.hidden {
  display: none;
}
.main-nav  li  a {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 72px;
  position: relative;
  color: black;
  padding: 0 30px;
  overflow: hidden;
  font-size: 17px;
  transition: var(--main-transition);
}
.nav-item .spc {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 72px;
  position: relative;
  color: black;
  padding: 0 30px;
  overflow: hidden;
  font-size: 17px;
  transition: var(--main-transition);
}
.main-nav a:hover {
  color: var(--main-color);
  transition: var(--transition);
  background-color: #fafafa;
}
.main-nav .spc::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 4px;
  background-color: var(--main-color);
  top: 0;
  left: -100%;
  transition: var(--transition);
}

.main-nav a:hover::before {
  left: 0;
}

.user-account {
  display: flex;
  align-items: center;
}
.user-img {
  width: 45px;
  border-radius: 50%;
  cursor: pointer;
}

/* Dropdown Menu */
.dropdown {
  position: absolute;
  top: 93px;
  left: 10px;
  background-color: white;
  border: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 200px;
  padding: 15px;
  border-radius: 5px;
  z-index: 1000;
}
.dropdown p {
  margin: 5px 0;
  font-size: 0.9rem;
  color: var(--text-color);
}
.dropdown hr {
  margin: 10px 0;
  border: 0;
  border-top: 1px solid #eee;
}
.settings-btn {
  background-color: var(--main-color);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  font-size: 0.9rem;
  transition: background var(--transition);
}
.settings-btn:hover {
  background-color: var(--secondary-color);
}
.hidden {
  display: none;
}


.courses-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  padding: 44px 20px 20px 20px;
  max-width: 100%;
  overflow-x: hidden;
}


    .course-card {
      background-color: #fff;
      border: 1px solid #ddd;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      transition: transform 0.3s;
      max-width: 100%;
      overflow: hidden;
    }

    .course-card:hover {
      transform: scale(1.03);
    }

    .course-image {
      width: 100%;
      height: 200px;
      object-fit: cover;
    }

    .course-content {
      padding: 15px;
    }

    .course-title {
      font-size: 1.2rem;
      margin: 10px 0;
      color: var(--main-color);
    }

    .course-description {
      font-size: 1rem;
      margin-bottom: 10px;
    }

    .course-button {
      display: inline-block;
      background-color: #ad9551;
      color: #fff;
      text-decoration: none;
      padding: 10px 15px;
      border-radius: 5px;
      font-size: 0.9rem;
      transition: background-color 0.3s;
    }

    .course-button:hover {
      background-color: #897540;
    }

.filter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
  }
  
  #search-input {
    width: 80%;
    max-width: 500px;
    padding: 10px;
    font-size: 1rem;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
  }
  
  .filter-buttons {
    display: flex;
    gap: 10px;
  }
  
  .filter-button {
    padding: 10px 15px;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
  }
  
  .filter-button:hover {
    background-color: #ad9551;
    color: #fff;
  }
  
  .filter-button.active {
    background-color: #ad9551;
    color: #fff;
  }
 /* footer */
/* تصميم الفوتر */
#site-footer {
  background-color: #222;
  color: #fff;
  padding: 20px 0;
  margin-top: 200px;
  /* font-family: Arial, sans-serif; */
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-container > div {
  flex: 1 1 300px;
}

.footer-container h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #f4f4f4;
}

.footer-container p,
.footer-container a {
  font-size: 14px;
  color: #ddd;
  line-height: 1.6;
}

.footer-container a:hover {
  color: var(--main-color);
  transition: var(--transition);
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links li a {
  text-decoration: none;
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.social-links a img {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease-in-out;
}

.social-links a img:hover {
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  border-top: 1px solid #444;
  padding-top: 10px;
}
@media (min-width:993px) {
  .header .main-nav {
    display: flex;
    justify-content: flex-end;
  }
}
@media (max-width: 992px) {

  .main-heading h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    margin-top: -78px;
  }
  .up {
    font-size: 45px;
  }
  .container-header {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding: 10px 20px;
    max-width: 100%;
    border-radius: 0;
    top: 0;
    margin-top: 0px;
  }
  .logo {
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .logo-img {
    height: 50px !important; /* ✅ تصغير الشعار */
    width: auto;
  }

  .logo span {
    font-size: 9px; /* ✅ تصغير حجم الآية */
    color: #333;
    display: block;
    max-width: 90%;
    line-height: 1.6;
  }


  .header {
    top: 0;
    z-index: 999999999;

  }
  .menu-toggle {
    display: block;
  }

  .main-nav {
    width: 100%;
    flex-direction: column;
    align-items: center;
    background-color: white;
    border-top: 1px solid #ccc;
    padding: 10px 0;
    display: none;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav li a {
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 89%;
    color: #444;
    border-bottom: 1px solid #eee;
  }

  .main-nav li a:hover {
    background-color: #f9f9f9;
  }

  .main-nav.show {
    display: flex;
  }

  .dropdown {
    position: static;
    width: 100%;
    border: none;
    box-shadow: none;
    padding: 10px 15px;
    margin-right: 38%;
    margin-top: -13px;
  }

  #otherLinksDropdown a {
    padding: 10px;
  }
  .courses-container {
    height: 100%;
    overflow-x: hidden;
    
  }
}