@font-face {
  font-family: 'Vazir';
  src: url('fonts/Vazir.woff2') format('woff2'),
       url('fonts/Vazir.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Vazir', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  direction: rtl;
}

/* Top Navigation Bar */
.navbar {
  background-color: #222;
  padding: 0.5em 1em;
}

.nav-container {
  display: flex;
  justify-content: flex-end;
  gap: 1em;
}

.nav-item {
  color: white;
  font-size: 1.2em;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-item:hover {
  color: #ccc;
}

/* Main Layout */
.main-box {
  width: 90%;
  margin: 0.5em auto 1.5em auto;
  padding: 0 1em;
}

/* Page Number */
.page-number {
  text-align: center;
  font-size: 1.3em;
  color: #444;
  margin: 0.2em 0 0.5em 0;
}

/* Article Section */
.article {
  border: 2px solid #ccc;
  border-radius: 10px;
  padding: 1.2em;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.section-title {
  font-size: 1.5em;
  margin-bottom: 0.5em;
  border-right: 4px solid #444;
  padding-right: 0.5em;
  color: #222;
}

.text {
  text-align: justify;
  font-family: 'Vazir', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  color: #333;
}

.separator {
  border: none;
  border-top: 2px solid #ccc;
  margin: 1em 0;
}

.footnote {
  font-size: 0.95em;
  color: #666;
  line-height: 1.8;
}

/* Bottom Navigation Buttons */
.footer-links {
  display: flex;
  justify-content: space-between;
  gap: 0;
  margin-top: 1em;
  border-top: 1px solid #ccc;
  padding-top: 0.5em;
}

.btn-link {
  flex: 1;
  text-align: center;
  padding: 0.4em 0.2em;
  background-color: #007BFF;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  border-radius: 0;
  transition: background-color 0.3s;
  font-size: 0.95em;
}

.btn-link:first-child {
  border-left: 1px solid #ccc;
}

.btn-link:hover {
  background-color: #0056b3;
}

/* Mobile Enhancements */
@media (max-width: 600px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-end;
  }

  .footer-links {
    flex-direction: column;
  }

  .btn-link {
    width: 100%;
    border-left: none;
    border-top: 1px solid #ccc;
  }

  .btn-link:first-child {
    border-top: none;
  }
}

/* Large screen font scaling */
@media (min-width: 1400px) {
  .text {
    font-size: 1.2em;
  }
}
