/* =========================================================
   LIFELINE HOSPITAL — SINGLE POST STYLES
   Editorial + clinical design system for single.php
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root{
  --lh-ink:      #1B2A2E;
  --lh-ink-soft: rgba(27,42,46,0.65);
  --lh-paper:    #FAF8F4;
  --lh-panel:    #FFFFFF;
  --lh-teal:     #0F6E62;
  --lh-teal-dk:  #0B5049;
  --lh-sage:     #DCE8E2;
  --lh-coral:    #E76F51;
  --lh-line:     #E7E1D3;
  --lh-radius:   14px;
}

/* ---------------------------------------------------------
   Page shell
--------------------------------------------------------- */
.site-content{
  background: var(--lh-paper);
  font-family: 'Inter', sans-serif;
  color: var(--lh-ink);
  padding: 0 0 64px;
}

.site-content .container{ max-width: 1140px; }

/* ---------------------------------------------------------
   Signature element: pulse / ECG reading-progress bar
   (fixed to top of viewport, fills as user scrolls)
--------------------------------------------------------- */
.pulse-progress{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--lh-sage);
  z-index: 9999;
}
.pulse-progress__fill{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--lh-teal), var(--lh-coral));
  transition: width 0.08s linear;
}

/* ---------------------------------------------------------
   Article wrapper
--------------------------------------------------------- */
.main-single-post-page{
  background: var(--lh-panel);
  border: 1px solid var(--lh-line);
  border-radius: var(--lh-radius);
  padding: clamp(24px, 4vw, 52px);
  margin-top: 32px;
  position: relative;
  box-shadow: 0 2px 0 var(--lh-sage);
}

/* left "vital" accent rail */
.main-single-post-page::before{
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 4px;
  background: var(--lh-teal);
  border-radius: var(--lh-radius) 0 0 var(--lh-radius);
}

article[id^="post-"]{ max-width: 720px; }

/* ---------------------------------------------------------
   Meta row (date | author)
--------------------------------------------------------- */
.entry-meta{
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lh-teal);
  margin-bottom: 14px;
}
.entry-meta .separator{ color: var(--lh-line); }
.entry-meta .byline a{
  color: var(--lh-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--lh-teal);
  transition: color .15s ease;
}
.entry-meta .byline a:hover{ color: var(--lh-teal); }

/* ---------------------------------------------------------
   Title
--------------------------------------------------------- */
.entry-title{
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.18;
  color: var(--lh-ink);
  margin: 0 0 24px;
}

/* ---------------------------------------------------------
   Featured image
--------------------------------------------------------- */
.featured-image{
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 28px;
  background: var(--lh-sage);
}
.featured-image img{
  width: 100%;
  height: auto;
  display: block;
  transition: transform .5s ease;
}
.featured-image:hover img{ transform: scale(1.02); }

/* ---------------------------------------------------------
   Entry content (article body typography)
--------------------------------------------------------- */
.entry-content{
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--lh-ink);
}
.entry-content p{ margin-bottom: 1.3em; }

.entry-content h2,
.entry-content h3{
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  color: var(--lh-teal-dk);
  margin: 1.6em 0 0.6em;
  line-height: 1.3;
}
.entry-content h2{ font-size: 1.5rem; }
.entry-content h3{ font-size: 1.2rem; }

.entry-content a{
  color: var(--lh-teal);
  text-decoration: underline;
  text-decoration-color: var(--lh-sage);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
.entry-content a:hover{ text-decoration-color: var(--lh-teal); }

.entry-content blockquote{
  border-left: 3px solid var(--lh-coral);
  background: var(--lh-sage);
  padding: 16px 20px;
  margin: 1.6em 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--lh-ink-soft);
}

.entry-content ul,
.entry-content ol{
  margin: 0 0 1.3em 1.3em;
  padding-left: 0.6em;
}
.entry-content li{ margin-bottom: 0.5em; }

.entry-content img{
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.2em 0;
}

.entry-content code{
  background: var(--lh-sage);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
}

/* ---------------------------------------------------------
   Tags — styled like a "prescription" tag strip
--------------------------------------------------------- */
.entry-tags{
  margin: 32px 0 20px;
  padding-top: 20px;
  border-top: 1px dashed var(--lh-line);
}
.entry-tags .tag-links{
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lh-ink-soft);
  margin-right: 8px;
}
.entry-tags a{
  display: inline-block;
  background: var(--lh-sage);
  color: var(--lh-teal-dk);
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  text-decoration: none;
  margin: 2px 4px 2px 0;
  transition: background .15s ease, color .15s ease;
}
.entry-tags a:hover{ background: var(--lh-teal); color: #fff; }

/* ---------------------------------------------------------
   Share row
--------------------------------------------------------- */
.entry-share{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.entry-share > span{
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lh-ink-soft);
  margin-right: 4px;
}
.entry-share a{
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--lh-teal-dk);
  border: 1px solid var(--lh-teal);
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: all .15s ease;
}
.entry-share a:hover{
  background: var(--lh-teal);
  color: #fff;
  transform: translateY(-1px);
}

