/* ================================
   Styles/Content.css  (cleaned)
   - Content Feed (card grid)
   - Post Viewer (Post.html)
   - Top Controls (search | type | sort)
   ================================ */

/* ---------- Base tokens (fallbacks if Global.css doesn’t define them) ---------- */
:root{
  --bg: #0b0b0d;
  --text: #eaeaea;
  --muted: #9aa0a6;

  /* Page card surfaces */
  --card: #141418;
  --card-border: rgba(255,255,255,0.07);

  --accent: #8be9fd;
  --link: #80bfff;

  /* Controls: match drawer look */
  --ctl-surface: #2b253b;                 /* input/select bg */
  --ctl-surface-hover: #2f2840;           /* hover bg */
  --ctl-border: rgba(167,139,250,.35);    /* violet border */
  --ctl-border-hover: rgba(167,139,250,.55);
  --ctl-ring: #a78bfa;                    /* focus ring */

  /* Control sizing */
  --ctl-h: 34px;
  --ctl-pad-x: 10px;
  --ctl-caret: 18px;

  /* Search width cap (roughly ~⅓ page width on desktop) */
  --search-max: 320px;
}

/* Map shared panel tokens used elsewhere to this file’s tokens */
:root{
  --panel: var(--card);
  --panel-2: color-mix(in oklab, var(--card) 85%, #fff 15%);
  --border: var(--card-border);
}

/* ---------- Utilities ---------- */
.muted{ color: var(--muted); }

/* ---------- Content Feed (wider cards, max 3-up grid) ---------- */
#content-grid{
  display: grid;
  gap: 18px;
  grid-auto-rows: 1fr;
}

/* 1 column on phones */
@media (max-width: 699px){
  #content-grid{
    grid-template-columns: 1fr;
  }
}

