/* =========================================================================
   blog.css — Blog listing + detail page styles
   Loaded only when $active === 'blog' in head.php
   ========================================================================= */

/* ═══════════════════════════════════════════════════════════════════════════
   LISTING — hero, filters, grid, cards
   ═══════════════════════════════════════════════════════════════════════════ */

/* hero */
.blog-hero{padding:8rem 0 3.5rem;background:var(--ivory);}
.blog-hero-inner{max-width:880px;}
.blog-hero h1{font-family:var(--serif);font-weight:500;
  font-size:clamp(2.4rem,5vw,4.4rem);line-height:1.05;letter-spacing:-.01em;
  color:var(--ink);margin:1.2rem 0 1.4rem;}
.blog-hero h1 .accent{color:var(--indigo);font-style:italic;font-weight:400;}
.blog-hero p{font-family:var(--body);font-size:1.1rem;line-height:1.65;
  color:rgba(26,23,38,.7);max-width:640px;margin:0;}

/* filter pills */
.blog-filters{display:flex;gap:.6rem;flex-wrap:wrap;margin:0 0 2.6rem;
  padding-bottom:1.4rem;border-bottom:1px solid rgba(26,23,38,.08);}
.blog-filter{font-family:var(--mono);font-size:.78rem;letter-spacing:.1em;
  text-transform:uppercase;background:transparent;color:rgba(26,23,38,.55);
  border:1px solid rgba(26,23,38,.15);border-radius:999px;
  padding:.6rem 1.3rem;cursor:pointer;transition:all .25s ease;}
.blog-filter:hover{color:var(--ink);border-color:rgba(26,23,38,.4);}
.blog-filter.is-active{background:var(--ink);color:var(--ivory);
  border-color:var(--ink);}

/* grid section */
.blog-grid-section{padding:3rem 0 6rem;background:var(--ivory);}
.blog-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2.2rem 2rem;}

/* card — entire card is a link */
.blog-card{position:relative;background:var(--white);border-radius:var(--r-md);
  overflow:hidden;transition:transform .35s ease,box-shadow .35s ease;
  box-shadow:0 1px 2px rgba(33,28,78,.04);}
.blog-card:hover{transform:translateY(-4px);box-shadow:0 12px 30px rgba(33,28,78,.1);}
.blog-card-link{display:flex;flex-direction:column;height:100%;
  text-decoration:none;color:inherit;}

/* card image — fixed aspect for consistency */
.blog-card-img{position:relative;aspect-ratio:3/2;overflow:hidden;
  background:var(--indigo-100);}
.blog-card-img img{width:100%;height:100%;object-fit:cover;display:block;
  transition:transform .8s cubic-bezier(.2,.6,.3,1);}
.blog-card:hover .blog-card-img img{transform:scale(1.05);}

/* tag inside card image — top-left */
.blog-tag{position:absolute;top:1rem;left:1rem;z-index:2;
  font-family:var(--mono);font-size:.68rem;font-weight:600;letter-spacing:.16em;
  text-transform:uppercase;padding:.42rem .75rem;border-radius:4px;}
.blog-tag--dental{background:var(--indigo);color:var(--ivory);}
.blog-tag--aesthetic{background:var(--red);color:var(--white);}

/* card body — fixed height behaviour */
.blog-card-body{flex:1;display:flex;flex-direction:column;
  padding:1.6rem 1.7rem 1.8rem;}
.blog-card-title{font-family:var(--serif);font-weight:500;
  font-size:1.32rem;line-height:1.3;letter-spacing:-.005em;
  color:var(--ink);margin:0 0 1rem;
  /* clamp to 3 lines so every card has the same title height */
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;
  overflow:hidden;text-overflow:ellipsis;
  /* fallback line-height-based min-height for browsers without -webkit-line-clamp */
  min-height:calc(1.32rem * 1.3 * 3);}
.blog-card-excerpt{font-family:var(--body);font-size:.92rem;line-height:1.55;
  color:rgba(26,23,38,.6);margin:0 0 1.2rem;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;}
.blog-card-meta{margin-top:auto;display:flex;align-items:center;gap:.5rem;
  font-family:var(--mono);font-size:.72rem;letter-spacing:.08em;
  color:rgba(26,23,38,.45);text-transform:uppercase;}
.blog-card-meta .dot{width:3px;height:3px;border-radius:50%;
  background:rgba(26,23,38,.3);}
.blog-card-arrow{margin-left:auto;display:inline-flex;align-items:center;gap:.35rem;
  font-family:var(--body);font-size:.85rem;font-weight:500;
  color:var(--indigo);text-transform:none;letter-spacing:0;
  transition:gap .25s ease;}
.blog-card:hover .blog-card-arrow{gap:.55rem;}

/* hidden state for filter */
.blog-card[hidden]{display:none;}

/* ═══════════════════════════════════════════════════════════════════════════
   DETAIL — editorial-style article page (unique vs service pages)
   ═══════════════════════════════════════════════════════════════════════════ */

