/* ==========================================================================
   Phase 2: Blog & Editorial Module Styles (/blogs & /blogs/{slug})
   ========================================================================== */

/* 1. Editorial Hero & Search/Filter Header */
.hp-blog-hero {
  background: linear-gradient(135deg, #fdf4f8 0%, #f5f0ff 100%);
  padding: 28px 0 36px;
  border-bottom: 1px solid var(--hp-border);
}

.hp-blog-hero-inner {
  max-width: 860px;
  margin: 12px auto 0;
  text-align: center;
}

.hp-blog-hero-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--hp-purple-dark);
  margin: 0 0 10px;
  line-height: 1.2;
}

.hp-blog-hero-subtitle {
  font-size: 16px;
  color: var(--hp-text-secondary);
  max-width: 680px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.hp-blog-search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px auto;
  gap: 10px;
  background: #ffffff;
  padding: 10px;
  border-radius: var(--hp-radius-lg);
  box-shadow: var(--hp-shadow-md);
  border: 1px solid var(--hp-border);
  margin-bottom: 20px;
}

.hp-blog-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.hp-blog-search-input-wrap i {
  position: absolute;
  left: 14px;
  color: var(--hp-text-muted);
  pointer-events: none;
}

.hp-blog-search-input-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-md);
  font-size: 14px;
  color: var(--hp-text-primary);
}

.hp-blog-search-input-wrap input:focus {
  outline: none;
  border-color: var(--hp-purple);
}

.hp-blog-category-select-wrap select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-md);
  font-size: 14px;
  color: var(--hp-text-primary);
  background-color: #ffffff;
}

/* Topic Hub Filter Pills */
.hp-blog-hub-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.hp-blog-hub-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--hp-radius-pill);
  border: 1px solid var(--hp-border-strong);
  background: #ffffff;
  color: var(--hp-text-secondary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hp-blog-hub-pill:hover {
  border-color: var(--hp-purple);
  color: var(--hp-purple);
}

.hp-blog-hub-pill.is-active {
  background: var(--hp-purple);
  border-color: var(--hp-purple);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(97, 46, 149, 0.22);
}

/* 2. Featured Spotlight Grid */
.hp-blog-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.hp-blog-spotlight-card {
  background: #ffffff;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-lg);
  overflow: hidden;
  box-shadow: var(--hp-shadow-sm);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hp-blog-spotlight-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--hp-shadow-md);
}

.hp-blog-spotlight-image {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: #f3f4f6;
}

.hp-blog-spotlight-image > a {
  display: block;
  width: 100%;
  height: 100%;
}

.hp-blog-spotlight-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hp-blog-spotlight-card:hover .hp-blog-spotlight-image img {
  transform: scale(1.03);
}

.hp-blog-spotlight-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hp-blog-spotlight-body h3 {
  font-size: 20px;
  line-height: 1.35;
  margin: 8px 0 10px;
}

.hp-blog-spotlight-body h3 a {
  color: var(--hp-text-primary);
  text-decoration: none;
}

.hp-blog-spotlight-body h3 a:hover {
  color: var(--hp-purple);
}

.hp-blog-spotlight-body p {
  font-size: 14px;
  color: var(--hp-text-secondary);
  line-height: 1.6;
  margin: 0 0 18px;
  flex: 1;
}

.hp-blog-spotlight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--hp-border);
}

.hp-blog-spotlight-provider {
  font-size: 12px;
  font-weight: 700;
  color: var(--hp-purple);
  text-decoration: none;
}

.hp-blog-spotlight-provider:hover {
  text-decoration: underline;
}

/* 3. Blog Article Cards Grid (.hp-blog-cards-grid) */
.hp-blog-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.hp-blog-card {
  background: #ffffff;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: var(--hp-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hp-blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--hp-shadow-md);
}

.hp-blog-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #f3f4f6;
}

.hp-blog-card-image > a {
  display: block;
  width: 100%;
  height: 100%;
}

.hp-blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hp-blog-card:hover .hp-blog-card-image img {
  transform: scale(1.04);
}

