/* ==========================================================================
   Encompass Care — Blog
   Extends css/style.css. Introduces no new colours or typefaces; every value
   below resolves to an existing brand token.
   ========================================================================== */

.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}

.container-narrow{max-width:720px;margin:0 auto;padding:0 1.75rem;}

.floating-book{position:fixed;bottom:1.5rem;right:1.5rem;background:var(--teal);color:#fff!important;padding:.75rem 1.5rem;border-radius:50px;font-size:.85rem;font-weight:600;text-decoration:none;z-index:998;box-shadow:0 4px 16px rgba(74,158,150,.4);}

/* --- Breadcrumbs --------------------------------------------------------- */
.crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;font-size:.74rem;color:var(--mid-gray);margin-bottom:1.5rem;font-weight:400;}
.crumbs a{color:var(--mid-gray);text-decoration:none;transition:color .18s;}
.crumbs a:hover{color:var(--blue);}
.crumbs span[aria-current]{color:var(--navy);font-weight:500;max-width:min(48ch,100%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.crumb-sep{color:var(--light-gray);}
.blog-post .crumbs,.blog-hero .crumbs{margin-bottom:1.75rem;}

/* --- Hero ---------------------------------------------------------------- */
.blog-hero{background:var(--navy);color:#fff;padding:4.5rem 0 3.5rem;}
.blog-hero.compact{padding:3.5rem 0 2.75rem;}
.blog-hero .crumbs,.blog-hero .crumbs a{color:rgba(255,255,255,.5);}
.blog-hero .crumbs a:hover{color:#fff;}
.blog-hero .crumbs span[aria-current]{color:rgba(255,255,255,.9);}
.blog-hero .crumb-sep{color:rgba(255,255,255,.25);}
.blog-hero .eyebrow{color:var(--teal-light);}
.blog-hero .eyebrow::before{background:var(--teal-light);}
.blog-hero h1{font-family:var(--serif);font-weight:300;font-size:clamp(2.1rem,5vw,3.4rem);line-height:1.1;letter-spacing:-.01em;margin-bottom:.9rem;}
.blog-hero h1 em{font-style:italic;color:var(--teal-light);}
.blog-hero-sub{font-size:.975rem;font-weight:300;line-height:1.85;color:rgba(255,255,255,.65);max-width:60ch;}
.back-link{display:inline-block;margin-top:1.5rem;font-size:.82rem;font-weight:500;color:var(--teal-light);text-decoration:none;}
.back-link:hover{text-decoration:underline;}

/* --- Search + filters ---------------------------------------------------- */
.blog-controls{background:var(--warm-white);border-bottom:1px solid var(--light-gray);position:sticky;top:68px;z-index:90;padding:1.25rem 0;}
.blog-search{position:relative;display:flex;align-items:center;max-width:460px;margin:0 auto .9rem;}
.blog-search svg{position:absolute;left:1rem;width:17px;height:17px;fill:none;stroke:var(--mid-gray);stroke-width:1.7;stroke-linecap:round;pointer-events:none;}
.blog-search input{width:100%;padding:.7rem 2.5rem;border:1.5px solid var(--light-gray);border-radius:50px;font-family:var(--sans);font-size:.875rem;color:var(--navy);background:#fff;outline:none;transition:border-color .18s,box-shadow .18s;}
.blog-search input::placeholder{color:var(--mid-gray);}
.blog-search input:focus{border-color:var(--teal);box-shadow:0 0 0 3px rgba(74,158,150,.15);}
.blog-search input::-webkit-search-cancel-button{display:none;}
.search-clear{position:absolute;right:.9rem;background:none;border:none;font-size:1.35rem;line-height:1;color:var(--mid-gray);cursor:pointer;padding:0 .2rem;}
.search-clear:hover{color:var(--navy);}

.blog-filters{display:flex;flex-wrap:wrap;justify-content:center;gap:.45rem;}
.chip{font-family:var(--sans);font-size:.76rem;font-weight:500;letter-spacing:.01em;color:var(--mid-gray);background:transparent;border:1.5px solid var(--light-gray);border-radius:50px;padding:.34rem .9rem;cursor:pointer;transition:all .18s;white-space:nowrap;}
.chip:hover{border-color:var(--teal);color:var(--dark-teal);}
.chip.is-active{background:var(--navy);border-color:var(--navy);color:#fff;}
.chip:focus-visible{outline:2px solid var(--blue);outline-offset:2px;}

/* --- Listing ------------------------------------------------------------- */
.blog-listing{padding:3.5rem 0 4.5rem;}
.blog-featured{padding:3.5rem 0 0;}
.blog-featured .eyebrow{margin-bottom:1.5rem;}
.blog-count{font-size:.78rem;color:var(--mid-gray);margin-bottom:1.5rem;letter-spacing:.02em;}
.blog-empty{text-align:center;font-size:.9rem;color:var(--mid-gray);font-weight:300;padding:3rem 0;}

.post-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:2.25rem;}

.post-card{display:flex;flex-direction:column;background:#fff;border:1px solid var(--light-gray);border-radius:var(--radius-lg);overflow:hidden;transition:transform .25s,box-shadow .25s,border-color .25s;}
.post-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:rgba(74,158,150,.4);}
.post-card-media{display:block;aspect-ratio:1200/630;overflow:hidden;background:var(--light-teal);}
.post-card-media img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease;}
.post-card:hover .post-card-media img{transform:scale(1.03);}
.post-card-body{padding:1.5rem 1.6rem 1.75rem;display:flex;flex-direction:column;flex:1;}
.post-card-meta{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem;font-size:.7rem;color:var(--mid-gray);letter-spacing:.03em;margin-bottom:.85rem;}
.post-card-meta > span + span::before,.post-cat + span::before{content:"·";margin-right:.55rem;color:var(--light-gray);}
.post-cat{font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--dark-teal);text-decoration:none;font-size:.66rem;}
.post-cat:hover{color:var(--teal);}
.post-card-title{font-family:var(--serif);font-size:1.4rem;font-weight:400;line-height:1.25;color:var(--navy);margin-bottom:.7rem;letter-spacing:-.005em;}
.post-card-title a{color:inherit;text-decoration:none;}
.post-card-title a:hover{color:var(--blue);}
.post-card-excerpt{font-size:.86rem;font-weight:300;line-height:1.8;color:var(--mid-gray);margin-bottom:1.25rem;flex:1;}
.post-card-more{font-size:.79rem;font-weight:600;color:var(--teal);text-decoration:none;align-self:flex-start;}
.post-card-more:hover{color:var(--dark-teal);}
.post-card-more span{display:inline-block;transition:transform .2s;}
.post-card:hover .post-card-more span{transform:translateX(3px);}

.post-card.featured{grid-column:1/-1;flex-direction:row;align-items:stretch;}
.post-card.featured .post-card-media{flex:1 1 52%;aspect-ratio:auto;min-height:320px;}
.post-card.featured .post-card-body{flex:1 1 48%;justify-content:center;padding:2.75rem 2.75rem 2.75rem 2.5rem;}
.post-card.featured .post-card-title{font-size:clamp(1.7rem,2.6vw,2.25rem);}
.post-card.featured .post-card-excerpt{font-size:.92rem;}

/* --- Article ------------------------------------------------------------- */
.read-progress{position:fixed;top:68px;left:0;right:0;height:2px;background:transparent;z-index:95;}
.read-progress-bar{height:100%;width:0;background:var(--teal);transition:width .08s linear;}

.post-header{background:var(--warm-white);padding:3.25rem 0 2.25rem;}
.post-cat.solo{display:inline-block;margin-bottom:1rem;}
.post-title{font-family:var(--serif);font-weight:300;font-size:clamp(2rem,4.4vw,3.05rem);line-height:1.12;letter-spacing:-.015em;color:var(--navy);margin-bottom:1.1rem;}
.post-standfirst{font-size:1.05rem;font-weight:300;line-height:1.8;color:var(--mid-gray);margin-bottom:2rem;}
.post-byline{display:flex;align-items:center;gap:.85rem;}
.post-avatar{border-radius:50%;background:var(--light-teal);padding:5px;flex-shrink:0;}
.post-author{font-size:.86rem;font-weight:500;color:var(--navy);text-decoration:none;}
.post-author:hover{color:var(--blue);}
.post-dateline{display:flex;flex-wrap:wrap;gap:.45rem;font-size:.76rem;color:var(--mid-gray);margin-top:.15rem;}

.post-hero-media{margin:0 auto 3rem;max-width:1000px;padding:0 1.75rem;}
.post-hero-media img{width:100%;height:auto;border-radius:var(--radius-lg);box-shadow:var(--shadow-md);}

/* Table of contents */
.post-toc{background:var(--off-white);border-left:2px solid var(--teal);border-radius:0 var(--radius) var(--radius) 0;padding:1.5rem 1.75rem;margin-bottom:3rem;}
.post-toc-title{font-family:var(--sans);font-size:.66rem;letter-spacing:.16em;text-transform:uppercase;font-weight:700;color:var(--dark-teal);margin-bottom:.9rem;}
.post-toc ol{list-style:none;counter-reset:toc;}
.post-toc li{margin-bottom:.5rem;line-height:1.5;}
.post-toc li.lvl3{padding-left:1.15rem;}
.post-toc a{font-size:.85rem;color:var(--navy);text-decoration:none;font-weight:400;border-bottom:1px solid transparent;transition:all .18s;}
.post-toc a:hover{color:var(--blue);border-bottom-color:var(--blue);}
.post-toc a.is-current{color:var(--dark-teal);font-weight:500;}

/* Body typography */
.post-body{font-size:1.02rem;line-height:1.9;color:#333a4d;font-weight:300;}
.post-body > * + *{margin-top:1.5rem;}
.post-body p{font-weight:300;}
.post-body h2{font-family:var(--serif);font-size:clamp(1.55rem,2.6vw,2rem);font-weight:400;line-height:1.25;color:var(--navy);margin-top:3.25rem;letter-spacing:-.01em;scroll-margin-top:110px;}
.post-body h3{font-family:var(--serif);font-size:1.3rem;font-weight:500;line-height:1.35;color:var(--navy);margin-top:2.5rem;scroll-margin-top:110px;}
.post-body h4{font-family:var(--sans);font-size:.95rem;font-weight:600;color:var(--navy);margin-top:2rem;}
.post-body h2 + p,.post-body h3 + p{margin-top:1rem;}
.post-body a{color:var(--blue);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px;}
.post-body a:hover{color:var(--dark-blue);}
.post-body strong{font-weight:600;color:var(--navy);}
.post-body ul,.post-body ol{padding-left:1.35rem;}
.post-body ul{list-style:disc;}
.post-body ol{list-style:decimal;}
.post-body li{margin-bottom:.6rem;padding-left:.3rem;}
.post-body li::marker{color:var(--teal);}
.post-body blockquote{border-left:2px solid var(--teal);background:var(--light-teal);padding:1.35rem 1.75rem;border-radius:0 var(--radius) var(--radius) 0;font-size:1.02rem;font-style:italic;color:var(--navy);}
.post-body blockquote p{margin:0;}
.post-body blockquote p + p{margin-top:.85rem;}
.post-body hr{border:none;height:1px;background:var(--light-gray);margin:3rem 0;}
.post-body code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.87em;background:var(--off-white);border:1px solid var(--light-gray);border-radius:4px;padding:.1em .38em;color:var(--navy);}
.post-body pre{background:var(--navy);color:#e8edf8;border-radius:var(--radius);padding:1.25rem 1.5rem;overflow-x:auto;font-size:.85rem;line-height:1.7;}
.post-body pre code{background:none;border:none;padding:0;color:inherit;}
.post-figure{margin:2.5rem 0;}
.post-figure img{border-radius:var(--radius);width:100%;}
.post-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.post-body table{width:100%;border-collapse:collapse;font-size:.88rem;}
.post-body th{background:var(--navy);color:#fff;font-weight:500;text-align:left;padding:.75rem 1rem;font-size:.8rem;letter-spacing:.02em;}
.post-body td{padding:.75rem 1rem;border-bottom:1px solid var(--light-gray);font-weight:300;}
.post-body tbody tr:last-child td{border-bottom:none;}

/* Share */
.post-share{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin-top:3.5rem;padding-top:1.75rem;border-top:1px solid var(--light-gray);}
.post-share-label{font-size:.66rem;letter-spacing:.16em;text-transform:uppercase;font-weight:700;color:var(--mid-gray);margin-right:.35rem;}
.share-btn{font-family:var(--sans);font-size:.76rem;font-weight:500;color:var(--navy);background:transparent;border:1.5px solid var(--light-gray);border-radius:50px;padding:.36rem .95rem;cursor:pointer;text-decoration:none;transition:all .18s;}
.share-btn:hover{border-color:var(--teal);color:var(--dark-teal);background:var(--light-teal);}
.share-btn.copied{border-color:var(--teal);background:var(--teal);color:#fff;}

/* Author box */
.post-authorbox{display:flex;gap:1.25rem;align-items:flex-start;background:var(--off-white);border-radius:var(--radius-lg);padding:1.75rem;margin-top:2.5rem;}
.post-authorbox img{border-radius:50%;background:#fff;padding:7px;flex-shrink:0;}
.post-authorbox-name{font-family:var(--serif);font-size:1.15rem;font-weight:500;color:var(--navy);margin-bottom:.4rem;}
.post-authorbox p{font-size:.84rem;font-weight:300;line-height:1.75;color:var(--mid-gray);margin-bottom:.6rem;}
.post-authorbox-link{font-size:.79rem;font-weight:600;color:var(--teal);text-decoration:none;}
.post-authorbox-link:hover{color:var(--dark-teal);}

.post-disclaimer{font-size:.76rem;font-style:italic;line-height:1.7;color:var(--mid-gray);margin-top:2rem;padding-top:1.25rem;border-top:1px solid var(--light-gray);}

/* Prev / next */
.post-prevnext{padding:3rem 0 0;}
.pn-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem;}
.pn{display:flex;flex-direction:column;gap:.4rem;border:1px solid var(--light-gray);border-radius:var(--radius-lg);padding:1.25rem 1.5rem;text-decoration:none;transition:all .2s;background:#fff;}
.pn:hover{border-color:var(--teal);box-shadow:var(--shadow-sm);}
.pn.next{text-align:right;}
.pn-label{font-size:.66rem;letter-spacing:.14em;text-transform:uppercase;font-weight:700;color:var(--teal);}
.pn-title{font-family:var(--serif);font-size:1.05rem;font-weight:400;line-height:1.35;color:var(--navy);}

/* Related + CTA */
.related{padding:4rem 0 1rem;}
.related .eyebrow{margin-bottom:1.75rem;}
.post-cta-wrap{padding:3.5rem 0 5rem;}
.post-cta{background:var(--navy);border-radius:var(--radius-lg);padding:3rem 2.5rem;text-align:center;}
.post-cta h2{font-family:var(--serif);font-size:clamp(1.5rem,3vw,2.1rem);font-weight:300;color:#fff;line-height:1.25;margin-bottom:.85rem;}
.post-cta p{font-size:.9rem;font-weight:300;color:rgba(255,255,255,.6);margin-bottom:1.9rem;}
.post-cta-actions{display:flex;flex-wrap:wrap;gap:1rem;justify-content:center;}

/* Newsletter */
.blog-newsletter-wrap{padding:0 0 5rem;}
.blog-newsletter{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:2rem;background:var(--light-teal);border-radius:var(--radius-lg);padding:2.5rem;}
.blog-newsletter h2{font-family:var(--serif);font-size:1.55rem;font-weight:400;color:var(--navy);margin-bottom:.4rem;}
.blog-newsletter p{font-size:.85rem;font-weight:300;color:var(--mid-gray);line-height:1.7;max-width:46ch;}
.blog-nl-form{display:flex;gap:.6rem;flex-wrap:wrap;}
.blog-nl-form input{padding:.7rem 1.1rem;border:1.5px solid rgba(22,32,58,.12);border-radius:6px;font-family:var(--sans);font-size:.85rem;min-width:230px;outline:none;background:#fff;color:var(--navy);}
.blog-nl-form input:focus{border-color:var(--teal);}
.blog-nl-msg{font-size:.85rem;font-weight:500;color:var(--dark-teal);}

/* --- Responsive ---------------------------------------------------------- */
@media(max-width:900px){
  .post-card.featured{flex-direction:column;}
  .post-card.featured .post-card-media{min-height:0;aspect-ratio:1200/630;}
  .post-card.featured .post-card-body{padding:1.75rem 1.75rem 2rem;}
}
@media(max-width:768px){
  .blog-controls{position:static;}
  .blog-hero{padding:3rem 0 2.5rem;}
  .post-grid{grid-template-columns:1fr;gap:1.75rem;}
  .pn-grid{grid-template-columns:1fr;}
  .pn.next{text-align:left;}
  .post-hero-media{margin-bottom:2.25rem;padding:0 1.25rem;}
  .blog-newsletter{padding:1.75rem;}
  .blog-nl-form,.blog-nl-form input{width:100%;}
  .post-cta{padding:2.25rem 1.5rem;}
  .post-cta-actions .btn{width:100%;justify-content:center;}
  .read-progress{top:0;}
}
@media(max-width:600px){
  .container-narrow{padding:0 1.25rem;}
  .post-authorbox{flex-direction:column;gap:1rem;}
  .post-body{font-size:1rem;}
}

/* --- Accessibility ------------------------------------------------------- */
a:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid var(--blue);outline-offset:2px;}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important;}
  .post-card:hover{transform:none;}
  .post-card:hover .post-card-media img{transform:none;}
}
@media print{
  .blog-controls,.read-progress,.post-share,.post-prevnext,.related,.post-cta-wrap,.floating-book,#en,#en-mob,footer{display:none!important;}
  .post-body{font-size:11pt;color:#000;}
}

/* ==========================================================================
   Homepage — "Latest writing" strip
   ========================================================================== */
.hp-blog{padding:6rem 0;background:var(--warm-white);}
.hp-blog-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1.5rem;flex-wrap:wrap;margin-bottom:2.75rem;}
.hp-blog-head .section-title{margin-bottom:0;}
.hp-blog-all{font-size:.82rem;font-weight:600;color:var(--teal);text-decoration:none;white-space:nowrap;padding-bottom:.35rem;}
.hp-blog-all:hover{color:var(--dark-teal);}
.hp-blog-all span{display:inline-block;transition:transform .2s;}
.hp-blog-all:hover span{transform:translateX(3px);}
.hp-post-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:2.25rem;}
.hp-post-media{display:block;aspect-ratio:1200/630;border-radius:var(--radius);overflow:hidden;background:var(--light-teal);margin-bottom:1.1rem;}
.hp-post-media img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease;}
.hp-post:hover .hp-post-media img{transform:scale(1.03);}
.hp-post-meta{display:flex;align-items:center;gap:.5rem;font-size:.68rem;letter-spacing:.08em;text-transform:uppercase;font-weight:600;color:var(--dark-teal);margin-bottom:.6rem;}
.hp-post-meta span{color:var(--light-gray);}
.hp-post h3{font-family:var(--serif);font-size:1.28rem;font-weight:400;line-height:1.28;color:var(--navy);margin-bottom:.55rem;}
.hp-post h3 a{color:inherit;text-decoration:none;}
.hp-post h3 a:hover{color:var(--blue);}
.hp-post p{font-size:.85rem;font-weight:300;line-height:1.75;color:var(--mid-gray);}
@media(max-width:768px){
  .hp-blog{padding:4rem 0;}
  .hp-post-grid{grid-template-columns:1fr;gap:2rem;}
  .hp-blog-head{margin-bottom:2rem;}
}
@media(prefers-reduced-motion:reduce){.hp-post:hover .hp-post-media img{transform:none;}}