/* 2 columns on tablets / small desktop */
@media (min-width: 700px) and (max-width: 1119px){
  #content-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 3 columns max on large desktop */
@media (min-width: 1120px){
  #content-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Card */
.card{
  display:flex;
  flex-direction:column;
  background:var(--card);
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 0 0 1px var(--card-border) inset;
  min-height:100%;
}

/* 16:9 media (shorter & wider thumbnails) */
.card .cover{
  display:block;
  position:relative;
  width:100%;
  aspect-ratio:16 / 9; /* prefer wide thumbnails */
  background:rgba(255,255,255,0.06);
  overflow:hidden;
}
.card .cover img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Card body */
.card .body{
  padding:8px 12px 10px;  /* slightly tighter */
  display:grid;
  grid-template-areas:"eyebrow" "title" "excerpt" "meta";
  grid-auto-rows:max-content;
  row-gap:4px;
}
.card .eyebrow{
  grid-area:eyebrow;
  font-size:.78rem;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:var(--muted);
}
.card .title {
  grid-area: title;
  margin: 0;
  font-size: 1.15rem;      /* bigger title */
  font-weight: 600;        /* optional, looks better */
  line-height: 1.22;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .title a{
  color:var(--text);
  text-decoration:none;
}
.card .title a:hover,
.card .title a:focus{
  color:var(--link);
  text-decoration:underline;
}
.card .excerpt{
  grid-area:excerpt;
  margin:0;
  color:var(--text);
  opacity:.9;
  font-size:.92rem;
  line-height:1.35;
  display:-webkit-box;
  -webkit-line-clamp:2;      /* shorter — 2 lines */
  line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:calc(1.35em * 2);
}
.card .meta{
  grid-area:meta;
  font-size:.9rem;
  color:var(--muted);
}

/* Loading / Error */
.loading, .error{
  grid-column:1 / -1;
  padding:16px;
  border-radius:10px;
  background:var(--card);
  box-shadow:0 0 0 1px var(--card-border) inset;
}
.error{ color:#ff9999; }

/* ---------- Top Controls (search | type | sort) ---------- */
/* Layout row */
.content-controls, .controls, .filters-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

/* Search: fixed cap (not full width) */
.content-controls input[type="search"],
.controls input[type="search"],
main input[type="search"].content-search{
  flex:0 0 var(--search-max);
  width:var(--search-max);
  max-width:var(--search-max);
  min-width:200px;
}

/* Selects hug their text */
.content-controls select,
.controls select,
main select{
  flex:0 0 auto;
  width:fit-content;
  min-width:0;
  white-space:nowrap;
}

/* Visual theme (match drawer) */
.content-controls :is(select, input[type="search"]),
.controls :is(select, input[type="search"]),
main :is(select, input[type="search"], input[type="text"].content-search){
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  height:var(--ctl-h);
  font-size:.94rem;
  line-height:1.2;
  padding:6px var(--ctl-caret) 6px var(--ctl-pad-x);
  color:var(--text);
  background:var(--ctl-surface);
  border:1px solid var(--ctl-border);
  border-radius:10px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03);
}
.content-controls :is(select, input[type="search"]):hover,
.controls :is(select, input[type="search"]):hover,
main :is(select, input[type="search"], input[type="text"].content-search):hover{
  background:var(--ctl-surface-hover);
  border-color:var(--ctl-border-hover);
}
.content-controls :is(select, input[type="search"]):focus,
.controls :is(select, input[type="search"]):focus,
main :is(select, input[type="search"], input[type="text"].content-search):focus{
  outline:2px solid var(--ctl-ring);
  outline-offset:1px;
}
.content-controls input[type="search"]::placeholder,
.controls input[type="search"]::placeholder{
  color:color-mix(in oklab, var(--text) 55%, black);
  opacity:.9;
}
main select option{
  background:#241f30;
  color:var(--text);
}

/* ---------- Post Viewer (Post.html) ---------- */
.post-page{ max-width:960px; margin:0 auto; }
.post-container{ display:block; }
.post-loading, .post-error{ opacity:.85; padding:24px 0; }
.post-error{ color:#ff9aa2; }
.post-header{ margin-bottom:20px; }
.post-title{ font-size:2rem; line-height:1.2; margin:0 0 6px 0; }
.post-meta{ opacity:.75; font-size:.95rem; display:flex; align-items:center; gap:8px; }
.post-hero{ margin:10px 0 18px; display:flex; justify-content:center; }
.post-hero img{ width:100%; max-width:300px; height:auto; display:block; border-radius:8px; }
.post-figcap{ font-size:.9rem; opacity:.8; margin-top:6px; }
.post-content{ font-size:1rem; line-height:1.65; }
.post-content p{ margin:0 0 1rem; }
.post-content h2, .post-content h3, .post-content h4{ margin:1.2rem 0 .6rem; line-height:1.25; }
.post-content img{ max-width:100%; height:auto; border-radius:6px; }
.post-content a{ color:var(--link); text-decoration:underline; }
.post-content a:hover, .post-content a:focus{ color:var(--accent); }
.post-content iframe{ width:100%; min-height:360px; border:0; border-radius:6px; }
.post-content blockquote{
  margin:1rem 0;
  padding:.75rem 1rem;
  background:rgba(255,255,255,.04);
  border-left:3px solid var(--card-border);
  border-radius:6px;
}
.post-content ul,
.post-content ol{
  margin:0 0 1rem 1.25rem;
}
.post-content code,
.post-content pre{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  background:rgba(255,255,255,.06);
  color:var(--text);
  border-radius:6px;
}
.post-content code{ padding:.1rem .35rem; }
.post-content pre{ padding:.75rem 1rem; overflow:auto; }

/* Small screens */
@media (max-width:520px){
  .post-title{ font-size:1.6rem; }
  .post-content iframe{ min-height:260px; }
}

/* Content actions */
.content-actions{ display:flex; justify-content:center; margin-top:10px; }
.load-more{
  background:var(--card);
  color:var(--text);
  border:1px solid var(--card-border);
  border-radius:10px;
  padding:10px 14px;
  font:inherit;
  cursor:pointer;
}
.load-more:hover{ border-color:rgba(255,255,255,.18); }
.load-more:disabled{ opacity:.6; cursor:default; }
.post-nav{ margin-bottom:10px; }
.back-link{ color:var(--link); text-decoration:none; }
.back-link:hover{ text-decoration:underline; }

/* ---------- Page background ---------- */
body{ background:#0f131a !important; }

/* Top-row controls: start with drawer-purple colors */
main .content-controls :is(select, input[type="search"]),
main .controls         :is(select, input[type="search"]),
main                    :is(select, input[type="search"].content-search) {
  background-color: #2b253b !important;
  color: #eaeaea !important;
  border: 1px solid rgba(167,139,250,.35) !important;
  border-radius: 10px !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03) !important;
}

/* Keep hover/focus consistent with the drawer */
main .content-controls :is(select, input[type="search"]):hover,
main .controls         :is(select, input[type="search"]):hover {
  background-color: #2f2840 !important;
  border-color: rgba(167,139,250,.55) !important;
}
main .content-controls :is(select, input[type="search"]):focus,
main .controls         :is(select, input[type="search"]):focus {
  outline: 2px solid #a78bfa !important;
  outline-offset: 1px !important;
}

/* The dropdown menu surface also matches the drawer */
main .content-controls select option,
main .controls select option {
  background: #241f30 !important;
  color: #eaeaea !important;
}

/* === Content: make the SEARCH BAR use the drawer purple by default === */
main .content-controls input[type="search"],
main .controls input[type="search"],
main input[type="search"].content-search {
  background-color: #2b253b !important;
  color: #eaeaea !important;
  border: 1px solid rgba(167,139,250,.35) !important;
  border-radius: 10px !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03) !important;
}

/* Hover + focus to match the selects/drawer */
main .content-controls input[type="search"]:hover,
main .controls input[type="search"]:hover,
main input[type="search"].content-search:hover {
  background-color: #2f2840 !important;
  border-color: rgba(167,139,250,.55) !important;
}
main .content-controls input[type="search"]:focus,
main .controls input[type="search"]:focus,
main input[type="search"].content-search:focus {
  outline: 2px solid #a78bfa !important;
  outline-offset: 1px !important;
}

/* Placeholder tint similar to drawer */
main .content-controls input[type="search"]::placeholder,
main .controls input[type="search"]::placeholder,
main input[type="search"].content-search::placeholder {
  color: color-mix(in oklab, #eaeaea 55%, #000) !important;
  opacity: .9;
}

/* Force the top SEARCH BAR to use the same purple as the drawer */
html body main .content-controls input[type="search"],
html body main input[type="search"].content-search,
html body #content .content-controls input[type="search"],
html body .controls input[type="search"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  background-color: #2b253b !important;
  border: 1px solid rgba(167,139,250,.35) !important;
  color: #eaeaea !important;
  border-radius: 10px !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03) !important;
  background-clip: padding-box !important; /* avoid UA inner bevel */
}

/* Hover / focus like the selects */
html body main .content-controls input[type="search"]:hover,
html body main input[type="search"].content-search:hover {
  background-color: #2f2840 !important;
  border-color: rgba(167,139,250,.55) !important;
}
html body main .content-controls input[type="search"]:focus,
html body main input[type="search"].content-search:focus {
  outline: 2px solid #a78bfa !important;
  outline-offset: 1px !important;
}

/* Placeholder tint */
html body main .content-controls input[type="search"]::placeholder,
html body main input[type="search"].content-search::placeholder {
  color: color-mix(in oklab, #eaeaea 55%, #000) !important;
  opacity: .9 !important;
}

/* Optional (Chrome/Safari): remove the default clear 'x' icon look */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* ===== CONTENT: make the search bar purple (match drawer) ===== */
/* Catch ALL likely markups for the search box */
main .content-controls input,
main .controls input,
#content input,
main input[type="search"],
main input[type="text"],
input[type="search"][placeholder*="Search"],
input[type="text"][placeholder*="Search"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  background-color: #2b253b !important;                       /* drawer input bg */
  border: 1px solid rgba(167,139,250,.35) !important;         /* violet border */
  color: #eaeaea !important;
  border-radius: 10px !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03) !important;
  background-clip: padding-box !important;
}

/* Hover / focus like the drawer */
main .content-controls input:hover,
main .controls input:hover,
#content input:hover {
  background-color: #2f2840 !important;
  border-color: rgba(167,139,250,.55) !important;
}
main .content-controls input:focus,
main .controls input:focus,
#content input:focus {
  outline: 2px solid #a78bfa !important;
  outline-offset: 1px !important;
}

/* Placeholder tint */
main .content-controls input::placeholder,
main .controls input::placeholder,
#content input::placeholder {
  color: color-mix(in oklab, #eaeaea 55%, #000) !important;
  opacity: .9 !important;
}

/* Remove default WebKit search decorations so the purple shows cleanly */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* ---------- Title & date rules (single purple line under title) ---------- */
/* Generic spacing for titles on content pages */
main h1 {
  position: relative;
  padding-bottom: 8px;   /* room for the rule */
  margin-bottom: 12px;   /* space before the date */
}

/* Remove any extra rule under the date/container */
.post-header,
.post-meta {
  border-bottom: 0 !important;
  box-shadow: none !important;
}
.post-header::after,
.post-meta::after {
  content: none !important;
}

/* Title underline — between title and date only on the post page */
#post-page .post-title {
  position: relative;
  padding-bottom: 8px;   /* room for the line */
  margin-bottom: 10px;   /* space before the date */
}
#post-page .post-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: #a78bfa;
  opacity: .95;
}