.hp-blog-card-hub-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(97, 46, 149, 0.92);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--hp-radius-pill);
  pointer-events: none;
}

.hp-blog-card-external-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(17, 24, 39, 0.85);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--hp-radius-sm);
}

.hp-blog-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hp-blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--hp-text-muted);
}

.hp-blog-card-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.38;
  margin: 8px 0;
}

.hp-blog-card-title a {
  color: var(--hp-text-primary);
  text-decoration: none;
}

.hp-blog-card-title a:hover {
  color: var(--hp-purple);
}

.hp-blog-card-excerpt {
  font-size: 13.5px;
  color: var(--hp-text-secondary);
  line-height: 1.55;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.hp-blog-card-expert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--hp-border);
  margin-top: auto;
}

.hp-blog-card-expert-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--hp-purple-tint);
  color: var(--hp-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.hp-blog-card-expert-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hp-blog-card-expert-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--hp-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-blog-card-provider-link {
  font-size: 11.5px;
  color: var(--hp-purple);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-blog-card-provider-link:hover {
  text-decoration: underline;
}

/* Filtered View Toolbar */
.hp-blog-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--hp-border);
}

/* ==========================================================================
   4. Native Article Reader (/blogs/{slug})
   ========================================================================== */

.hp-reading-progress-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(97, 46, 149, 0.1);
  z-index: 1200;
}

.hp-reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--hp-purple) 0%, var(--hp-pink-deep) 100%);
  transition: width 0.1s linear;
}

.hp-blog-article-header {
  padding: 24px 0 20px;
}

.hp-blog-article-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 12px;
}

.hp-blog-article-title {
  font-size: clamp(26px, 3.8vw, 40px);
  font-weight: 800;
  color: var(--hp-text-primary);
  line-height: 1.22;
  margin: 0 0 10px;
  max-width: 920px;
}

.hp-blog-article-subtitle {
  font-size: 18px;
  color: var(--hp-text-secondary);
  line-height: 1.55;
  margin: 0 0 20px;
  max-width: 840px;
}

.hp-blog-reviewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: #faf7ff;
  border: 1px solid #e9d8fd;
  border-radius: var(--hp-radius-md);
}

.hp-blog-reviewer-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hp-blog-reviewer-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--hp-purple);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.hp-blog-reviewer-line {
  font-size: 14px;
  color: var(--hp-text-primary);
}

.hp-blog-reviewer-role {
  color: var(--hp-text-secondary);
  font-size: 13px;
}

.hp-blog-reviewer-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--hp-text-muted);
  margin-top: 3px;
}

.hp-blog-reviewer-sub a {
  color: var(--hp-purple);
  font-weight: 700;
  text-decoration: none;
}

.hp-blog-share-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hp-blog-hero-figure {
  margin: 8px 0 32px;
  border-radius: var(--hp-radius-lg);
  overflow: hidden;
  max-height: 460px;
  background: #f3f4f6;
  box-shadow: var(--hp-shadow-sm);
}

.hp-blog-hero-figure img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  display: block;
}

/* Two-Column Article + Sidebar Grid */
.hp-blog-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px;
  align-items: start;
  padding-bottom: 48px;
}

.hp-blog-main-col {
  min-width: 0;
  max-width: 100%;
}

/* Table of Contents Card */
.hp-blog-toc-card {
  background: #fdf8fa;
  border: 1px solid #f7dce7;
  border-left: 4px solid var(--hp-purple);
  border-radius: var(--hp-radius-md);
  padding: 18px 22px;
  margin-bottom: 28px;
}

