body {
  padding-top: 50px;
}

/*--------------------------------------------------------------
# Guide Landing Page
--------------------------------------------------------------*/

.docs-landing {
  padding: 80px 0 60px;
  min-height: calc(100vh - 80px - 367px + 30px);
}

.landing-header {
  max-width: 700px;
  margin: 0 auto 40px;
  text-align: center;
}

.landing-header h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #012970;
  line-height: 3rem !important;
}

.search-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.search-wrapper i {
  display: flex;
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.search-wrapper .search-box-custom {
  direction: rtl;
  width: 100%;
  height: 56px;
  border-radius: 20px;
  border: 1px solid #dbe2ea;
  background: #fff;
  padding: 0 50px 0 20px;
  font-size: 15px;
  text-align: right;
  transition: all .2s ease;
}

.search-wrapper .search-box-custom:focus {
  outline: none;
  border-color: #053C84;
  box-shadow: 0 0 0 4px rgba(5, 60, 132, .08);
}

.landing-header .mirror-filter-wrapper {
  width: 254px;
  margin: auto;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.guide-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all .25s ease;
}

.guide-card:hover {
  transform: translateY(-4px);
  border-color: #053C84;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.guide-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 16px;
}

.guide-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  color: #334155;
}

.guides-grid-title {
  grid-column: 1 / -1;
  text-align: right;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 24px;
  font-weight: 700;
  color: #012970;
}

.no-results {
  direction: rtl;
  grid-column: 1 / -1;
  text-align: center;
  padding: 34px 20px;
}

.no-results h3 {
  margin-bottom: 10px;
  font-size: 22px;
  color: #334155;
}

.no-results p {
  margin-bottom: 8px;
  color: #64748b;
}

.no-results small {
  color: #94a3b8;
}

@media (max-width: 1060px) {
  .docs-landing {
    padding: 60px 0 40px;
  }
}

@media (max-width: 768px) {
  .landing-header h1 {
    font-size: 28px;
  }

  .guides-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

  .guide-card {
    padding: 18px;
  }

  .guide-card img {
    width: 50px;
    height: 50px;
  }
}

/*--------------------------------------------------------------
# Repo Guide Page
--------------------------------------------------------------*/

.custom-sidebar {
  border: 1px solid #dee2e6;
  border-radius: 20px;
  z-index: 10;
}

.custom-sidebar ul {
  display: grid;
  gap: 5px;
}

.repo-list-container ul li {
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
}

.repo-list-container ul li.active {
  background: #e4f9ff;
}

.repo-list-container ul li a {
  cursor: pointer;
}

.repo-list-container ul li.active a,
.repo-list-container ul li.active button {
  color: #053C84;
}

.repo-list-container ul li.active ul li.active {
  background: #d1f3fe;
  border: 1px solid #053C84;
}

.repo-list-container ul li.disabled a {
  cursor: default;
  pointer-events: none;
}

.repo-list-container ul li.active a,
.repo-list-container ul li.active button {
  color: #053C84;
}

.header {
  transition: all 0.5s;
  z-index: 997;
  padding: 10px 0;
  direction: rtl;
  background-color: #FFFFFF;
}

.header .btn {
  display: flex;
  justify-content: center;
  flex-direction: row;
  align-items: center;
  border-radius: 50px;
  font-size: 1em;
  color: #053C84;
  background-color: transparent;
  border-color: #053C84;
  float: right;
  font-weight: 700;
  box-shadow: none !important;
  /* padding: 5px 15px 15px 5px */
}

.header .fa {
  padding-right: 10px;
  font-size: 20px;
  padding-bottom: 3px;
}

.header .btn:hover,
.header .btn .active,
.header .btn .active:focus {
  background-color: #053C84;
  color: white;
  box-shadow: none !important;
}

.sidebar-guides-title {
  text-align: right;
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 1rem;
  color: #012970;
}

/* استایل دکمه‌های مخازن */
.repo-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  color: #495057;
  background-color: transparent;
  border: none;
  padding: 12px 15px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  text-align: center;
}

.repo-btn:hover {
  background-color: #d8ebff;
  color: #0d6efd;
  padding-right: 20px;
}

.repo-btn:hover i {
  opacity: 1;
  color: #0d6efd;
}

.custom-sidebar .search-box-custom {
  text-align: right;
  border-radius: 12px;
  border: 1px solid #ced4da;
  transition: all 0.3s ease;
}

.custom-sidebar .search-box-custom:focus {
  outline: none;
  border-color: #053C84;
  box-shadow: 0 0 0 4px rgba(5, 60, 132, .08);
}

.input-group-text {
  border-radius: 12px 0 0 12px;
  border: 1px solid #ced4da;
}

.repo-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin-left: 10px;
}

.show-more-container {
  display: block;
  justify-content: flex-start;
  text-align: right;
  margin-top: 10px;
  margin-bottom: 10px;
  width: 100%;
  padding-right: 15px;
}

.btn-show-more {
  background-color: #fff;
  border: 0;
  color: #6c757d;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  gap: 5px;
  display: inline-flex;
  align-items: start;
}

.btn-show-more i {
  transition: transform 0.3s ease;
}

.repo-btn.has-submenu.active i {
  transform: rotate(180deg);
}

.btn-show-more.active i {
  transform: rotate(180deg);
}

.hidden-repo {
  display: none !important;
}

.repo-list-container::-webkit-scrollbar {
  width: 6px;
}

