/* ================================================================
   QUALZY — Blog Styles
   Index listing + individual post pages
   ================================================================ */


/* ── BLOG INDEX HERO
   ---------------------------------------------------------------- */
.bl-hero {
  background: var(--dk);
  padding: 120px 80px 80px;
  text-align: center;
}

.bl-hero .slbl { color: var(--ol); }

.bl-hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 900;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.bl-hero-title em {
  font-style: italic;
  color: var(--ol);
}

.bl-hero-sub {
  font-size: clamp(15px, 1.8vw, 18px);
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}


/* ── FEATURED POST
   ---------------------------------------------------------------- */
.bl-featured {
  padding: 64px 80px;
  background: var(--wh);
  border-bottom: 1px solid var(--rule);
}

.bl-featured-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.bl-feat-img {
  aspect-ratio: 16/10;
  background: var(--op);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.bl-feat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bl-feat-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--op) 0%, var(--om) 100%);
}

.bl-feat-img-placeholder svg {
  width: 64px;
  height: 64px;
  color: var(--o);
  opacity: 0.4;
}

.bl-feat-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bl-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--o);
  text-decoration: none;
}

.bl-cat:hover { color: var(--o2); }

.bl-feat-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 700;
  color: var(--dk);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: block;
  transition: color var(--t-fast);
}

.bl-feat-title:hover { color: var(--o); }

.bl-feat-excerpt {
  font-size: 16px;
  color: var(--mid);
  line-height: 1.65;
}

.bl-feat-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--mu);
  padding-top: 4px;
  border-top: 1px solid var(--rule);
}

.bl-feat-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--rule);
  flex-shrink: 0;
}

.bl-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--o);
  text-decoration: none;
  margin-top: 4px;
  transition: gap var(--t-fast), color var(--t-fast);
}

.bl-read-more:hover { gap: 12px; color: var(--o2); }


/* ── FILTER BAR
   ---------------------------------------------------------------- */
.bl-filters {
  padding: 28px 80px;
  background: #fff;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 64px;
  z-index: 10;
}

.bl-filters-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.bl-filters-inner::-webkit-scrollbar { display: none; }

.bl-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--rule);
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--mu);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-fast);
  flex-shrink: 0;
}

.bl-filter-btn:hover {
  border-color: var(--o);
  color: var(--o);
}

.bl-filter-btn.is-active {
  background: var(--o);
  border-color: var(--o);
  color: #fff;
}

.bl-filter-count {
  font-size: 11px;
  opacity: 0.7;
}


/* ── POST GRID
   ---------------------------------------------------------------- */
.bl-grid-section {
  padding: 64px 80px 100px;
  background: var(--wh);
}

.bl-grid-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.bl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* No-results message */
.bl-no-results {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 0;
  color: var(--mu);
  font-size: 16px;
}

.bl-no-results.is-visible { display: block; }


/* ── POST CARD
   ---------------------------------------------------------------- */
.bl-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--rule);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Inner link variant — used in some articles where the card wrapper is
   an <article> and the <a class="bl-card-link"> is nested inside */
.bl-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.bl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  border-color: transparent;
}

.bl-card-img {
  aspect-ratio: 16/9;
  background: var(--op);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.bl-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.bl-card:hover .bl-card-img img { transform: scale(1.04); }

.bl-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--op) 0%, var(--om) 100%);
}

.bl-card-img-placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--o);
  opacity: 0.35;
}

.bl-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.bl-card-cat {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--o);
}

.bl-card-title {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 700;
  color: var(--dk);
  line-height: 1.25;
  letter-spacing: -0.01em;
  transition: color var(--t-fast);
}

.bl-card:hover .bl-card-title { color: var(--o); }

.bl-card-excerpt {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.bl-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--mu);
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  margin-top: auto;
  flex-wrap: wrap;
}

.bl-card-meta-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--mu);
  opacity: 0.5;
  flex-shrink: 0;
}


/* ── CATEGORY COLOUR VARIANTS
   ---------------------------------------------------------------- */
