/* ============================================================
   Body text — Meskavan
   ------------------------------------------------------------
   Two things that were page-by-page problems and are handled
   here for the whole site.
   ============================================================ */

/* Text blocks built with the page builder are justified in
   inc/container-normaliser.php, where each block's font size is known — a
   justified two-line title in a narrow column pulls its words to both edges
   and leaves a river of space down the middle, and CSS cannot ask how big
   the text is. What is left are plain paragraphs, handled here. There is no
   size to read, so titles are kept out by tag: only p and li, never a
   heading. */
:where(.wp-block-post-content)
:where(p:not([class*="gb-text"]), li:not([class*="gb-text"])) {
  text-align: justify;
}

/* Explicitly right-aligned. On a right-to-left page that is the reading
   direction spelled out rather than a decision, so it reads as body copy —
   the same view the generated styles get. Centred and left-aligned text is
   someone choosing something and keeps its alignment. */
.wp-block-post-content p.has-text-align-right,
.wp-block-post-content li.has-text-align-right {
  text-align: justify;
}

@media (min-width: 1024px) {

  /* The heading over the video header sat wider than the page container —
     the header itself is full width by design, but its words should still
     line up with everything below them. Anchored on .video-top, the
     hand-written class on the video itself. */
  :is(div:has(> .video-top)) > :is(p, h1, h2, h3) {
    width: 80%;
    max-width: 1400px;
    margin-inline: auto;
  }

}

/* The footer sat on a top margin, so between the last section and the footer
   there was a strip of the page's own white — visible wherever the section
   above it is coloured, which on the blog is a cream block meeting a dark
   footer. The footer has its own generous padding; the margin was only ever
   adding a gap nothing filled. */
.site-footer {
  margin-block-start: 0;
}

/* The line in brackets that opens six of these pages — "[ ۲۵+ سال تجربه … ]".
   It is a tagline, not a paragraph: a few words standing above the title, in
   brackets so they read as an aside. Justified, those few words were pulled to
   both edges of the column with a gap down the middle. The class is added in
   inc/container-normaliser.php, where the text can be read; nothing in a
   stylesheet could have told it apart from any other short line. */
html .msk-tagline {
  text-align: center;
}
