/**
 * Single blog post layout
 *
 * @package Hello_Elementor_Child
 */

body.hec-blog-single {
  background: #ffffff;
  /* Header (~112px) + gap; overridden when promo banner/admin bar present */
  --hec-header-stack: 112px;
  --hec-blog-sticky-gap: 18px;
  --hec-blog-sticky-top: calc(
    var(--hec-header-stack) + var(--hec-blog-sticky-gap)
  );
  scroll-padding-top: var(--hec-blog-sticky-top);
}

body.hec-blog-single.has-webtraffic-promo-banner {
  --hec-header-stack: calc(56px + 112px);
}

body.admin-bar.hec-blog-single {
  --hec-header-stack: calc(32px + 112px);
}

body.admin-bar.hec-blog-single.has-webtraffic-promo-banner {
  --hec-header-stack: calc(32px + 56px + 112px);
}

@media (max-width: 782px) {
  body.admin-bar.hec-blog-single {
    --hec-header-stack: calc(46px + 112px);
  }

  body.admin-bar.hec-blog-single.has-webtraffic-promo-banner {
    --hec-header-stack: calc(46px + 56px + 112px);
  }
}

.hec-blogSingle {
  --hec-blog-single-width: 1180px;
  padding: 36px 0 0;
}

.hec-blogSingle__container {
  width: 100%;
  max-width: var(--hec-blog-single-width);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Hero */
.hec-blogSingle__hero {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 28px;
}

.hec-blogSingle__heroMeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 20px;
  margin: 0 0 18px;
}

.hec-blogSingle__badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(91, 75, 235, 0.12);
  color: var(--hec-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hec-blogSingle__badgeLink {
  color: var(--hec-primary);
  text-decoration: none;
}

.hec-blogSingle__badgeLink:hover,
.hec-blogSingle__badgeLink:focus,
.hec-blogSingle__badgeLink:focus-visible,
.hec-blogSingle__badgeLink:active {
  color: var(--hec-primary);
  text-decoration: none;
}

.hec-blogSingle__heroMeta .hec-blogs__meta {
  margin: 0;
  font-size: 13px;
  color: var(--hec-muted);
}

.hec-blogSingle__title {
  margin: 0 0 18px;
  font-size: 42px;
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--hec-text);
}

.hec-blogSingle__byline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
}

.hec-blogSingle__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--hec-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.hec-blogSingle__bylineName {
  font-weight: 800;
  color: var(--hec-text);
}

.hec-blogSingle__bylineRole {
  color: var(--hec-muted);
}

/* Lead image — same width as layout container below */
.hec-blogSingle__mediaFull {
  width: 100%;
  margin: 0 0 32px;
}

.hec-blogSingle__mediaFullInner {
  width: 100%;
  margin: 0;
  padding: 0;
}

.hec-blogSingle__mediaFull img,
.hec-blogSingle__leadImg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 480px;
  margin: 0 !important;
  border-radius: 20px;
}

.hec-blogSingle__mediaFull figure {
  margin: 0;
}

/* Hide duplicate lead image blocks only (not wrappers that contain article text) */
.hec-blogSingle--hasLead
  .hec-blogSingle__content
  > figure.wp-block-image:first-child,
.hec-blogSingle--hasLead .hec-blogSingle__content > .wp-block-image:first-child,
.hec-blogSingle--hasLead
  .hec-blogSingle__content
  > div.wp-block-image:first-child,
.hec-blogSingle--hasLead
  .hec-blogSingle__content
  > p:first-child:has(> img:only-child) {
  display: none !important;
}

.hec-blogSingle--hasLead .hec-blogSingle__content > p:empty:first-child {
  display: none;
}

/* Three-column layout */
.hec-blogSingle__layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 290px;
  gap: 28px;
  align-items: start;
}

.hec-blogSingle__toc,
.hec-blogSingle__cta {
  position: sticky;
  top: var(--hec-blog-sticky-top, 130px);
  z-index: 20;
  max-height: calc(100vh - var(--hec-blog-sticky-top, 130px) - 20px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hec-blogSingle__main {
  min-width: 0;
}

/* Table of contents */
.hec-blogSingle__tocCard {
  background: #f8fafc;
  border: 1px solid var(--hec-border);
  border-radius: 14px;
  padding: 16px 14px 14px;
  border-bottom: 3px solid var(--hec-primary);
}

.hec-blogSingle__tocHead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--hec-muted);
}

.hec-blogSingle__tocTitle {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hec-blogSingle__tocList {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hec-blogSingle__tocItem {
  margin: 0 0 4px;
}

.hec-blogSingle__tocItem--h3 {
  padding-left: 14px;
}

.hec-blogSingle__tocLink {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--hec-muted);
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.hec-blogSingle__tocLink:hover,
.hec-blogSingle__tocLink.is-active {
  background: rgba(91, 75, 235, 0.1);
  color: var(--hec-primary);
  font-weight: 700;
}

/* Main content */
.hec-blogSingle__content {
  font-size: 17px;
  line-height: 1.8;
  color: #1f2937;
}

.hec-blogSingle__content p {
  margin: 0 0 16px;
}

.hec-blogSingle__content h2 {
  margin: 32px 0 12px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--hec-text);
  scroll-margin-top: var(--hec-blog-sticky-top, 130px);
}

.hec-blogSingle__content h3 {
  margin: 24px 0 10px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--hec-text);
  scroll-margin-top: var(--hec-blog-sticky-top, 130px);
}

