@import "./variables.css";
@import "./fonts.css";
@import "./top-bar.css";
@import "./defaults.css";
@import "./nav-bar.css";
@import "./footer.css";
@import "./course-box.css";
@import "./pagination.css";
@import "./common-classes.css";
@import "./breadcrumb.css";
@import "./sidebarCourseBox.css";
@import "./index.css";
/* ---------------- */
.tree-container {
  font-family: Arial, sans-serif;
  direction: rtl;
  text-align: right;
  overflow-x: auto; /* برای اسکرول افقی در موبایل */
}
.tree-list {
  margin: 5rem 5rem 3rem 0;
}
.tree,
.tree ul {
  list-style-type: none;
  padding-right: 4rem;
  position: relative;
  margin-top: 5rem 7rem 3rem 0;
}

.tree li {
  margin: 0;
  padding: 10px 0 0 20px;
  position: relative;
}

.tree li::before,
.tree li::after {
  content: "";
  position: absolute;
  right: 0;
}

.tree li::before {
  border-right: 1px solid var(--primary-color);
  height: 100%;
  top: 0;
  width: 1px;
}

.tree li::after {
  border-top: 1px solid var(--primary-color);
  top: 20px;
  width: 20px;
}

.tree li:last-child::before {
  height: 20px;
}

.tree .node-title {
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  display: inline-block;
  padding: 5px 10px;
  background-color: var(--primary-color);
  cursor: pointer;
  font-size: 1.3rem; /* اندازه فونت پیش‌فرض */
  position: relative; /* برای موقعیت‌دهی باکس توضیحات */
  margin-right: 3rem;
  color: var(--white-color);
  font-weight: bold;
}

.tree .node-title:hover {
  background-color: var(--white-color);
  color: var(--primary-color);
  transform: scale(1.1);
  -webkit-transform: scale(1.1);
  -moz-transform: scale(1.1);
  -ms-transform: scale(1.1);
  -o-transform: scale(1.1);
  border: 1px solid var(--primary-color);
}

.tree ul ul .node-title {
  background-color: var(--primary-color);
  font-weight: bold;
  color: var(--white-color);
  border: none;
}

.tree ul ul ul .node-title {
  background-color: rgb(149, 213, 52);
}

.tree ul ul ul ul .node-title {
  background-color: #fce4ec;
}

/* باکس توضیحات */
.node-title .tooltip {
  visibility: hidden;
  /*width: 200px;
  */
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  text-align: center;
  border-radius: 0.5rem;
  padding: 1.1rem;
  position: absolute;
  z-index: 1;
  bottom: 0;
  /*موقعیتباکسبالایعنوان*/
  left: -200%;
  margin-right: -100px;
  /*تنظیمموقعیتافقی*/
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 1.2rem;
  transition: all 300ms ease;
  -webkit-transition: all 300ms ease;
  -moz-transition: all 300ms ease;
  -ms-transition: all 300ms ease;
  -o-transition: all 300ms ease;
  -webkit-border-radius: 0.5rem;
  -moz-border-radius: 0.5rem;
  -ms-border-radius: 0.5rem;
  -o-border-radius: 0.5rem;
}

/* .node-title .tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 50%;
  margin-right: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
} */

.node-title:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* استایل‌های ریسپانسیو برای موبایل */
@media (max-width: 768px) {
  .tree-container {
    padding: 10px;
  }

  .tree .node-title {
    font-size: 12px; /* کاهش اندازه فونت برای موبایل */
    padding: 4px 8px; /* کاهش padding برای موبایل */
  }

  .tree li {
    padding: 8px 0 0 15px; /* کاهش padding برای موبایل */
  }

  .tree li::after {
    top: 15px; /* تنظیم موقعیت خطوط برای موبایل */
    width: 15px;
  }

  .node-title .tooltip {
    width: 150px; /* کاهش عرض باکس توضیحات برای موبایل */
    font-size: 10px; /* کاهش اندازه فونت توضیحات */
  }
}

@media (max-width: 480px) {
  .tree .node-title {
    font-size: 10px; /* کاهش بیشتر اندازه فونت برای صفحه‌های خیلی کوچک */
    padding: 3px 6px;
  }

  .tree li {
    padding: 6px 0 0 10px;
  }

  .tree li::after {
    top: 12px;
    width: 10px;
  }

  .node-title .tooltip {
    width: 120px; /* کاهش بیشتر عرض باکس توضیحات */
    font-size: 8px; /* کاهش بیشتر اندازه فونت توضیحات */
  }
}