[data-cat="ai"] .bl-card-cat,
[data-cat="ai"] .bl-cat { color: #7C3AED; }

[data-cat="ai"] .bl-card-img-placeholder,
[data-cat="ai"] .bl-feat-img-placeholder {
  background: linear-gradient(135deg, #F5F0FF 0%, #EDE9FF 100%);
}

[data-cat="ai"] .bl-card-img-placeholder svg,
[data-cat="ai"] .bl-feat-img-placeholder svg { color: #7C3AED; }

[data-cat="platform"] .bl-card-cat,
[data-cat="platform"] .bl-cat { color: var(--o); }

[data-cat="research"] .bl-card-cat,
[data-cat="research"] .bl-cat { color: #0D7A5F; }

[data-cat="research"] .bl-card-img-placeholder,
[data-cat="research"] .bl-feat-img-placeholder {
  background: linear-gradient(135deg, #EDFBF6 0%, #D6F5EB 100%);
}

[data-cat="research"] .bl-card-img-placeholder svg,
[data-cat="research"] .bl-feat-img-placeholder svg { color: #0D7A5F; }

[data-cat="industry"] .bl-card-cat,
[data-cat="industry"] .bl-cat { color: #1E6FBA; }

[data-cat="industry"] .bl-card-img-placeholder,
[data-cat="industry"] .bl-feat-img-placeholder {
  background: linear-gradient(135deg, #EBF4FF 0%, #D6EAFF 100%);
}

[data-cat="industry"] .bl-card-img-placeholder svg,
[data-cat="industry"] .bl-feat-img-placeholder svg { color: #1E6FBA; }


/* ── POST PAGE — HEADER
   ---------------------------------------------------------------- */
.bp-header {
  background: #fff;
  border-bottom: 1px solid var(--rule);
  padding: 120px 80px 64px;
}

.bp-header-inner {
  max-width: 860px;
  margin: 0 auto;
}

/* Breadcrumb hidden — global nav handles site navigation;
   bp-header-cat serves as the back-to-blog indicator */
.bp-breadcrumb { display: none; }

.bp-header-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--mu);
  margin-bottom: 24px;
  text-decoration: none;
  transition: color var(--t-fast);
}

.bp-header-cat::before {
  content: '←';
  font-size: 14px;
  color: var(--mu);
  transition: color var(--t-fast), transform var(--t-fast);
  display: inline-block;
}

.bp-header-cat:hover { color: var(--o); }
.bp-header-cat:hover::before { color: var(--o); transform: translateX(-3px); }

.bp-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  color: var(--dk);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.bp-title em {
  font-style: italic;
  color: var(--o);
}

.bp-lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--mid);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 860px;
}

.bp-byline {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.bp-byline-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--op);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--o);
}

.bp-byline-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bp-byline-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--dk);
}

.bp-byline-detail {
  font-size: 12.5px;
  color: var(--mu);
}


/* ── POST PAGE — CONTENT
   ---------------------------------------------------------------- */
.bp-content-wrap {
  background: #fff;
  padding: 72px 80px 80px;
}

.bp-content-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 80px;
  align-items: start;
}

.bp-content {
  max-width: 720px;
}

/* Prose styles */
.bp-body h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 700;
  color: var(--dk);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 52px 0 18px;
}

.bp-body h3 {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 700;
  color: var(--dk);
  line-height: 1.3;
  margin: 36px 0 14px;
}

.bp-body p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--mid);
  margin-bottom: 24px;
}

.bp-body p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 4em;
  line-height: 0.75;
  padding-right: 10px;
  padding-top: 8px;
  color: var(--o);
  font-weight: 700;
}

/* ── POST FEATURE IMAGE (between dark header and content)
   ---------------------------------------------------------------- */
.bp-feature-img {
  width: 100%;
  height: 420px;
  overflow: hidden;
  flex-shrink: 0;
}

.bp-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bp-body ul,
.bp-body ol {
  margin: 0 0 24px 0;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bp-body li {
  font-size: 17px;
  line-height: 1.65;
  color: var(--mid);
}

.bp-body a {
  color: var(--o);
  text-decoration: underline;
  text-decoration-color: rgba(250,88,2,0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--t-fast), color var(--t-fast);
}

.bp-body a:hover {
  color: var(--o2);
  text-decoration-color: var(--o2);
}

.bp-body blockquote {
  border-left: 3px solid var(--o);
  margin: 36px 0;
  padding: 20px 28px;
  background: var(--op);
  border-radius: 0 8px 8px 0;
}

.bp-body blockquote p {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.5vw, 18px);
  font-style: normal;
  font-weight: 500;
  color: var(--dk);
  line-height: 1.65;
  margin-bottom: 0;
}

.bp-body blockquote p::before {
  content: '\201C';
  color: var(--o);
  font-size: 1.3em;
  line-height: 0;
  margin-right: 3px;
  vertical-align: -0.15em;
}

.bp-body blockquote p::after {
  content: '\201D';
  color: var(--o);
  font-size: 1.3em;
  line-height: 0;
  margin-left: 3px;
  vertical-align: -0.15em;
}

.bp-body blockquote p::first-letter {
  float: none;
  font-size: inherit;
  line-height: inherit;
  padding: 0;
  color: inherit;
}

.bp-body strong { color: var(--dk); font-weight: 600; }

