/* استایل‌های مخصوص موبایل‌های خیلی کوچک */
@media (max-width: 575.98px) {
}

/* استایل‌های مخصوص تبلت‌های افقی یا موبایل‌های بزرگ */
@media (min-width: 576px) and (max-width: 767.98px) {
}

/* استایل‌های مخصوص لپ‌تاپ‌ها و تبلت‌های بزرگ */
@media (min-width: 768px) and (max-width: 991.98px) {
}

/* استایل‌های مخصوص مانیتورهای دسکتاپ معمولی */
@media (min-width: 992px) and (max-width: 1199.98px) {
}

/* استایل‌های مخصوص مانیتورهای بزرگ */
@media (min-width: 1200px) and (max-width: 1399.98px) {
}

/* استایل‌های مخصوص مانیتورهای فوق‌العاده بزرگ */
@media (min-width: 1400px) {
}

* {
  box-sizing: border-box;
}

/* body {
            margin: 0;
            font-family: Tahoma, Arial, sans-serif;
            background:
                radial-gradient(circle at top right, rgba(220, 53, 69, 0.08), transparent 28%),
                radial-gradient(circle at bottom left, rgba(13, 110, 253, 0.08), transparent 26%),
                linear-gradient(135deg, #f8f9fa 0%, #fff5f5 100%);
            color: #212529;
        } */

.menu-wrapper {
  /*width: 700px;*/
  /*width: 1000px;*/
  max-width: 1200px;
  margin: 32px auto 0 0;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: inherit;
  overflow: hidden;
  display: grid;
  /*grid-template-columns: 280px 1fr;*/
  grid-template-columns: 1fr 3fr;
  /*min-height: 620px;*/
  box-shadow: 0 18px 50px rgba(33, 37, 41, 0.12);
  backdrop-filter: blur(12px);
  margin-top: 0;
  overflow-y: scroll;
  height: 450px;
}

