/* =========================================================
   Blog list (/blog/) and blog detail pages
   Uses the site brand: deep purple #0B0016, panel #20162A,
   red accent #EB2034, muted text #9B9EAC, Poppins / Barlow.
   ========================================================= */

.blog-page{
  --brand-red:#EB2034;
  --brand-bg:#0B0016;
  --brand-panel:#20162A;
  --brand-panel-2:#2A1F36;
  --brand-muted:#9B9EAC;
  --brand-text:#DADBE2;
}

/* ---------- Page hero (replaces the oversized banner image) ---------- */
.blog-hero{
  padding:150px 0 50px;
  position:relative;
  background:
    radial-gradient(900px 300px at 85% 0%, rgba(235,32,52,.18), transparent 70%),
    linear-gradient(180deg, #160626 0%, var(--brand-bg) 100%);
  border-bottom:1px solid rgba(255,255,255,.06);
}
.blog-hero .headline{ margin-bottom:12px; }
.blog-hero h1{
  font-size:46px;
  font-weight:600;
  text-transform:uppercase;
  color:#fff;
  line-height:1.15;
}
.blog-hero h1 span{ color:var(--brand-red); }
.blog-hero .lead-text{
  color:var(--brand-muted);
  font-size:17px;
  max-width:640px;
  margin-top:16px;
  line-height:1.7;
}

/* ---------- Breadcrumb ---------- */
.blog-crumbs{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  font-size:14px;
  color:var(--brand-muted);
  margin-bottom:22px;
}
.blog-crumbs a{ color:var(--brand-muted); transition:color .2s; }
.blog-crumbs a:hover{ color:var(--brand-red); }
.blog-crumbs i{ font-size:11px; opacity:.7; }
.blog-crumbs span{ color:#fff; }

/* ---------- Listing section ---------- */
.blog-list{ padding:60px 0 90px; }
.blog-list .section-label{
  display:flex;
  align-items:center;
  gap:14px;
  font-family:"Barlow",sans-serif;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:15px;
  color:#fff;
  margin:0 0 26px;
}
.blog-list .section-label::after{
  content:"";
  flex:1;
  height:1px;
  background:rgba(255,255,255,.1);
}

/* Shared meta line (date - read time) */
.post-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 16px;
  font-size:13px;
  color:var(--brand-muted);
  text-transform:uppercase;
  letter-spacing:.04em;
}
.post-meta i{ color:var(--brand-red); margin-right:5px; }

/* Shared image frame */
.post-thumb{
  position:relative;
  display:block;
  overflow:hidden;
  background:var(--brand-panel-2);
  aspect-ratio:16 / 10;
}
.post-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .6s ease;
}
/* Branded placeholder when a post has no image */
.post-thumb.no-image{
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(circle at 30% 20%, rgba(235,32,52,.35), transparent 60%),
    var(--brand-panel-2);
}
.post-thumb.no-image i{
  font-size:56px;
  color:rgba(255,255,255,.85);
}

