@font-face {
  font-family: "Vazir";
  src: url("/_library/vazir.woff2") format("woff2");
}
@font-face {
  font-family: "VazirEn";
  src: url("/_library/vazir-en.woff2") format("woff2");
}

* {
  -webkit-tap-highlight-color: transparent;
  font-family: Vazir;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: 300ms;
  user-select: none;
  -webkit-user-drag: none;
}

:root {
  --primary: #0a66c2;
  --gray-light: #dadada;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--gray-light);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 20px;
}

.taja {
  text-align: justify !important;
  text-justify: inter-word !important;
  hyphens: auto !important;
}

.tac {
  text-align: center;
}

body {
  font-family: "Vazir", "Tahoma", sans-serif;
  background-color: #f0f4f9;
  color: #1a2c3e;
  line-height: 1.9;
  padding: 2rem 1rem;
}

.dark {
  color: #004182 !important;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  padding: 2rem;
}

.english {
  font-family: "VazirEn", "Arial", sans-serif;
}

.hero-image {
  flex: 0.9;
  /* background: linear-gradient(145deg, #f0f4f9, #ebedf0); */
  border-radius: 2rem;
  padding: 1rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.hero-image img {
  max-width: 100%;
  max-width: 14rem;
  border-radius: 1.5rem;
  object-fit: contain;
  /* aspect-ratio: 1 / 0.9; */
}

.ltr {
  direction: ltr !important;
  display: inline-block;
}

.header-hero {
  text-align: center;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.header-hero .badge {
  background: #eef2ff;
  color: #0a66c2;
  display: inline-block;
  padding: 0.2rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  margin-bottom: 0.8rem;
}

.header-hero h1 {
  font-size: 2rem;
  color: #0a2b3e;
  margin: 0.5rem 0;
}

.header-hero p {
  color: #475569;
  margin: 0.3rem 0;
}

.btn-site {
  display: inline-block;
  background: #0a66c2;
  color: white;
  padding: 0.6rem 1.8rem;
  border-radius: 40px;
  text-decoration: none;
  margin-top: 1rem;
  font-weight: 500;
}

.btn-site:hover {
  background: #004182;
}

h1 {
  font-size: 1.6rem;
  color: #0a2b3e;
  border-bottom: 3px solid #0a66c2;
  padding-bottom: 0.4rem;
  margin-top: 1.8rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.3rem;
  color: #004182;
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
}

h3 {
  font-size: 1.1rem;
  color: #0a66c2;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

.toc {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 20px;
  margin: 1.5rem 0;
  border: 1px solid #e2e8f0;
}

.toc h3 {
  margin-top: 0;
}

.toc ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.4rem;
  list-style: none;
}

.toc ul li a {
  color: #0a66c2;
  text-decoration: none;
  display: block;
  padding: 0.3rem 0;
  font-size: 0.85rem;
}

.toc ul li a:hover {
  background: #eef2ff;
  padding-right: 0.5rem;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

th {
  background: #004182;
  color: white;
  padding: 10px 12px;
  text-align: right;
}

td {
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  vertical-align: top;
}

tr:nth-child(even) {
  background: #f8fafc;
}

.info-box {
  background: #eef2fa;
  border-right: 4px solid #0a66c2;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  border-radius: 12px;
}

.image-placeholder {
  background: linear-gradient(135deg, #f0f4f9, #e2e8f0);
  border-radius: 16px;
  padding: 1.8rem;
  text-align: center;
  margin: 1.2rem 0;
  border: 2px dashed #0a66c2;
}

.image-caption {
  font-size: 0.7rem;
  color: #64748b;
  text-align: center;
  margin-top: -0.8rem;
  margin-bottom: 1rem;
}

ul,
ol {
  margin-right: 1.8rem;
  margin-bottom: 1rem;
}

li {
  margin: 0.4rem 0;
}

.contact-links {
  list-style: none;
  margin-right: 0;
}
.contact-links li {
  margin: 0.7rem 0;
}
.contact-links a {
  color: #1a2c3e;
  text-decoration: none;
  cursor: pointer;
}
.contact-links a:hover {
  text-decoration: none;
  cursor: pointer;
}
.contact-links .english {
  direction: ltr;
  display: inline-block;
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }
  .container {
    padding: 1rem;
  }
  .toc ul {
    grid-template-columns: 1fr;
  }
  table,
  th,
  td {
    font-size: 0.7rem;
  }
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: #0a66c2;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top:hover {
  background: #004182;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
