/* =====================================================
   موقع قبيلة الأنصار الرسمي — التصميم التراثي الفاخر
   الألوان متغيرات: النهاري يعدّله المشرفون من لوحة الإدارة،
   والليلي ثابت ومريح للعين.
   ===================================================== */
:root {
  --bg:#faf7f0; --head:#425f4b; --card:#ffffff; --text:#1d2620; --muted:#5a665d;
  --line:#e7e0cf; --primary:#425f4b; --gold:#b08423; --gold-text:#86610f;
  --accent:var(--gold); --on-primary:#ffffff; --shadow:0 8px 24px rgba(30,40,30,.08);
}
[data-theme="dark"] {
  --bg:#111713; --head:#1c2a21; --card:#1a221d; --text:#ece7da; --muted:#a8b2aa;
  --line:#2c3830; --primary:#9cc4a8; --gold:#c99a3a; --gold-text:#e2b862;
  --on-primary:#111713; --shadow:0 8px 24px rgba(0,0,0,.35);
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body { margin:0; background:var(--bg); color:var(--text); font-family:'Tajawal',system-ui,sans-serif; line-height:1.8; font-size:17px; transition:background .3s,color .3s; }
a { color:var(--primary); text-decoration:none; }
a:hover { color:var(--gold-text); }
img { max-width:100%; display:block; }
h1,h2,h3 { font-family:'Amiri',serif; line-height:1.45; margin:0 0 .4em; }
button { font:inherit; cursor:pointer; }
.wrap { max-width:1240px; margin:0 auto; padding:0 16px; }
.muted { color:var(--muted); }
.hidden { display:none !important; }

/* ---------- الرأس ---------- */
.site-header { background:var(--head); border-bottom:4px solid var(--gold); position:sticky; top:0; z-index:20; }
.head-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:10px; padding-bottom:10px; }
.brand { display:flex; align-items:center; gap:10px; color:#fff; font-family:'Amiri',serif; font-weight:700; font-size:1.3rem; line-height:1.2; }
.brand:hover { color:#fff; }
.brand img { width:48px; height:48px; border-radius:12px; box-shadow:0 0 0 2px rgba(255,255,255,.25); }
.nav-desk { display:flex; flex-wrap:wrap; gap:2px; }
.nav-desk a { color:#fff; padding:7px 13px; border-radius:20px; font-weight:500; font-size:15px; opacity:.92; }
.nav-desk a:hover, .nav-desk a[aria-current] { background:rgba(255,255,255,.16); color:#fff; opacity:1; }
.head-actions { display:flex; align-items:center; gap:6px; }
.icon-btn { width:44px; height:44px; border-radius:50%; border:1px solid rgba(255,255,255,.35); background:transparent; color:#fff; display:flex; align-items:center; justify-content:center; }
.icon-btn svg { width:20px; height:20px; }
.theme-sun { display:none; } [data-theme="dark"] .theme-sun { display:block; } [data-theme="dark"] .theme-moon { display:none; }
.login-btn { display:flex; align-items:center; gap:8px; background:#fff; color:#1f1f1f; height:44px; padding:0 16px; border-radius:22px; font-weight:700; font-size:14px; border:0; }
.login-btn:hover { color:#1f1f1f; }
.me-btn { width:44px; height:44px; border-radius:50%; border:2px solid var(--gold); overflow:hidden; background:var(--line); display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; }
.me-btn img { width:100%; height:100%; object-fit:cover; }

.chips { display:none; gap:8px; padding:12px 16px; overflow-x:auto; scrollbar-width:none; border-bottom:1px solid var(--line); }
.chips::-webkit-scrollbar { display:none; }
.chips a { white-space:nowrap; padding:7px 14px; border-radius:20px; font-size:14px; font-weight:500; color:var(--text); }
.chips a[aria-current] { background:var(--primary); color:var(--on-primary); }

@media (max-width:900px) {
  .nav-desk { display:none; }
  .chips { display:flex; }
  .brand { font-size:1.05rem; }
  .brand img { width:42px; height:42px; }
  .login-btn .lbl-long { display:none; }
  .login-btn { padding:0 14px; }
}

/* ---------- الشريط المتحرك ---------- */
.marquee { overflow:hidden; padding:20px 0 6px; }
.marquee-track { display:flex; gap:14px; width:max-content; animation:slideLR 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state:paused; }
@keyframes slideLR { from { transform:translateX(-50%); } to { transform:translateX(0); } }
.slide { width:340px; height:210px; border-radius:18px; position:relative; overflow:hidden; flex-shrink:0; background:var(--head); }
.slide img { width:100%; height:100%; object-fit:cover; }
.slide span { position:absolute; bottom:0; right:0; left:0; padding:12px 16px; background:linear-gradient(transparent,rgba(0,0,0,.7)); color:#fff; font-weight:500; direction:rtl; }
@media (max-width:600px) { .slide { width:240px; height:155px; } .slide span { font-size:14px; } }
@media (prefers-reduced-motion:reduce) { .marquee-track { animation:none; } }

/* ---------- الأقسام ---------- */
.block { margin:34px 0; }
.block-head { display:flex; justify-content:space-between; align-items:baseline; border-bottom:2px solid var(--line); margin-bottom:16px; }
.block-head h2 { color:var(--primary); font-size:1.9rem; margin:0 0 6px; }
.block-head a { color:var(--gold-text); font-size:15px; }
.page-title { color:var(--primary); font-size:2.2rem; margin:30px 0 18px; }
.empty { color:var(--muted); }

.news-top { display:flex; flex-wrap:wrap; gap:18px; }
.feature { flex:3 1 480px; min-width:0; background:var(--card); border:1px solid var(--line); border-radius:18px; overflow:hidden; }
.feature .ph, .feature img { width:100%; aspect-ratio:16/9; object-fit:cover; background:var(--head); }
.feature-body { padding:16px 20px 20px; }
.feature h3 { font-size:1.8rem; margin:8px 0 6px; }
.feature h3 a { color:var(--text); }
.news-list { flex:2 1 320px; min-width:0; display:flex; flex-direction:column; gap:12px; }
.row-card { display:flex; gap:12px; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:10px; }
.row-card .thumb { width:110px; height:82px; border-radius:10px; object-fit:cover; flex-shrink:0; background:var(--line); }
.row-card h3 { font-family:'Tajawal',sans-serif; font-size:1rem; font-weight:700; margin:0 0 6px; line-height:1.55; }
.row-card h3 a { color:var(--text); }
.meta { color:var(--muted); font-size:13px; }
.tag { display:inline-block; background:var(--gold); color:#fff; font-size:12px; padding:1px 11px; border-radius:12px; }

.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:18px; }
@media (max-width:600px) { .grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } }
.card { background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden; display:flex; flex-direction:column; transition:transform .15s, box-shadow .15s; }
.card:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.card img, .card .ph { width:100%; aspect-ratio:16/10; object-fit:cover; background:var(--line); }
.card-body { padding:12px 14px 16px; }
.card h3 { font-family:'Tajawal',sans-serif; font-size:1rem; font-weight:700; line-height:1.55; margin:6px 0 4px; }
.card h3 a { color:var(--text); }
.card p { color:var(--muted); font-size:.9rem; margin:0 0 6px; }

.poem-card { background:var(--card); border:1px solid var(--line); border-top:4px solid var(--gold); border-radius:18px; padding:26px 20px; text-align:center; }
.poem-card h3 { color:var(--gold-text); font-size:1.5rem; }
.poem-card .verse { font-family:'Amiri',serif; font-size:1.3rem; line-height:2.2; white-space:pre-line; margin:0; }
.poem-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:18px; }

.people { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:16px; }
@media (max-width:600px) { .people { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } }
.person { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:18px 12px; text-align:center; }
.person img, .avatar-ph { width:96px; height:96px; border-radius:50%; object-fit:cover; margin:0 auto 10px; border:3px solid var(--gold); background:var(--line); }
.person h3 { font-family:'Tajawal',sans-serif; font-size:1rem; font-weight:700; margin:0; }
.person .role { color:var(--gold-text); font-size:.9rem; margin:0; }
.person p { color:var(--muted); font-size:.88rem; margin:6px 0 0; }

.books { display:flex; flex-wrap:wrap; gap:16px; }
.book { width:150px; }
.book .cover { height:215px; border-radius:6px 14px 14px 6px; overflow:hidden; background:var(--head); color:#fff; display:flex; align-items:center; justify-content:center; text-align:center; padding:12px; font-family:'Amiri',serif; font-size:1.1rem; box-shadow:var(--shadow); }
.book .cover img { width:100%; height:100%; object-fit:cover; }
.book h3 { font-family:'Tajawal',sans-serif; font-size:.95rem; margin:8px 0 0; }
@media (max-width:600px) { .book { width:calc(33.3% - 11px); } .book .cover { height:auto; aspect-ratio:2/3; font-size:.9rem; } }

.join { background:var(--head); color:#fff; border-radius:20px; padding:26px; display:flex; flex-wrap:wrap; gap:16px; align-items:center; justify-content:space-between; }
.join h2 { font-size:1.7rem; margin:0 0 4px; }
.join p { margin:0; opacity:.9; }
.join .login-btn { height:50px; padding:0 26px; }

.platforms { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; }
.platforms a { border:1px solid rgba(255,255,255,.4); color:#fff; padding:6px 16px; border-radius:20px; }

/* ---------- صفحة الخبر ---------- */
.post { max-width:820px; margin:24px auto; }
.post .crumbs { font-size:.85rem; color:var(--muted); margin-bottom:8px; }
.post h1 { font-size:2.2rem; }
.post-meta { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:10px; color:var(--muted); font-size:.92rem; margin-bottom:16px; }
.post .cover { width:100%; border-radius:16px; margin-bottom:20px; }
.content p { margin:0 0 1.1em; font-size:1.08rem; line-height:2; }
.post.poem .content { text-align:center; font-family:'Amiri',serif; font-size:1.35rem; line-height:2.4; }
.btn { display:inline-flex; align-items:center; gap:8px; background:var(--primary); color:var(--on-primary); padding:10px 22px; border-radius:12px; border:0; font-weight:700; }
.btn:hover { color:var(--on-primary); opacity:.92; }
.btn-ghost { background:transparent; color:var(--text); border:1px solid var(--line); }
.btn-ghost:hover { color:var(--text); }
.save-btn[aria-pressed="true"] { background:var(--gold); color:#fff; border-color:var(--gold); }
.share { display:flex; gap:10px; flex-wrap:wrap; border-top:1px solid var(--line); margin-top:24px; padding-top:16px; }

.comments { border-top:2px solid var(--line); margin-top:30px; padding-top:18px; }
.comments h2 { color:var(--primary); font-size:1.6rem; }
.c-form { display:flex; gap:10px; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:12px; margin-bottom:18px; }
.c-form textarea { flex:1; min-height:70px; border:0; background:transparent; color:var(--text); font:inherit; resize:vertical; outline:none; }
.c-item { display:flex; gap:10px; margin-bottom:14px; }
.c-ava { width:40px; height:40px; border-radius:50%; object-fit:cover; flex-shrink:0; background:var(--line); }
.c-bubble { flex:1; min-width:0; background:var(--card); border:1px solid var(--line); border-radius:4px 14px 14px 14px; padding:10px 14px; }
.c-bubble strong { font-size:.95rem; }
.c-bubble p { margin:4px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.c-del { border:0; background:none; color:var(--muted); font-size:.8rem; padding:0; }

/* ---------- الملف الشخصي ---------- */
.profile { max-width:640px; margin:24px auto; }
.panel { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:18px; margin-bottom:14px; }
.profile-top { text-align:center; }
.profile-top .big-ava { width:116px; height:116px; border-radius:50%; object-fit:cover; border:4px solid var(--gold); margin:0 auto 8px; background:var(--line); }
.field { display:flex; gap:8px; }
.field input { flex:1; min-width:0; height:48px; border:1px solid var(--line); border-radius:12px; padding:0 12px; background:var(--bg); color:var(--text); font:inherit; }
.tabs { display:grid; grid-template-columns:1fr 1fr; border-bottom:2px solid var(--line); margin:18px 0 14px; }
.tabs button { height:46px; border:0; background:none; color:var(--muted); font-weight:700; border-bottom:3px solid transparent; margin-bottom:-2px; }
.tabs button[aria-selected="true"] { color:var(--primary); border-color:var(--gold); }
.danger { color:#b3261e; }

/* ---------- نافذة الدخول ---------- */
.sheet { position:fixed; inset:0; z-index:50; background:rgba(0,0,0,.45); display:flex; align-items:flex-end; justify-content:center; }
.sheet-box { background:var(--card); color:var(--text); width:100%; max-width:440px; border-radius:22px 22px 0 0; padding:24px 20px 30px; }
@media (min-width:600px) { .sheet { align-items:center; } .sheet-box { border-radius:22px; } }
.sheet-box h2 { font-size:1.6rem; margin:0 0 4px; color:var(--primary); }
.prov { width:100%; height:52px; margin-top:10px; border-radius:14px; border:1px solid var(--line); background:var(--bg); color:var(--text); display:flex; align-items:center; justify-content:center; gap:10px; font-weight:700; }

/* ---------- التذييل والتنقل السفلي ---------- */
.site-footer { background:var(--head); color:#fff; border-top:4px solid var(--gold); margin-top:50px; padding:26px 0 30px; text-align:center; }
.site-footer p { opacity:.85; margin:14px 0 0; font-size:.9rem; }
.site-footer .links a { color:#fff; opacity:.8; font-size:.85rem; margin:0 8px; }
.bottom-nav { display:none; }
@media (max-width:900px) {
  body { padding-bottom:70px; }
  .bottom-nav { display:grid; grid-template-columns:repeat(4,1fr); position:fixed; bottom:0; right:0; left:0; z-index:30; height:66px; padding-bottom:env(safe-area-inset-bottom); background:var(--card); border-top:1px solid var(--line); }
  .bottom-nav a { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; font-size:12px; color:var(--muted); }
  .bottom-nav a svg { width:22px; height:22px; }
  .bottom-nav a[aria-current] { color:var(--primary); font-weight:700; }
}
.pager { display:flex; justify-content:space-between; margin:26px 0; }

/* =====================================================
   الإصدار ٣: واجهة البوابة القبلية
   ===================================================== */
.brand-txt { display:flex; flex-direction:column; line-height:1.15; }
.brand-txt b { font-size:1.35rem; }
.brand-txt small { font-family:'Tajawal',sans-serif; font-weight:500; font-size:.72rem; color:var(--gold); letter-spacing:.5px; }
@media (max-width:900px) { .brand-txt b { font-size:1.15rem; } }

/* الواجهة الرئيسية بزخرفة إسلامية خفيفة */
.hero { position:relative; color:#fff; text-align:center; padding:56px 0 64px; overflow:hidden;
  background-color:#24382b;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23d4a94a' stroke-opacity='.16' stroke-width='1.2'%3E%3Cpath d='M48 10l11 27 27 11-27 11-11 27-11-27-27-11 27-11z'/%3E%3Crect x='27' y='27' width='42' height='42' transform='rotate(45 48 48)'/%3E%3Ccircle cx='48' cy='48' r='7'/%3E%3Cpath d='M0 0l10 10M96 0L86 10M0 96l10-10M96 96l-10-10'/%3E%3C/g%3E%3C/svg%3E"); }
:root:not([data-theme="dark"]) .hero { background-color:color-mix(in srgb, var(--head) 70%, #000); }
[data-theme="dark"] .hero { background-color:#0d1410; }
.hero::after { content:''; position:absolute; bottom:0; right:0; left:0; height:4px; background:var(--gold); }
.hero-in { position:relative; max-width:820px; }
.hero-logo { width:120px; height:120px; border-radius:26px; margin:0 auto 18px; box-shadow:0 0 0 4px rgba(212,169,74,.55), 0 18px 40px rgba(0,0,0,.35); }
.eyebrow { margin:0 0 6px; color:#e2b862; font-weight:700; letter-spacing:.5px; font-size:.95rem; }
.hero h1 { font-size:clamp(2.6rem, 9vw, 4.6rem); margin:0 0 10px; line-height:1.15; text-shadow:0 2px 12px rgba(0,0,0,.25); }
.hero-lead { margin:0 auto 26px; max-width:620px; font-size:1.08rem; opacity:.9; }
.hero-cta { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.hero-cta .btn { height:52px; padding:0 30px; font-size:1.02rem; border-radius:14px; justify-content:center; }
.btn-gold { background:var(--gold); color:#fff; border:0; }
.btn-gold:hover { color:#fff; filter:brightness(1.08); }
.btn-outline { background:transparent; color:#fff; border:1.5px solid rgba(255,255,255,.55); }
.btn-outline:hover { color:#fff; background:rgba(255,255,255,.08); }

/* شريط الجديد */
.ticker { background:var(--card); border-bottom:1px solid var(--line); }
.ticker-in { display:flex; align-items:center; gap:12px; padding-top:10px; padding-bottom:10px; overflow:hidden; }
.ticker-tag { background:var(--gold); color:#fff; font-weight:700; font-size:.82rem; padding:3px 12px; border-radius:8px; flex-shrink:0; }
.ticker-items { display:flex; gap:12px; align-items:center; white-space:nowrap; overflow:hidden; font-weight:500; }
.ticker-items a { color:var(--text); }
.ticker-items .dot { color:var(--gold); font-size:.6rem; }

/* عناوين الأقسام بزخرفة */
.block-head.center { justify-content:center; gap:14px; border-bottom:0; align-items:center; }
.block-head.center h2 { margin:0; }
.orn { color:var(--gold); font-size:.8rem; }

/* بوابة الأقسام */
.portal { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
@media (max-width:900px) { .portal { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; } }
.portal-item { display:flex; flex-direction:column; align-items:center; text-align:center; gap:6px; background:var(--card); border:1px solid var(--line); border-radius:20px; padding:26px 14px 22px; color:var(--text); transition:transform .18s, box-shadow .18s, border-color .18s; }
.portal-item:hover { transform:translateY(-4px); box-shadow:var(--shadow); border-color:var(--gold); color:var(--text); }
.portal-ic { width:62px; height:62px; border-radius:18px; display:flex; align-items:center; justify-content:center; background:color-mix(in srgb, var(--primary) 12%, transparent); color:var(--primary); margin-bottom:4px; }
.portal-ic svg { width:30px; height:30px; }
.portal-item strong { font-family:'Amiri',serif; font-size:1.35rem; }
.portal-item span:last-child { color:var(--muted); font-size:.88rem; line-height:1.5; }

/* الحسابات الرسمية */
.socials { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; }
.social { display:flex; flex-direction:column; gap:2px; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:16px 18px; color:var(--text); border-right:4px solid var(--gold); }
.social:hover { color:var(--text); box-shadow:var(--shadow); }
.social span { color:var(--muted); font-size:.85rem; text-align:right; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* مساحات أوسع */
main .block { margin:48px 0; }
.marquee { padding-top:26px; }
.join { margin-top:48px; }
.feature img, .feature .ph { max-height:420px; }

/* =====================================================
   الإصدار ٤: مساحة وراحة للعين — مقاسات أهدأ وتنفّس أكثر
   ===================================================== */
body { font-size:16px; line-height:1.75; }
.site-header { border-bottom-width:3px; }
.head-row { padding-top:8px; padding-bottom:8px; }
.brand img { width:40px; height:40px; border-radius:10px; }
.brand-txt b { font-size:1.15rem; }
.brand-txt small { font-size:.66rem; }
.icon-btn { width:40px; height:40px; }
.icon-btn svg { width:18px; height:18px; }
.login-btn { height:40px; padding:0 14px; font-size:13px; gap:6px; }
.login-btn svg { width:17px; height:17px; }
.me-btn { width:40px; height:40px; }

.hero { padding:72px 0 80px; }
.hero-logo { width:96px; height:96px; border-radius:22px; margin-bottom:22px; box-shadow:0 0 0 3px rgba(212,169,74,.5), 0 14px 30px rgba(0,0,0,.3); }
.eyebrow { font-size:.85rem; font-weight:500; margin-bottom:10px; }
.hero h1 { font-size:clamp(2.2rem, 6vw, 3.8rem); margin-bottom:14px; }
.hero-lead { font-size:1rem; line-height:1.9; opacity:.82; max-width:560px; margin-bottom:30px; }
.hero-cta .btn { height:46px; padding:0 26px; font-size:.95rem; border-radius:12px; }

.block-head h2 { font-size:1.55rem; }
main .block { margin:56px 0; }
.portal { gap:14px; }
.portal-item { padding:22px 12px 18px; border-radius:16px; gap:4px; }
.portal-ic { width:50px; height:50px; border-radius:14px; }
.portal-ic svg { width:24px; height:24px; }
.portal-item strong { font-size:1.15rem; }
.portal-item span:last-child { font-size:.8rem; }
.feature h3 { font-size:1.5rem; }
.poem-card .verse { font-size:1.15rem; }
.post h1 { font-size:1.9rem; }
.content p { font-size:1.02rem; }

@media (max-width:900px) {
  body { font-size:15px; padding-bottom:62px; }
  .wrap { padding:0 20px; }
  /* شريط الأقسام العلوي يختفي في الجوال: التنقل السفلي يكفي، فتتوسع الشاشة */
  .chips { display:none; }
  .head-row { padding-top:7px; padding-bottom:7px; }
  .brand img { width:36px; height:36px; border-radius:9px; }
  .brand-txt b { font-size:1rem; }
  .brand-txt small { font-size:.62rem; }
  .icon-btn, .me-btn { width:36px; height:36px; }
  .login-btn { height:36px; padding:0 12px; font-size:12.5px; }
  .login-btn svg { width:15px; height:15px; }

  .hero { padding:46px 0 52px; }
  .hero-logo { width:72px; height:72px; border-radius:17px; margin-bottom:16px; }
  .eyebrow { font-size:.75rem; }
  .hero h1 { font-size:2.1rem; margin-bottom:10px; }
  .hero-lead { font-size:.88rem; line-height:1.85; margin-bottom:24px; padding:0 6px; }
  .hero-cta { gap:10px; }
  .hero-cta .btn { height:42px; padding:0 22px; font-size:.88rem; }

  main .block { margin:40px 0; }
  .block-head h2 { font-size:1.3rem; }
  .block-head a { font-size:13px; }
  .portal { gap:10px; }
  .portal-item { padding:18px 10px 14px; }
  .portal-ic { width:42px; height:42px; border-radius:12px; }
  .portal-ic svg { width:21px; height:21px; }
  .portal-item strong { font-size:1rem; }
  .portal-item span:last-child { font-size:.74rem; }
  .ticker-in { padding-top:8px; padding-bottom:8px; font-size:.85rem; }
  .feature h3 { font-size:1.2rem; }
  .row-card .thumb { width:84px; height:64px; }
  .row-card h3, .card h3 { font-size:.9rem; }
  .poem-card { padding:20px 16px; }
  .poem-card .verse { font-size:1.05rem; line-height:2.1; }
  .person img, .avatar-ph { width:72px; height:72px; }
  .social { padding:12px 14px; }
  .join { padding:20px; }
  .join h2 { font-size:1.3rem; }
  .post h1 { font-size:1.5rem; }
  .page-title { font-size:1.6rem; margin:24px 0 14px; }

  .bottom-nav { height:58px; }
  .bottom-nav a { font-size:11px; gap:1px; }
  .bottom-nav a svg { width:20px; height:20px; }
  .site-footer { margin-top:40px; padding:22px 0 26px; }
}

/* =====================================================
   الإصدار ٥: خط "عام الإبل" وبانر العلم
   ===================================================== */
@font-face { font-family:'Camel'; src:url('/fonts/camel-Regular.woff') format('woff'); font-weight:300 500; font-display:swap; }
@font-face { font-family:'Camel'; src:url('/fonts/camel-Bold.woff') format('woff'); font-weight:600 900; font-display:swap; }
html body, html body *:not(svg):not(path) { font-family:'Camel', system-ui, sans-serif !important; }
h1, h2, h3, .brand-txt b, .portal-item strong { font-weight:700; letter-spacing:0; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

.hero { background:#1d2a21 !important; background-image:none !important; padding:0 !important; min-height:clamp(330px, 46vw, 560px); display:flex; align-items:flex-end; }
.hero-bg { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:65% 35%; }
.hero-shade { position:absolute; inset:0; background:linear-gradient(to top, rgba(12,22,16,.9) 0%, rgba(12,22,16,.55) 38%, rgba(12,22,16,.05) 75%); }
.hero-in { position:relative; z-index:1; width:100%; padding-top:0; padding-bottom:30px; }
.hero .eyebrow { font-size:.78rem; margin-bottom:6px; color:#e2b862; }
.hero-lead { font-size:.88rem !important; line-height:1.8 !important; opacity:.92 !important; max-width:520px !important; margin:0 auto 18px !important; }
@media (max-width:900px) {
  .hero { min-height:clamp(300px, 88vw, 420px); }
  .hero-bg { object-position:44% 40%; }
  .hero-in { padding-bottom:22px; }
  .hero .eyebrow { font-size:.7rem; }
  .hero-lead { font-size:.8rem !important; margin-bottom:14px !important; }
}

/* التذييل يلتصق بأسفل الشاشة حتى لو كان محتوى الصفحة قصيراً */
body { min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; }
body > main { flex:1 0 auto; }
body > .site-footer { flex-shrink:0; }

/* يمنع أي صفحة من التمدد بالعرض وانزياحها يمين ويسار */
html, body { max-width:100%; overflow-x:hidden; }
body > main { min-width:0; width:100%; }

/* اسم الكاتب وصورته في صفحة المقال */
.byline { display:flex; align-items:center; gap:10px; line-height:1.5; }
.byline img { width:40px; height:40px; border-radius:50%; object-fit:cover; border:2px solid var(--gold); }
.poet { display:flex; align-items:center; justify-content:center; gap:8px; margin:14px 0 0; color:var(--muted); font-size:.85rem; }
.poet img { width:34px; height:34px; border-radius:50%; object-fit:cover; border:2px solid var(--gold); }

/* =====================================================
   الإصدار ١٠: "آخر ما نُشر" — كل جديد في الواجهة
   ===================================================== */
.feed { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.feed-card.big { grid-column:span 2; }
@media (max-width:900px) { .feed { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; } .feed-card:nth-child(8) { display:none; } .feed-card.big .feed-media { aspect-ratio:16/10; } }
.feed-card { background:var(--card); border:1px solid var(--line); border-radius:18px; overflow:hidden; display:flex; flex-direction:column; transition:transform .18s, box-shadow .18s; }
.feed-card:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.feed-media { position:relative; display:block; aspect-ratio:16/10; background:var(--line); overflow:hidden; }
.feed-card.big .feed-media { aspect-ratio:16/8; }
.feed-media img { width:100%; height:100%; object-fit:cover; }
.feed-media .tag { position:absolute; top:12px; right:12px; box-shadow:0 2px 8px rgba(0,0,0,.2); }
.tag-news { background:var(--gold); } .tag-poem { background:#7a5a2f; } .tag-article { background:#3e5a63; } .tag-book { background:#5a4a7a; }
.feed-ph { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:rgba(255,255,255,.85); }
.feed-ph svg { width:44px; height:44px; }
.feed-ph.news { background:#4f6d58; } .feed-ph.article { background:#3e5a63; } .feed-ph.book { background:#5a4a7a; }
.feed-ph.poem { background:#2f3f33; padding:18px; text-align:center; }
.feed-ph.poem p { margin:0; color:#f1e6c8; white-space:pre-line; line-height:2; font-size:.95rem; }
.feed-card.big .feed-ph.poem p { font-size:1.15rem; }
.feed-body { padding:12px 14px 14px; }
.feed-body h3 { font-size:1rem; line-height:1.6; margin:0 0 6px; }
.feed-card.big .feed-body h3 { font-size:1.35rem; }
.feed-body h3 a { color:var(--text); }
.feed-body p { margin:0 0 8px; font-size:.9rem; }
.feed-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px; color:var(--muted); font-size:.78rem; }
.feed-by { display:flex; align-items:center; gap:6px; }
.feed-by img { width:24px; height:24px; border-radius:50%; object-fit:cover; }
@media (max-width:900px) { .feed-body { padding:10px 12px 12px; } .feed-body h3 { font-size:.88rem; } .feed-card.big .feed-body h3 { font-size:1.1rem; } .feed-ph svg { width:34px; height:34px; } }

.read-more { display:inline-block; margin-top:12px; font-weight:700; font-size:.9rem; color:var(--gold-text); border-bottom:1px dashed currentColor; }
.post.poem .content p { white-space:pre-line; }