/* ---------- Featured (latest) post ---------- */
.featured-post{
  display:grid;
  grid-template-columns:1.1fr 1fr;
  background:var(--brand-panel);
  border-bottom:5px solid var(--brand-red);
  margin-bottom:60px;
  overflow:hidden;
  color:inherit;
}
.featured-post .post-thumb{ aspect-ratio:auto; min-height:340px; height:100%; }
.featured-post .featured-body{
  padding:44px 44px 40px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.featured-post .featured-tag{
  display:inline-block;
  align-self:flex-start;
  background:var(--brand-red);
  color:#fff;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  padding:5px 12px;
  margin-bottom:18px;
}
.featured-post h3{
  font-size:30px;
  line-height:1.25;
  font-weight:600;
  color:#fff;
  margin:14px 0 16px;
  transition:color .2s;
}
.featured-post p{
  font-size:16px;
  line-height:1.7;
  color:var(--brand-muted);
  margin-bottom:26px;
}
.featured-post .theme-btn{ align-self:flex-start; }
.featured-post:hover .post-thumb img{ transform:scale(1.04); }
.featured-post:hover h3{ color:var(--brand-red); }

/* ---------- Post cards ---------- */
.post-card{
  display:flex;
  flex-direction:column;
  height:100%;
  background:var(--brand-panel);
  border-bottom:3px solid transparent;
  transition:transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  color:inherit;
}
.post-card:hover{
  transform:translateY(-4px);
  border-bottom-color:var(--brand-red);
  box-shadow:0 18px 40px rgba(0,0,0,.35);
}
.post-card:hover .post-thumb img{ transform:scale(1.05); }
.post-card .card-body-x{
  padding:22px 24px 24px;
  display:flex;
  flex-direction:column;
  flex:1;
}
.post-card h4{
  font-size:19px;
  line-height:1.4;
  font-weight:600;
  color:#fff;
  margin:12px 0 10px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  transition:color .2s;
}
.post-card:hover h4{ color:var(--brand-red); }
.post-card p{
  font-size:15px;
  line-height:1.65;
  color:var(--brand-muted);
  margin-bottom:18px;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.read-link{
  margin-top:auto;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#fff;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.read-link i{ color:var(--brand-red); transition:transform .3s; }
.post-card:hover .read-link i{ transform:translateX(5px); }

.blog-empty{
  background:var(--brand-panel);
  padding:50px;
  text-align:center;
  color:var(--brand-muted);
}

/* ---------- Detail page ---------- */
.article-hero{ padding-bottom:40px; }
.article-hero h1{
  font-size:42px;
  text-transform:none;
  max-width:900px;
}
.article-hero .post-meta{ margin-top:22px; }
.article-hero .author-chip{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:#fff;
  text-transform:none;
  letter-spacing:0;
  font-size:14px;
}
.article-hero .author-chip img{
  width:34px;
  height:34px;
  border-radius:50%;
  object-fit:cover;
  object-position:center 15%;
  border:2px solid var(--brand-red);
}

.article-wrap{ padding:50px 0 80px; }

.article-figure{
  background:var(--brand-panel);
  margin:0 0 44px;
  display:flex;
  justify-content:center;
  border-bottom:5px solid var(--brand-red);
}
.article-figure img{
  display:block;
  max-width:100%;
  max-height:520px;
  width:auto;
  height:auto;
}

.article-body{
  max-width:820px;
  margin:0;
  text-align:left;
  font-size:18px;
  line-height:1.85;
  color:var(--brand-text);
}
.article-body p{
  font-size:18px;
  line-height:1.85;
  color:var(--brand-text);
  margin:0;
}
/* Always left-align article text, even if the editor saved centre/justify alignment */
.article-body p,
.article-body li,
.article-body h1,.article-body h2,.article-body h3,.article-body h4,
.article-body [class*="ql-align-"]{ text-align:left !important; }
/* Empty <p><br></p> lines from the editor become a paragraph gap */
.article-body p:empty{ height:1em; }
.article-body p:has(> br:only-child){ height:1em; overflow:hidden; }
.article-body > p:first-of-type::first-letter,
.article-body .section-block:first-child p:first-of-type::first-letter{
  float:left;
  font-family:"Barlow",sans-serif;
  font-size:64px;
  line-height:.9;
  font-weight:700;
  color:var(--brand-red);
  padding:6px 10px 0 0;
}
.article-body h1,.article-body h2,.article-body h3,.article-body h4{
  text-transform:none;
  color:#fff;
  margin:1.4em 0 .6em;
  line-height:1.3;
}
.article-body h2{ font-size:28px; }
.article-body h3{ font-size:23px; }
.article-body a{ color:var(--brand-red); text-decoration:underline; text-underline-offset:3px; }
.article-body strong,.article-body b{ color:#fff; font-weight:600; }
.article-body ul,.article-body ol{ padding-left:1.4em; margin:.8em 0; }
.article-body li{ margin:.3em 0; }
.article-body blockquote{
  border-left:4px solid var(--brand-red);
  background:var(--brand-panel);
  padding:18px 24px;
  margin:1.4em 0;
  font-style:italic;
  color:#fff;
}
.article-body img,
.article-body .post-img{
  display:block;
  max-width:100%;
  height:auto;
  margin:28px 0;
}
.article-body video{
  display:block;
  width:100%;
  height:auto;
  margin:28px 0;
  background:#000;
}
.section-block + .section-block{ margin-top:1em; }

/* Share + author */
.article-footer{
  max-width:820px;
  margin:50px 0 0;
  padding-top:30px;
  border-top:1px solid rgba(255,255,255,.1);
}
.share-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-bottom:40px;
}
.share-row .share-label{
  font-family:"Barlow",sans-serif;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#fff;
  font-size:14px;
  margin-right:6px;
}
.share-btn{
  width:42px;
  height:42px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.25);
  background:none;
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:16px !important;
  transition:background .25s, border-color .25s;
}
.share-btn:hover{ background:var(--brand-red); border-color:var(--brand-red); color:#fff; }
.share-copied{ font-size:13px; color:var(--brand-muted); opacity:0; transition:opacity .2s; }
.share-copied.show{ opacity:1; }

.author-box{
  display:flex;
  gap:26px;
  align-items:center;
  background:var(--brand-panel);
  padding:30px;
  border-left:4px solid var(--brand-red);
}
.author-box img{
  width:96px;
  height:96px;
  border-radius:50%;
  object-fit:cover;
  object-position:center 15%;
  flex-shrink:0;
}
.author-box h5{ color:#fff; font-size:20px; margin-bottom:6px; }
.author-box p{ color:var(--brand-muted); font-size:15px; line-height:1.65; margin-bottom:16px; }

.back-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--brand-muted);
  font-size:14px;
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-top:30px;
}
.back-link:hover{ color:var(--brand-red); }

.more-posts{
  background:linear-gradient(180deg, var(--brand-bg) 0%, #140823 100%);
  padding:70px 0 90px;
  border-top:1px solid rgba(255,255,255,.06);
}
.more-posts h2{ font-size:32px; margin-bottom:30px; }

/* ---------- Call-to-action band (replaces the non-working form) ---------- */
.blog-cta{
  background:var(--brand-panel);
  padding:60px 0;
  margin-bottom:60px;
}
.blog-cta .cta-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
  flex-wrap:wrap;
}
.blog-cta h3{
  color:#fff;
  font-size:28px;
  text-transform:uppercase;
  font-weight:600;
  margin-bottom:8px;
}
.blog-cta p{ color:var(--brand-muted); font-size:16px; max-width:560px; }
.blog-cta .cta-actions{ display:flex; gap:14px; flex-wrap:wrap; }
.theme-btn.solid{ background:var(--brand-red); }
.theme-btn.solid:hover{ background:transparent; }

/* ---------- Responsive ---------- */
@media (max-width:991px){
  .blog-hero{ padding:130px 0 40px; }
  .blog-hero h1{ font-size:36px; }
  .article-hero h1{ font-size:32px; }
  .featured-post{ grid-template-columns:1fr; }
  .featured-post .post-thumb{ min-height:0; aspect-ratio:16 / 9; }
  .featured-post .featured-body{ padding:30px; }
  .featured-post h3{ font-size:24px; }
}
@media (max-width:767px){
  .blog-hero{ padding:110px 0 32px; }
  .blog-hero h1{ font-size:28px; }
  .article-hero h1{ font-size:26px; }
  .blog-hero .lead-text{ font-size:15px; }
  .blog-list{ padding:40px 0 60px; }
  .featured-post{ margin-bottom:40px; }
  .article-wrap{ padding:30px 0 60px; }
  .article-figure{ margin-bottom:30px; }
  .article-body, .article-body p{ font-size:17px; line-height:1.8; }
  .article-body > p:first-of-type::first-letter,
  .article-body .section-block:first-child p:first-of-type::first-letter{ font-size:50px; }
  .author-box{ flex-direction:column; text-align:center; align-items:center; }
  .blog-cta{ padding:44px 0; }
  .blog-cta h3{ font-size:22px; }
  .more-posts{ padding:50px 0 60px; }
  .more-posts h2{ font-size:26px; }
}
@media (prefers-reduced-motion: reduce){
  .post-card, .post-thumb img, .read-link i{ transition:none; }
  .post-card:hover{ transform:none; }
}
