/* Fallback templates: blog list, search, 404, generic posts. */

/* Block padding only: a shorthand with 0s erased the shell's side gutter and
   pushed article text against the screen edge. Inline padding fills in only
   where the 1120px measure leaves less side room than the site gutter. */
.wp-page {
  padding-block: calc(var(--header-h, 80px) + clamp(56px, 9vw, 130px)) clamp(70px, 8vw, 120px);
  padding-inline: max(0px, calc(var(--gutter) - max(0px, (100% - 1120px) / 2)));
  max-width: 1120px;
}

.wp-page h1 {
  font-size: calc(clamp(2.4rem, 5vw, 4.6rem) * var(--site-type, 1));
  line-height: 1.05;
  letter-spacing: -.04em;
  max-width: 20ch;
  margin: 0 0 24px;
}

.wp-page .lede { margin-bottom: 32px; }

.wp-page--center {
  min-height: 70vh;
  display: grid;
  align-content: center;
  justify-items: start;
}

.wp-list {
  display: grid;
  gap: 26px;
  margin: 18px 0 36px;
}

.wp-list__item {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.wp-list__item h2 {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.2;
  margin: 0 0 8px;
}

.wp-list__item h2 a { color: var(--fg); }
.wp-list__item h2 a:hover { color: var(--accent); }
.wp-list__item p { color: var(--muted); max-width: 60ch; line-height: 1.75; }

.wp-page .pagination,
.wp-page .nav-links { display: flex; gap: 12px; flex-wrap: wrap; }

.wp-post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--muted);
  font-size: .92rem;
  margin: 0 0 30px;
}

.wp-post__media {
  margin: 0 0 clamp(28px, 4vw, 48px);
  border-radius: var(--radius, 18px);
  overflow: hidden;
  border: 1px solid var(--line);
}

.wp-post__media img {
  display: block;
  width: 100%;
  height: auto;
}

[dir="rtl"] .wp-page { max-width: 1120px; }

[dir="rtl"] .wp-post__meta,
[dir="rtl"] .wp-post .article-share { font-family: 'Noto Kufi Arabic', sans-serif; }
