
.blog-listing-dark {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 16px;
  }
  
  .posts-grid-dark {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
  }
  
  .post-card-dark {
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .5);
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
  }
  .post-card-dark:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 28px rgba(0,0,0,.8);
  }
  
  .thumb-wrap-dark {
    display:block;
    aspect-ratio: 16/10;
    overflow:hidden;
  }
  .thumb-wrap-dark img {
    width:100%;
    height:100%;
    object-fit: cover;
    transition: transform .35s ease;
  }
  .post-card-dark:hover img {
    transform: scale(1.05);
  }
  
  .post-content-dark {
    padding: 18px;
    color: #eee;
  }
  .post-title-dark {
    margin: 0 0 10px;
    font-size: 1.1rem;
  }
  .post-title-dark a {
    color: #fff;
    text-decoration: none;
  }
  .post-title-dark a:hover {
    text-decoration: underline;
  }
  .post-excerpt-dark {
    font-size: .95rem;
    color: #bbb;
    margin-bottom: 12px;
    line-height: 1.6;
  }
  .post-meta-dark {
    display: flex;
    gap: 16px;
    font-size: .85rem;
    color: #888;
    margin-bottom: 10px;
  }
  .read-more-dark {
    display: inline-block;
    padding: 8px 14px;
    background: #00ff88;
    color: #000;
    border-radius: 10px;
    font-size: .9rem;
    text-decoration: none;
    font-weight: 600;
    transition: background .2s ease;
  }
  .read-more-dark:hover {
    background: #00ff88;
  }
  
  /* Pagination */
  .pagination-dark {
    display:flex;
    gap:8px;
    justify-content:center;
    margin-top: 28px;
  }
  .page-dark {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:38px; height:38px;
    border-radius:8px;
    border:1px solid #333;
    background:#111;
    color:#eee;
    text-decoration:none;
    font-size:.9rem;
    transition: all .2s ease;
  }
  .page-dark:hover {
    background:#222;
    border-color:#444;
  }
  .page-dark.current {
    background:#00ff88;
    border-color:#00ff88;
    color:#fff;
    font-weight: 600;
  }
  
  .blog-layout {
  overflow-x:hidden;
    
    display: grid;
    grid-template-columns: 1fr 3fr; /* العمود الجانبي 25% والمقالات 75% */
    gap: 28px;
    max-width: 1400px;
    margin: 50px auto;
    padding: 0 16px;
  }
  
  /* Sidebar */
  .blog-sidebar {
    background: #111;
    padding: 20px;
    border-radius: 14px;
    color: #eee;
    height: fit-content;
    box-shadow: 0 4px 18px rgba(0,0,0,.5);
  }
  .blog-sidebar h3 {
    margin: 0 0 14px;
    font-size: 1.2rem;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
  }
  .categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
  }
  .categories-list li a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    background: #1a1a1a;
    color: #ddd;
    text-decoration: none;
    font-size: .95rem;
    transition: all .2s ease;
  }
  .categories-list li a:hover {
    background: #0aff84;
    color: #fff;
  }
  
  /* Cards Grid */
  .posts-grid-dark {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 كروت في الصف */
    gap: 24px;
  }
  /* ==== Sidebar Banner ==== */
  .sidebar-banner {
    display: block;
    margin-top: 14px;
    border-radius: 14px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    background: radial-gradient(100% 120% at 50% 0%, #0aff84 0%, rgba(10,255,132,0.15) 35%, rgba(0,0,0,0) 60%),
    linear-gradient(180deg, #151515 0%, #0f0f0f 100%);
    box-shadow: 0 8px 28px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.04);
    transition: transform .2s ease, box-shadow .2s ease;
    
    width: 100%;           /* نفس عرض القائمة */
    min-height: 500px;     /* الطول أطول زي رول بانر */
    display: flex;
    align-items: center;   /* يخلي المحتوى في النص */
    justify-content: center;
    text-align: center;    /* يخلي الكلام في النص */
  }
  
  .sidebar-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.06);
  }
  
  .sidebar-banner .sb-inner {
    padding: 20px 14px;
    color: #e9fef3;
  }
  
  .sidebar-banner .sb-title {
    font-size: 1.2rem;
    margin: 12px 0;
    color: #fff;
  }
  
  .sidebar-banner .sb-text {
    font-size: .95rem;
    color: #cfe8da;
    margin-bottom: 14px;
  }
  
  .sidebar-banner .sb-btn {
    display: inline-block;
    padding: 10px 16px;
    background: #0aff84;
    color: #071b10;
    font-weight: 700;
    border-radius: 10px;
    font-size: .95rem;
    border: none;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
  }
  .sidebar-banner .sb-btn:hover {
    background: #09d873;
    transform: translateY(-2px);
  }
.blog-heading {
  font-size: 2rem;
  font-weight: bold;
  margin: 30px 0 20px 0;
  text-align: center;
  color: #fff; /* يخليه أبيض بما إنه دارك ثيم */
}
/* === BLOG: Responsive Fix & Order === */

/* موبايل أولاً: الكروت فوق والكاتيجوري تحت */
.blog-layout{
overflow-x:hidden;
 padding: 30px;
  display:grid;
  gap:28px;
  grid-template-columns: 1fr;
  grid-template-areas:
    "posts"
    "sidebar";
}

/* اربط المناطق */
.posts-grid-dark{ grid-area: posts; }
.blog-sidebar{ grid-area: sidebar; }

/* شبكية الكروت على الموبايل: عمود واحد واسع */
.posts-grid-dark{
  display:grid;
  gap:24px;
  grid-template-columns: 1fr; /* 1 col on phones */
}

