/*
 * Blog article styling — single posts and the posts archive.
 *
 * WHY A SEPARATE FILE. assets/css/site.css is a compiled Tailwind bundle with
 * no build step in the deploy (see functions.php:103). Editing it by hand works
 * exactly until someone regenerates the theme, at which point the change is
 * gone with no error. This file is hand-written by intent and survives a
 * rebuild, which is the same reason request-tray.css exists.
 *
 * WHY THE PROSE RULES AT ALL. the_content() emits ordinary <h2>, <p>, <ul>,
 * <blockquote>. The compiled bundle is purged against the theme's templates, so
 * it contains utility classes and no element styles — bare tags inherit almost
 * nothing and an article renders as an undifferentiated wall. Tailwind's
 * typography plugin is not in the build and adding it means a build step.
 *
 * Palette matches the templates: navy #0F2D3D, teal #0d6e6e, gold #D4A853,
 * body #374151, muted #6B7280.
 */

/*
 * HEADER CLEARANCE.
 *
 * The site header is position:fixed and 64px tall (functions.php:80 onwards).
 * Marketing templates clear it with a pt-16 first section, which
 * surnahealth_layout_css() then grows to 6rem. A blog page has no such section,
 * so without this the post title renders underneath the header.
 */
.surna-article-top { padding-top: 6rem; }

@media screen and (max-width: 600px) {
  .surna-article-top { padding-top: 5.5rem; }
}

/* ── article body ──────────────────────────────────────────────────────── */

.surna-prose {
  font-size: 1.0625rem;
  line-height: 1.75;
}

.surna-prose > * + * { margin-top: 1.25rem; }

.surna-prose h2,
.surna-prose h3,
.surna-prose h4 {
  color: #0F2D3D;
  font-weight: 800;
  line-height: 1.25;
}

/* Headings need more space above than below — the gap belongs to the section
   they open, not the paragraph they left. */
.surna-prose h2 { font-size: 1.75rem; margin-top: 2.75rem; margin-bottom: .75rem; }
.surna-prose h3 { font-size: 1.375rem; margin-top: 2.25rem; margin-bottom: .5rem; }
.surna-prose h4 { font-size: 1.125rem; margin-top: 1.75rem; margin-bottom: .5rem; }

.surna-prose h2:first-child,
.surna-prose h3:first-child { margin-top: 0; }

.surna-prose a {
  color: #0d6e6e;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.surna-prose a:hover { color: #0F2D3D; }

.surna-prose strong { color: #0F2D3D; font-weight: 700; }

.surna-prose ul,
.surna-prose ol { padding-left: 1.5rem; }
.surna-prose ul { list-style: disc; }
.surna-prose ol { list-style: decimal; }
.surna-prose li + li { margin-top: .5rem; }
.surna-prose li::marker { color: #0d6e6e; }

.surna-prose blockquote {
  border-left: 4px solid #D4A853;
  padding: .25rem 0 .25rem 1.25rem;
  color: #6B7280;
  font-style: italic;
}

.surna-prose img,
.surna-prose iframe {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}

.surna-prose figure { margin-top: 2rem; margin-bottom: 2rem; }
.surna-prose figcaption {
  margin-top: .625rem;
  font-size: .875rem;
  color: #6B7280;
  text-align: center;
}

.surna-prose hr {
  border: 0;
  border-top: 1px solid #E5E7EB;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.surna-prose code {
  background: #F8F5F0;
  border: 1px solid #E5E7EB;
  border-radius: .375rem;
  padding: .125rem .375rem;
  font-size: .9375em;
}

.surna-prose pre {
  background: #0F2D3D;
  color: #E5E7EB;
  border-radius: 1rem;
  padding: 1.25rem;
  overflow-x: auto;
}
.surna-prose pre code { background: none; border: 0; padding: 0; color: inherit; }

/* A table wider than the measure scrolls inside itself rather than pushing the
   page sideways. */
.surna-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
  display: block;
  overflow-x: auto;
}
.surna-prose th,
.surna-prose td {
  border: 1px solid #E5E7EB;
  padding: .625rem .75rem;
  text-align: left;
}
.surna-prose th { background: #F8F5F0; color: #0F2D3D; font-weight: 700; }

/* ── pagination ────────────────────────────────────────────────────────── */

.surna-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.surna-pagination a,
.surna-pagination span {
  display: inline-block;
  padding: .5rem .875rem;
  border-radius: 9999px;
  border: 1px solid #E5E7EB;
  font-size: .875rem;
  font-weight: 700;
  color: #6B7280;
  text-decoration: none;
}

.surna-pagination a:hover { border-color: #0d6e6e; color: #0d6e6e; }
.surna-pagination .current { background: #0F2D3D; border-color: #0F2D3D; color: #fff; }