.repo-list-container::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.repo-list-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.repo-list-container::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* --- استایل زیرمجموعه‌ها --- */
ul.repo-sub-list {
  list-style: none;
  padding-right: 30px;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

ul.repo-sub-list.open {
  max-height: 100%;
  transition: max-height 0.5s ease-in;
  padding-top: 0.5rem;
  padding-bottom: 1rem;
}

ul.repo-sub-list li button {
  font-size: 0.9rem;
  padding: 8px 15px;
  display: block;
  width: 100%;
  text-align: right;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
}

.section_title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 25px;
  padding-right: 15px;
  font-size: 2rem;
  font-weight: 700;
  color: #2f2f2f;
}

.section_title img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.section_title div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  line-height: 1;
}

.section_title div h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1;
  font-weight: 700;
  margin: 0;
}

.section_title span.badge {
  font-size: .8rem;
  font-weight: 500;
  padding: .45rem .7rem;
  border-radius: 999px;
  text-transform: none;
  background: #053C84;
  min-width: 3rem;
  font-family: sans-serif;
}

.justify-content-center {
  justify-content: center !important;
}

.code_side {
  flex: 0 0 100% !important;
  max-width: 100% !important;
}

.main_panel_box {
  background: #ffffff;
  box-shadow: none;
  border: 1px solid #dfe3ea;
  border-radius: 20px;
  padding: 20px;
  min-height: auto;
  height: auto;
}

.main_panel_box .card-body {
  font-size: 12px;
  line-height: 20px;
  padding: 0 6px;
}

.card-body p {
  font-size: 16px;
  color: #444444;
  text-align: right;
}

.guide_title {
  text-align: right;
  color: #180786;
  direction: rtl;
}

.main_panel_box p {
  line-height: 2;
}

.guide-notice,
.guide-notice p {
  direction: rtl;
  color: #003882 !important;
}

.guide-notice span {
  background: #d5d5d5;
  color: #444444;
  border-radius: 7px;
  padding: 0 5px;
  display: inline-block;
  direction: ltr;
  line-height: 25px;
}

.code_box {
  background: #d5d5d5;
  transition: all 0.4s;
  padding: 4px 6px;
  border-radius: 7px;
  border: 1px solid #d5d5d5;
  position: relative;
  overflow: hidden;
  z-index: 2;
  margin: 10px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.code_box:hover {
  background: #d5d5d58c !important;
}

.code_box .copy_box {
  background: #c1c1c1;
  border-left: 1px solid #c1c1c1;
  position: absolute;
  height: 100%;
  top: 0;
  right: -40px;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 3;
  cursor: pointer;
  transition: all 0.4s;
}

.code_box .copy_box:hover {
  background: #d5d5d58c !important;
}

.code_box:hover .copy_box {
  right: 0px !important;
}

.code_box .config_copy_box {
  background: #c1c1c1;
  border-left: 1px solid #c1c1c1;
  position: absolute;
  height: fit-content;
  /* top: 4px;
  right: 4px; */
  top: 0;
  right: -40px;
  padding: 4px 7px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 3;
  cursor: pointer;
  transition: all 0.4s;
  border-radius: 11px;
}

.code_box .config_copy_box:hover {
  background: #d5d5d58c !important;
}

.code_box:hover .config_copy_box {
  top: 4px !important;
  right: 4px !important;
}

.code_box .copy_box .copy_icon,
.code_box .config_copy_box .copy_icon {
  font-size: 16px;
  display: flex;
  text-align: center;
  align-self: center;
  margin-top: 6px;
}

.code_box .copy_box .copy_text,
.code_box .config_copy_box .copy_text {
  font-size: 85%;
}

.code,
.config {
  margin: 0;
  text-align: left !important;
  font-family: Consolas, monospace;
  font-size: 14px !important;
  color: #444444;
  white-space: pre-wrap;
}

#download {
  width: 150px;
  color: #4154f1;
  align-items: center;
  border: 0.5px solid #4154f1;
  border-radius: 20px;
  display: flex;
  font-size: 14px;
  justify-content: center;
  padding: 5px;
}

.repo-meta-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.repo-meta-btn {
  background: #fff;
  border: 1px solid #d6dce8;
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 14px;
  color: #5d6b82;
}

.repo-meta-btn.favorite {
  background: #d9eefb;
  color: #4154f1;
}

.download-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-version-title {
  margin: 0;
  font-size: 28px;
  font-weight: 400;
  color: #444444;
}

.video_side {
  width: 100%;
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

.video_side video {
  width: 100%;
  max-width: 100%;
  display: block;
  border-radius: 16px;
}


/* مخفی کردن دکمه بیشتر در حین جستجو */
.search-box-custom:not(:placeholder-shown)~.repo-list-container .show-more-container {
  display: none !important;
}

/* اطمینان از نمایش همه مخازن در حین جستجو */
.search-box-custom:not(:placeholder-shown)~.repo-list-container .hidden-repo {
  display: block !important;
}

/* بهبود نمایش در جستجو */
.search-box-custom:not(:placeholder-shown)~.repo-list-container li {
  display: block;
}

/* ریست کردن استایل‌ها وقتی جستجو خالی است */
.search-box-custom:placeholder-shown~.repo-list-container .show-more-container {
  display: block;
}

.mirror-filter-wrapper {
  direction: rtl;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: fit-content;
  margin: 0 0 15px 0;
  padding: 4px;
  border: 1px solid #dee1e7;
  border-radius: 20px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.mirror-radio-group {
  display: flex;
  width: 100%;
  height: 46px;
  border-radius: 6px;
  overflow: hidden;
}

.mirror-radio-group input[type="radio"] {
  display: none;
}

.mirror-radio-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #121314;
  transition: all 0.3s ease;
  user-select: none;
  border: none;
  border-radius: 14px;
  margin: 5px;
}

.mirror-radio-group input[type="radio"]:checked+.mirror-radio-label {
  background-color: #012970;
  color: #ffffff;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="radio"]:disabled+.mirror-radio-label {
  opacity: 0.5;
  cursor: not-allowed;
}