.hp-blog-toc-title {
  font-weight: 800;
  font-size: 15px;
  color: var(--hp-purple-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hp-blog-toc-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hp-blog-toc-link {
  color: var(--hp-text-secondary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.hp-blog-toc-link:hover {
  color: var(--hp-purple);
  text-decoration: underline;
}

.hp-blog-external-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: var(--hp-radius-md);
  margin-bottom: 24px;
}

/* Editorial Long-Form Serif Content */
.hp-blog-article-content {
  font-family: 'Merriweather', Georgia, Cambria, serif;
  font-size: 18px;
  line-height: 1.82;
  color: #1f2937;
}

.hp-blog-article-content h2 {
  font-family: var(--hp-font-sans);
  font-size: 24px;
  font-weight: 800;
  color: var(--hp-purple-dark);
  margin: 34px 0 14px;
  line-height: 1.3;
  scroll-margin-top: 96px;
}

.hp-blog-article-content h3 {
  font-family: var(--hp-font-sans);
  font-size: 20px;
  font-weight: 700;
  color: var(--hp-text-primary);
  margin: 26px 0 10px;
}

.hp-blog-article-content p {
  margin: 0 0 20px;
}

.hp-blog-article-content blockquote {
  margin: 26px 0;
  padding: 18px 24px;
  background: #faf5ff;
  border-left: 4px solid var(--hp-purple);
  border-radius: 0 var(--hp-radius-md) var(--hp-radius-md) 0;
  font-style: italic;
  color: var(--hp-purple-dark);
  font-size: 17px;
}

/* In-Article Featured Expert Card */
.hp-blog-expert-card {
  margin: 36px 0 28px;
  background: linear-gradient(135deg, #ffffff 0%, #fcf8ff 100%);
  border: 2px solid #e9d8fd;
  border-radius: var(--hp-radius-lg);
  padding: 24px;
  box-shadow: var(--hp-shadow-sm);
}

.hp-blog-expert-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hp-purple);
  margin-bottom: 10px;
}

.hp-blog-expert-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.hp-blog-expert-card-info {
  flex: 1;
  min-width: 260px;
}

.hp-blog-expert-card-info h3 {
  font-size: 20px;
  margin: 0 0 6px;
  color: var(--hp-text-primary);
}

.hp-blog-expert-card-specialist {
  font-size: 14px;
  color: var(--hp-purple);
  margin: 0 0 8px;
}

.hp-blog-expert-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--hp-text-secondary);
}

.hp-blog-expert-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 230px;
}

/* Article Footer Tags & Share */
.hp-blog-article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  margin-top: 28px;
  border-top: 1px solid var(--hp-border);
}

.hp-blog-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hp-blog-tag-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--hp-radius-pill);
  background: #f3f4f6;
  color: var(--hp-text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.hp-blog-tag-chip:hover {
  background: var(--hp-purple-tint);
  color: var(--hp-purple);
}

/* Right Sticky Sidebar */
.hp-blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 92px;
  min-width: 0;
}

.hp-blog-sidebar-card {
  background: #ffffff;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-lg);
  padding: 20px;
  box-shadow: var(--hp-shadow-sm);
}

.hp-blog-ad-banner {
  display: block;
  text-decoration: none;
  background: linear-gradient(135deg, #fdf2f8 0%, #f5f3ff 100%);
  border: 1px solid #f5d0fe;
  border-radius: var(--hp-radius-md);
  padding: 16px;
  transition: transform 0.2s ease;
}

.hp-blog-ad-banner:hover {
  transform: translateY(-2px);
}

.hp-blog-recent-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hp-blog-recent-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-decoration: none;
}

.hp-blog-recent-item img {
  width: 72px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--hp-radius-sm);
}

.hp-blog-recent-hub {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--hp-purple);
  margin-bottom: 2px;
}

.hp-blog-recent-item h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--hp-text-primary);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hp-blog-recent-item:hover h4 {
  color: var(--hp-purple);
}

.hp-blog-related-providers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
  .hp-blog-search-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .hp-blog-spotlight-grid,
  .hp-blog-cards-grid,
  .hp-blog-related-providers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hp-blog-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hp-blog-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .hp-blog-spotlight-grid,
  .hp-blog-cards-grid,
  .hp-blog-related-providers-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hp-blog-hero-figure img {
    height: 240px;
  }

  .hp-blog-article-content {
    font-size: 16.5px;
  }

  .hp-blog-expert-card-actions {
    width: 100%;
  }
}