/* hero — large title block on ivory, no image */
.post-hero{padding:7.5rem 0 3rem;background:var(--ivory);position:relative;}
.post-hero-inner{max-width:880px;}
.post-back{display:inline-flex;align-items:center;gap:.45rem;
  font-family:var(--mono);font-size:.74rem;font-weight:500;letter-spacing:.12em;
  text-transform:uppercase;color:rgba(26,23,38,.55);text-decoration:none;
  margin-bottom:2.2rem;transition:color .25s ease,gap .25s ease;}
.post-back:hover{color:var(--indigo);gap:.65rem;}
.post-back .ti{font-size:1rem;}

.post-cat{display:inline-block;font-family:var(--mono);font-size:.72rem;
  font-weight:600;letter-spacing:.16em;text-transform:uppercase;
  padding:.45rem .85rem;border-radius:4px;margin-bottom:1.4rem;}
.post-cat--dental{background:var(--indigo);color:var(--ivory);}
.post-cat--aesthetic{background:var(--red);color:var(--white);}

.post-title{font-family:var(--serif);font-weight:500;
  font-size:clamp(2.4rem,5.2vw,4.5rem);line-height:1.06;letter-spacing:-.01em;
  color:var(--ink);margin:0 0 1.8rem;max-width:920px;}

.post-meta{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;
  font-family:var(--mono);font-size:.78rem;letter-spacing:.1em;
  text-transform:uppercase;color:rgba(26,23,38,.55);}
.post-meta .author{color:var(--indigo);font-weight:600;}
.post-meta .dot{width:4px;height:4px;border-radius:50%;
  background:rgba(26,23,38,.25);}

/* full-bleed cover image */
.post-cover{margin:0;background:var(--ivory);padding-bottom:5rem;}
.post-cover-inner{aspect-ratio:16/8;overflow:hidden;border-radius:var(--r-lg);
  box-shadow:0 24px 60px -20px rgba(33,28,78,.18);}
.post-cover-inner img{width:100%;height:100%;object-fit:cover;display:block;}

/* article body — narrow column for easy reading */
.post-body{background:var(--white);padding:5.5rem 0 6.5rem;}
.container--narrow{max-width:760px;margin-inline:auto;padding:0 1.5rem;}

.post-body p{font-family:var(--body);font-size:1.1rem;line-height:1.78;
  color:rgba(26,23,38,.85);margin:0 0 1.4rem;}
.post-body p.lead{font-size:1.28rem;line-height:1.6;color:var(--ink);
  font-weight:400;margin-bottom:2rem;}

/* drop cap on the first paragraph */
.post-body .drop-cap::first-letter{
  font-family:var(--serif);font-weight:200;font-size:4.2em;line-height:.85;
  float:left;margin:.08em .14em 0 0;color:var(--indigo);}
.post-body--aes .drop-cap::first-letter{color:var(--red);}

.post-body h2{font-family:var(--serif);font-weight:500;
  font-size:clamp(1.7rem,2.8vw,2.2rem);line-height:1.2;letter-spacing:-.005em;
  color:var(--ink);margin:3rem 0 1rem;}
.post-body h2 .accent{color:var(--indigo);font-style:italic;font-weight:400;}
.post-body--aes h2 .accent{color:var(--red);}

.post-body h3{font-family:var(--serif);font-weight:500;
  font-size:1.32rem;line-height:1.3;color:var(--ink);
  margin:2.2rem 0 .8rem;}

.post-body ul,.post-body ol{font-family:var(--body);font-size:1.06rem;
  line-height:1.75;color:rgba(26,23,38,.85);margin:0 0 1.6rem;
  padding-left:1.3rem;}
.post-body li{margin-bottom:.55rem;}
.post-body li::marker{color:var(--gold);font-weight:600;}

.post-body strong{color:var(--ink);font-weight:600;}
.post-body em{font-style:italic;color:rgba(26,23,38,.9);}

/* pull quote */
.post-quote{font-family:var(--serif);font-weight:300;font-style:italic;
  font-size:clamp(1.3rem,2.2vw,1.6rem);line-height:1.45;color:var(--indigo);
  border-left:3px solid var(--gold);padding:.4rem 0 .4rem 1.6rem;
  margin:2.5rem 0;}
.post-body--aes .post-quote{color:var(--red);}

/* highlighted info box (gentle takeaway tip) */
.post-callout{background:var(--indigo-100);border-radius:var(--r-md);
  padding:1.6rem 1.8rem;margin:2rem 0;}
