/*
Theme Name: Simple RTL Blog
Theme URI: https://example.com/simple-rtl-blog
Author: Your Name
Author URI: https://example.com
Description: قالب ووردبريس عربي بسيط وخفيف (RTL) لمدونة: صفحة رئيسية 3×2 (6 مقالات/صفحة) مع ترقيم أرقام، وصفحة مقالة ترث الهيدر والفوتر، بدون ويدجت أو إضافات.
Version: 1.0.2
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: simple-rtl-blog
*/

/* ====== إعدادات عامة RTL ====== */
html[lang="ar"] { direction: rtl; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: #222;
  background: #fafafa;
  line-height: 1.7;
  text-align: right;
}

/* الحاوية العامة */
.container { width: min(1100px, 92%); margin-inline: auto; }

/* الهيدر */
.site-header { background: #fff; border-bottom: 1px solid #ececec; position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }

/* — توسيط الشعار والقائمة (تحديثاتك) — */
.site-header .wrap.header-stack { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px 0; }
.branding { display: flex; align-items: center; justify-content: center; }
.brand-logo { display: block; max-height: 64px; width: auto; }
.main-nav ul, .footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; flex-wrap: wrap; }
.main-nav ul { justify-content: center; }
.main-nav a, .footer-nav a { color: #333; text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.main-nav a:hover, .footer-nav a:hover { background: #f0f0f0; }

h1, h2, h3 { color: #111; line-height: 1.4; margin: 0 0 10px; }

/* شبكة البطاقات */
.posts-grid { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 22px; }
@media (min-width: 768px) { .posts-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { background: #fff; border: 1px solid #eaeaea; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,0.04); display: flex; flex-direction: column; min-height: 100%; }
.post-thumb { width: 100%; height: 200px; object-fit: cover; display: block; background: #f6f6f6; }
.post-body { padding: 14px 16px 16px; }
.post-title { font-size: 1.05rem; margin: 0 0 8px; }
.post-title a { color: #111; text-decoration: none; }
.post-excerpt { color: #555; margin-bottom: 12px; min-height: 42px; }
.read-more { align-self: flex-start; display: inline-block; padding: 8px 12px; background: #111; color: #fff; text-decoration: none; border-radius: 8px; font-size: .95rem; }
.read-more:hover { background: #333; }

/* ترقيم الصفحات */
.pagination { margin: 22px 0 10px; text-align: center; }
.pagination .page-numbers { display: inline-block; padding: 8px 10px; margin: 0 4px; border: 1px solid #e2e2e2; border-radius: 8px; text-decoration: none; color: #333; background: #fff; }
.pagination .page-numbers.current { background: #111; color: #fff; border-color: #111; }
.pagination .page-numbers:hover { background: #f2f2f2; }

/* صفحة المقالة */
.single-article { background: #fff; border: 1px solid #eaeaea; border-radius: 12px; padding: 18px; box-shadow: 0 1px 6px rgba(0,0,0,0.04); margin-top: 20px; }
.single-article img { max-width: 100%; height: auto; }
.single-meta { margin-top: 14px; color: #666; font-size: .95rem; }

/* الفوتر */
.site-footer { margin-top: 30px; border-top: 1px solid #ececec; background: #fff; }
.site-footer .wrap { padding: 18px 0; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.copy { color: #666; font-size: .95rem; }

/* قسم صورة الهيدر (Hero) */
.blog-hero { width: 100%; background: #fff; border-bottom: 1px solid #ececec; }
.blog-hero .hero-img { display: block; width: 100%; max-height: 420px; object-fit: cover; }

/* وصولية */
.screen-reader-text { position: absolute; clip: rect(1px,1px,1px,1px); padding: 0; border: 0; height: 1px; width: 1px; overflow: hidden; word-wrap: normal !important; }
