/* ========================================
   Blog page polish — byline, share rail, content
   typography, branded CTA. Loaded only on blog-page.hbs.
   Depends on /css/styles.css for vars.
   ======================================== */

/* ===== Reading progress bar — sticky 4px strip on top of viewport ===== */
.blog-post__progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(42, 65, 232, 0.10);
  z-index: 100;
  display: block;
}

.blog-post__progress::-webkit-progress-bar {
  background: rgba(42, 65, 232, 0.10);
}

.blog-post__progress::-webkit-progress-value {
  background: var(--primary);
  box-shadow: 0 0 10px rgba(42, 65, 232, 0.50);
  transition: width 0.16s ease;
}

.blog-post__progress::-moz-progress-bar {
  background: var(--primary);
}

/* ===== Byline card — premium author card with verified badge ===== */
.blog-byline {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 24px 14px 28px;
  margin: -42px auto 36px;
  width: fit-content;
  max-width: calc(100% - 32px);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 18px 40px rgba(42, 65, 232, 0.12);
  z-index: 2;
  overflow: hidden;
  animation: blog-fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-byline:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 26px 50px rgba(42, 65, 232, 0.18);
}

/* Vertical primary accent bar on the left edge */
.blog-byline::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 4px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
  pointer-events: none;
}

.blog-byline > * { position: relative; z-index: 1; }

/* Avatar — branded badge framing */
.blog-byline__avatar {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow:
    0 0 0 4px rgba(42, 65, 232, 0.20),
    0 0 0 6px rgba(42, 65, 232, 0.06),
    0 6px 14px rgba(42, 65, 232, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
}

.blog-byline__avatar--placeholder {
  background: rgba(42, 65, 232, 0.10);
  color: var(--primary);
  font-size: 18px;
}

.blog-byline__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-byline__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  line-height: 1.2;
}

.blog-byline__name a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.18s ease;
}

.blog-byline__name a:hover {
  color: #1e33c9;
}

/* Meta row */
.blog-byline__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 12.5px;
  color: var(--gray-600);
}

.blog-byline__meta time,
.blog-byline__meta > span {
  display: inline-flex;
  align-items: center;
}

.blog-byline__meta i {
  margin-right: 5px;
  color: var(--primary);
  opacity: 0.85;
  font-size: 11px;
}

.blog-byline__categories {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.blog-byline__category {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  background: rgba(42, 65, 232, 0.10);
  color: var(--primary);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.18s ease;
}

.blog-byline__category:hover {
  background: rgba(42, 65, 232, 0.22);
}

/* ===== Featured image polish ===== */
.blog-post__featured-image {
  margin: 0 auto 36px;
}

.blog-post__hero-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04),
              0 28px 56px rgba(15, 23, 42, 0.12);
  animation: blog-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.blog-post__featured-image figcaption {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--gray-600);
  font-style: italic;
}

@keyframes blog-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Floating share rail (left edge, sticky) ===== */
.blog-share {
  position: fixed;
  top: 50%;
  left: 24px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  z-index: 10;
  pointer-events: auto;
}

.blog-share__label {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-600);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  margin-bottom: 4px;
}

.blog-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.blog-share__btn:hover {
  color: var(--primary);
  border-color: rgba(42, 65, 232, 0.40);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(42, 65, 232, 0.18);
}

.blog-share__btn:active {
  transform: translateY(0);
}

