/* ==========================================================================
   BLOG — listing + article page styles.
   Tokens, header, footer, buttons, forms, modal, cursor all inherited from
   assets/css/style.css and intentionally not duplicated here.
========================================================================== */

/* ---------- BLOG HERO ---------- */
.blog-hero{
  padding-top:calc(var(--section-y) + 60px);
  padding-bottom:80px;
  text-align:center;
}
.blog-hero h1{ font-size:clamp(34px, 5vw, 58px); max-width:760px; margin:18px auto 0; }
.blog-hero p{ margin:22px auto 0; max-width:560px; color:var(--text-muted); font-size:18px; line-height:1.6; }


/* ---------- CATEGORY FILTER (simple centered tabs, not pills) ---------- */
.blog-filter{
  display:flex; justify-content:center; flex-wrap:wrap; gap:40px;
  margin-top:44px;
  padding-bottom:0;
}
@media (max-width:640px){
  .blog-filter{ gap:14px 20px; margin-top:28px; }
  .blog-filter button{ font-size:14.5px; padding-bottom:10px; }
}
.blog-filter button{
  padding:0 0 16px; background:none; border:none; border-bottom:2px solid transparent;
  font-size:16.5px; font-weight:500; color:var(--text-muted);
  transition:color .3s ease, border-color .3s ease;
}
.blog-filter button:hover{ color:var(--text); }
.blog-filter button.active{ color:var(--text); border-bottom-color:var(--accent1); }

/* ---------- ARTICLE GRID (true masonry via CSS columns) ---------- */
.blog-grid-section{ padding-top:20px; }
.blog-grid{
  columns:3; column-gap:30px;
}
@media (max-width:1000px){ .blog-grid{ columns:2; } }
@media (max-width:640px){ .blog-grid{ columns:1; } }
.blog-card{
  display:block; border-radius:20px; overflow:hidden;
  background:var(--bg); border:1px solid var(--border);
  transition:transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease, border-color .4s ease;
  opacity:0; transform:translateY(24px);
  break-inside:avoid;
  margin-bottom:30px;
}
.blog-card.in-view{ opacity:1; transform:translateY(0); }
.blog-card:hover{ transform:translateY(-6px); border-color:transparent; box-shadow:0 26px 54px -26px rgba(9,29,57,0.22); }
.blog-card-media{ aspect-ratio:4/3; background-size:cover; background-position:center; transition:transform .5s ease; overflow:hidden; }
.blog-card:nth-child(3n+2) .blog-card-media{ aspect-ratio:1/1; }
.blog-card:nth-child(3n+3) .blog-card-media{ aspect-ratio:3/4; }
.blog-card:hover .blog-card-media{ transform:scale(1.04); }
.blog-card-body{ padding:22px 24px 26px; }
@media (max-width:480px){
  .blog-card-body{ padding:18px 16px 20px; }
  .blog-card-body h3{ font-size:16.5px; }
}
.blog-card-body h3{ font-size:17.5px; font-weight:500; margin-top:10px; line-height:1.35; }
.blog-card-body p{ font-size:13.5px; color:var(--text-muted); margin-top:8px; line-height:1.6; }

.blog-meta{ display:flex; gap:16px; font-size:12.5px; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.06em; flex-wrap:wrap; }
.blog-card-body .blog-meta{ margin-bottom:0; }

/* ---------- NEWSLETTER CTA ---------- */
.newsletter-cta{ background:var(--bg-secondary); }
.newsletter-card{
  max-width:640px; margin:0 auto; text-align:center;
  padding:64px 48px;
  border-radius:28px;
  background:var(--bg);
  border:1px solid var(--border);
  box-shadow:0 40px 80px -40px rgba(9,29,57,0.18);
}
.newsletter-card h2{ font-size:clamp(26px,3.4vw,36px); font-weight:500; margin-top:16px; }
.newsletter-card p{ margin-top:14px; color:var(--text-muted); font-size:15.5px; line-height:1.6; }
.newsletter-form{
  display:flex; gap:10px; margin-top:32px;
  max-width:420px; margin-left:auto; margin-right:auto;
}
.newsletter-form input{
  flex:1; min-width:0;
  padding:14px 18px; border-radius:999px;
  border:1px solid var(--border); background:var(--bg-secondary);
  font-size:14.5px; font-family:inherit; color:var(--text);
}
.newsletter-form input:focus{ outline:none; border-color:var(--accent1); }
.newsletter-form .btn{ flex-shrink:0; padding:14px 26px; }
@media (max-width:480px){
  .newsletter-form{ flex-direction:column; }
  .newsletter-card{ padding:44px 26px; }
}

/* ---------- READING PROGRESS (article page only) ---------- */
.reading-progress{
  position:fixed; top:0; left:0; width:100%; height:3px; z-index:1001;
  background:transparent;
}
.reading-progress-fill{
  height:100%; width:0%;
  background:linear-gradient(90deg, var(--accent1), var(--accent2));
  transition:width .1s linear;
}

