/* صفحة المقالات وصفحة المقال — التصميم اللي اعتمده محمود ٢٥ نوفمبر ٢٠٢٦.
   بيتحمّل بس مع page_open(['css' => 'blog']). كل الكلاسات بادئة bv-.
   الخطوط جاية من skin-b (Alexandria للعناوين + IBM Plex Sans Arabic للنص). */

.bv{
  --bv-ink:#16293d; --bv-body:#2c3e52; --bv-muted:#5d7187;
  --bv-line:#e3e9f0; --bv-line-s:#eef2f7; --bv-steel:#f2f5f9;
  --bv-gold-d:#7d6c14; --bv-gold-l:#b9a443;
  --bv-narrow:820px; --bv-fs:19.5px;
  color:var(--bv-body); background:#fff;
}
.bv :where(h1,h2,h3){font-family:var(--fh);color:var(--navy);line-height:1.25}
.bv .bv-ic{width:22px;height:22px;flex:0 0 auto}
.bv-narrow{width:100%;max-width:var(--bv-narrow);margin-inline:auto;
  padding-left:max(20px,env(safe-area-inset-left,0px));padding-right:max(20px,env(safe-area-inset-right,0px))}

/* ===== ترويسة صفحة المقالات ===== */
.bv-phead{background:var(--bv-steel);border-bottom:1px solid var(--bv-line)}
.bv-phead .wrap{padding-block:58px 50px;text-align:center;max-width:880px}
.bv-phead .crumbs{display:flex;justify-content:center;flex-wrap:wrap;gap:9px;font-size:14px;color:var(--bv-muted)}
.bv-phead .crumbs a{color:inherit}
.bv-phead .crumbs a:hover{color:var(--bv-gold-d)}
.bv-phead .crumbs [aria-current]{color:var(--bv-ink)}
.bv-phead h1{margin:16px 0 0;font-size:clamp(38px,6vw,60px);font-weight:800;letter-spacing:-.01em;text-wrap:balance}
.bv-lede{margin:16px auto 0;font-size:18px;line-height:1.85;color:var(--bv-muted);max-width:40em;text-wrap:balance}
/* شعار المدونة: نص دهبي تحته شريط دهبي سميك، على طريقة عناوين محمود */
.bv-motto{margin:28px auto 0;max-width:30em;font-family:var(--fh);font-weight:600;
  font-size:clamp(18.5px,2.05vw,25px);line-height:1.8;color:var(--gold);text-wrap:balance}
.bv-motto::before{content:"";display:block;width:64px;height:5px;background:var(--gold);margin:0 auto 24px}
.bv-search{position:relative;max-width:520px;margin:30px auto 0}
.bv-search .bv-ic{position:absolute;inset-inline-start:18px;top:50%;transform:translateY(-50%);color:var(--bv-muted)}
.bv-search input{width:100%;padding:16px 54px 16px 20px;border:1px solid var(--bv-line);border-radius:999px;
  background:#fff;font-size:16px;font-family:inherit;color:var(--bv-ink)}
.bv-search input:focus{outline:2px solid var(--gold);outline-offset:1px;border-color:transparent}

/* ===== مقال الصدارة ===== */
.bv-feat{padding-block:54px 10px}
.bv-card.bv-big{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);border-radius:20px;
  box-shadow:0 22px 50px -34px rgba(0,48,91,.45)}
.bv-card.bv-big .bv-c-pic{aspect-ratio:auto;height:100%;min-height:330px}
.bv-card.bv-big .bv-c-body{padding:42px 44px;justify-content:center;gap:14px}
.bv-card.bv-big h3{font-size:clamp(26px,3.1vw,38px);line-height:1.3}
.bv-card.bv-big p{font-size:17px;line-height:1.9}