.post-body--aes .post-callout{background:#FCEEEC;}
.post-callout-label{display:inline-block;font-family:var(--mono);
  font-size:.7rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;
  color:var(--indigo);margin-bottom:.5rem;}
.post-body--aes .post-callout-label{color:var(--red);}
.post-callout p{font-size:1rem;line-height:1.65;margin-bottom:0;
  color:rgba(26,23,38,.85);}

/* article numbered or labelled section markers */
.post-marker{display:flex;align-items:baseline;gap:1rem;margin:2.6rem 0 .6rem;}
.post-marker-num{font-family:var(--serif);font-weight:200;font-size:2.4rem;
  line-height:1;color:var(--gold);min-width:2.2rem;}
.post-marker-text{font-family:var(--serif);font-weight:500;
  font-size:clamp(1.5rem,2.4vw,1.85rem);line-height:1.25;color:var(--ink);
  margin:0;}

/* ─── refined end-of-article CTA ───────────────────────────────
   Editorial card (ivory bg + thin colored top border) instead of a
   solid indigo/red block. Sits calmly inside the article column. */
.post-end-cta{margin-top:4rem;padding:2.4rem 2rem 2.2rem;
  background:var(--ivory);border-radius:var(--r-md);
  border-top:4px solid var(--indigo);
  text-align:left;}
.post-body--aes .post-end-cta{border-top-color:var(--red);}

.post-end-cta-eye{display:inline-flex;align-items:center;gap:.55rem;
  font-family:var(--mono);font-size:.7rem;font-weight:600;letter-spacing:.16em;
  text-transform:uppercase;color:var(--gold);margin:0 0 .8rem;}
.post-end-cta-eye::before{content:"";display:inline-block;width:24px;height:1px;
  background:var(--gold);}

.post-end-cta-t{font-family:var(--serif);font-weight:500;
  font-size:clamp(1.35rem,2.4vw,1.7rem);line-height:1.3;letter-spacing:-.005em;
  color:var(--ink);margin:0 0 .9rem;}

.post-end-cta-d{font-family:var(--body);font-size:1.02rem;line-height:1.7;
  color:rgba(26,23,38,.78);margin:0 0 1.6rem;max-width:none;}

.post-end-cta .btn{font-size:.78rem;}

/* ─── article footer strip — byline (left) + back link (right) ── */
.post-footer{margin-top:3rem;padding-top:1.8rem;
  border-top:1px solid rgba(26,23,38,.08);
  display:flex;align-items:flex-start;justify-content:space-between;
  gap:1.5rem;flex-wrap:wrap;}

.post-footer-byline{flex:1;min-width:0;}
.post-byline-name{font-family:var(--serif);font-weight:500;font-size:1.08rem;
  color:var(--ink);margin:0;line-height:1.3;}
.post-byline-role{font-family:var(--mono);font-size:.42rem;letter-spacing:.08em;
  text-transform:uppercase;color:rgba(26,23,38,.5);margin:.3rem 0 0;line-height:1.5;}

.post-back-link{font-family:var(--mono);font-size:.72rem;font-weight:500;
  letter-spacing:.14em;text-transform:uppercase;color:rgba(26,23,38,.55);
  text-decoration:none;display:inline-flex;align-items:center;gap:.45rem;
  transition:color .25s ease, gap .25s ease;white-space:nowrap;
  padding-top:.55rem;}
.post-back-link:hover{color:var(--indigo);gap:.65rem;}
.post-body--aes .post-back-link:hover{color:var(--red);}
.post-back-link .ti{font-size:1rem;}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width:1200px){
  .blog-grid{grid-template-columns:repeat(3,1fr);gap:2rem 1.6rem;}
}
@media (max-width:992px){
  .blog-grid{grid-template-columns:repeat(2,1fr);gap:2rem 1.6rem;}
  .post-hero{padding:6rem 0 2.5rem;}
  .post-body{padding:4.5rem 0 5.5rem;}
  .post-cover{padding-bottom:4rem;}
  .post-end-cta{padding:2.4rem 1.6rem;}
}
@media (max-width:768px){
  .blog-hero{padding:6.5rem 0 2.5rem;}
  .blog-grid-section{padding:2rem 0 4.5rem;}
  .blog-card-body{padding:1.3rem 1.4rem 1.6rem;}
  .post-body{padding:3.5rem 0 4.5rem;}
  .post-cover-inner{aspect-ratio:16/10;}
  .post-body p{font-size:1.04rem;line-height:1.72;}
  .post-body .drop-cap::first-letter{font-size:3.4em;}
}
@media (max-width:576px){
  .blog-grid{grid-template-columns:1fr;gap:1.6rem;}
  .blog-filters{gap:.4rem;}
  .blog-filter{padding:.5rem 1rem;font-size:.72rem;}
  .post-meta{font-size:.7rem;gap:.5rem;}
  .post-marker-num{font-size:2rem;}
  .post-end-cta{padding:1.8rem 1.4rem 1.6rem;}
  .post-footer{flex-direction:column;align-items:flex-start;gap:1.3rem;}
}
@media (max-width:400px){
  .blog-hero h1{font-size:2.2rem;}
  .post-title{font-size:2rem;}
  .blog-card-title{font-size:1.18rem;}
}
