/* blog.css — قالب المقالة وصفحة المقالات */
.blog {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding-block: 90px 60px;
  max-width: 1232px;
}
.blog__side { position: sticky; top: 24px; display: grid; gap: 24px; }

.search-box { display: flex; height: 40px; }
.search-box input {
  flex: 1; min-width: 0; border: 1px solid #cfd8dc; border-left: 0; border-radius: 0 4px 4px 0;
  padding: 0 12px; font: inherit; font-size: 14px; color: var(--c-ink); background: #fff;
}
.search-box input:focus { outline: 2px solid var(--c-primary); outline-offset: -2px; }
.search-box button {
  width: 42px; border: 0; border-radius: 4px 0 0 4px; background: var(--c-primary); color: #fff;
  display: grid; place-items: center;
}
.search-box button svg { width: 14px; height: 14px; fill: currentColor; }

.side-box h2 { font-size: 17px; color: var(--c-heading); margin-bottom: 10px; }
.side-box li { border-bottom: 1px solid #eceff1; }
.side-box a { display: block; padding: 8px 0; font-size: 14px; line-height: 1.6; color: var(--c-text); }
.side-box a:hover { color: var(--c-primary); }

/* بطاقة المقالة */
.post { background: #fff; border: 1px solid #e6eaec; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.post__img { margin: 0; }
.post__img img { width: 100%; height: 500px; object-fit: cover; }
.post__body { padding: 28px 32px 8px; }
.post__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: #9aa7ac; margin-bottom: 14px; }
.post__meta > * + *::before { content: "|"; margin-inline-end: 14px; color: #cfd8dc; }
.post__title { font-size: 30px; color: var(--c-heading); margin-bottom: 24px; }
.post__content { color: var(--c-ink); font-size: 16px; line-height: 2; }
.post__content h2 { font-size: 28px; color: var(--c-ink); margin: 1.4em 0 .5em; font-weight: 600; }
.post__content h3 { font-size: 22px; color: var(--c-ink); margin: 1.2em 0 .5em; }
.post__content ul, .post__content ol { margin: 0 0 1.2em; padding-inline-start: 1.5em; list-style: disc; }
.post__content ol { list-style: decimal; }
.post__content li { margin-bottom: .35em; }
.post__content a { color: var(--c-primary); }
.post__content a:hover { text-decoration: underline; }
.post__content img { border-radius: 8px; margin: 1em auto; }
.post__content blockquote { margin: 1em 0; padding: 12px 18px; border-inline-start: 4px solid var(--c-primary); background: #f3fbff; }

.post__tags { margin: 28px 0 8px; }
.post__tags h2 { font-size: 15px; color: var(--c-ink); margin-bottom: 8px; }
.post__tags ul { display: flex; flex-wrap: wrap; gap: 6px; }
.post__tags li { font-size: 12px; border: 1px solid #dfe5e8; padding: 3px 9px; color: var(--c-text); }

.post-nav {
  display: flex; justify-content: space-between; gap: 20px;
  border-top: 1px solid #eceff1; padding: 16px 32px; margin-top: 20px;
}
.post-nav a { display: grid; gap: 2px; font-size: 14px; max-width: 48%; line-height: 1.5; }
.post-nav small { color: #9aa7ac; font-size: 12px; }
.post-nav__prev { text-align: left; margin-inline-start: auto; }

.post-cta {
  border-top: 1px solid #eceff1; padding: 24px 32px 30px; text-align: center;
  background: linear-gradient(180deg, #fff 0%, #f4f6fd 100%);
}
.post-cta p { color: var(--c-ink); font-weight: 600; }
.post-cta .btn-row { justify-content: center; }

/* صفحة المقالات */
.articles-hero { background: var(--g-hero); padding: 90px 0 70px; text-align: center; }
.articles-hero h1 { font-size: clamp(32px, 5vw, 52px); color: var(--c-heading); margin-bottom: 10px; }
.articles-hero p { font-size: 18px; margin: 0 auto 24px; max-width: 640px; }
.articles-hero .search-box { max-width: 460px; margin-inline: auto; height: 48px; }
.articles-hero .search-box input { font-size: 16px; }

.posts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px;
  padding-block: 70px 90px;
}
.post-card {
  display: flex; flex-direction: column; background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow-card); transition: transform .25s, box-shadow .25s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -10px rgba(23, 37, 42, .35); }
.post-card__img { display: block; aspect-ratio: 16 / 9; background: var(--g-card); }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.post-card__ph {
  display: block; width: 100%; height: 100%;
  background: url("/assets/img/2025/01/law-logo_11zon.png") center / 90px no-repeat, var(--g-hero);
}
.post-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card time { font-size: 13px; color: #9aa7ac; }
.post-card h2 { font-size: 20px; margin: 6px 0 10px; line-height: 1.5; }
.post-card h2 a { color: var(--c-heading); }
.post-card h2 a:hover { color: var(--c-primary); }
.post-card p { font-size: 15px; flex: 1; }
.post-card__more { font-weight: 700; font-size: 15px; }
.posts-empty { text-align: center; padding: 40px 0 80px; font-size: 18px; }

@media (max-width: 900px) {
  .blog { grid-template-columns: 1fr; padding-block: 30px 40px; }
  .blog__side { position: static; order: -1; }
  .side-box { display: none; }
  .post__img img { height: 240px; }
  .post__body { padding: 20px 18px 4px; }
  .post__title { font-size: 24px; }
  .post__content h2 { font-size: 22px; }
  .post-nav, .post-cta { padding-inline: 18px; }
}