.bp-body img {
  border-radius: 8px;
  margin: 36px 0;
  width: 100%;
}

.bp-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 48px 0;
}


/* ── POST SIDEBAR
   ---------------------------------------------------------------- */
.bp-sidebar {
  position: sticky;
  top: 100px;
}

.bp-sidebar-block {
  background: var(--wh);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.bp-sidebar-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mu);
  margin-bottom: 16px;
}

.bp-sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bp-sidebar-link {
  font-size: 13.5px;
  color: var(--dk);
  text-decoration: none;
  line-height: 1.4;
  transition: color var(--t-fast);
  padding-left: 12px;
  border-left: 2px solid var(--rule);
}

.bp-sidebar-link:hover {
  color: var(--o);
  border-left-color: var(--o);
}

.bp-sidebar-cta {
  background: var(--o);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.bp-sidebar-cta p {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.4;
}

.bp-sidebar-cta a {
  display: block;
  background: #fff;
  color: var(--o);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity var(--t-fast);
}

.bp-sidebar-cta a:hover { opacity: 0.9; }


/* ── POST TAGS
   ---------------------------------------------------------------- */
.bp-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.bp-tag-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mu);
}

.bp-tag {
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid var(--rule);
  font-size: 12.5px;
  color: var(--mid);
  text-decoration: none;
  transition: all var(--t-fast);
}

.bp-tag:hover {
  border-color: var(--o);
  color: var(--o);
}


/* ── RELATED POSTS
   ---------------------------------------------------------------- */
.bp-related {
  background: var(--wh);
  padding: 72px 80px;
  border-top: 1px solid var(--rule);
}

.bp-related-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.bp-related-head {
  margin-bottom: 40px;
}

.bp-related-head h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  color: var(--dk);
  margin-top: 8px;
}

.bp-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}


/* ── CTA BAND (blog pages use section.ctab + ctab-inn pattern)
   ---------------------------------------------------------------- */
section.ctab {
  background: var(--dk);
  padding: 80px;
}

section.ctab .ctab-inn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

section.ctab .ctab-text .slbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

section.ctab .ctab-text h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

section.ctab .ctab-text p {
  font-size: clamp(14px, 1.5vw, 16px);
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 0;
}

section.ctab .ctab-btns {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}


/* ── RESPONSIVE
   ---------------------------------------------------------------- */

/* Tablet */
@media (max-width: 1024px) {
  .bl-hero { padding: 100px 40px 64px; }
  .bl-featured { padding: 48px 40px; }
  .bl-featured-inner { gap: 40px; }
  .bl-filters { padding: 20px 40px; }
  .bl-grid-section { padding: 48px 40px 80px; }
  .bl-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }

  .bp-header { padding: 100px 40px 56px; }
  .bp-content-wrap { padding: 56px 40px 64px; }
  .bp-content-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .bp-sidebar { position: static; }
  .bp-sidebar-block, .bp-sidebar-cta { max-width: 560px; }
  .bp-related { padding: 56px 40px; }
  .bp-related-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  section.ctab { padding: 56px 40px; }
}

/* Author bio */
.bp-author-bio {
  margin-top: 48px;
  padding: 24px 28px;
  background: var(--op);
  border-radius: 12px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.bp-author-bio-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--o);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}
.bp-author-bio-info { flex: 1; }
.bp-author-bio-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--o);
  margin-bottom: 4px;
}
.bp-author-bio-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--dk);
  margin-bottom: 6px;
}
.bp-author-bio-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--mu);
}
.bp-author-bio-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--o);
  text-decoration: none;
}
.bp-author-bio-link:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 640px) {
  .bp-feature-img { height: 220px; }
  .bl-hero { padding: 88px 20px 48px; }
  .bl-featured { padding: 36px 20px; }
  .bl-featured-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .bl-feat-img { order: -1; }
  .bl-filters { padding: 16px 20px; top: 56px; }
  .bl-grid-section { padding: 36px 20px 64px; }
  .bl-grid { grid-template-columns: 1fr; gap: 20px; }

  .bp-header { padding: 88px 20px 48px; }
  .bp-content-wrap { padding: 36px 20px 48px; }
  .bp-body p { font-size: 16px; }
  .bp-body p:first-child::first-letter {
    font-size: 3.2em;
  }
  .bp-related { padding: 48px 20px; }
  .bp-related-grid { grid-template-columns: 1fr; }

  .bl-feat-meta { flex-wrap: wrap; gap: 8px; }

  section.ctab { padding: 48px 20px; }
  section.ctab .ctab-inn { flex-direction: column; align-items: flex-start; gap: 28px; }
}
