/* =====================================================================
   JUSOOR · Public blog
   Standalone stylesheet (the blog is a public page, not the admin panel)
   but it reuses the same brand tokens so the two feel like one product.
   ===================================================================== */
:root{
  --brand-50:#eafaf1; --brand-100:#cdf1de; --brand-200:#9de8bd; --brand-300:#64d896;
  --brand-400:#35c378; --brand-500:#16a85d; --brand-600:#0e8f4d; --brand-700:#0b7440;
  --brand-800:#0a5c34; --brand-900:#073f24;
  --ink-900:#0f1c17; --ink-700:#2b3a34; --ink-600:#4a5b54; --ink-400:#7b8a84;
  --bg:#e7f2ec; --surface:#fff; --surface-2:#f0f8f3; --line:#d7e8dd;
  --radius:14px; --radius-lg:22px;
  --shadow-sm:0 1px 2px rgba(15,28,23,.06);
  --shadow-md:0 4px 16px rgba(15,28,23,.08);
  --shadow-lg:0 12px 32px rgba(15,28,23,.12);
  --ease:cubic-bezier(.4,0,.2,1);
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:'Tajawal','Segoe UI',system-ui,sans-serif;
  background:var(--bg);color:var(--ink-900);
  font-size:16px;line-height:1.8;-webkit-font-smoothing:antialiased;
}
a{color:var(--brand-700);text-decoration:none}
img{max-width:100%;display:block}
.wrap{width:92%;max-width:1080px;margin-inline:auto}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:48px;padding:12px 26px;border:0;border-radius:12px;
  background:var(--brand-600);color:#fff;font:inherit;font-weight:700;cursor:pointer;
  transition:background .2s var(--ease),box-shadow .2s var(--ease);
}
.btn:hover{background:var(--brand-700);color:#fff;box-shadow:0 8px 20px rgba(11,116,64,.28)}
.btn-sm{min-height:40px;padding:8px 18px;font-size:14.5px}

/* ---------- header ---------- */
.blog-header{
  position:sticky;top:0;z-index:20;
  background:rgba(255,255,255,.9);backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.blog-header .nav{display:flex;align-items:center;gap:16px;padding:14px 0}
.brand{display:flex;align-items:center;gap:10px}
.brand img{height:46px;width:auto}
.brand-tag{
  background:var(--brand-50);color:var(--brand-700);
  border-radius:999px;padding:3px 12px;font-size:13px;font-weight:700;
}
.nav-links{display:flex;align-items:center;gap:20px;margin-inline-start:auto}
.nav-links a{color:var(--ink-700);font-weight:600;font-size:15px}
.nav-links a:hover{color:var(--brand-600)}
.nav-links a.btn{color:#fff}

/* ---------- hero ---------- */
.blog-hero{
  background:linear-gradient(150deg,var(--brand-800),var(--brand-600));
  color:#fff;padding:64px 0 72px;text-align:center;
}
.blog-hero .eyebrow{
  display:inline-block;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.28);
  border-radius:999px;padding:6px 16px;font-size:13.5px;font-weight:600;margin-bottom:14px;
}
.blog-hero h1{font-size:40px;font-weight:800;letter-spacing:-.02em;margin-bottom:12px}
.blog-hero p{color:rgba(255,255,255,.85);max-width:56ch;margin-inline:auto;font-size:17px}

/* ---------- post grid ---------- */
.posts-wrap{padding:56px 0 72px}
.posts{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:24px}
.post-card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  overflow:hidden;box-shadow:var(--shadow-sm);display:flex;flex-direction:column;
  transition:transform .2s var(--ease),box-shadow .2s var(--ease),border-color .2s var(--ease);
}
.post-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-md);border-color:var(--brand-200)}
.post-cover{display:block;aspect-ratio:16/9;background:var(--surface-2);overflow:hidden}
.post-cover img{width:100%;height:100%;object-fit:cover;transition:transform .35s var(--ease)}
.post-card:hover .post-cover img{transform:scale(1.04)}
.cover-fallback{
  width:100%;height:100%;display:flex;align-items:center;justify-content:center;
  font-size:42px;background:var(--brand-50);
}
.post-body{padding:20px;display:flex;flex-direction:column;gap:8px;flex:1}
.post-meta{color:var(--ink-400);font-size:13px;display:flex;gap:6px;flex-wrap:wrap}
.post-body h2{font-size:19px;line-height:1.5;font-weight:800}
.post-body h2 a{color:var(--ink-900)}
.post-body h2 a:hover{color:var(--brand-700)}
.post-body p{color:var(--ink-600);font-size:15px}
.read-more{margin-top:auto;font-weight:700;font-size:14.5px}

.empty{text-align:center;padding:70px 20px;color:var(--ink-400)}
.empty span{font-size:52px;display:block;margin-bottom:12px}
.empty h2{font-size:22px;color:var(--ink-700);margin-bottom:6px}

/* ---------- article ---------- */
.article{padding:48px 0 20px}
.article-head{margin-bottom:26px}
.back{font-size:14.5px;font-weight:600;display:inline-block;margin-bottom:16px}
.article-head h1{font-size:38px;font-weight:800;line-height:1.35;letter-spacing:-.02em;margin-bottom:10px}
.article-cover{
  width:100%;max-height:460px;object-fit:cover;
  border-radius:var(--radius-lg);box-shadow:var(--shadow-md);margin-bottom:32px;
}
.article-body{
  max-width:68ch;margin-inline:auto;
  font-size:17.5px;line-height:2;color:var(--ink-700);
}
.article-body br{content:"";display:block;margin-bottom:10px}

.article-cta{
  max-width:68ch;margin:48px auto 0;text-align:center;
  background:linear-gradient(160deg,var(--brand-700),var(--brand-900));
  color:#fff;border-radius:var(--radius-lg);padding:36px 28px;box-shadow:var(--shadow-lg);
}
.article-cta h3{font-size:23px;font-weight:800;margin-bottom:8px}
.article-cta p{color:rgba(255,255,255,.82);margin-bottom:20px}

.more-wrap{padding:56px 0 72px}
.more-title{font-size:22px;font-weight:800;margin-bottom:20px}

/* ---------- pagination ---------- */
.pagination-wrap{display:flex;justify-content:center;padding:34px 0 0}
.pagination{display:flex;gap:6px;list-style:none;flex-wrap:wrap}
.pagination .page-link{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:40px;height:40px;padding:0 12px;
  border:1px solid var(--line);border-radius:10px;background:var(--surface);
  color:var(--ink-700);font-weight:600;
}
.pagination .page-link:hover{background:var(--brand-50);color:var(--brand-700)}
.pagination .active .page-link{background:var(--brand-600);border-color:var(--brand-600);color:#fff}
.pagination .disabled .page-link{color:var(--ink-400);background:var(--surface-2)}

/* ---------- footer ---------- */
.blog-footer{background:#08150f;color:rgba(255,255,255,.62);padding:32px 0;font-size:14px}
.foot{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.foot img{height:28px;filter:brightness(0) invert(1);opacity:.85}
.foot a{color:rgba(255,255,255,.75)}
.foot a:hover{color:#fff}
.foot-links{display:flex;gap:16px;flex-wrap:wrap}

@media (max-width:768px){
  .blog-hero h1{font-size:29px}
  .article-head h1{font-size:27px}
  .article-body{font-size:16.5px}
  .nav-links{gap:12px}
  .nav-links a:not(.btn){display:none}
}
@media (prefers-reduced-motion:reduce){
  *{transition-duration:.001ms!important;animation-duration:.001ms!important}
}
