/* Single post page — shares colours/fonts with style.css */
.post-page .nav { background: rgba(255, 255, 255, .97); box-shadow: 0 2px 20px rgba(0, 0, 0, .06); padding: 14px 0; }
.post-page .nav .brand-name, .post-page .nav .nav-links a { color: var(--ink); }
.post-page .nav-toggle span { background: var(--ink); }

.post-hero { background: var(--dark); color: var(--white); padding: 140px 0 60px; }
.post-hero-inner { max-width: 860px; }
.post-hero h1 { color: var(--white); font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.4; margin-bottom: 14px; }
.post-meta-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; font-size: .92rem; color: var(--on-dark); }
.post-cat { background: var(--primary); color: var(--white); padding: 2px 14px; border-radius: 14px; font-weight: 600; }
.post-cat:empty { display: none; }
.post-lead { font-size: 1.15rem; color: rgba(255, 255, 255, .85); margin: 0; }
.post-lead:empty { display: none; }

.post-main { max-width: 860px; padding-top: 40px; padding-bottom: 80px; }
.post-cover { margin: -80px 0 40px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-cover img { width: 100%; max-height: 520px; object-fit: cover; }

/* Article typography (also understands the editor's formatting classes) */
.post-content { font-size: 1.12rem; line-height: 2; color: var(--text); }
.post-content h2 { font-size: 1.7rem; margin: 1.6em 0 .6em; }
.post-content h3 { font-size: 1.35rem; margin: 1.4em 0 .5em; }
.post-content p { margin: 0 0 1.2em; }
.post-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.post-content ul, .post-content ol { padding-inline-start: 1.6em; margin: 0 0 1.2em; list-style: revert; }
.post-content li { margin-bottom: .4em; }
.post-content blockquote {
  margin: 1.6em 0; padding: 14px 22px; background: var(--light-bg);
  border-inline-start: 4px solid var(--primary); border-radius: 0; font-style: italic;
}
.post-content img { border-radius: var(--radius); height: auto; }
/* A picture with no wrap setting sits in the line like in the editor: it follows the
   paragraph's alignment (right by default, centred if the paragraph is centred) */
.post-content img:not([data-wrap]) { display: inline-block; margin: .6em 0; vertical-align: bottom; }
.post-content iframe, .post-content .ql-video {
  display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0;
  border-radius: var(--radius); margin: 1.6em 0;
}
.post-content .ql-align-center { text-align: center; }
.post-content .ql-align-left { text-align: left; }
.post-content .ql-align-justify { text-align: justify; }
.post-content .ql-direction-ltr { direction: ltr; text-align: left; }
.post-loading { color: var(--muted); }
.post-content { display: flow-root; }   /* contains floated pictures */
/* Pictures & videos: size (inline style width) + text wrap (data-wrap) — same rules as the editor */
.post-content img[data-wrap="right"], .post-content iframe[data-wrap="right"] { float: right; margin: .4em 0 .8em 1.4em; }
.post-content img[data-wrap="left"], .post-content iframe[data-wrap="left"] { float: left; margin: .4em 1.4em .8em 0; }
.post-content img[data-wrap="center"], .post-content iframe[data-wrap="center"] { display: block; float: none; margin: 1em auto; }
/* wrapped without a chosen size → keep text room; a chosen/dragged size always wins */
.post-content img[data-wrap="right"]:not([style*="width"]), .post-content img[data-wrap="left"]:not([style*="width"]), .post-content iframe[data-wrap="right"]:not([style*="width"]), .post-content iframe[data-wrap="left"]:not([style*="width"]) { max-width: 60%; }
.post-content img[style*="width"], .post-content iframe[style*="width"] { height: auto; }
.post-content iframe[style*="width"] { aspect-ratio: 16 / 9; }
.post-content .ql-indent-1 { padding-inline-start: 3em; }
.post-content .ql-indent-2 { padding-inline-start: 6em; }
.post-content .ql-indent-3 { padding-inline-start: 9em; }
.post-content .ql-indent-4 { padding-inline-start: 12em; }

@media (max-width: 600px) {
  .post-hero { padding: 110px 0 44px; }
  .post-cover { margin-top: -50px; }
  .post-content { font-size: 1.05rem; }
  /* On phones, wrapped/resized pictures and videos go full width so text stays readable */
  .post-content img[data-wrap], .post-content iframe[data-wrap],
  .post-content img[style*="width"], .post-content iframe[style*="width"] { float: none; width: 100% !important; max-width: 100%; margin: 1em 0; }
}
