* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  background-color: #ece9f3;
  min-height: 100svh;
  background-size: 170% 130%;
  font-family: "Vazirmatn", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  /* max-width: 100svw; */
  overflow-x: hidden;
  max-width: 100%;
}

header {
  display: flex;
  justify-content: space-between !important;
  align-items: center;
  flex-direction: row !important;
  min-height: 70px;
  border-bottom: solid red 2px;
}

header .header-right,
header .header-left {
  display: flex;
  align-items: center;
  height: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.square {
  aspect-ratio: 1/1 !important;
  border-radius: 100%;
  width: 50px;
  object-fit: cover;
}

.sidebarBtn {
  border: 0px;
  background-color: transparent;
  width: max-content;
  margin-right: 16px;
  cursor: pointer;
}

.header-right .sidebarBtn,
.header-right a {
  display: flex;
  align-items: center;
}

.user-img {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {
  .user-img {
    width: 25px;
    height: 25px;
  }

  .user-text {
    font-size: 16px;
  }

  .f-md-16 {
    font-size: 16px;
  }

  .user-link,
  .loginBtn {
    padding: 8px 15px;
    font-size: 14px;
    justify-content: center;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    line-height: 1.5;
    white-space: nowrap;
  }

  .user-link {
    color: #333;
    background-color: #ccc;
    border: 1px solid #ddd;
  }

  .user-link:hover {
    border-color: #dd2a1b;
    transform: translateY(-1px);
  }

  .loginBtn {
    color: white;
    background-color: #dd2a1b;
    border: 1px solid #dd2a1b;
    flex-direction: row-reverse;
  }

  .loginBtn:hover {
    border-color: #e5ab1f;
    transform: translateY(-1px);
  }
}

@media (max-width: 767.98px) {
  .user-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
  }

  .loginBtn {
    text-decoration: none;
    padding: 4px 15px;
    border-radius: 12px;
    color: white;
    background-color: #dd2a1b;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    flex-direction: row-reverse;
  }

  .header-right .d-none.d-md-flex {
    display: none !important;
  }
}

aside {
  height: 100svh;
  position: fixed;
  right: -100%;
  background-color: white;
  color: black;
  width: 70svw;
  top: 0px;
  transition: right 0.3s ease-in-out;
  z-index: 10000000000;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

body.dark aside {
  background-color: rgb(37, 37, 37);
}

aside.active {
  right: 0px;
}

aside a {
  max-width: fit-content;
  text-decoration: none;
  color: black;
  transition: color 0.2s ease;
}

aside a:hover {
  color: #dd2a1b;
}

aside .active {
  color: #dd2a1b;
}

aside nav ul li {
  transition: all 0.2s ease;
}

aside nav ul li:hover {
  background-color: rgba(253, 193, 60, 0.1);
  border-radius: 8px;
}

div.antiAside {
  position: fixed;
  height: 100svh;
  width: 100svw;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000000000;
  display: none;
  top: 0px;
}

div.antiAside.active {
  display: block;
}

.header-right .d-flex.align-items-center.ms-md-3 {
  display: flex;
  align-items: center !important;
  height: 100%;
}

.header-right > div > ul {
  display: flex;
  align-items: center !important;
  margin-bottom: 0 !important;
  padding-right: 0 !important;
  height: 100%;
}

.header-right > div > ul > li {
  display: flex;
  align-items: center;
  list-style: none;
  position: relative;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.header-right>div>ul>li:not(:last-child)::after {
  content: "|";
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
  color: #5d5d5d;
  font-size: 14px;
  font-weight: 300;
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .header-right > div > ul > li {
    padding: 0 8px;
    font-size: 12px;
  }

  .header-right > div > ul > li:not(:last-child)::after {
    left: -1px;
  }
}

@media (min-width: 992px) {
  .header-right > div > ul > li {
    padding: 0 15px;
    font-size: 15px;
  }
}

.user-box {
  display: flex;
  align-items: center;
}

.user-text {
  font-size: 14px;
  font-weight: 500;
}

.f-13 {
  font-size: 13px;
}

.f-md-16 {
  font-size: 13px;
}

.aspect1 {
  aspect-ratio: 1/1;
}

@media only screen and (max-width: 768px) {
  header.d-grid {
    display: flex !important;
    justify-content: space-between;
  }

  .logoName {
    display: flex;
  }
}

/*  */

.imgSection {
  background-image: url(/vecty/HOME.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: 300px;
  border-radius: 0;
}

@media (min-width: 768px) {
  .imgSection {
    height: 400px;
  }
}

.title {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50px;
  padding: 10px 10px;
}

.imgSearch {
  width: 25px;
  height: 25px;
}

.d-flex.justify-content-center.align-items-center > div {
  display: flex;
  align-items: center;
}

.outline {
  outline: 0px;
}

.d-flex.justify-content-center.align-items-center select,
.d-flex.justify-content-center.align-items-center input,
.d-flex.justify-content-center.align-items-center button {
  height: 50px;
  font-size: 12px;
  padding: 0 12px;
  transition: all 0.3s ease;
}

.d-flex.justify-content-center.align-items-center select {
  cursor: pointer;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  width: 100px;
}

.d-flex.justify-content-center.align-items-center input {
  width: 200px;
}
.d-flex.justify-content-center.align-items-center textarea {
    width: 200px;
}

.d-flex.justify-content-center.align-items-center button {
  background-color: #dd2a1b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.d-flex.justify-content-center.align-items-center button img {
  width: 25px;
  height: 25px;
}

@media (min-width: 768px) {
  .d-flex.justify-content-center.align-items-center select,
  .d-flex.justify-content-center.align-items-center input,
  .d-flex.justify-content-center.align-items-center button {
    height: 48px;
    font-size: 14px;
    padding: 0 16px;
  }

  .d-flex.justify-content-center.align-items-center input {
    width: 250px;
  }
    .d-flex.justify-content-center.align-items-center textarea {
        width: 250px;
    }

  .d-flex.justify-content-center.align-items-center select {
    width: 150px;
  }

  .d-flex.justify-content-center.align-items-center button img {
    width: 30px;
    height: 30px;
  }
}

@media (min-width: 992px) {
  .d-flex.justify-content-center.align-items-center select,
  .d-flex.justify-content-center.align-items-center input,
  .d-flex.justify-content-center.align-items-center button {
    height: 54px;
    font-size: 15px;
    padding: 0 20px;
  }

  .d-flex.justify-content-center.align-items-center input {
    width: 420px;
  }
    .d-flex.justify-content-center.align-items-center textarea {
        width: 420px;
    }

  .d-flex.justify-content-center.align-items-center select {
    width: 150px;
  }

  .d-flex.justify-content-center.align-items-center button img {
    width: 30px;
    height: 30px;
  }
}

/* Nima Code */
.statImg img {
  width: 50px;
}

.stats {
    background-color: #e9e5f2;
    margin-top: 70px;
}

/* slider */
.carouselImg {
  width: 100px;
  height: 100px;

  display: flex;
  justify-content: center;
  align-items: center;

  background-color: #ececec;
  border-radius: 999px;
  padding: 10px;

  overflow: hidden;
}

.carouselImg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customCard {
  max-width: 33%;
}

.carouselTop {
  position: relative;
  top: 30px;
  left: 30px;
  display: flex;
  justify-content: end;
  align-items: center;
  flex-direction: row-reverse;
}

.carouselText {
  text-align: justify;
}

.carouselBottom {
  background-color: #ececec;
  padding: 40px 30px;
  border-radius: 24px;
}

.swiperTop {
  position: relative;
  top: 30px;
  left: 20px;

  display: flex;
  justify-content: end;
  align-items: center;
  flex-direction: row-reverse;
  column-gap: 12px;

  z-index: 2;
}

.text-container {
  padding: 2rem;
}

/* کلید اصلی: wrapper با انیمیشن max-height */
.text-wrapper {
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.long-text {
  font-size: 1rem;
  line-height: 1.8;
  color: #2d3748;
  text-align: justify;
}

.button-container {
  padding: 0 2rem 2rem 2rem;
  text-align: center;
}

.toggle-btn {
  background-color: transparent;
  color: black;
  border: none;
  cursor: pointer;
}

.toggle-btn:active {
  transform: translateY(0);
}

.scroll-top-btn {
  position: fixed;
  bottom: 1.8rem;
  right: 1.8rem;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background: #dd2a1b;
  /* background-image: radial-gradient(circle at 30% 20%, #2c6e9e, #0f2b3d); */
  border: none;
  cursor: pointer;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.25),
    0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  z-index: 1000;
  opacity: 0.9;
}

/* آیکون فلش بالا (طراحی با CSS خالص + پشتیبانی از SVG fallback) */
.scroll-top-btn svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  transition: transform 0.2s ease;
}

.scroll-top-btn:hover {
  /* transform: scale(1.07); */
  background: #a72014;
  /* background-image: radial-gradient(circle at 30% 20%, #3782b0, #14384d); */
  /* box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3); */
  opacity: 1;
}

.scroll-top-btn:active {
  transform: scale(0.96);
}

/* انیمیشن نرم هنگام اسکرول با کلاس‌های جاوااسکریپت */
html {
  scroll-behavior: smooth; /* fallback اگر اسکریپت مشکل داشته باشد */
}

@media (max-width: 600px) {
  .scroll-top-btn {
    width: 48px;
    height: 48px;
    bottom: 1.2rem;
    right: 1.2rem;
  }
  .scroll-top-btn svg {
    width: 24px;
    height: 24px;
  }
  .content {
    padding: 1rem 1rem 5rem 1rem;
  }
  .card {
    padding: 1rem 1.2rem;
  }
}

/* نمایش/مخفی شدن اختیاری برای دکمه (وقتی در بالای صفحه باشیم، شاید دکمه کم‌رنگ شود)
       اما کاربر پسند است که همیشه دکمه هست. برای تجربه بهتر دکمه همیشه دیده می‌شود. */
.scroll-top-btn {
  transition:
    opacity 0.3s ease,
    transform 0.2s ease,
    background 0.2s;
}

.goToTopNone {
  opacity: 0;
}

.goToTopBlock {
  opacity: 1;
}

.fastAccess {
  width: max-content;
  padding: 16px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  border: 1px solid #ccc;
  position: relative;
  top: -70px;
  background-color: white;

  @media (max-width: 768px) {
    top: -30px;
    padding: 8px 12px;
  }
}

.fastAccess img {
  width: 40px;
}

.accessItem {
  position: relative;
  padding: 5px 10px;
}

.accessItem a {
  row-gap: 3px;
}

.accessItem a p {
  margin-bottom: 0px;
}

.accessItem a:hover p {
  color: #f15a31;
}

.accessItem button {
  border: 0px;
  background-color: #44bc7c;
  color: white;
  padding: 8px;
  border-radius: 1000000px;
  aspect-ratio: 1/1;
}

.accessItem button p {
  margin-bottom: 0px;
}

.accessItem:not(:last-child) {
  border-left: 1px solid #e9e9e9;
}

.popover1>div {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  /* padding-inline: 24px; */

  @media (max-width: 992px) {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media only screen and (max-width: 768px) {
  .popover1 {
    padding: 16px !important;
  }

  /* .item{
    max-width: 300px;
  } */
}

.fastPopItem {
  position: relative;
  padding: 5px 10px;
  background-color: #ece9f3;
  border-radius: 10px;
  margin: 12px;
  padding: 20px 4px;
}

.fastPopItem a {
  row-gap: 4px;
}

.fastPopItem a:hover p {
  color: #f15a31;
}

.fastPopItem img {
  width: 40px;
}

.fastPopItem p {
  margin: 0px;
}

.grid {
  column-width: 280px;
  column-gap: 16px;
}

.item {
  break-inside: avoid;
  margin-bottom: 16px;

  border-radius: 22px;
  overflow: hidden;

  background: #1e1e1e;
  color: white;

  transition: 0.25s transform;
  cursor: pointer;
  position: relative;
}

.gridItem:hover {
  transform: translateY(-5px);
}

.gridItem:hover .content {
  opacity: 1;
}

.item img {
  width: 100%;
  display: block;
}

.content {
  padding: 14px;
  position: absolute;
  bottom: 0px;
  opacity: 0;
  color: white;
  background-color: transparent !important;
  background-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0.836)
  );
  width: 100%;
  transition: opacity 0.2s linear;
}

.content:hover p {
  color: #dd2a1b;
}

.content h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.content p {
  opacity: 0.7;
  line-height: 1.5;
  margin-bottom: 0px;
  font-size: 12px;
  transition: color 0.1s linear;
  text-align: center;
}

.gridSystem > div.container > div.row > a {
  background-color: #dd2a1b;
  border-radius: 100000px;
  width: max-content !important;
  transition: background-color 0.1s linear;
}

.gridSystem > div.container > div.row > a:hover {
  background-color: #a72014;
}

.carouselSection > div.container > div.row > a {
  background-color: #dd2a1b;
  border-radius: 100000px;
  width: max-content !important;
  transition: background-color 0.1s linear;
}

.carouselSection > div.container > div.row > a:hover {
  background-color: #a72014;
}

.textAfter {
  position: relative;
}

.textAfter::after {
  content: "";
  background-color: #dd2a1b;
  color: #dd2a1b;
  width: 100px;
  height: 1px;
  position: absolute;
  top: 164%;
  left: 50%;
  transform: translateX(-50%);
}

.tab {
  cursor: pointer;
  position: relative;
}

.tab.active {
  color: #dd2a1b;
}

.tab.active::after {
  content: "";
  background-color: #dd2a1b;
  color: #dd2a1b;
  width: 100px;
  height: 1px;
  position: absolute;
  top: 164%;
  left: 50%;
  transform: translateX(-50%);
}

@media only screen and (max-width: 768px) {
  div.tab.newest {
    display: none !important;
  }
  div.tab.free {
    display: none !important;
  }
}

@media only screen and (min-width: 768px) {
  div.tab.newest2 {
    display: none !important;
  }
  div.tab.free2 {
    display: none !important;
  }
}

.footerInfo {
  background-color: #dd2a1b;
}

.footerInfo a:nth-child(1) {
  transition: color 0.1s linear;
  text-decoration: none;
  color: white;
}

.footerInfo a:nth-child(1):hover {
  color: rgb(183, 183, 183);
}

.navItem:not(:last-child)::after {
  content: "|";
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
  /* background-color: #5d5d5d; */
  font-size: 14px;
  font-weight: 700;
}

.max-content {
  @media (min-width: 768px) {
    width: max-content;
  }
}

.filterImg {
  filter: brightness(0.7) contrast(1.2) grayscale(100%);
}

.filterImg2 {
  filter: brightness(1) contrast(1.2) grayscale(100%);
}

.filterImg3 {
  filter: brightness(1.5) contrast(1.2) grayscale(100%);
}

.navItem {
  white-space: nowrap;
}

section.heroSection {
  background-image: url("/vecty/Profile.jpg");
  background-size: cover;
  backdrop-filter: theme(dark);
  max-height: 135px;
  background-position: center;
}

a.navBox {
  width: 130px;
  height: 130px;
  background-color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  row-gap: 10px;
  border-radius: 4px;
  transition: color 0.1s linear;
}

a.navBox:hover {
  color: #dd2a1b !important;
}

div.navBoxes {
  z-index: 2;
}

@media only screen and (max-width: 992px) {
  div.navBoxes {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    gap: 12px !important;
  }
}

@media only screen and (max-width: 768px) {
  a.navBox {
    width: 100px;
    height: 100px;
  }
}

.navSection {
  margin-top: 150px;
}

.activeIcon {
  display: none;
}

a.navBox.active > img {
  display: none;
}

a.navBox.active > img.activeIcon {
  display: block;
}

a.navBox > img {
  width: 20px;
}

a.navBox.active {
  background-color: #6e6e6e;
  color: white !important;
}

.navSection > hr {
  width: 100%;
  bottom: 60px;
  z-index: 1;
  right: 0px;
}

.partHeader {
  color: #dd2a1b;
  position: relative;
  width: max-content;
}

.partHeader::after {
  content: "";
  width: 100%;
  height: 2px;
  position: absolute;
  bottom: -17px;
  background-color: #dd2a1b;
  left: 0px;
  border-radius: 100000px;
}

.badgeDiv {
  position: absolute;
  top: 20px;
  /* left: -46px; */
  /* background-color: green; */
  padding: 4px;
  border-bottom-right-radius: 8px;
  border-top-right-radius: 8px;
  font-weight: 100;
  color: white;
  transition: left 0.3s ease-in-out;
}

.badgeDivGreen {
    background-color: green;
    left: -40px;
}

.badgeDivBlue {
  background-color: rgb(81, 81, 255);
  left: -50px;
}

.badgeDivYellow {
    background-color: gold;
    left: -40px;
    color: black !important;
}

.gridItem:hover .badgeDiv {
    left: 0px;
}

.gridItemX:hover .badgeDiv {
    left: 0px;
}

div.prevDownload {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 12px;
  justify-items: center;
}

div.prevDownload > a {
  width: max-content;
  height: max-content;
}

.gridItem {
  overflow: hidden;
  position: relative;
  border-radius: 8px;
}

@media only screen and (max-width: 768px) {
  div.prevDownload {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media only screen and (max-width: 576px) {
  div.prevDownload {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .prevDownload .gridItem {
    max-width: 200px;
  }
}

.prevDownload img {
  width: 100%;
}

.tabProfile.active {
  color: #dd2a1b;
}

.tabProfile.active::after {
  content: "";
  background-color: #dd2a1b;
  color: #dd2a1b;
  width: 100%;
  height: 1px;
  position: absolute;
  top: 164%;
  left: 50%;
  transform: translateX(-50%);
}

div.inputDiv > input {
  border: 0px !important;
  outline: 0px;
}

div.inputDiv > input:focus-visible {
  border: 0px !important;
  outline: 0px;
}

div.inputDiv > button {
  cursor: pointer;
}

.radioContainer > label {
  cursor: pointer;
}

.radioContainer > label.active {
  background-color: #363636;
  color: white;
  border-radius: 10000px;
  padding: 4px 6px;
}

.cursorP {
  cursor: pointer;
}

.comboWrapper {
  position: relative;
  display: inline-block;
  /* padding-bottom: 10px; */
}

.comboList {
  position: absolute;
  z-index: 1000;
  background-color: white;
  border-radius: 8px;
  width: 150px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.12);

  left: 50%;
  transform: translateX(-50%);

  top: 100%;

  max-height: 300px;
  overflow-y: auto;
}

.comboItem {
  cursor: pointer;
  border-radius: 6px;
}

.comboItem:hover {
  background-color: #f3f3f3;
}

.submitBtn {
  padding: 6px 10px;
  border-radius: 1000px;
  background-color: rgb(43, 176, 43);
  border: 0px;
  outline: 0px;
  color: white;
  transition: background-color 0.2s linear;
  font-size: 13px;
}

.submitBtn:hover {
  background-color: rgb(38, 156, 38);
}

.addTicketBtn {
  padding: 6px 10px;
  border-radius: 1000px;
  background-color: rgb(43, 176, 43);
  border: 0px;
  outline: 0px;
  color: white;
  transition: background-color 0.2s linear;
  font-size: 13px;
}

.addTicketBtn:hover {
  background-color: rgb(38, 156, 38);
}

.showModalBtn {
  padding: 6px 10px;
  border-radius: 1000px;
  background-color: rgb(43, 112, 176);
  border: 0px;
  outline: 0px;
  color: white;
  transition: background-color 0.2s linear;
  font-size: 13px;
}

.showModalBtn:hover {
  background-color: rgb(36, 95, 150);
}

.editImg {
  padding: 6px 10px;
  border-radius: 1000px;
  background-color: rgb(43, 112, 176);
  border: 0px;
  outline: 0px;
  color: white;
  transition: background-color 0.2s linear;
  font-size: 13px;
}

.editImg:hover {
  background-color: rgb(36, 95, 150);
}

.submitBtn {
  padding: 6px 10px;
  border-radius: 1000px;
  background-color: rgb(43, 176, 43);
  border: 0px;
  outline: 0px;
  color: white;
  transition: background-color 0.2s linear;
  font-size: 13px;
}

.submitBtn:hover {
  background-color: rgb(38, 156, 38);
}

@media (max-width: 768px) {
  form {
    justify-content: center;
  }
}

select,
input:focus-visible {
  outline: 0px;
}

.walletBox a {
  /* background-color: #44bc7c !important; */
}

ul.pagination > li.page-item.active > a.page-link {
  background-color: #dd2a1b !important;
  border: 0px;
  color: white;
}

ul.pagination > li.page-item > a.page-link {
  color: black;
}

.hoverMenu {
  display: none;
}

ul.dropdown-menu {
  min-width: 200px;
}

ul.dropdown-menu > li,
ul.dropdown-menu > li > a.dropdown-item {
  transition: background-color 0.1s linear;
}

ul.dropdown-menu > li:hover {
  background-color: rgb(227, 227, 227);
}

ul.dropdown-menu > li:hover > a.dropdown-item {
  background-color: rgb(227, 227, 227);
}

/* ============================================================
       DESIGN TOKENS & RESET
    ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-border: #e8eaed;
  --color-hover-bg: #f0f4ff;
  --color-hover-text: #2563eb;
  --color-text: #1e2530;
  --color-text-muted: #6b7280;
  --color-accent: #2563eb;
  --color-accent-soft: #eff6ff;
  --color-shadow: rgba(30, 37, 48, 0.1);
  --color-shadow-lg: rgba(30, 37, 48, 0.16);
  --color-connector: #c7d2fe;

  /* Sizing */
  --item-height: 40px;
  --item-px: 14px;
  --font-size: 13.5px;
  --radius: 8px;
  --radius-sm: 5px;
  --submenu-width: 220px;
  --transition: 160ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* html, body {
      height: 100%;
      font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
      font-size: var(--font-size);
      color: var(--color-text);
      background: #f4f6fb;
      -webkit-font-smoothing: antialiased;
    } */

/* ============================================================
       PAGE LAYOUT & DEMO SHELL
    ============================================================ */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 80px;
  gap: 32px;
}

.page-header {
  text-align: center;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--color-text);
}

.page-header p {
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.demo-row {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

.demo-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 12px var(--color-shadow);
  min-width: 220px;
}

.demo-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  /* margin-bottom: 14px; */
  padding: 0px !important;
  position: relative;
}

/* Controls */
.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 13px;
  font-family: inherit;
  color: var(--color-text);
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition);
}

.btn:hover {
  background: var(--color-hover-bg);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ============================================================
       TREE NAV ROOT
    ============================================================ */
.tree-nav {
  position: relative;
  user-select: none;
  overflow: visible;
}

/* ---- Root (level-0) list ---- */
.tree-nav > .tree-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
}

/* ---- All lists ---- */
.tree-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ---- Individual list item ---- */
.tree-item {
  position: relative;
}

/* ============================================================
       ITEM BUTTON / LABEL
    ============================================================ */
.tree-label {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--item-height);
  padding: 0 var(--item-px);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  color: var(--color-text);
  transition:
    background var(--transition),
    color var(--transition);
  outline: none;
  position: relative;
  /* ensures keyboard focus ring is visible */
}