/* ضمان إن الصور ما تتقصّش غلط */
.thumb-wrap-dark{ width:100%; aspect-ratio:16/10; overflow:hidden; }
.thumb-wrap-dark img{ width:100%; height:100%; object-fit:cover; }

/* >=576px: خليها عمودين للكروت */
@media (min-width:576px){
  .posts-grid-dark{
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

/* >=992px: رجّع السايدبار جنب الكروت */
@media (min-width:992px){
  .blog-layout{
    grid-template-columns: 1fr 3fr;  /* Sidebar 25% – Posts 75% */
    grid-template-areas: "sidebar posts";
  }
  .posts-grid-dark{
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

/* >=1200px: ثلاثة أعمدة للكروت */
@media (min-width:1200px){
  .posts-grid-dark{
    grid-template-columns: repeat(3, minmax(300px, 1fr));
  }
}

/* تظل الشبكة 3 أعمدة كحد أقصى حتى على الشاشات الكبيرة. */
@media (min-width:1600px){
  .posts-grid-dark{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* تجميل بسيط لعنوان القسم على الموبايل */
.blog-heading{
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}
/*--------------------------------------------------------*/
/* ===== Desktop: رجّع الكاتيجوري تاخد عرض الصايدبار كله ===== */
@media (min-width: 992px){
  /* سايدبار ثابت وعريض بشكل مريح */
  .blog-layout{
    grid-template-columns: 280px 1fr;     /* Sidebar ثابت + Posts */
    grid-template-areas: "sidebar posts";
  }
  .blog-sidebar{ grid-area: sidebar; align-self: start; }

  /* الكروت صفّين/تلاتة حسب المقاس */
  .posts-grid-dark{ grid-template-columns: repeat(2, minmax(280px,1fr)); }
}
@media (min-width:1200px){
  .posts-grid-dark{ grid-template-columns: repeat(3, minmax(300px,1fr)); }
}

/* خلى عناصر الكاتيجورى تتمد للعرض الكامل بدل عرض المحتوى فقط */
.blog-sidebar .categories-list{
  display: flex;              /* بدل grid عشان تمدّ العناصر طبيعي */
  flex-direction: column;
  gap: 12px;
}
.blog-sidebar .categories-list li{
  width: 100%;
}
.blog-sidebar .categories-list li a{
  display: block;
  width: 100%;                /* المهم */
  padding: 12px 14px;
  border-radius: 10px;
  background: #1a1a1a;
  color: #ddd;
  border: 1px solid #262626;
  text-align: left;
  transition: .2s ease;
}
.blog-sidebar .categories-list li a:hover{
  background: #0aff84;
  color: #000;
}

/* Pagination مستقلة عن ستايلات Laravel وTailwind العامة. */
.pagination-dark {
  width: min(1100px, calc(100% - 32px));
  margin: 34px auto 70px;
  display: flex;
  justify-content: center;
}
.blog-pagination { display:flex; align-items:center; justify-content:center; gap:10px; direction:ltr; }
.blog-page-link,
.blog-page-dots {
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 44px;
  border:1px solid var(--nav-border, #294039);
  border-radius:12px;
  color:var(--nav-text, #eef8f4) !important;
  background:var(--surface-solid, #111b18);
  font-size:1rem;
  font-weight:800;
  line-height:1;
  text-decoration:none !important;
  transition:.2s ease;
}
.blog-page-link:hover { border-color:var(--nav-accent); transform:translateY(-2px); }
.blog-page-link.active { color:var(--button-text, #04110d) !important; border-color:var(--nav-accent); background:var(--nav-accent); }
.blog-page-link.disabled { opacity:.35; cursor:not-allowed; }
.blog-page-dots { border-color:transparent; background:transparent; }

/* Popular articles */
.popular-articles {
  width:min(1400px, calc(100% - 32px));
  margin:0 auto 80px;
  padding:clamp(24px, 4vw, 48px);
  border:1px solid var(--nav-border, #294039);
  border-radius:28px;
  background:color-mix(in srgb, var(--surface-solid, #111b18) 92%, transparent);
}
.popular-articles-head { max-width:760px; margin-bottom:28px; }
.popular-articles-head > span { color:var(--nav-accent); font-weight:850; }
.popular-articles-head h2 { margin:7px 0 10px; color:var(--nav-text, #fff); font-size:clamp(1.8rem, 4vw, 3rem); }
.popular-articles-head p { margin:0; color:var(--nav-muted, #a3b2ad); line-height:1.8; }
.popular-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:20px; }
.popular-card { overflow:hidden; border:1px solid var(--nav-border, #294039); border-radius:18px; background:var(--card-bg, #101915); }
.popular-thumb { position:relative; display:block; aspect-ratio:16/10; overflow:hidden; }
.popular-thumb img { width:100%; height:100%; object-fit:cover; transition:transform .3s ease; }
.popular-card:hover .popular-thumb img { transform:scale(1.035); }
.popular-thumb span { position:absolute; inset:auto 12px 12px auto; padding:7px 10px; border-radius:999px; color:#fff; background:rgba(0,0,0,.7); font-size:.8rem; }
.popular-card > div { padding:16px; }
.popular-card small { color:var(--nav-accent); }
.popular-card h3 { margin:8px 0; font-size:1.05rem; line-height:1.55; }
.popular-card h3 a { color:var(--nav-text, #fff); text-decoration:none; }
.popular-card p { margin:0; color:var(--nav-muted, #a3b2ad); line-height:1.65; font-size:.9rem; }

@media (max-width:1050px) { .popular-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width:575px) {
  .blog-layout { padding-inline:16px; }
  .popular-grid { grid-template-columns:1fr; }
  .popular-articles { padding:20px; border-radius:20px; }
  .blog-page-link, .blog-page-dots { width:38px; height:38px; flex-basis:38px; }
}