/* Single purple line under the title (above the date) */
.post-page .post-header h1,
#post-page .post-header h1 {
  position: relative;
  padding-bottom: 8px;  /* space for line */
  margin-bottom: 10px;  /* space before date */
}
.post-page .post-header h1::after,
#post-page .post-header h1::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: #a78bfa;
  opacity: .95;
}

/* keep the date row clean */
.post-header,
.post-meta {
  border-bottom: 0 !important;
  box-shadow: none !important;
}
.post-header::after,
.post-meta::after {
  content: none !important;
}

/* ---------- Hard override to keep cards 16:9 no matter what ---------- */
main #content-grid .card .cover{
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
}
main #content-grid .card .cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Purple underline under content card titles */
.card .title {
  position: relative;
  padding-bottom: 6px;   /* room for the line */
  margin-bottom: 6px;    /* spacing before excerpt */
}

.card .title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #a78bfa;        /* your accent purple */
  opacity: .9;
  border-radius: 2px;
}
.card .title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#content-grid {
  display: grid;
  gap: 22px;
  grid-auto-rows: 1fr;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
}
/* ---------- Bigger inline card images ---------- */
.post-content .jt-card-row {
  margin: 1.75rem 0;
  text-align: center;
}

.post-content .jt-card-block {
  display: inline-block;
  vertical-align: top;
  margin: 0 12px 24px;

  width: 24%;        /* (was 19%) → fits ~4 per row instead of 5 */
  max-width: 320px;  /* (was 260px) → physically bigger cards */

  text-align: left;
}

