/* CloudSigma blog (Phase 2) — layer on portal.css / iter2.css design system. */

.cs-blog-card{display:block;height:100%;border-radius:18px;overflow:hidden;background:var(--bg-card,#fff);
  border:1px solid var(--border-color,#e8e8e8);text-decoration:none;color:inherit;
  transition:transform .25s ease,box-shadow .25s ease;}
.cs-blog-card:hover{transform:translateY(-5px);box-shadow:0 22px 48px -16px rgba(20,164,77,.22);}
.cs-blog-card-img{height:180px;background-size:cover;background-position:center;}
.cs-blog-card-img-ph{background:linear-gradient(135deg,#0d8c61,#06b6d4);}
.cs-blog-card-body{padding:1.25rem;}
.cs-blog-card-title{font-size:1.1rem;font-weight:700;margin:0 0 .5rem;color:var(--text-heading);}
.cs-blog-card-excerpt{font-size:.9rem;color:var(--text-secondary);margin:0 0 .75rem;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}
.cs-blog-card-meta{font-size:.78rem;color:var(--text-secondary);letter-spacing:.02em;}

.cs-post{max-width:760px;margin:0 auto;}
.cs-post-back{font-size:.85rem;color:var(--cs-green);text-decoration:none;}
.cs-post-title{font-size:clamp(1.9rem,4vw,2.6rem);font-weight:800;letter-spacing:-.02em;margin:.5rem 0;}
.cs-post-meta{color:var(--text-secondary);font-size:.9rem;margin-bottom:1.5rem;}
.cs-post-cover{width:100%;border-radius:16px;margin:1rem 0 2rem;}
.cs-post-body{font-size:1.05rem;line-height:1.75;color:var(--text-primary);}
.cs-post-body h2{font-size:1.5rem;font-weight:700;margin:2rem 0 .75rem;}
.cs-post-body h3{font-size:1.2rem;font-weight:700;margin:1.5rem 0 .5rem;}
.cs-post-body p{margin:0 0 1.1rem;}
.cs-post-body img{max-width:100%;border-radius:12px;margin:1rem 0;}
.cs-post-body a{color:var(--cs-green);}
.cs-post-body blockquote{border-left:3px solid var(--cs-green);padding-left:1rem;color:var(--text-secondary);margin:1.2rem 0;}
.cs-post-body pre{background:var(--code-bg,#f5f5f5);padding:1rem;border-radius:10px;overflow:auto;}

.cs-comments{margin:1.5rem 0;}
.cs-comment{padding:1rem 0;border-bottom:1px solid var(--border-color,#e8e8e8);}
.cs-comment-head{display:flex;gap:.5rem;align-items:baseline;}
.cs-comment-head span{font-size:.78rem;color:var(--text-secondary);}
.cs-comment p{margin:.35rem 0 0;}
.cs-comment-form{margin-top:1.5rem;}


/* ===== blog v2: 3D card, byline, about-author, sidebar ===== */
.cs-post-back{display:inline-flex;align-items:center;gap:.4rem;font-weight:600;color:var(--cs-green);text-decoration:none;margin-bottom:1.25rem}
.cs-post-back:hover{gap:.6rem}
.cs-post-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:2.5rem;align-items:start}
@media(max-width:991px){.cs-post-layout{grid-template-columns:1fr}.cs-post-side{order:2}}
.cs-post-card{position:relative;background:var(--bg-card,#fff);border-radius:20px;padding:clamp(1.25rem,3vw,3rem);
  box-shadow:0 1px 2px rgba(7,21,14,.05),0 30px 60px -28px rgba(7,21,14,.28),0 12px 28px -20px rgba(20,164,77,.22)}
[data-bs-theme="dark"] .cs-post-card{background:#1f242c;box-shadow:0 1px 2px rgba(0,0,0,.4),0 30px 70px -28px rgba(0,0,0,.7),0 0 44px -22px rgba(20,164,77,.4)}
.cs-post-cover{display:block;width:100%;height:auto;border-radius:14px;margin:0 0 1.75rem;box-shadow:0 18px 40px -22px rgba(7,21,14,.5)}
.cs-post-title{font-weight:800;letter-spacing:-.02em;font-size:clamp(1.8rem,3.4vw,2.6rem);margin-bottom:1rem;line-height:1.15}
.cs-post-byline{display:flex;align-items:center;gap:.75rem;margin-bottom:1.75rem;padding-bottom:1.25rem;border-bottom:1px solid var(--border-color,#e8e8e8)}
.cs-author-av{width:46px;height:46px;border-radius:50%;object-fit:cover;background:linear-gradient(135deg,#0d8c61,#00a94f);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700;flex-shrink:0}
.cs-post-byline strong{display:block;font-size:.95rem;line-height:1.2}
.cs-post-byline span{font-size:.8rem;color:var(--text-secondary,#77787B)}
.cs-post-body{font-size:1.06rem;line-height:1.8;color:var(--text-primary)}
.cs-post-body img{max-width:100%;height:auto;border-radius:12px;margin:1.5rem 0}
.cs-post-body h2,.cs-post-body h3{font-weight:700;letter-spacing:-.01em;margin:2rem 0 .8rem;line-height:1.25}
.cs-post-body p{margin:0 0 1.15rem}
.cs-post-body ul,.cs-post-body ol{margin:0 0 1.15rem 1.25rem;line-height:1.75}
.cs-post-body a{color:var(--cs-green);text-decoration:underline}
.cs-post-body figure{margin:1.5rem 0}.cs-post-body figcaption{font-size:.82rem;color:var(--text-secondary);text-align:center;margin-top:.4rem}
.cs-author-about{display:flex;gap:1.1rem;align-items:flex-start;margin-top:2.5rem;padding:1.5rem;border-radius:16px;
  background:linear-gradient(135deg,rgba(20,164,77,.09),rgba(6,182,212,.05));border:1px solid rgba(20,164,77,.2)}
.cs-author-about .cs-author-av{width:74px;height:74px;font-size:1.4rem}
.cs-author-about h4{margin:0 0 .15rem;font-size:1.08rem;font-weight:700}
.cs-author-about .role{color:var(--cs-green);font-weight:600;font-size:.82rem;margin-bottom:.45rem;text-transform:uppercase;letter-spacing:.05em}
.cs-author-about p{margin:0;font-size:.93rem;color:var(--text-secondary,#77787B);line-height:1.6}
.cs-post-side{position:sticky;top:90px}
.cs-side-card{background:var(--bg-card,#fff);border-radius:16px;padding:1.5rem;box-shadow:0 1px 2px rgba(7,21,14,.05),0 18px 40px -26px rgba(7,21,14,.25)}
[data-bs-theme="dark"] .cs-side-card{background:#1f242c}
.cs-side-card h4{font-size:.74rem;text-transform:uppercase;letter-spacing:.12em;color:var(--text-secondary,#77787B);margin-bottom:1.1rem}
.cs-side-list{list-style:none;padding:0;margin:0 0 1.25rem}
.cs-side-list li{margin-bottom:.95rem}
.cs-side-list a{display:flex;gap:.65rem;align-items:center;text-decoration:none;color:var(--text-primary,#1a1d23);font-weight:600;font-size:.9rem;line-height:1.3}
.cs-side-thumb{width:50px;height:50px;border-radius:9px;object-fit:cover;flex-shrink:0;display:block;background:rgba(20,164,77,.12)}
.cs-side-list a:hover{color:var(--cs-green)}
.cs-post-comments{max-width:900px;margin-inline:auto}
/* 3D lift on blog index cards */
.cs-blog-card{transition:transform .3s cubic-bezier(.22,1,.36,1),box-shadow .3s ease}
.cs-blog-card:hover{transform:translateY(-6px);box-shadow:0 26px 50px -22px rgba(7,21,14,.3),0 14px 30px -20px rgba(20,164,77,.3)}

/* =====================================================================
   blog v3: restore ORIGINAL WordPress in-post formatting
   (image text-wrap + Crayon code blocks). Markup is preserved in
   content_html / post_translations, only the styling was missing.
   This is template-shared CSS, so it covers ALL posts and ALL locales.
   ===================================================================== */

/* ---- WordPress image alignment: let body text flow around images ---- */
.cs-post-body .alignright,
.cs-post-body img.alignright{float:right;margin:.4rem 0 1rem 1.6rem;max-width:50%;height:auto}
.cs-post-body .alignleft,
.cs-post-body img.alignleft{float:left;margin:.4rem 1.6rem 1rem 0;max-width:50%;height:auto}
.cs-post-body .aligncenter,
.cs-post-body img.aligncenter{display:block;float:none;margin:1.5rem auto}
.cs-post-body .alignnone,
.cs-post-body img.alignnone{height:auto}
/* WP caption / figure wrappers (carry the float on the caption box) */
.cs-post-body .wp-caption{max-width:100%;height:auto;background:transparent}
.cs-post-body .wp-caption.alignright{float:right;margin:.4rem 0 1rem 1.6rem}
.cs-post-body .wp-caption.alignleft{float:left;margin:.4rem 1.6rem 1rem 0}
.cs-post-body .wp-caption.aligncenter{margin:1.5rem auto}
.cs-post-body .wp-caption img{margin:0;display:block}
.cs-post-body .wp-caption-text,
.cs-post-body figcaption{font-size:.82rem;color:var(--text-secondary);text-align:center;margin-top:.4rem;line-height:1.4}
/* contain trailing floats so they never spill out of the post card */
.cs-post-body::after{content:"";display:block;clear:both}
/* on narrow screens, stop wrapping (images go full width, stacked) */
@media(max-width:600px){
  .cs-post-body .alignright,.cs-post-body img.alignright,
  .cs-post-body .alignleft,.cs-post-body img.alignleft,
  .cs-post-body .wp-caption.alignright,.cs-post-body .wp-caption.alignleft{
    float:none;display:block;max-width:100%;margin:1.25rem auto}
}

/* ---- Crayon Syntax Highlighter: restore code-block styling ---- */
/* Block code box */
.cs-post-body .crayon-syntax{
  display:block;
  background:#1e1f26;
  color:#e6e6e6;
  border:1px solid rgba(255,255,255,.08);
  border-radius:10px;
  margin:1.5rem 0;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  font-family:'SFMono-Regular',Menlo,Monaco,Consolas,'Liberation Mono','Courier New',monospace;
}
/* strip the (now non-functional) plugin chrome + duplicate plain copy */
.cs-post-body .crayon-toolbar,
.cs-post-body .crayon-info,
.cs-post-body .crayon-plain-wrap{display:none !important}
.cs-post-body .crayon-main{width:100%;overflow-x:auto}
.cs-post-body .crayon-table{border-collapse:collapse;width:100%;margin:0;background:transparent;border:0;table-layout:auto}
.cs-post-body .crayon-table td,
.cs-post-body .crayon-table tr{border:0;padding:0;background:transparent;vertical-align:top}
/* line-number gutter */
.cs-post-body .crayon-nums{
  padding:1rem .65rem !important;
  background:rgba(255,255,255,.04);
  text-align:right;user-select:none;white-space:nowrap;
  border-right:1px solid rgba(255,255,255,.08)}
.cs-post-body .crayon-num,
.cs-post-body .crayon-nums-content{color:#6b7280 !important}
/* code cell */
.cs-post-body td.crayon-code{width:100%}
.cs-post-body td.crayon-code .crayon-pre{
  white-space:pre;font-family:inherit;color:inherit;
  padding:1rem 1.1rem;margin:0}
.cs-post-body .crayon-line{display:block;min-height:1.4em}
/* inline code stays inline */
.cs-post-body .crayon-syntax-inline{
  display:inline !important;background:rgba(135,131,120,.18);
  color:inherit;border:0;border-radius:4px;padding:.12em .4em;margin:0;overflow:visible}
.cs-post-body .crayon-syntax-inline .crayon-pre{padding:0;white-space:pre-wrap;font-family:inherit}
[data-bs-theme="dark"] .cs-post-body .crayon-syntax-inline{background:rgba(255,255,255,.1)}
/* Crayon classic token palette (re-applied on the dark box) */
.cs-post-body .crayon-c,.cs-post-body .crayon-cm{color:#7f8c98;font-style:italic} /* comments */
.cs-post-body .crayon-s,.cs-post-body .crayon-sb{color:#9ece6a}             /* strings */
.cs-post-body .crayon-k,.cs-post-body .crayon-st,.cs-post-body .crayon-r{color:#bb9af7} /* keywords */
.cs-post-body .crayon-cn,.cs-post-body .crayon-h{color:#ff9e64}             /* constants/numbers */
.cs-post-body .crayon-i,.cs-post-body .crayon-v{color:#7dcfff}             /* identifiers/vars */
.cs-post-body .crayon-o,.cs-post-body .crayon-sy{color:#89ddff}            /* operators */
.cs-post-body .crayon-e,.cs-post-body .crayon-t{color:#73daca}            /* entities/types */
.cs-post-body .crayon-m,.cs-post-body .crayon-p{color:#e6e6e6}