.col-left {
  background: linear-gradient(180deg, #fff5f5 0%, #ffffff 100%);
  border-left: 1px solid #f1d7db;
  /*padding: 12px 0;*/
}

.col-right {
  /*padding: 20px;*/
  background:
    radial-gradient(
      circle at top right,
      rgba(13, 110, 253, 0.04),
      transparent 28%
    ),
    #ffffff;
}

.category-item {
  margin: 6px 10px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 14px;
  color: #495057;
  font-weight: 500;
  user-select: none;
  transition: all 0.22s ease;
  text-wrap: nowrap;
}

.category-item:hover {
  background: var(--bs-danger-bg-subtle, #f8d7da);
  color: var(--bs-danger-text-emphasis, #842029);
  transform: translateX(-3px);
  box-shadow: 0 8px 18px rgba(220, 53, 69, 0.1);
}

.category-item.active {
  background: linear-gradient(135deg, var(--bs-danger) 0%, #ff6b81 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(220, 53, 69, 0.22);
  text-wrap: nowrap;
}

.tree-menu {
  width: 100%;
}

.tree-node {
  margin-bottom: 10px;
}

.tree-header {
  width: 100%;
  border: 1px solid #f1d7db;
  background: linear-gradient(180deg, #ffffff 0%, #fff7f8 100%);
  padding: 13px 14px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-size: 15px;
  color: #343a40;
  font-weight: 600;
  transition: all 0.22s ease;
  text-align: right;
  box-shadow: 0 5px 14px rgba(33, 37, 41, 0.05);
}

.tree-header:hover {
  background: var(--bs-danger-bg-subtle, #f8d7da);
  border-color: rgba(220, 53, 69, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(220, 53, 69, 0.1);
}

.tree-header .header-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.tree-header .header- icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  color: var(--bs-danger);
  background: var(--bs-danger-bg-subtle, #f8d7da);
  border-radius: 9px;
}

.tree-header .chevron {
  margin-right: auto;
  margin-left: 0;
  transition: transform 0.25s ease;
  font-size: 13px;
  color: #dc3545;
  flex: 0 0 auto;
}

.tree-node.open > .tree-header .chevron {
  transform: rotate(180deg);
}

.tree-children {
  margin-right: 18px;
  padding-right: 14px;
  border-right: 1px dashed #f0b6be;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease;
}

.tree-node.open > .tree-children {
  max-height: 1200px;
  opacity: 1;
  margin-top: 10px;
}

.tree-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  margin-bottom: 8px;
  text-decoration: none;
  color: #495057;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #f1d7db;
  transition: all 0.22s ease;
  box-shadow: 0 4px 10px rgba(33, 37, 41, 0.04);
}

.tree-link:hover {
  background: var(--bs-danger-bg-subtle, #f8d7da);
  color: var(--bs-danger-text-emphasis, #842029);
  transform: translateX(-3px);
  box-shadow: 0 8px 18px rgba(220, 53, 69, 0.08);
}

.tree-link i {
  color: var(--bs-danger);
}

.hint {
  color: #6c757d;
  font-size: 14px;
  margin-bottom: 14px;
  line-height: 1.8;
  background: linear-gradient(180deg, #fff7f8 0%, #ffffff 100%);
  border: 1px solid #f1d7db;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 5px 14px rgba(33, 37, 41, 0.04);
}

.navbar {
  background-color: #f8d7da !important;
  border-bottom: 1px solid #f5c2c7 !important;
}

.navbar-brand img {
  max-height: 35px;
}

.navbar-nav .nav-link {
  color: #842029 !important;
  font-weight: 500;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
  color: #fff !important;
  background-color: #dc3545 !important;
}

/* استایل‌های مخصوص موبایل‌های خیلی کوچک */
@media (max-width: 575.98px) {
  .menu-wrapper {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .col-left {
    border-left: none;
    border-bottom: 1px solid #e2e8f0;
  }

  .col-right {
    padding: 14px;
  }

  .tree-children {
    margin-right: 14px;
    padding-right: 12px;
    border-right: 1px dashed #e2e8f0;
  }

  .tree-node.open > .tree-children {
    margin-top: 8px;
  }
}

@media (min-width: 576px) and (max-width: 600.98px) {
  .dropdown-menu {
    min-height: auto;
    width: 560px;
    margin-top: 30px !important;
    right: -110px !important;
  }
}

/* استایل‌های مخصوص تبلت‌های افقی یا موبایل‌های بزرگ */
@media (min-width: 601px) and (max-width: 700.98px) {
  .dropdown-menu {
    min-height: auto;
    width: 590px;
    margin-top: 30px !important;
    right: -110px !important;
  }
}

@media (min-width: 701px) and (max-width: 800.98px) {
  .dropdown-menu {
    min-height: auto;
    width: 680px;
    margin-top: 30px !important;
    right: -110px !important;
  }
}

@media (min-width: 801px) and (max-width: 900.98px) {
  .dropdown-menu {
    min-height: auto;
    width: 785px;
    margin-top: 30px !important;
    right: -110px !important;
  }
}

@media (min-width: 901px) and (max-width: 1000.98px) {
  .dropdown-menu {
    min-height: auto;
    width: 890px;
    margin-top: 30px !important;
    right: -110px !important;
  }
}

@media (min-width: 1001px) and (max-width: 1100.98px) {
  .dropdown-menu {
    min-height: auto;
    width: 990px;
    margin-top: 30px !important;
    right: -110px !important;
  }
}

@media (min-width: 1101px) and (max-width: 1200.98px) {
  .dropdown-menu {
    min-height: auto;
    width: 1080px;
    margin-top: 30px !important;
    right: -110px !important;
  }
}

@media (min-width: 1201px) and (max-width: 1300.98px) {
  .dropdown-menu {
    min-height: auto;
    width: 1190px;
    margin-top: 30px !important;
    right: -110px !important;
  }
}

@media (min-width: 1301px) and (max-width: 1400.98px) {
  .dropdown-menu {
    min-height: auto;
    width: 1200px;
    margin-top: 30px !important;
    right: -45px !important;
  }

  .menu-wrapper {
    max-width: 1300px;
    /*margin: 32px 0 0 0;*/
  }
}

@media (min-width: 1401px) {
  .dropdown-menu {
    min-height: auto;
    width: 1395px;
    margin-top: 30px !important;
  }

  .menu-wrapper {
    max-width: 1400px;
    margin: 32px 0 0 0;
  }
}

/* استایل‌های مخصوص لپ‌تاپ‌ها و تبلت‌های بزرگ */
/* @media (min-width: 768px) and (max-width: 991.98px) {

            .dropdown-menu {
                min-height: auto;
                width: 750px;
                margin-top: 30px !important;
                right: -110px !important;
            }

        } */

/* استایل‌های مخصوص مانیتورهای دسکتاپ معمولی */
/* @media (min-width: 992px) and (max-width: 1199.98px) {
            .dropdown-menu {
                min-height: auto;
                width: 980px;
                margin-top: 30px !important;
                right: -110px !important;
            }
        } */

/* استایل‌های مخصوص مانیتورهای بزرگ */
/* @media (min-width: 1200px) and (max-width: 1399.98px) {
            .dropdown-menu {
                min-height: auto;
                width: 1180px;
                margin-top: 30px !important;
                right: -110px !important;
            }
        } */

/* استایل‌های مخصوص مانیتورهای فوق‌العاده بزرگ */
/* @media (min-width: 1400px) {
            .dropdown-menu {
                min-height: auto;
                width: 1400px;
                margin-top: 30px !important;
                right: -110px !important;
            }
        } */

.dropdown-menu {
  pointer-events: auto;
}

.dropdown-menu .menu-wrapper,
.dropdown-menu .col-left,
.dropdown-menu .col-right,
.dropdown-menu .tree-menu,
.dropdown-menu .tree-node,
.dropdown-menu .tree-header,
.dropdown-menu .tree-link {
  pointer-events: auto;
}
