body {
  background-color:white;
}


#scroll-down-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: auto;
  z-index: 9999;
  background-color:  #4caf50 ;
  color: white;
  border: none;
  padding: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  display: none; /* اولش مخفیه */
  transition: all 0.3s ease;
}




/* حالت شب اصلی */
.dark-mode {
  background-color: #121212 !important;
  color: #eeeeee !important;
}

/* همه‌ی عناصر داخلی */
.dark-mode * {
  background-color: transparent !important;
  color: #eeeeee !important;
  border-color: #444 !important;
}

/* بخش‌هایی که پس‌زمینه سفید دارن */
.dark-mode #main-container,
.dark-mode .container,
.dark-mode section,
.dark-mode div[style*="background"],
.dark-mode td,
.dark-mode th,
.dark-mode h1,
.dark-mode h2,
.dark-mode h3 {
  background-color: #1e1e1e !important;
  color: #eeeeee !important;
}

/* جدول‌ها */
.dark-mode table {
  background-color: #1e1e1e !important;
  color: #eeeeee !important;
  border: 1px solid #555 !important;
}

.dark-mode th,
.dark-mode td {
  background-color: #2a2a2a !important;
  border: 1px solid #666 !important;
}

/* ورودی‌ها */
.dark-mode input,
.dark-mode textarea,
.dark-mode select {
  background-color: #2a2a2a !important;
  color: #eeeeee !important;
  border: 1px solid #555 !important;
}


/*كد براى پرينت نشدن دكمه ها */
@media print {
  .no-print,
  button,
  .darkmode-toggle,
  .scroll-bottom-btn {
    display: none !important;
  }
}




/*كد cssبراى حذف اعداد لاتين ol*/


ol.persian-list {
      list-style-type: persian;
      padding-right: 1.5em;
    }
    .persian-num {
      font-weight: bold;
      margin-left: 0.5em;}









/*كد css براى منو*/

  #sidebarToggle {
  position: fixed;
  top: 10px;
  right: 10px;
  font-size: 28px;
  cursor: pointer;
  z-index:1100;
}

#sidebar {
  position: fixed;
  top: 0;
  right: -250px;
  width: 250px;
  height: 100%;
  background: #ffffff;
  box-shadow: -2px 0 5px rgba(0,0,0,0.2);
  transition: right 0.3s ease;
  z-index: 1000;
  padding-top: 60px;
}

.menu-item {
  padding: 15px 20px;
  cursor: pointer;
  border-bottom: 1px solid #ccc;
}
.menu-item:hover {
  background-color: #f5f5f5;
}
#toggledarkmode{
color: black;}



html {
  -webkit-text-size-adjust: 100%; /* جلوگیری از زوم خودکار متن */
}




/*كد css براى فهرست مطالب*/
/*
.toc {
  background-color: #f9f9f9;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  border: 1px solid #ddd;
}
.toc h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.toc ul {
  list-style: none;
  padding: 0;
}
.toc ul li {
  margin-bottom: 0.5rem;
}
.toc ul li a {
  color: #007BFF;
  text-decoration: none;
}
.toc ul li a:hover {
  text-decoration: underline;
}

*/

html {
  scroll-behavior: smooth;
}

.toc a {text-decoration: none;}



/* منوی کناری — یکدست کردن لینک ایمیل با بقیه آیتم‌ها */
a.menu-item {
  display: block;
  padding: 12px 16px;
  color: inherit;                 /* رنگ مثل بقیه آیتم‌ها */
  text-decoration: none;          /* حذف زیرخط */
  border-bottom: 1px solid #ccc;
  text-align: right;              /* راست‌چین برای فارسی */
  -webkit-tap-highlight-color: transparent;
}
a.menu-item:visited { color: inherit; }
a.menu-item:hover { background: rgba(0,0,0,.04); }
body.dark-mode a.menu-item:hover { background: rgba(255,255,255,.07); }