.post-content .jt-card-block__img {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  box-shadow: 0 10px 22px rgba(0,0,0,.55);
}

.post-content .jt-card-block__img img {
  display: block;
  width: 100%;
  height: auto;
}

/* Medium screens: ~2–3 per row */
@media (max-width: 1024px) {
  .post-content .jt-card-block {
    width: 32%;
    max-width: 320px;
  }
}

/* Small tablets / big phones */
@media (max-width: 800px) {
  .post-content .jt-card-block {
    width: 45%;
    max-width: 340px;
  }
}

/* Phones: big single column */
@media (max-width: 500px) {
  .post-content .jt-card-block {
    width: 80%;
    max-width: 360px;
  }
}


/* ---------- [deck slug="..."] shortcode — full deck viewer iframe ---------- */

.post-content .jt-deck-iframe-wrapper {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}

.post-content .jt-deck-iframe {
  width: 100%;
  max-width: 1100px;
  height: 780px; /* enough to show the deck viewer on most screens */
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--card-border) inset,
    0 14px 40px rgba(0, 0, 0, 0.7);
  background: transparent;
}

/* On narrow screens, give it extra height so it doesn't clip */
@media (max-width: 768px) {
  .post-content .jt-deck-iframe {
    height: 900px;
    border-radius: 12px;
  }
}
/* ---------- [deck slug="..."] full deck viewer iframe ---------- */

.post-content .jt-deck-iframe-wrapper {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}

.post-content .jt-deck-iframe {
  width: 100%;
  max-width: 1100px;
  height: 1200px;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--card-border) inset,
    0 14px 40px rgba(0, 0, 0, 0.7);
  background: transparent;
}

@media (max-width: 768px) {
  .post-content .jt-deck-iframe {
    height: 1300px;
    border-radius: 12px;
  }
}
/* ---------- Full deck viewer embed inside posts ---------- */

/* Break the deck embed out of the narrow text column and center it */
.post-content .jt-deck-iframe-wrapper {
  margin: 2.5rem 0;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 100vw - 32px);
}

/* Height is controlled by JS; min-height is just a placeholder before load */
.post-content .jt-deck-iframe {
  display: block;
  width: 100%;
  min-height: 900px;   /* just so it doesn’t look tiny while loading */
  height: auto;        /* JS will set an exact pixel height later */
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--card-border) inset,
    0 18px 50px rgba(0, 0, 0, 0.75);
  background: transparent;
}

