/* ===============================
   HEADER STYLING (Arabic RTL)
   =============================== */
header {
  background: linear-gradient(90deg, #00796b, #004d40);
  color: #fff;
  padding: 10px 25px;
  position: fixed; /* always visible */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between; /* logo+title left, menu right */
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  flex-wrap: wrap;
  direction: rtl; /* right-aligned for Arabic */
}

/* Logo + title container */
.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Logo */
header img {
  height: 60px;
  border-radius: 8px;
}

/* Title */
header h1 {
  font-size: 1.6em;
  margin: 0;
  white-space: nowrap;
}

/* Navigation menu */
header nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end; /* right-align menu */
  overflow-x: auto;
}

/* Menu links */
header nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 14px;
  border-radius: 5px;
  transition: 0.3s;
  white-space: nowrap;
}

header nav a:hover {
  background-color: #004d40;
  transform: translateY(-2px);
}

/* Optional scrollbar styling for horizontal scroll */
header nav::-webkit-scrollbar {
  height: 6px;
}

header nav::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,0.5);
  border-radius: 3px;
}
footer {
  background: #004d40;
  color: #fff;
  padding: 15px 20px;
  text-align: right;       /* right-align for Arabic */
  font-size: 0.9em;
  direction: rtl;          /* ensure RTL */
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
  margin-top: 20px;
}

/* Optional: stick footer to bottom if page is short */
html, body {
  height: 100%;
}

/* General body styling */
body {
  font-family: "Tajawal", Arial, sans-serif;
  line-height: 1.7;
  color: #333;
  background-color: #f9f9f9;
  margin: 0;
  padding: 0;
  direction: rtl; /* Arabic layout */
}

/* Section styling */
section {
  background-color: #fff;
  margin: 20px auto;
  padding: 30px 25px;
  max-width: 1200px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Section titles */
section h2 {
  font-size: 1.8em;
  color: #004d40;
  margin-bottom: 15px;
  border-bottom: 2px solid #00796b;
  display: inline-block;
  padding-bottom: 5px;
}

/* Subtitles inside sections */
section h3 {
  font-size: 1.3em;
  color: #00796b;
  margin-top: 20px;
  margin-bottom: 10px;
}

/* Paragraphs */
section p {
  font-size: 1em;
  color: #444;
  margin-bottom: 15px;
  text-align: justify;
}

/* Lists */
section ul, section ol {
  margin: 15px 0 15px 25px;
  padding: 0;
  color: #444;
}

section li {
  margin-bottom: 8px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  border-radius: 8px;
  overflow: hidden;
}

table th, table td {
  border: 1px solid #ccc;
  padding: 10px 15px;
  text-align: right; /* right-align for Arabic */
}

table th {
  background-color: #00796b;
  color: #fff;
}

table tr:nth-child(even) {
  background-color: #f2f2f2;
}

/* Links inside content */
a {
  color: #00796b;
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  section {
    padding: 20px 15px;
  }
  section h2 {
    font-size: 1.5em;
  }
  section h3 {
    font-size: 1.1em;
  }
}


footer {
  flex-shrink: 0; /* prevent footer from shrinking */
}