.tree-label:focus-visible {
  box-shadow: 0 0 0 2px var(--color-accent);
  background: var(--color-hover-bg);
  color: var(--color-accent);
  z-index: 1;
}

.tree-label:hover,
.tree-item.open > .tree-label {
  background: var(--color-hover-bg);
  color: var(--color-accent);
}

/* Icon slot */
.tree-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 15px;
  line-height: 1;
  display: none !important;
}

/* Label text */
.tree-label-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Arrow chevron */
.tree-arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  transition:
    transform var(--transition),
    opacity var(--transition);
  margin-left: auto;
  transform: rotateZ(0deg) !important;
}

.tree-arrow svg {
  width: 12px;
  height: 12px;
  display: block;
  /* rotate: 0 0 90deg; */
  transform: rotateZ(90deg) !important;
}

.tree-item.open > .tree-label .tree-arrow {
  opacity: 0.85;
}

/* RTL: flip arrow direction on root level */
[dir="rtl"] .tree-arrow svg {
  transform: scaleX(-1) rotateZ(90deg);
}

/* ============================================================
       SUBMENU PANEL
    ============================================================ */
.tree-submenu {
  /*
        Submenu floats beside its parent item.
        Position is set in JS to account for viewport edges.
      */
  position: absolute;
  top: 0;
  left: 100%; /* default LTR — JS may override */
  min-width: var(--submenu-width);
  max-width: calc(100vw - 20px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow:
    0 8px 32px var(--color-shadow-lg),
    0 2px 8px var(--color-shadow);
  padding: 5px;
  z-index: 1000;
  pointer-events: none;

  /* Animation start state */
  opacity: 0;
  transform: translateX(6px) scale(0.97);
  transform-origin: left top;
  transition:
    opacity var(--transition),
    transform var(--transition);
}

/* RTL flip */
[dir="rtl"] .tree-submenu {
  left: auto;
  right: 100%;
  transform: translateX(-6px) scale(0.97);
  transform-origin: right top;
}

/* Open / visible state */
.tree-item.open > .tree-submenu {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

/* Small connector bridge between parent and submenu (prevents hover gap) */
.tree-submenu::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 8px;
  height: 100%;
  background: transparent;
}

[dir="rtl"] .tree-submenu::before {
  left: auto;
  right: -8px;
}

/* Subtle left-border accent per nesting level */
.tree-submenu .tree-submenu {
  border-left: 2px solid var(--color-connector);
}

[dir="rtl"] .tree-submenu .tree-submenu {
  border-left: none;
  border-right: 2px solid var(--color-connector);
}

/* ============================================================
       LEVEL DEPTH INDENTATION (visual badge on label)
    ============================================================ */
.tree-depth-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 99px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  margin-left: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  display: none !important;
}