/* ===== شريط الفلاتر ===== */
.bv-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;padding-block:34px 20px}
.bv-tabs{display:flex;gap:9px;flex-wrap:wrap}
.bv-tabs button{font-family:var(--fh);font-weight:500;font-size:14.5px;padding:9px 17px;border-radius:999px;
  border:1px solid var(--bv-line);color:var(--bv-muted);background:#fff;cursor:pointer;transition:.15s}
.bv-tabs button:hover{border-color:var(--gold);color:var(--bv-gold-d)}
.bv-tabs button[aria-pressed=true]{background:var(--navy);border-color:var(--navy);color:#fff}
.bv-count{font-size:14.5px;color:var(--bv-muted)}

/* ===== الشبكة والجانب ===== */
.bv-cols{display:grid;grid-template-columns:minmax(0,1fr) 288px;gap:52px;align-items:start;padding-bottom:20px}
.bv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:30px}
.bv-card{background:#fff;border:1px solid var(--bv-line);border-radius:18px;overflow:hidden;
  display:flex;flex-direction:column;transition:.18s}
.bv-card:hover{border-color:#cfd9e5;box-shadow:0 18px 38px -26px rgba(0,48,91,.5);transform:translateY(-2px)}
.bv-card[hidden]{display:none}
.bv-c-pic{display:block;aspect-ratio:16/10;background:var(--bv-steel);overflow:hidden}
.bv-c-pic img{width:100%;height:100%;object-fit:cover;display:block}
.bv-c-body{padding:22px 24px 24px;display:flex;flex-direction:column;gap:11px;flex:1}
.bv-k{font-family:var(--fh);font-weight:600;font-size:12px;letter-spacing:.06em;color:var(--bv-gold-d)}
.bv-lock{display:inline-block;margin-inline-start:6px;padding:2px 8px;border-radius:999px;
  background:var(--navy);color:#fff;font-size:10.5px;font-weight:600}
.bv-card h3{font-size:20.5px;line-height:1.45}
.bv-card h3 a{color:inherit}
.bv-card h3 a:hover{color:var(--bv-gold-d)}
.bv-card p{margin:0;font-size:15px;line-height:1.85;color:var(--bv-muted);flex:1}
.bv-by{display:flex;align-items:center;gap:10px;padding-top:13px;border-top:1px solid var(--bv-line-s)}
.bv-by span{font-size:13px;color:var(--bv-muted);line-height:1.5}
.bv-by b{font-weight:600;color:var(--bv-ink)}
.bv-by i,.bv-meta i{font-style:normal;margin-inline:7px;color:#b8c4d2}
.bv-av{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--navy);
  color:#fff;font-family:var(--fh);font-weight:700;font-size:15px;flex:0 0 auto}
.bv-av.bv-lg{width:52px;height:52px;font-size:21px;background:var(--gold)}
.bv-empty{grid-column:1/-1;margin:0;padding:52px 20px;text-align:center;color:var(--bv-muted);
  font-size:16px;background:var(--bv-steel);border-radius:16px}
.bv-side{display:flex;flex-direction:column;gap:26px;position:sticky;top:20px}
.bv-sbox{background:var(--bv-steel);border-radius:16px;padding:22px 22px 24px}
.bv-sbox h2{font-size:17px;margin:0 0 14px}
.bv-wlist{display:flex;flex-direction:column;gap:2px}
.bv-wlist button{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;
  padding:9px 12px;border-radius:9px;font-size:14.5px;font-family:inherit;color:var(--bv-body);
  background:none;border:0;cursor:pointer;text-align:start}
.bv-wlist button i{font-style:normal;font-size:12.5px;color:var(--bv-muted)}
.bv-wlist button:hover{background:#fff}
.bv-wlist button[aria-pressed=true]{background:var(--navy);color:#fff}
.bv-wlist button[aria-pressed=true] i{color:rgba(255,255,255,.7)}
.bv-ylist{display:flex;flex-wrap:wrap;gap:7px}
.bv-ylist button{padding:7px 13px;border-radius:999px;background:#fff;border:0;cursor:pointer;
  font-family:inherit;font-size:13.5px;color:var(--bv-muted)}
.bv-ylist button:hover{color:var(--bv-gold-d)}
.bv-ylist button[aria-pressed=true]{background:var(--navy);color:#fff}
.bv-more-wrap{display:flex;justify-content:center;padding-block:14px 60px}
.bv-more{font-family:var(--fh);font-weight:600;font-size:15.5px;padding:14px 34px;border-radius:999px;
  border:1px solid var(--navy);color:var(--navy);background:none;cursor:pointer}
.bv-more:hover{background:var(--navy);color:#fff}
.bv-more[hidden]{display:none}

/* ===== شريط التقدم ===== */
.bv-prog{position:sticky;top:0;z-index:30;height:3px;background:var(--bv-line-s)}
.bv-prog span{display:block;height:100%;width:0;background:var(--gold)}

/* ===== ترويسة المقال ===== */
.bv-head{padding-block:64px 0;text-align:center}
.bv-head .bv-narrow{max-width:900px}
.bv-head .crumbs{display:flex;justify-content:center;flex-wrap:wrap;gap:9px;font-size:14px;color:var(--bv-muted)}
.bv-head .crumbs a{color:inherit}
.bv-head .crumbs a:hover{color:var(--bv-gold-d)}
.bv-head .crumbs [aria-current]{color:var(--bv-ink)}
.bv-head h1{margin:20px 0 0;font-size:clamp(34px,5vw,56px);font-weight:800;line-height:1.22;
  letter-spacing:-.015em;text-wrap:balance}
.bv-tldr{margin-top:38px;background:var(--bv-steel);border-radius:18px;padding:30px 34px;text-align:start}
.bv-tldr-k{display:block;font-family:var(--fh);font-weight:700;font-size:13.5px;letter-spacing:.04em;
  color:var(--bv-gold-d);margin-bottom:12px}
.bv-tldr p{margin:0;font-size:17.5px;line-height:2;color:var(--bv-body)}
.bv-byline{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;
  margin-top:34px;text-align:start}
.bv-who{display:flex;align-items:center;gap:14px}
.bv-who b{display:block;font-family:var(--fh);font-weight:700;font-size:17px;color:var(--navy)}
.bv-who b a{color:inherit}
.bv-who b a:hover{color:var(--bv-gold-d)}
.bv-meta{display:block;font-size:13.5px;color:var(--bv-muted);margin-top:3px}
.bv-meta [data-bv-left]:not(:empty)::before{content:"·";margin-inline:7px;color:#b8c4d2}

/* ===== أزرار كبسولة ومشاركة ===== */
.bv-share{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.bv-share-k{display:inline-flex;align-items:center;gap:9px;font-family:var(--fh);font-weight:600;
  font-size:15px;color:var(--navy);margin-inline-end:4px}
.bv-pill{display:inline-flex;align-items:center;gap:9px;font-family:var(--fh);font-weight:500;font-size:14.5px;
  padding:11px 20px;border-radius:999px;border:1px solid var(--bv-line);color:var(--bv-body);
  background:#fff;cursor:pointer;transition:.15s}
.bv-pill b{font-weight:600}
.bv-pill:hover{border-color:var(--navy);color:var(--navy)}
.bv-wa{color:#1f8f4e;border-color:#cfe9da}
.bv-wa:hover{background:#1f8f4e;border-color:#1f8f4e;color:#fff}
.bv-solid{background:var(--navy);border-color:var(--navy);color:#fff}
.bv-solid:hover{background:var(--night);color:#fff}
.bv-follow{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;
  margin-top:30px;padding-top:26px;border-top:1px solid var(--bv-line);text-align:start}
.bv-follow p{margin:0;font-size:15px;color:var(--bv-muted)}

/* ===== الغلاف ===== */
.bv-cover{margin:48px auto 0;width:100%;max-width:1060px;
  padding-left:max(20px,env(safe-area-inset-left,0px));padding-right:max(20px,env(safe-area-inset-right,0px))}
.bv-cover img{width:100%;border-radius:22px;aspect-ratio:16/9;object-fit:cover;display:block}

/* ===== الجسم والفهرس ===== */
.bv-grid-post{display:grid;grid-template-columns:minmax(0,var(--bv-narrow)) 272px;gap:60px;justify-content:center;
  padding-block:56px 20px;
  padding-left:max(20px,env(safe-area-inset-left,0px));padding-right:max(20px,env(safe-area-inset-right,0px))}
.bv-grid-post.bv-notoc{grid-template-columns:minmax(0,var(--bv-narrow))}
.bv-prose{min-width:0;font-size:var(--bv-fs);line-height:2.05;color:var(--bv-body);text-align:justify}
.bv-prose > *{margin:0 0 1.25em}
.bv-prose > *:last-child{margin-bottom:0}
.bv-prose h2{margin:2em 0 .7em;font-size:calc(var(--bv-fs) * 1.6);line-height:1.35;text-align:start;scroll-margin-top:90px}
.bv-prose h3{margin:1.7em 0 .6em;font-size:calc(var(--bv-fs) * 1.2);text-align:start;scroll-margin-top:90px}
.bv-prose strong{font-weight:600;color:var(--bv-ink)}
.bv-prose a{color:var(--navy);font-weight:500;text-decoration:none;
  background-image:linear-gradient(var(--bv-gold-l),var(--bv-gold-l));background-size:100% 2px;
  background-position:0 100%;background-repeat:no-repeat;padding-bottom:1px}
.bv-prose a:hover{color:var(--bv-gold-d)}
.bv-prose blockquote{margin-block:1.6em;padding:22px 28px;background:var(--bv-steel);
  border-inline-start:4px solid var(--gold);border-radius:0 14px 14px 0;
  font-size:calc(var(--bv-fs) * .97);line-height:1.95;color:var(--bv-ink);text-align:start}
.bv-prose ul,.bv-prose ol{margin-block:1.3em;padding-inline-start:0;list-style:none;
  display:flex;flex-direction:column;gap:.6em;text-align:start}
.bv-prose li{position:relative;padding-inline-start:26px}
.bv-prose li::before{content:"";position:absolute;inset-inline-start:7px;top:.78em;width:7px;height:7px;
  background:var(--gold);border-radius:50%}
.bv-prose img{max-width:100%;height:auto;border-radius:16px;margin-block:.6em}
.bv-prose figure{margin-block:2em}
.bv-prose figcaption{margin-top:12px;font-size:13.5px;color:var(--bv-muted);text-align:center}
.bv-prose .gate{text-align:start}

.bv-toc{min-width:0}
.bv-toc-in{position:sticky;top:28px;border-inline-start:1px solid var(--bv-line);padding-inline-start:26px}
.bv-toc h2{font-size:15px;color:var(--bv-ink);margin:0 0 16px}
.bv-toc nav{display:flex;flex-direction:column;gap:3px}
.bv-toc nav a{font-size:14.5px;line-height:1.65;color:var(--bv-muted);padding:7px 0;
  border-inline-start:2px solid transparent;padding-inline-start:12px;margin-inline-start:-27px;text-decoration:none}
.bv-toc nav a:hover{color:var(--navy)}
.bv-toc nav a.on{color:var(--navy);font-weight:600;border-inline-start-color:var(--gold)}
.bv-fs{display:flex;align-items:center;gap:8px;margin-top:24px;padding-top:20px;
  border-top:1px solid var(--bv-line);font-size:13px;color:var(--bv-muted)}
.bv-fs button{width:34px;height:34px;border-radius:9px;border:1px solid var(--bv-line);background:none;
  cursor:pointer;font-family:var(--fh);font-weight:600;color:var(--navy);display:grid;place-items:center}
.bv-fs button:hover{background:var(--bv-steel)}

/* ===== نهاية المقال ===== */
.bv-end{padding-block:46px 56px}
.bv-acard{display:flex;gap:18px;align-items:flex-start;background:var(--bv-steel);border-radius:18px;padding:26px 28px}
.bv-acard b{display:block;font-family:var(--fh);font-weight:700;font-size:18px;color:var(--navy)}
.bv-acard p{margin:8px 0 14px;font-size:15px;line-height:1.85;color:var(--bv-muted)}
.bv-end .bv-share{margin-top:28px;padding-top:26px;border-top:1px solid var(--bv-line)}

/* ===== المقال التالي ===== */
.bv-next{display:block;background:var(--navy);color:#fff;padding-block:40px;text-decoration:none}
.bv-next:hover{background:var(--night)}
.bv-next span{display:block;font-size:13px;letter-spacing:.07em;color:var(--bv-gold-l);
  font-family:var(--fh);font-weight:600}
.bv-next b{display:block;margin-top:10px;font-family:var(--fh);font-weight:700;
  font-size:clamp(22px,3vw,32px);line-height:1.35;color:#fff;text-wrap:balance}
.bv-next em{display:block;margin-top:9px;font-style:normal;font-size:14px;color:rgba(255,255,255,.65)}

/* ===== اقرأ أيضًا ===== */
.bv-rel{background:var(--bv-steel);padding-block:62px}
.bv-flag{display:inline-block;margin:0 0 32px;font-size:26px;color:var(--bv-gold-d);
  padding-bottom:12px;border-bottom:6px solid var(--gold)}
.bv-rel .bv-card{border-color:transparent}

/* ===== أزرار عائمة ===== */
.bv-dock{position:fixed;z-index:60;left:max(18px,env(safe-area-inset-left,0px));
  bottom:calc(20px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:12px}
.bv-d{position:relative;display:grid;place-items:center;width:52px;height:52px;border-radius:50%;
  background:#fff;color:var(--navy);border:1px solid var(--bv-line);cursor:pointer;
  box-shadow:0 10px 26px -10px rgba(0,48,91,.5)}
.bv-d-gold{background:var(--gold);color:#fff;border-color:var(--gold)}
.bv-tip{position:absolute;left:62px;white-space:nowrap;background:var(--night);color:#fff;font-size:12.5px;
  padding:6px 11px;border-radius:7px;opacity:0;pointer-events:none;transition:.15s}
.bv-d:hover .bv-tip{opacity:1}

/* ===== فهرس الموبايل ===== */
.bv-fab{display:none;position:fixed;z-index:60;right:max(18px,env(safe-area-inset-right,0px));
  bottom:calc(20px + env(safe-area-inset-bottom,0px))}
.bv-fab button{display:inline-flex;align-items:center;gap:9px;background:var(--navy);color:#fff;
  font-family:var(--fh);font-weight:600;font-size:14px;padding:13px 20px;border-radius:999px;
  border:0;cursor:pointer;box-shadow:0 12px 30px -10px rgba(0,48,91,.7)}
.bv-drawer{position:fixed;inset:0;z-index:70;background:rgba(0,29,57,.45);display:flex;align-items:flex-end}
.bv-drawer[hidden]{display:none}
.bv-dr-in{width:100%;max-height:72vh;overflow:auto;background:#fff;border-radius:20px 20px 0 0;
  padding:22px max(20px,env(safe-area-inset-left,0px)) calc(26px + env(safe-area-inset-bottom,0px))}
.bv-dr-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.bv-dr-top b{font-family:var(--fh);font-weight:700;font-size:17px;color:var(--navy)}
.bv-dr-top button{background:none;border:0;cursor:pointer;color:var(--bv-muted)}
.bv-dr-in nav{display:flex;flex-direction:column}
.bv-dr-in nav a{padding:13px 0;font-size:15.5px;color:var(--bv-body);text-decoration:none;
  border-bottom:1px solid var(--bv-line-s)}

/* ===== الاستجابة ===== */
@media (max-width:1180px){
  .bv-grid-post{grid-template-columns:minmax(0,1fr);max-width:var(--bv-narrow);margin-inline:auto;gap:0}
  .bv-toc{display:none}
  .bv-fab{display:block}
  .bv-cols{grid-template-columns:minmax(0,1fr);gap:40px}
  .bv-side{position:static;flex-direction:row;flex-wrap:wrap}
  .bv-sbox{flex:1 1 280px}
}
@media (max-width:980px){
  .bv-card.bv-big{grid-template-columns:minmax(0,1fr)}
  .bv-card.bv-big .bv-c-pic{min-height:0;aspect-ratio:16/9}
  .bv-card.bv-big .bv-c-body{padding:30px 26px}
}
@media (max-width:620px){
  .bv{--bv-fs:18px}
  .bv-phead .wrap{padding-block:38px 34px}
  .bv-head{padding-top:36px}
  .bv-tldr{padding:22px 20px;border-radius:14px;margin-top:28px}
  .bv-byline{gap:16px}
  .bv-share,.bv-follow{width:100%}
  .bv-follow{flex-direction:column;align-items:flex-start}
  .bv-cover{margin-top:34px}
  .bv-cover img{border-radius:14px;aspect-ratio:4/3}
  .bv-grid-post{padding-block:36px 10px}
  .bv-prose{text-align:start}
  .bv-prose blockquote{padding:18px 20px}
  .bv-grid{grid-template-columns:minmax(0,1fr);gap:22px}
  .bv-acard{flex-direction:column;gap:14px;padding:22px 20px}
  .bv-dock{left:14px;gap:10px}
  .bv-d{width:46px;height:46px}
  .bv-d .bv-ic{width:20px;height:20px}
}

/* ===== صفحة تحت الإنشاء ===== */
.bv-soon-k{display:inline-block;margin:18px 0 0;padding:8px 20px;border-radius:999px;
  background:var(--gold);color:#fff;font-family:var(--fh);font-weight:600;font-size:14px}
.bv-soon-k + .bv-lede{margin-top:18px}
.bv-soon-acts{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:28px}
