/* Reset and Base Styles */
body {
  margin: 0;
  padding: 0;
  background-color: #fff;
  direction: rtl;
  font-family: 'Vazir-light', sans-serif;
}

/* Top Bar Header */
.top-bar,
.fancy-nav {
  background-color: #f0f0f0; /* Light gray background */
  color: #000;
  padding: 10px;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #ccc;
}

/* Navbar Flex Container */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* Hamburger Icon Button */
.menu-toggle {
  background: none;
  border: none;
  font-size: 1.5em;
  color: #003366;
  cursor: pointer;
  display: none;
}

/* Nav Links Container */
.nav-links {
  display: flex;
  gap: 10px;
  background-color: #f0f0f0;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: flex-start;
  align-items: center;
  padding-right: 20px;
  flex-wrap: wrap;
}

/* Individual Link Styling */
.nav-links a {
  color: #000;
  text-decoration: none;
  font-size: 1em;
  padding: 0.5em 1em;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  display: inline-block;
}

.nav-links a:hover {
  background-color: #eee;
}

.nav-links a i {
  margin-left: 5px;
  margin-right: 0;
}

/* Search link */
.search-link a {
  background-color: #007bff;
  color: #fff;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #f8f8f8;
    padding: 10px 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 10px 20px;
    width: 100%;
    text-align: right;
  }
}

/* Main container */
.container {
  width: 95%;
  margin: 20px auto;
  box-sizing: border-box;
}

/* Section Titles */
.section-titles-horizontal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid #aaa;
  border-bottom: none;
  background-color: #fff;
  box-sizing: border-box;
}

.title-right,
.title-center,
.title-left {
  flex: 1;
}

.title-right {
  font-family: 'Amiri', serif;
  font-size: 1.2em;
  text-align: right;
  padding-left: 10px;
}

.title-center {
  font-size: 1.2em;
  text-align: center;
}

.title-left {
  font-family: 'Amiri', serif;
  font-size: 1.2em;
  text-align: left;
  padding-right: 10px;
}

.mytitle {
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 1.4em;
  direction: ltr;
  margin: 20px 0;
}

/* Section Styles */
section {
  border-left: 1px solid #aaa;
  border-right: 1px solid #aaa;
  border-top: 1px solid #aaa;
  border-bottom: 1px solid #aaa;
  padding: 15px;
  box-sizing: border-box;
}

/* Arabic Section Styling */
.arabic-section {
  font-family: 'Amiri', serif;
  text-align: right;
  background-color: #f9f9f9;
}

/* Persian Section Styling */
.persian-section {
  font-family: 'Vazir-light', sans-serif;
  text-align: right;
  background-color: #fff;
}

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

.atext {
  font-family: 'Amiri', serif;
  direction: rtl;
  text-align: right;
  font-size: 1.4em;
  line-height: 1.8;
}

/* Bottom Links */
.bottom-links {
  text-align: center;
  padding: 12px 0;
  border-left: 1px solid #aaa;
  border-right: 1px solid #aaa;
  border-bottom: 1px solid #aaa;
  border-top: none;
  box-sizing: border-box;
  background-color: #fff;
}

.bottom-links a,
.nav-link {
  text-decoration: none;
  color: #000;
  margin: 0 10px;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 600px) {
  .section-titles-horizontal {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .title-right,
  .title-center,
  .title-left {
    margin: 5px;
    text-align: center;
  }

  .arabic-section,
  .persian-text {
    font-size: 1.1em;
  }

  .bottom-links {
    font-size: 0.95em;
    padding: 10px 5px;
  }

  .container {
    width: 98%;
    margin: 15px auto;
  }
}
