/* PropPulser Blog UX Enhancements (layout + readability)
   - Wide-screen container improvements
   - TOC styling
   - Table responsiveness
   - Callout utilities
   Kept minimal to preserve automation and authoring flow.
*/

.pp-blog-container{
  /* widen Bootstrap container on very large screens */
  max-width: 1500px;
}


.pp-reading-wrap{
  /* widen overall reading area without forcing long line-length */
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* Keep body text comfortable (70–85ch) while allowing media/cards to breathe */
.pp-content-card{
  max-width: 100%;
}

.pp-article{
  line-height: 1.6;
}

.pp-article h2, .pp-article h3, .pp-article h4{
  margin-top: 1.5rem;
  margin-bottom: 0.85rem;
}

/* Inline TOC (below intro) */
.pp-toc-inline .pp-toc{
  margin-top: 1rem;
}

/* Sticky sidebar TOC */
.pp-toc-sidebar{
  position: sticky;
  top: 96px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Tables: prevent layout breaks */
.pp-article table{
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Optional callout styles (can be used by markdown renderer output classes if present) */
.pp-callout.pp-callout--tip,
.pp-callout.pp-callout--warning{
  border: 1px solid rgba(255,255,255,0.10);
}

.pp-callout.pp-callout--tip{
  background: rgba(0, 200, 255, 0.06);
}

.pp-callout.pp-callout--warning{
  background: rgba(255, 180, 0, 0.08);
}

/* Scroll progress bar */
#ppScrollProgress{
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 9999;
  background: rgba(255,255,255,0.55);
}

/* Inline CTA blocks */
.pp-inline-cta{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
  margin: 18px 0;
}
.pp-inline-cta .pp-inline-cta__title{
  font-weight: 700;
  margin-bottom: 6px;
}
.pp-inline-cta .pp-inline-cta__meta{
  opacity: 0.85;
  font-size: 0.95rem;
}
.pp-inline-cta .btn{
  white-space: nowrap;
}

/* Page wrap soft contrast (reduces 'thin strip' feel on wide monitors) */
.pp-page-wrap{
  background: rgba(255,255,255,0.015);
}

/* Callout icons + scannability */
.pp-callout{
  position: relative;
  padding-left: 44px;
}
.pp-callout::before{
  content: '';
  position: absolute;
  left: 14px;
  top: 16px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}
.pp-callout.pp-callout--tip::after,
.pp-callout.pp-callout--warning::after{
  position: absolute;
  left: 18px;
  top: 14px;
  font-size: 14px;
  line-height: 1;
  opacity: 0.95;
}
.pp-callout.pp-callout--tip::after{ content: '💡'; }
.pp-callout.pp-callout--warning::after{ content: '⚠️'; }

/* TOC active section highlight */
.pp-toc a.is-active{
  font-weight: 700;
  text-decoration: none;
  border-left: 2px solid rgba(255,255,255,0.55);
  padding-left: 10px;
  margin-left: -12px;
}

/* Back to top */
#ppBackToTop{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9998;
  display: none;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 10px 12px;
  color: rgba(255,255,255,0.9);
  cursor: pointer;
}
#ppBackToTop:hover{
  background: rgba(0,0,0,0.55);
}

.pp-article table tbody tr{
  border-color: rgba(255,255,255,0.08);
}

/* TOC collapsible groups (H2 > H3 nesting) */
.pp-toc-group{
  margin: 0;
}
.pp-toc-group summary{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pp-toc-group summary::-webkit-details-marker{ display:none; }

.pp-toc-group .pp-toc-group__chev{
  opacity: 0.75;
  font-size: 12px;
  transform: rotate(0deg);
  transition: transform 120ms ease;
}
.pp-toc-group[open] .pp-toc-group__chev{
  transform: rotate(90deg);
}

.pp-toc-group ul{
  margin-top: 6px;
  margin-bottom: 8px;
  padding-left: 14px;
}

/* Heading permalink (copy link) */
.pp-article h2, .pp-article h3, .pp-article h4{
  position: relative;
}
.pp-heading-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.25);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  opacity: 0;
  transform: translateY(-1px);
  transition: opacity 120ms ease, background 120ms ease;
}
.pp-article h2:hover .pp-heading-link,
.pp-article h3:hover .pp-heading-link,
.pp-article h4:hover .pp-heading-link{
  opacity: 1;
}
.pp-heading-link:hover{
  background: rgba(0,0,0,0.45);
}

/* TOC search/filter (auto-injected when TOC is long) */
.pp-toc-search{
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.22);
  color: rgba(255,255,255,0.92);
  outline: none;
}
.pp-toc-search::placeholder{
  color: rgba(255,255,255,0.55);
}
.pp-toc-search-wrap{
  margin-bottom: 10px;
}

/* Section highlight on hash navigation */
.pp-section-flash{
  animation: ppFlash 1200ms ease-out 1;
}
@keyframes ppFlash{
  0%{ box-shadow: 0 0 0 0 rgba(255,255,255,0.35); }
  25%{ box-shadow: 0 0 0 6px rgba(255,255,255,0.18); }
  100%{ box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* Blog listing cards */
.pp-blog-card{
  position: relative;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.pp-blog-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.14);
}
.pp-blog-card__media{
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pp-blog-card__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pp-blog-card__media--placeholder{
  background: rgba(255,255,255,0.02);
}
.pp-blog-card__placeholder-img{
  width: 44px;
  height: 44px;
  opacity: 0.9;
}
.pp-blog-card__title{
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pp-blog-card__excerpt{
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Featured image CLS guard */
.pp-featured-wrap{
  aspect-ratio: 16 / 9;
}
.pp-featured-image--post{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 10%;
}

/* Key takeaways (auto-injected) */
.pp-takeaways{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 16px;
  margin: 18px 0;
}
.pp-takeaways__title{
  font-weight: 800;
  margin-bottom: 8px;
}
.pp-takeaways ul{
  margin-bottom: 0;
  padding-left: 18px;
}