@media (max-width: 768px) {
  .post-content .jt-deck-iframe-wrapper {
    width: 100vw;
  }

  .post-content .jt-deck-iframe {
    border-radius: 14px;
  }
}
/* ---- Mobile overflow fix ---- */

/* Ensure the article container never exceeds the viewport */
.post-container,
.post-content {
  max-width: 100%;
  overflow-x: hidden;
}

/* Make *everything inside the post* obey the viewport */
.post-content * {
  max-width: 100%;
  box-sizing: border-box;
}

/* Card rows must wrap cleanly */
.post-content .jt-card-row {
  overflow-x: hidden;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* Card blocks cannot force overflow */
.post-content .jt-card-block {
  max-width: 90vw;   /* cannot exceed screen width */
  width: auto;
}

/* Images inside card blocks stay responsive */
.post-content .jt-card-block__img img {
  width: 100%;
  height: auto;
  display: block;
}

/* Any images that WordPress posts insert */
.post-content img {
  max-width: 100%;
  height: auto;
}

/* Embedded deck iframes */
.jt-deck-iframe-wrapper,
.jt-deck-iframe {
  max-width: 100%;
  width: 100%;
  overflow: hidden;
}
/* ---------- Mobile safety for Post.html (no sideways scroll) ---------- */

/* Keep the post page inside the viewport on small screens */
@media (max-width: 640px) {
  .jt-page.post-page {
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Make sure long content doesn't push the layout wider than the screen */
.post-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Any media inside posts should shrink to fit the screen */
.post-content img,
.post-content iframe,
.post-content table,
.post-content video {
  max-width: 100%;
  height: auto;
}

/* If you ever paste code blocks or preformatted text from WP */
.post-content pre {
  max-width: 100%;
  overflow-x: auto;
}
/* === Article card rows: desktop layout restored === */

.article-body .jt-card-row {
  text-align: center;
  margin: 1.5rem 0;
}

/* On desktop, allow multiple cards per row */
.article-body .jt-card-row .jt-card-block {
  display: inline-block;
  vertical-align: top;
  margin: 0 8px 16px;
  width: 22%;          /* up to 4 per row */
  max-width: 260px;
}

/* Medium screens: 3 per row */
@media (max-width: 960px) {
  .article-body .jt-card-row .jt-card-block {
    width: 30%;
  }
}

/* Tablets: 2 per row */
@media (max-width: 720px) {
  .article-body .jt-card-row .jt-card-block {
    width: 45%;
  }
}

/* Phones: 1 per row */
@media (max-width: 480px) {
  .article-body .jt-card-row .jt-card-block {
    width: 80%;
  }
}
/* === Card rows inside article content === */

/* Row wrapper: centers the group and adds spacing */
.post-content .jt-card-row,
.entry-content .jt-card-row {
  margin: 1.75rem 0;
  text-align: center;
}

/* Individual card blocks: sit side-by-side on desktop */
.post-content .jt-card-block,
.entry-content .jt-card-block {
  display: inline-block;
  vertical-align: top;
  margin: 0 12px 24px;

  /* 3–4 cards per row on desktop */
  width: 24%;
  max-width: 320px;

  text-align: left;
}

/* Medium screens: ~3 per row */
@media (max-width: 1024px) {
  .post-content .jt-card-block,
  .entry-content .jt-card-block {
    width: 30%;
  }
}

/* Tablets: ~2 per row */
@media (max-width: 800px) {
  .post-content .jt-card-block,
  .entry-content .jt-card-block {
    width: 45%;
  }
}

/* Phones: big single column */
@media (max-width: 500px) {
  .post-content .jt-card-block,
  .entry-content .jt-card-block {
    width: 80%;
  }
}
/* ================================
   WordPress / Gutenberg formatting
   Scope: Post.html only (articles)
   ================================ */

.post-content {
  /* WP themes usually give content a readable line length */
  max-width: 760px;
  margin: 0 auto;
}

/* Alignment classes used by WordPress */
.post-content .aligncenter,
.post-content img.aligncenter,
.post-content figure.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.post-content .alignleft,
.post-content img.alignleft,
.post-content figure.alignleft {
  float: left;
  margin: 0.2em 1em 0.8em 0;
}

.post-content .alignright,
.post-content img.alignright,
.post-content figure.alignright {
  float: right;
  margin: 0.2em 0 0.8em 1em;
}

/* Gutenberg image blocks */
.post-content .wp-block-image {
  margin: 0 0 1.25em 0;
}

.post-content .wp-block-image img {
  display: block; /* critical for true centering */
  max-width: 100%;
  height: auto;
}

/* Captions */
.post-content figcaption,
.post-content .wp-element-caption {
  font-size: 0.9em;
  opacity: 0.85;
  margin-top: 0.4em;
  text-align: center;
}

/* Spacer blocks (this is what “blank lines” often become) */
.post-content .wp-block-spacer {
  display: block;
}

/* Separator */
.post-content .wp-block-separator {
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin: 1.5em auto;
  max-width: 280px;
}

/* Galleries (basic Gutenberg) */
.post-content .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 0 0 1.25em 0;
  padding: 0;
  list-style: none;
}

.post-content .wp-block-gallery figure {
  margin: 0;
}

.post-content .wp-block-gallery img {
  width: 100%;
  height: auto;
  display: block;
}

/* Columns */
.post-content .wp-block-columns {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin: 0 0 1.25em 0;
}

.post-content .wp-block-column {
  flex: 1;
  min-width: 0;
}

@media (max-width: 700px) {
  .post-content .wp-block-columns {
    flex-direction: column;
  }
}

/* Buttons */
.post-content .wp-block-button__link {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  background: rgba(167,139,250,0.25);
  border: 1px solid rgba(167,139,250,0.45);
  color: var(--text);
}

.post-content .wp-block-button__link:hover {
  border-color: rgba(167,139,250,0.65);
}

/* Clear floats so layout doesn’t break after aligned images */
.post-content::after {
  content: "";
  display: block;
  clear: both;
}
/* WordPress/Gutenberg text alignment */
.post-content .has-text-align-center { text-align: center !important; }
.post-content .has-text-align-right  { text-align: right !important; }
.post-content .has-text-align-left   { text-align: left !important; }

/* Some themes also emit this naming */
.post-content .has-text-align-justify { text-align: justify !important; }

/* Safety: if a block uses inline style="text-align:center" but a rule overrides it */
.post-content [style*="text-align:center"] { text-align: center !important; }
.post-content [style*="text-align:right"]  { text-align: right !important; }
/* =====================================
   WordPress image alignment (articles)
   ===================================== */

/* Base image behavior */
.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* CENTER */
.post-content .aligncenter,
.post-content img.aligncenter,
.post-content figure.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* LEFT */
.post-content .alignleft,
.post-content img.alignleft,
.post-content figure.alignleft {
  float: left;
  margin: 0.25em 1.25em 1em 0;
}

/* RIGHT */
.post-content .alignright,
.post-content img.alignright,
.post-content figure.alignright {
  float: right;
  margin: 0.25em 0 1em 1.25em;
}

/* WIDE (extends beyond text column, but not full bleed) */
.post-content .alignwide {
  width: min(110%, 100vw);
  margin-left: -5%;
  margin-right: -5%;
}

/* FULL WIDTH (true edge-to-edge) */
.post-content .alignfull {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Captions */
.post-content figcaption {
  text-align: center;
  font-size: 0.9em;
  opacity: 0.85;
  margin-top: 0.4em;
}

/* Clear floats so content below behaves */
.post-content::after {
  content: "";
  display: block;
  clear: both;
}
/* =====================================
   Article typography scale (WP-like)
   ===================================== */

.post-content {
  font-size: 18px;      /* WP body often ~16–18 */
  line-height: 1.75;
}

/* Headings: larger + consistent rhythm */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  line-height: 1.18;
  margin: 1.25em 0 0.6em;
  font-weight: 800;
}

/* Size scale */
.post-content h1 { font-size: 3.0rem; }  /* ~48px if root 16 */
.post-content h2 { font-size: 2.25rem; } /* ~36px */
.post-content h3 { font-size: 1.75rem; } /* ~28px */
.post-content h4 { font-size: 1.35rem; } /* ~22px */
.post-content h5 { font-size: 1.15rem; } /* ~18px */
.post-content h6 { font-size: 1.00rem; } /* ~16px */

/* Gutenberg sometimes uses this wrapper */
.post-content .wp-block-heading { margin: 1.25em 0 0.6em; }

/* Mobile: clamp huge headings */
@media (max-width: 700px) {
  .post-content { font-size: 16px; }
  .post-content h1 { font-size: 2.2rem; }
  .post-content h2 { font-size: 1.8rem; }
  .post-content h3 { font-size: 1.45rem; }
}