/* ---------------------------------------------------------
   Post navigation (prev / next)
--------------------------------------------------------- */
.post-navigation{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--lh-line);
  flex-wrap: wrap;
}
.post-navigation > div{
  flex: 1 1 45%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lh-ink-soft);
}
.post-navigation a{
  display: block;
  margin-top: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: var(--lh-ink);
  text-decoration: none;
  transition: color .15s ease;
}
.post-navigation a:hover{ color: var(--lh-teal); }
.nav-next{ text-align: right; }

/* ---------------------------------------------------------
   Sidebar
--------------------------------------------------------- */
.col-lg-4 .widget{
  background: var(--lh-panel);
  border: 1px solid var(--lh-line);
  border-radius: var(--lh-radius);
  padding: 24px;
  margin-bottom: 24px;
}
.col-lg-4 .widget-title{
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--lh-teal-dk);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--lh-sage);
}

/* ---------------------------------------------------------
   Page Banner (breadcrumb hero section)
--------------------------------------------------------- */
.page-banner{
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--lh-ink);
}

.pb-image{
  position: absolute;
  inset: 0;
  z-index: 0;
}
.pb-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.9;
}
.pb-image::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(27,42,46,0.55) 0%, rgba(27,42,46,0.85) 100%);
}

.pb-watermark{
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: clamp(3.5rem, 12vw, 8rem);
  color: rgba(255,255,255,0.06);
  white-space: nowrap;
  z-index: 1;
  pointer-events: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pb-container{
  position: relative;
  z-index: 2;
  padding: 40px 24px 32px;
  max-width: 1140px;
}

.pb-title{
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #FFFFFF;
  margin: 0 0 10px;
  line-height: 1.15;
}

.pb-breadcrumb{
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.pb-breadcrumb a{
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color .15s ease;
}
.pb-breadcrumb a:hover{ color: var(--lh-coral); }
.pb-breadcrumb .pb-sep{ color: rgba(255,255,255,0.4); }
.pb-breadcrumb .pb-current{ color: #FFFFFF; }

.pb-accent{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--lh-teal), var(--lh-coral));
  z-index: 2;
}

@media (max-width: 767.98px){
  .page-banner{ min-height: 220px; }
  .pb-container{ padding: 28px 18px 24px; }
  .pb-title{ font-size: 1.6rem; }
  .pb-breadcrumb{ font-size: 0.68rem; }
}

/* ---------------------------------------------------------
   Sidebar — Recent Posts widget
--------------------------------------------------------- */
.recent-posts-list{
  list-style: none;
  margin: 0; padding: 0;
}
.recent-post-item{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px dashed var(--lh-line);
}
.recent-post-item:last-child{ border-bottom: none; padding-bottom: 0; }
.recent-post-item:first-child{ padding-top: 0; }

.recent-post-thumb{
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}
.recent-post-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recent-post-info{ flex: 1; min-width: 0; }
.recent-post-title{
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--lh-ink);
  text-decoration: none;
  margin-bottom: 4px;
  transition: color .15s ease;
}
.recent-post-title:hover{ color: var(--lh-teal); }

.recent-post-date{
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lh-ink-soft);
}

/* ---------------------------------------------------------
   Sidebar — Categories widget
--------------------------------------------------------- */
.categories-list{
  list-style: none;
  margin: 0; padding: 0;
}
.categories-list li{
  border-bottom: 1px dashed var(--lh-line);
}
.categories-list li:last-child{ border-bottom: none; }

.categories-list a{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--lh-ink);
  text-decoration: none;
  transition: color .15s ease, padding-left .15s ease;
}
.categories-list a:hover{
  color: var(--lh-teal);
  padding-left: 4px;
}

/* ---------------------------------------------------------
   Comments area
--------------------------------------------------------- */
#comments{
  max-width: 720px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--lh-line);
}
.comments-title,
.comment-reply-title{
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  color: var(--lh-ink);
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 991.98px){
  .main-single-post-page{ margin-top: 20px; }
  .entry-title{ font-size: clamp(1.5rem, 5vw, 2rem); }
}

@media (max-width: 767.98px){
  .main-single-post-page{
    padding: 20px;
    border-radius: 10px;
  }
  .main-single-post-page::before{ width: 3px; }
  .entry-content{ font-size: 1rem; line-height: 1.75; }
  .post-navigation > div{ flex: 1 1 100%; }
  .nav-next{ text-align: left; }
  .entry-share{ gap: 8px; }
  .entry-share a{ font-size: 0.72rem; padding: 5px 11px; }
}

@media (max-width: 575.98px){
  .entry-title{ font-size: 1.4rem; }
  .entry-meta{ flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce){
  .featured-image img,
  .entry-share a,
  .entry-tags a,
  .post-navigation a{ transition: none; }
}