.tree-label:hover .tree-depth-badge,
.tree-item.open > .tree-label .tree-depth-badge {
  opacity: 1;
}

/* ============================================================
       MOBILE: click/tap mode — submenu sits below
    ============================================================ */
@media (max-width: 640px) {
  :root {
    --submenu-width: 200px;
    --item-height: 44px;
  }

  /* Stack everything vertically */
  .tree-submenu {
    position: absolute;
    top: 100%; /* زیر آیتم والد */
    left: 0; /* از چپ تراز */
    right: auto;
    min-width: var(--submenu-width);
    max-width: calc(100vw - 20px);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow:
      0 8px 32px var(--color-shadow-lg),
      0 2px 8px var(--color-shadow);
    padding: 5px;
    z-index: 1000;
    pointer-events: none;

    opacity: 0;
    transform: translateY(6px) scale(0.97); /* انیمیشن از پایین */
    transform-origin: top left;
    transition:
      opacity var(--transition),
      transform var(--transition);
  }

  /* RTL: از راست تراز */
  [dir="rtl"] .tree-submenu {
    left: auto;
    right: 0;
    transform: translateY(6px) scale(0.97);
    transform-origin: top right;
  }

  .tree-submenu > * {
    overflow: hidden;
  }

  .tree-item.open > .tree-submenu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .tree-submenu::before {
    content: "";
    position: absolute;
    bottom: 100%; /* بالای submenu */
    left: 0;
    width: 100%;
    height: 8px;
    background: transparent;
  }

  [dir="rtl"] .tree-submenu::before {
    left: auto;
    right: 0;
  }

  .tree-submenu .tree-submenu {
    border-left: none;
  }

  [dir="rtl"] .tree-submenu .tree-submenu {
    border-right: none;
  }

  /* Arrow rotates down on mobile */
  .tree-item.open > .tree-label .tree-arrow svg {
    transform: rotate(90deg);
  }

  [dir="rtl"] .tree-item.open > .tree-label .tree-arrow svg {
    transform: rotate(90deg) scaleX(-1);
  }
}

/* ============================================================
       UTILITY: separator
    ============================================================ */
.tree-separator {
  height: 1px;
  background: var(--color-border);
  margin: 4px 6px;
}
.ccc {
    padding: 6px 10px;
    border-radius: 1000px;
    background-color: rgb(43, 176, 43);
    border: 0px;
    outline: 0px;
    color: white;
    transition: background-color 0.2s linear;
    font-size: 13px;
}