/* ============================================================
   BarqNews Pro — 02 — Typography System
   ============================================================ */

/* تحميل Readex Pro من Google Fonts.
   في الإنتاج استخدم self-host عبر @font-face للملف woff2 المحلي. */
@import url("https://fonts.googleapis.com/css2?family=Readex+Pro:wght@300;400;500;600;700&display=swap");

/*  --------- إعدادات أساسية --------- */
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--site-font);
  font-size:   var(--font-size-base);
  line-height: var(--line-height-ar);
  color:       var(--text-color);
  background:  var(--bg-color);
  direction:   rtl;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.ltr { direction: ltr; }

/*  --------- العناوين --------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--site-font);
  color: var(--text-color);
  margin: 0 0 0.5em;
  line-height: var(--line-height-tight);
  text-wrap: balance;
}

h1 { font-size: clamp(24px, 4vw, 38px); font-weight: 700; }
h2 { font-size: clamp(20px, 3vw, 30px); font-weight: 700; }
h3 { font-size: clamp(17px, 2.5vw, 24px); font-weight: 700; }
h4 { font-size: 18px; font-weight: 600; }
h5 { font-size: 16px; font-weight: 600; }
h6 { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

p { margin: 0 0 1em; }

a {
  color: var(--site-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--site-color-darker-2); }

small { font-size: var(--font-size-xs); color: var(--text-muted); }
strong, b { font-weight: 700; }

/*  --------- محتوى المقال --------- */
.entry-content {
  font-size: 17px;
  line-height: 1.9;
  color: var(--text-color);
  text-wrap: pretty;
}

.entry-content p { margin: 0 0 1.25em; }

.entry-content a {
  color: var(--site-color);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--site-color-rgb), 0.3);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.entry-content a:hover {
  text-decoration: underline;
  border-bottom-color: transparent;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.entry-content h2 { font-size: 26px; }
.entry-content h3 { font-size: 21px; border-bottom: none; padding-bottom: 0; }

.entry-content ul,
.entry-content ol {
  padding-right: 20px;
  padding-left: 0;
  margin: 0 0 1.25em;
}
.entry-content li { margin-bottom: 0.5em; }

.entry-content blockquote {
  margin: 1.5em 0;
  padding: 16px 20px 16px 20px;
  border-right: 4px solid var(--site-color);
  background: var(--light-bg);
  border-radius: 0 var(--glob-border-radius) var(--glob-border-radius) 0;
  font-style: normal;
  color: var(--text-secondary);
}
.ltr .entry-content blockquote {
  border-right: none;
  border-left: 4px solid var(--site-color);
  border-radius: var(--glob-border-radius) 0 0 var(--glob-border-radius);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--light-bg);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  direction: ltr;
  display: inline-block;
}

.entry-content pre {
  font-family: var(--font-mono);
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--glob-border-radius);
  padding: 16px;
  overflow-x: auto;
  direction: ltr;
  font-size: 14px;
  line-height: 1.6;
}
.entry-content pre code { background: transparent; border: none; padding: 0; }

.entry-content img,
.entry-content figure {
  max-width: 100%;
  height: auto;
  border-radius: var(--glob-border-radius);
  margin: 1.5em 0;
}

.entry-content figcaption {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.entry-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2em 0;
}

/*  --------- meta المقالات --------- */
.post-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.post-meta a { color: var(--text-muted); }
.post-meta a:hover { color: var(--site-color); }
.post-meta .meta-sep { opacity: 0.4; }
.post-meta i { margin-left: 4px; opacity: 0.7; }

/*  --------- الوسوم --------- */
.entry-tags-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.entry-tags-inner .tags-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: 4px;
}
.entry-tags-inner a {
  background: var(--light-bg);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.entry-tags-inner a:hover {
  background: var(--site-color);
  color: white;
}

/*  --------- selection --------- */
::selection {
  background: rgba(var(--site-color-rgb), 0.25);
  color: var(--text-color);
}
