/* Blog Detail Page v2 — scoped to .hv2-bd* classes only */

.hv2-bd {
  background: #fff;
  font-family: var(--hv2-font-family, 'Plus Jakarta Sans', sans-serif);
  padding-bottom: 0;
}

.hv2-bd__container {
  max-width: 820px;
}

/* ── Hero ── */
.hv2-bd__hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.hv2-bd__hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hv2-bd__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.72) 100%);
}

.hv2-bd__hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 1rem 2.75rem;
  max-width: 900px;
}

.hv2-bd__hero-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.hv2-bd__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  line-height: 1.3;
}

.hv2-bd__tag--primary {
  background: #ef4444;
  color: #fff;
}

.hv2-bd__tag--ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hv2-bd__hero-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.hv2-bd__hero-sub {
  margin: 0 auto 1.35rem;
  max-width: 640px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
}

.hv2-bd__hero-author {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-align: left;
}

.hv2-bd__hero-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hv2-bd__hero-author-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hv2-bd__hero-author-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}

.hv2-bd__hero-author-meta {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
}

/* ── Article content ── */
.hv2-bd__article {
  margin-bottom: 3rem;
}

.hv2-bd__content {
  font-size: 1rem;
  line-height: 1.75;
  color: #374151;
}

.hv2-bd__content p {
  margin-bottom: 1.15rem;
}

.hv2-bd__content h2,
.hv2-bd__content h3,
.hv2-bd__content h4 {
  color: #111827;
  font-weight: 700;
  line-height: 1.35;
  margin: 2rem 0 0.85rem;
}

.hv2-bd__content h2 {
  font-size: 1.45rem;
}

.hv2-bd__content h3 {
  font-size: 1.2rem;
}

.hv2-bd__content img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  margin: 1.5rem 0;
  display: block;
}

.hv2-bd__content ul,
.hv2-bd__content ol {
  margin-bottom: 1.15rem;
  padding-left: 1.35rem;
}

.hv2-bd__content li {
  margin-bottom: 0.4rem;
}

.hv2-bd__content blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.25rem;
  background: #f3e8ff;
  border-left: 4px solid #9333ea;
  border-radius: 0 14px 14px 0;
  color: #581c87;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.hv2-bd__content a {
  color: #2563eb;
  text-decoration: underline;
}

/* ── Inline newsletter ── */
.hv2-bd__newsletter {
  margin: 2.5rem 0;
}

.hv2-bd__newsletter-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 2.25rem 1.75rem;
  text-align: center;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.62)),
    url('../img/hv2/newsletter-bg.jpg');
  background-size: cover;
  background-position: center;
}

.hv2-bd__newsletter-wrap h3 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.hv2-bd__newsletter-wrap > p {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
}

.hv2-bd__newsletter-field {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 0.4rem;
  max-width: 460px;
  margin: 0 auto;
  gap: 0.35rem;
}

.hv2-bd__newsletter-field input[type="email"] {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 0.875rem;
  color: #111827;
  min-width: 0;
  padding: 0.55rem 0.75rem;
}

.hv2-bd__newsletter-field button {
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.6rem 1.15rem;
  cursor: pointer;
  white-space: nowrap;
}

.hv2-bd__newsletter-field button:hover {
  background: #1d4ed8;
}

/* ── Author box ── */
.hv2-bd__author-box {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.25rem 0;
  border-top: 1px solid #e5e7eb;
  margin-top: 1rem;
}

.hv2-bd__author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #dbeafe;
  color: #2563eb;
  font-size: 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hv2-bd__author-info strong {
  display: block;
  font-size: 0.9375rem;
  color: #111827;
  margin-bottom: 0.25rem;
}

.hv2-bd__author-info p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #6b7280;
}

/* ── Related posts ── */
.hv2-bd__related {
  background: #f8fafc;
  padding: 2.75rem 0 3rem;
}

.hv2-bd__related-head {
  margin-bottom: 1.5rem;
}

.hv2-bd__related-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
}

.hv2-bd__related-head p {
  margin: 0;
  font-size: 0.8125rem;
  color: #6b7280;
}

.hv2-bd__related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.hv2-bd__related-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
}

.hv2-bd__related-img-link {
  display: block;
  overflow: hidden;
}

.hv2-bd__related-img-link img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.hv2-bd__related-card:hover .hv2-bd__related-img-link img {
  transform: scale(1.04);
}

.hv2-bd__related-body {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hv2-bd__related-body h3 {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
}

.hv2-bd__related-body h3 a {
  color: #111827;
  text-decoration: none;
}

.hv2-bd__related-body h3 a:hover {
  color: #2563eb;
}

.hv2-bd__related-body p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #6b7280;
  flex: 1;
}

.hv2-bd__related-read {
  display: block;
  text-align: center;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #f3f4f6;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.hv2-bd__related-read:hover {
  color: #1d4ed8;
}

.hv2-bd__related-empty,
.hv2-bd__faq-empty {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
}

/* ── FAQ ── */
.hv2-bd__faq {
  padding: 2.5rem 0 3.5rem;
  background: #fff;
}

.hv2-bd__faq-list {
  max-width: 820px;
  margin: 0 auto;
}

.hv2-bd__faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: #fff;
}

.hv2-bd__faq-item h3 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 1rem 1.15rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  user-select: none;
}

.hv2-bd__faq-item h3 .num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hv2-bd__faq-item h3 .question {
  flex: 1;
  text-align: left;
}

.hv2-bd__faq-item h3 .faq-toggle {
  flex-shrink: 0;
  color: #9ca3af;
  font-size: 0.85rem;
  transition: transform 0.25s ease;
}

.hv2-bd__faq-item .faq-content {
  display: none;
  padding: 0 1.15rem 1rem 3.5rem;
}

.hv2-bd__faq-item .faq-content p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #4b5563;
}

.hv2-bd__faq-item.faq-active h3 .faq-toggle {
  transform: rotate(45deg);
}

.hv2-bd__faq-item.faq-active .faq-content {
  display: block;
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
  .hv2-bd__related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .hv2-bd__hero {
    min-height: 360px;
    margin-bottom: 1.75rem;
  }

  .hv2-bd__hero-inner {
    padding: 2.5rem 0.75rem 2rem;
  }

  .hv2-bd__newsletter-field {
    flex-direction: column;
    align-items: stretch;
    padding: 0.65rem;
  }

  .hv2-bd__newsletter-field button {
    width: 100%;
  }

  .hv2-bd__related-grid {
    grid-template-columns: 1fr;
  }

  .hv2-bd__faq-item .faq-content {
    padding-left: 1.15rem;
  }
}
