/* W4-WS1 blog article layout (2026-05-28) */
/* Scope: oct_blogarticle.twig - content column + hero + TOC + tables. */

/* === Content column: unified width (sess #24: 680 -> 820 align with hero band) === */
.rm-blog-post-text {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
  line-height: 1.7;
  font-size: 17px;
  color: #222;
}

.rm-blog-post-text > * + * {
  margin-top: 0;
}

.rm-blog-post-text p {
  margin: 0 0 1.15em;
}

.rm-blog-post-text h2 {
  margin: 2em 0 0.7em;
  font-size: 1.55em;
  color: #10591b;
  scroll-margin-top: 90px;
  line-height: 1.3;
  font-weight: 600;
}

.rm-blog-post-text h3 {
  margin: 1.6em 0 0.55em;
  font-size: 1.22em;
  color: #1a3320;
  scroll-margin-top: 90px;
  line-height: 1.35;
  font-weight: 600;
}

.rm-blog-post-text ul,
.rm-blog-post-text ol {
  margin: 0 0 1.2em;
  padding-left: 1.5em;
}

.rm-blog-post-text ul li,
.rm-blog-post-text ol li {
  margin-bottom: 0.45em;
  line-height: 1.6;
}

.rm-blog-post-text strong {
  font-weight: 600;
  color: #1a3320;
}

.rm-blog-post-text em {
  font-style: italic;
  color: #2b3a2b;
}

/* Inline images у body */
.rm-blog-post-text img {
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
  display: block;
  border-radius: 4px;
}

/* === Hero band (after H1, before content) === */
/* sess #16: hero 820 > text 680 (intentional visual hierarchy hero wider than text column) */
.rm-blog-hero-wrap {
  max-width: 820px;
  margin: 0 auto 2em;
  padding: 0 16px;
  box-sizing: border-box;
}

.rm-blog-hero {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: #f0f5ef;
}

/* === TOC nav === */
.rm-blog-toc {
  max-width: 820px;
  margin: 0 auto 2.2em;
  padding: 1.1em 1.3em;
  background: #f7faf6;
  border-left: 4px solid #10591b;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 0.97em;
}

.rm-blog-toc-title {
  font-weight: 600;
  color: #10591b;
  margin: 0 0 0.55em;
  font-size: 1.07em;
}

.rm-blog-toc ol,
.rm-blog-toc ul {
  list-style: decimal;
  padding-left: 1.5em;
  margin: 0;
}

.rm-blog-toc li {
  margin: 0.35em 0;
  line-height: 1.5;
}

.rm-blog-toc a {
  color: #1a3320;
  text-decoration: none;
  transition: color 0.15s ease;
}

.rm-blog-toc a:hover {
  color: #10591b;
  text-decoration: underline;
}

/* === Tables: brand-styled, mobile-only horizontal scroll === */
/* Override all.css :112 .rm-blog-post-text table { overflow-x:scroll; display:block } */
.rm-blog-post-text table {
  display: table !important;
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1.8em 0 !important;
  background: #fff !important;
  overflow-x: visible !important;
  font-size: 0.95em;
  border: 1px solid #d4d8d2;
}

.rm-blog-post-text table thead th,
.rm-blog-post-text table th {
  background: #10591b;
  border: 1px solid #d4d8d2;
  padding: 11px 14px;
  text-align: left;
  font-weight: 600;
  color: #fff;
  vertical-align: middle;
}

.rm-blog-post-text table td {
  border: 1px solid #e4e7e2;
  padding: 11px 14px;
  vertical-align: top;
}

.rm-blog-post-text table tbody tr:nth-child(even) td {
  background: #fafbf9;
}

/* Caption: short plain-text label above table (RULE #23) */
.rm-blog-post-text table caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  color: #1a3320;
  padding: 0 0 8px;
}

/* Author block - sync з text column max-width */
.rm-blog-post-text .oct-blog-author-block {
  max-width: 820px;
  margin: 2em auto;
}

/* === Mobile === */
@media (max-width: 767px) {
  .rm-blog-post-text {
    max-width: 100%;
    padding: 0 12px;
    font-size: 16px;
    line-height: 1.65;
  }

  .rm-blog-post-text h2 {
    font-size: 1.4em;
  }

  .rm-blog-post-text h3 {
    font-size: 1.15em;
  }

  .rm-blog-post-text table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    white-space: normal;
  }

  .rm-blog-hero-wrap {
    padding: 0 12px;
    margin-bottom: 1.6em;
  }

  .rm-blog-toc {
    padding: 0.9em 1em;
    margin-bottom: 1.6em;
  }
}

/* === Tablet refinement === */
@media (min-width: 768px) and (max-width: 991px) {
  .rm-blog-post-text {
    max-width: 820px;
  }

  .rm-blog-toc {
    max-width: 820px;
  }
}
