/* Import Cairo Font */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
  --primary: #8b4513; /* SaddleBrown - Earthy Damascus tone */
  --secondary: #d4a017; /* Gold */
  --bg-off: #f9f7f2; /* Paper/Parchment feel */
  --text-main: #1a1a1a;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-off);
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
}

/* Rich Text Styling (Article Body) */
.rich-text {
  line-height: 1.8;
  font-size: 1.125rem;
}

.rich-text h1, .rich-text h2, .rich-text h3, .rich-text h4 {
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.75em;
  color: #000;
}

.rich-text h2 { font-size: 1.75rem; border-bottom: 2px solid var(--secondary); padding-bottom: 0.5rem; display: inline-block; }
.rich-text h3 { font-size: 1.5rem; }
.rich-text p { margin-bottom: 1.5em; }

.rich-text ul, .rich-text ol {
  margin-bottom: 1.5em;
  padding-right: 1.5em;
}

.rich-text ul { list-style-type: disc; }
.rich-text ol { list-style-type: decimal; }

.rich-text blockquote {
  border-right: 4px solid var(--primary);
  padding-right: 1rem;
  font-style: italic;
  background: #f0ebe5;
  padding: 1rem;
  margin: 1.5rem 0;
}

/* Responsive Tables */
.rich-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.rich-text th, .rich-text td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: right;
}

.rich-text th {
  background-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.rich-text tr:nth-child(even) {
  background-color: #f3f3f3;
}

/* Specific Layout Tweaks */
.container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sticky Header Backdrop */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border-bottom: 1px solid #e5e7eb;
}