.hec-blogSingle__content a {
  color: var(--hec-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hec-blogSingle__content ul:not(.hec-blogSingle__tocList) {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.hec-blogSingle__content ul:not(.hec-blogSingle__tocList) > li {
  position: relative;
  padding-left: 28px;
  margin: 0 0 10px;
}

.hec-blogSingle__content ul:not(.hec-blogSingle__tocList) > li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: 800;
}

.hec-blogSingle__content img:not(.hec-blogSingle__leadImg) {
  border-radius: 16px;
  max-width: 100%;
  height: auto;
  width: auto;
  display: none;
}

/* Tags */
.hec-blogSingle__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 24px;
}

.hec-blogSingle__tagsLabel {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hec-muted);
}

.hec-blogSingle__tagsList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hec-blogSingle__tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(91, 75, 235, 0.08);
  color: var(--hec-primary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.hec-blogSingle__tag:hover,
.hec-blogSingle__tag:focus,
.hec-blogSingle__tag:focus-visible,
.hec-blogSingle__tag:active {
  background: rgba(91, 75, 235, 0.16);
  color: var(--hec-primary);
  text-decoration: none;
}

/* Share + author */
.hec-blogSingle__footer {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--hec-border);
}

.hec-blogSingle__share {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 24px;
}

.hec-blogSingle__shareLabel {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hec-muted);
}

.hec-blogSingle__shareActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hec-blogSingle__socialLink {
  width: 40px;
  height: 40px;
  border: 1px solid var(--hec-border);
  border-radius: 10px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.hec-blogSingle__socialLink:hover,
.hec-blogSingle__socialLink:focus,
.hec-blogSingle__socialLink:focus-visible,
.hec-blogSingle__socialLink:active {
  border-color: var(--hec-primary);
  background: rgba(91, 75, 235, 0.06);
  text-decoration: none;
}

.hec-blogSingle__socialIcon {
  width: 18px;
  height: 18px;
  display: block;
}

.hec-blogSingle__copyLink,
.bp-share-btn.hec-blogSingle__copyLink {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  cursor: pointer;
  color: var(--hec-text, #0f172a);
  font-family: inherit;
}

.hec-blogSingle__copyLink svg {
  width: 15px;
  height: 15px;
  display: block;
}

.hec-blogSingle__copyLink.is-copied {
  border-color: #20d997;
  background: rgba(32, 217, 151, 0.1);
  color: #0f766e;
}

.hec-blogSingle__authorBox {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid var(--hec-border);
  border-radius: 16px;
  padding: 20px 22px;
}

.hec-blogSingle__authorAvatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--hec-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.hec-blogSingle__authorLine {
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.hec-blogSingle__authorName {
  color: var(--hec-text);
  font-size: 16px;
}

.hec-blogSingle__authorRole {
  font-size: 13px;
  color: var(--hec-muted);
}

.hec-blogSingle__authorBio {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--hec-muted);
}

/* CTA sidebar */
.hec-blogSingle__ctaCard {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid pink;
  border-top: 4px solid pink;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  padding: 18px 18px 16px;
  text-align: center;
}

.hec-blogSingle__ctaBadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
  margin: 0 0 14px;
}

.hec-blogSingle__ctaDot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

.hec-blogSingle__ctaIcon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: rgba(91, 75, 235, 0.1);
  color: var(--hec-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hec-blogSingle__ctaHeading {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--hec-text);
}

.hec-blogSingle__ctaText {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--hec-muted);
}

/* Review summary (homepage-style social proof) */
.hec-blogSingle__ctaProof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 12px;
  border-top: 1px solid var(--hec-border);
  border-bottom: 1px solid var(--hec-border);
}

.hec-blogSingle__ctaProofAvatars {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.hec-blogSingle__ctaProofAvatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #eff0ec;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  color: var(--hec-text);
  margin-left: -10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.hec-blogSingle__ctaProofAvatar:first-child {
  margin-left: 0;
}

.hec-blogSingle__ctaProofRating {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  text-align: left;
}

.hec-blogSingle__ctaProofStars {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  color: var(--hec-primary);
  letter-spacing: 1px;
  font-size: 14px;
  line-height: 1;
}

.hec-blogSingle__ctaProofScore {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  font-weight: 900;
  font-size: 16px;
  color: var(--hec-text);
  line-height: 1;
}

.hec-blogSingle__ctaProofCount {
  grid-column: 1 / 3;
  grid-row: 2 / 3;
  font-size: 12px;
  font-weight: 700;
  color: var(--hec-text);
  white-space: nowrap;
}

.hec-blogSingle__ctaBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--hec-primary);
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(91, 75, 235, 0.35);
  margin: 0 0 14px;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.hec-blogSingle__ctaBtn:hover {
  background: var(--hec-primary-700, #4a3dd8);
  transform: translateY(-1px);
}

.hec-blogSingle__ctaTrust {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
  font-size: 12px;
  color: var(--hec-muted);
}

.hec-blogSingle__ctaTrust li {
  position: relative;
  padding-left: 18px;
  margin: 0 0 6px;
}

.hec-blogSingle__ctaTrust li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: 800;
}

@media (max-width: 1080px) {
  .hec-blogSingle__layout {
    grid-template-columns: 1fr;
  }

  .hec-blogSingle__toc,
  .hec-blogSingle__cta {
    position: static;
  }

  .hec-blogSingle__toc {
    order: 1;
  }

  .hec-blogSingle__main {
    order: 2;
  }

  .hec-blogSingle__cta {
    order: 3;
  }
}

@media (max-width: 640px) {
  .hec-blogSingle {
    padding-top: 24px;
  }

  .hec-blogSingle__title {
    font-size: 30px;
  }

  .hec-blogSingle__mediaFull img,
  .hec-blogSingle__leadImg {
    max-height: 280px;
  }

  .hec-blogSingle__authorBox {
    flex-direction: column;
  }
}