/* ---------- BACK LINK ---------- */
.detail-back{ padding-top:calc(var(--section-y) + 50px); padding-bottom:0; }
.back-link{
  display:inline-flex; align-items:center; gap:8px;
  font-size:14px; font-weight:500; color:var(--text-muted);
  transition:color .3s ease, gap .3s ease;
}
.back-link:hover{ color:var(--text); gap:12px; }
.back-link svg{ width:15px; height:15px; flex-shrink:0; }

/* ---------- ARTICLE HEADER ---------- */
.article-head{ padding-top:20px; padding-bottom:0; text-align:center; }
.article-head .wrap{ max-width:760px; }
.article-head .blog-meta{ justify-content:center; }
.article-head h1{ font-size:clamp(30px,4.6vw,52px); font-weight:600; margin-top:20px; line-height:1.25; }
@media (max-width:640px){
  .article-head h1{ font-size:clamp(24px, 5.5vw, 36px); }
}
.article-author{
  display:flex; align-items:center; gap:14px;
  width:100%; max-width:400px; margin:32px auto 0;
  padding:16px 22px; border-radius:16px;
  text-align:left;
  background:var(--bg-secondary); border:1px solid var(--border);
}
@media (max-width:640px){
  .article-author{ padding:12px 16px; margin-top:22px; }
}

/* ---------- COVER IMAGE ---------- */
.article-cover-section{ padding-top:36px; padding-bottom:0; }
.article-body-section{ padding-top:48px; padding-bottom:0; }
.article-cover{
  aspect-ratio:21/9; border-radius:24px; overflow:hidden;
  background-size:cover; background-position:center;
  box-shadow:0 40px 80px -32px rgba(9,29,57,0.26);
}
@media (max-width:900px){ .article-cover{ aspect-ratio:4/3; border-radius:16px; } }
@media (max-width:480px){ .article-cover{ aspect-ratio:16/10; border-radius:14px; } }

/* ---------- ARTICLE BODY ---------- */
.article-body{ max-width:950px; margin:0 auto; }
.article-body p{ font-size:17.5px; line-height:1.85; color:var(--text); margin-top:26px; }
.article-body h3{ font-size:clamp(21px,2.6vw,27px); font-weight:500; margin-top:46px; margin-bottom:2px; }
.article-body p:first-child{ margin-top:0; }
@media (max-width:640px){
  .article-body p{ font-size:15.5px; line-height:1.75; margin-top:20px; }
  .article-body h3{ font-size:22px; margin-top:32px; }
}

/* ---------- INLINE ARTICLE IMAGE ---------- */
.article-inline-image{ margin:36px 0; }
.article-inline-image img{
  width:100%; border-radius:20px; display:block;
  box-shadow:0 30px 60px -30px rgba(9,29,57,0.3);
}
.article-inline-image figcaption{
  margin-top:12px; font-size:13.5px; color:var(--text-muted); text-align:center;
}

/* ---------- ARTICLE FINAL CTA (premium dark panel) ---------- */
.article-final-cta{ padding-top:20px; padding-bottom:90px; }
.article-cta-panel{
  position:relative;
  text-align:center;
  padding:72px 40px;
  border-radius:28px;
  background:linear-gradient(155deg, var(--dark), #0F2745);
  overflow:hidden;
}
.article-cta-panel h2{
  font-size:clamp(30px, 4.4vw, 50px); font-weight:600;
  max-width:760px; margin:16px auto 0; color:#fff;
}
.article-cta-panel > p{
  margin:20px auto 0; max-width:520px;
  color:rgba(255,255,255,0.65); font-size:17px; line-height:1.6;
}
.article-cta-panel .btn-wrap{ margin-top:38px; display:flex; justify-content:center; gap:16px; flex-wrap:wrap; }
.article-cta-outline{
  background:transparent; border:1px solid rgba(255,255,255,0.25); color:#fff;
}
.article-cta-outline:hover{ background:rgba(255,255,255,0.08); }
@media (max-width:640px){
  .article-cta-panel{ padding:44px 20px; border-radius:20px; }
  .article-cta-panel h2{ font-size:26px; }
  .article-cta-panel .btn-wrap{ flex-direction:column; align-items:stretch; }
  .article-cta-panel .btn{ width:100%; justify-content:center; }
}

/* ---------- KEY TAKEAWAYS ---------- */
.key-takeaways{
  margin-bottom:38px; padding:26px 28px;
  border-radius:18px; background:var(--bg-secondary);
  border-left:3px solid var(--accent1);
}
.key-takeaways h4{ font-size:13px; text-transform:uppercase; letter-spacing:0.08em; color:var(--accent1); font-weight:600; }
.key-takeaways ul{ margin-top:14px; padding-left:18px; }
.key-takeaways li{ font-size:15px; color:var(--text); line-height:1.7; margin-top:6px; }