.blog-share__btn.is-copied {
  color: #10b981;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

@media (max-width: 1180px) {
  .blog-share { display: none; }
}

/* ===== Content typography (mirrors tool-sections.css, scoped to blog) ===== */
.blog-post__content .content-heading {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.015em;
  margin: 44px 0 18px;
  line-height: 1.3;
  background: #eef1fe;
  border-left: 4px solid var(--primary);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
}

.blog-post__content h2.content-heading { font-size: 28px; }
.blog-post__content h3.content-heading {
  font-size: 21px;
  border-left-width: 3px;
  padding: 12px 16px;
  margin-top: 32px;
}
.blog-post__content h4.content-heading {
  font-size: 17px;
  border-left-width: 3px;
  padding: 10px 14px;
  margin-top: 28px;
}
.blog-post__content h5.content-heading,
.blog-post__content h6.content-heading {
  font-size: 15px;
  border-left-width: 3px;
  padding: 9px 12px;
  margin-top: 24px;
}
.blog-post__content .content-heading--bold {
  font-size: 17px;
  border-left-width: 3px;
  padding: 10px 14px;
}

.blog-post__content .content-text {
  font-size: 16.5px;
  line-height: 1.85;
  color: #374151;
  margin-bottom: 18px;
}

.blog-post__content .content-text:first-of-type {
  font-size: 18px;
  color: var(--gray-800);
  font-weight: 500;
}

.blog-post__content .content-text strong {
  color: var(--gray-800);
  font-weight: 600;
}

.blog-post__content .content-text a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(42, 65, 232, 0.35);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.blog-post__content .content-text a:hover {
  text-decoration-color: var(--primary);
  color: #1e33c9;
}

/* Lists with branded bullets / numbered chips */
.blog-post__content .content-list {
  margin: 14px 0 26px;
  padding-left: 0;
  font-size: 16.5px;
  line-height: 1.85;
  color: #374151;
  list-style: none;
}

.blog-post__content ul.content-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
}

.blog-post__content ul.content-list li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(42, 65, 232, 0.16);
}

.blog-post__content ol.content-list {
  counter-reset: blog-content-counter;
}

.blog-post__content ol.content-list li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 14px;
  counter-increment: blog-content-counter;
}

.blog-post__content ol.content-list li::before {
  content: counter(blog-content-counter);
  position: absolute;
  left: 0;
  top: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(42, 65, 232, 0.10);
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-post__content .content-list li strong {
  color: var(--gray-800);
  font-weight: 600;
}

/* Branded blockquote */
.blog-post__content .content-blockquote {
  position: relative;
  margin: 28px 0;
  padding: 22px 26px 22px 56px;
  background: rgba(42, 65, 232, 0.06);
  border-left: 4px solid var(--primary);
  border-radius: 0 14px 14px 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--gray-800);
  font-style: italic;
}

.blog-post__content .content-blockquote::before {
  content: "\f10d"; /* fa-quote-left */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 22px;
  top: 22px;
  font-size: 22px;
  color: var(--primary);
  opacity: 0.55;
  font-style: normal;
}

.blog-post__content .content-blockquote p {
  margin: 0;
}

/* ===== CTA card revamp ===== */
.blog-post__cta {
  background: transparent;
  padding: 60px 0 90px;
}

.blog-cta-card {
  position: relative;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  padding: 48px 40px 44px;
  text-align: center;
  overflow: hidden;
  color: var(--white);
}

.blog-cta-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.blog-cta-card h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 12px;
}

.blog-cta-card__accent {
  color: #93c5fd;
}

.blog-cta-card p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto 24px;
}

.blog-cta-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    0 4px 0 #1e33c9,
    0 6px 14px rgba(42, 65, 232, 0.32);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.blog-cta-card__btn:hover,
.blog-cta-card__btn:focus,
.blog-cta-card__btn:active,
.blog-cta-card__btn:visited {
  color: var(--white);
  background: var(--primary);
  text-decoration: none;
}

.blog-cta-card__btn:hover {
  transform: translateY(-1px);
}

.blog-cta-card__btn:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    0 1px 0 #1e33c9,
    0 2px 8px rgba(42, 65, 232, 0.20);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .blog-byline {
    margin-top: -30px;
    padding: 14px 16px 14px 22px;
    gap: 12px;
    border-radius: 14px;
  }
  .blog-byline__avatar {
    width: 44px;
    height: 44px;
    box-shadow:
      0 0 0 3px rgba(42, 65, 232, 0.20),
      0 0 0 5px rgba(42, 65, 232, 0.06),
      0 4px 10px rgba(42, 65, 232, 0.18);
  }
  .blog-byline__name { font-size: 13px; }
  .blog-byline__meta {
    font-size: 11.5px;
    gap: 6px 10px;
  }
  .blog-post__hero-img { border-radius: 14px; }
  .blog-cta-card {
    padding: 32px 22px 30px;
    border-radius: 18px;
  }
  .blog-cta-card h2 { font-size: 24px; }
  .blog-cta-card p { font-size: 14.5px; }
  .blog-post__cta { padding: 40px 0 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-byline,
  .blog-post__hero-img { animation: none; }
}
