/* ═══════════════════════════════════════════════
   BLOG-DETAIL.CSS — Article Detail Page
   Vietnam City Breaks
   ═════════════════════════════════════════════ */

@keyframes kenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

/* ── Reading progress bar ── */
.bd-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  width: 0%;
  z-index: 9999;
  transition: width 0.12s linear;
  border-radius: 0 2px 2px 0;
}

/* ── Hero ── */
.bd-hero {
  position: relative;
  height: 480px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.bd-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  animation: kenBurns 18s ease-in-out infinite alternate;
}
.bd-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,.1) 100%);
}
.bd-hero-cnt {
  position: relative;
  z-index: 2;
  padding-bottom: 2.5rem;
  color: #fff;
  width: 100%;
}

/* Breadcrumb in hero */
.bd-breadcrumb {
  margin-bottom: .85rem;
}
.bd-breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  flex-wrap: wrap;
}
.bd-breadcrumb ol li:not(:last-child)::after {
  content: '/';
  margin: 0 .4rem;
  opacity: .5;
}
.bd-breadcrumb ol a {
  color: rgba(255,255,255,.65);
  transition: color .2s;
}
.bd-breadcrumb ol a:hover { color: #fff; }
.bd-breadcrumb ol li:last-child { color: rgba(255,255,255,.88); }

.bd-hero-cat {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .85rem;
}
.bd-hero-cnt h1 {
  font-family: var(--fh);
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 820px;
  text-shadow: 0 2px 16px rgba(0,0,0,.35);
}
.bd-meta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: .82rem;
  color: rgba(255,255,255,.78);
  flex-wrap: wrap;
}
.bd-meta-item {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.bd-meta-item svg { opacity: .75; flex-shrink: 0; }

/* ── Layout: article + sidebar ── */
.bd-layout {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
}

/* ── Article body ── */
.bd-article {
  flex: 1;
  min-width: 0;
  max-width: 780px;
}

/* Article content blocks */
.bd-lead {
  font-family: var(--fh);
  font-size: 1.13rem;
  line-height: 1.75;
  color: var(--text-h);
  font-weight: 500;
  margin-bottom: 1.6rem;
  padding-bottom: 1.6rem;
  border-bottom: 2px solid var(--border);
}
.bd-h2 {
  font-family: var(--fh);
  font-size: 1.42rem;
  font-weight: 800;
  color: var(--text-h);
  margin: 2rem 0 .75rem;
  line-height: 1.3;
  position: relative;
  padding-left: 1rem;
}
.bd-h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: .15em;
  bottom: .15em;
  width: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.bd-p {
  font-family: var(--fb);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-b);
  margin-bottom: 1.2rem;
}
.bd-pullquote {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 1.1rem 1.5rem;
  margin: 1.75rem 0;
  font-family: var(--fh);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-h);
  font-style: italic;
  line-height: 1.55;
}
.bd-figure {
  margin: 1.75rem 0;
  border-radius: 12px;
  overflow: hidden;
}
.bd-figure img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}
.bd-caption {
  font-size: .8rem;
  color: var(--text-m);
  text-align: center;
  padding: .6rem 1rem;
  background: var(--bg-soft);
  font-style: italic;
}

/* ── WP editor content (the_content) ──
   The block/classic editor emits plain <p>/<h2>/<blockquote>/<figure>; the
   prototype applied .bd-lead/.bd-h2/.bd-p via JS. Scope those styles onto the
   real elements so server-rendered articles match the prototype typography. */
.bd-article > p {
  font-family: var(--fb);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-b);
  margin-bottom: 1.2rem;
}
.bd-article > p:first-of-type { /* lead paragraph */
  font-family: var(--fh);
  font-size: 1.13rem;
  line-height: 1.75;
  color: var(--text-h);
  font-weight: 500;
  margin-bottom: 1.6rem;
  padding-bottom: 1.6rem;
  border-bottom: 2px solid var(--border);
}
.bd-article h2 {
  font-family: var(--fh);
  font-size: 1.42rem;
  font-weight: 800;
  color: var(--text-h);
  margin: 2rem 0 .75rem;
  line-height: 1.3;
  position: relative;
  padding-left: 1rem;
}
.bd-article h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: .15em;
  bottom: .15em;
  width: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.bd-article h3 {
  font-family: var(--fh);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-h);
  margin: 1.6rem 0 .6rem;
  line-height: 1.35;
}
.bd-article ul,
.bd-article ol {
  margin: 0 0 1.2rem 1.3rem;
  padding: 0;
}
.bd-article li {
  font-family: var(--fb);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-b);
  margin-bottom: .4rem;
}
.bd-article a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bd-article strong { color: var(--text-h); }
.bd-article blockquote {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 1.1rem 1.5rem;
  margin: 1.75rem 0;
  font-family: var(--fh);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-h);
  font-style: italic;
  line-height: 1.55;
}
.bd-article blockquote p { margin: 0; font: inherit; color: inherit; }
.bd-article figure,
.bd-article .wp-block-image {
  margin: 1.75rem 0;
  border-radius: 12px;
  overflow: hidden;
}
.bd-article figure img,
.bd-article > img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}
.bd-article figure img { border-radius: 0; }
.bd-article figcaption {
  font-size: .8rem;
  color: var(--text-m);
  text-align: center;
  padding: .6rem 1rem;
  background: var(--bg-soft);
  font-style: italic;
}

/* Article footer: tags + share */
.bd-article-footer {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.bd-tags {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.bd-tag-lbl {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-m);
  margin-right: .25rem;
}
.bd-tag {
  font-size: .75rem;
  font-weight: 600;
  padding: .28rem .75rem;
  border-radius: 20px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  color: var(--text-b);
  transition: all .2s;
}
.bd-tag:hover {
  background: var(--secondary-light);
  border-color: var(--secondary);
  color: var(--secondary);
}

/* Inline CTA — mobile only (desktop uses sticky sidebar CTA) */
.bd-inline-cta {
  display: none;
  flex-direction: column;
  gap: .85rem;
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
}
.bd-inline-cta-txt strong {
  display: block;
  font-family: var(--fh);
  font-size: 1.02rem;
  font-weight: 800;
  margin-bottom: .25rem;
}
.bd-inline-cta-txt span {
  font-size: .85rem;
  opacity: .9;
  line-height: 1.5;
}
.bd-inline-cta-btn {
  display: block;
  width: 100%;
  background: #fff;
  color: var(--primary);
  font-family: var(--fh);
  font-size: .9rem;
  font-weight: 700;
  padding: .8rem 1rem;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  transition: all .2s;
}
.bd-inline-cta-btn:hover {
  background: rgba(255,255,255,.92);
  transform: translateY(-1px);
}

/* ── Sticky Sidebar ── */
.bd-sidebar {
  width: 300px;
  min-width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* CTA box */
.bd-cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 16px;
  padding: 1.5rem;
  color: #fff;
  text-align: center;
}
.bd-cta-icon {
  font-size: 2rem;
  margin-bottom: .5rem;
}
.bd-cta-box h3 {
  font-family: var(--fh);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: .4rem;
  line-height: 1.3;
}
.bd-cta-box p {
  font-size: .83rem;
  opacity: .88;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.bd-cta-btn {
  display: block;
  width: 100%;
  background: #fff;
  color: var(--primary);
  font-family: var(--fh);
  font-size: .88rem;
  font-weight: 700;
  padding: .75rem 1rem;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  transition: all .2s;
  box-sizing: border-box;
}
.bd-cta-btn:hover {
  background: rgba(255,255,255,.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

/* Share box */
.bd-sb-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--sh-card);
  padding: 1.15rem;
}
.bd-sb-title {
  font-family: var(--fh);
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-h);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .85rem;
}
.bd-share-btns {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.bd-share-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 600;
  padding: .45rem .8rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-b);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  line-height: 1;
}
.bd-share-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.bd-share-btn.copied { background: var(--secondary-light); border-color: var(--secondary); color: var(--secondary); }

/* Related mini list in sidebar */
.bd-related-mini-list {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.bd-mini-item {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  text-decoration: none;
  transition: opacity .2s;
}
.bd-mini-item:hover { opacity: .8; }
.bd-mini-thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.bd-mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bd-mini-info { flex: 1; min-width: 0; }
.bd-mini-cat {
  font-size: .68rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .15rem;
}
.bd-mini-title {
  font-family: var(--fh);
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-h);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}
.bd-mini-item:hover .bd-mini-title { color: var(--primary); }
.bd-mini-date { font-size: .72rem; color: var(--text-m); margin-top: .2rem; }

/* Author card */
.bd-author-inner {
  display: flex;
  gap: .85rem;
  align-items: center;
}
.bd-author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--fh);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
}
.bd-author-name {
  font-family: var(--fh);
  font-size: .92rem;
  font-weight: 700;
  color: var(--text-h);
}
.bd-author-role {
  font-size: .78rem;
  color: var(--text-m);
  margin-top: .1rem;
}

/* ── Related section (bottom) ── */
.bd-related-section {
  background: var(--bg-soft);
  padding: 3.5rem 0;
}
.bd-related-section .section-hd {
  text-align: center;
  margin-bottom: 2rem;
}
.bd-related-section .section-hd h2 {
  font-family: var(--fh);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 800;
  color: var(--text-h);
  margin-bottom: .35rem;
}
.bd-related-section .section-hd p {
  color: var(--text-m);
  font-size: .9rem;
}
/* override home.css blog-grid columns for related section */
.bd-related-section .blog-grid {
  grid-template-columns: repeat(3, 1fr);
}
.bd-related-section .bl-img { height: 220px; }

/* ── 404 / error state ── */
.bd-error {
  text-align: center;
  padding: 5rem 1rem;
  max-width: 520px;
  margin: 0 auto;
}
.bd-error h2 {
  font-family: var(--fh);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-h);
  margin-bottom: .75rem;
}
.bd-error p { color: var(--text-m); margin-bottom: 1.5rem; }

/* ── Widget area (Blog Detail Sidebar — vcb-blog-detail) ── */
.bd-sidebar .widget {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--sh-card);
  padding: 1.15rem;
}
.bd-sidebar .widget-title {
  font-family: var(--fh);
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-h);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .85rem;
}
.bd-sidebar .widget a { color: var(--secondary); transition: color .2s; }
.bd-sidebar .widget a:hover { color: var(--primary); }
.bd-sidebar .widget ul,
.bd-sidebar .widget ol { list-style: none; margin: 0; padding: 0; }
.bd-sidebar .widget li { margin-bottom: .5rem; font-size: .9rem; line-height: 1.5; }
.bd-sidebar .widget img { max-width: 100%; height: auto; border-radius: 10px; }
.bd-sidebar .widget .wp-block-social-links { gap: .4rem; }

/* ── Responsive ── */
@media(max-width:1024px) {
  .bd-sidebar { width: 260px; min-width: 260px; }
}
@media(max-width:768px) {
  .bd-hero { height: 360px; }
  .bd-layout {
    flex-direction: column;
    padding: 1.5rem 0 3rem;
    gap: 0;
  }
  .bd-sidebar {
    display: none;
  }
  .bd-inline-cta {
    display: flex;
  }
  .bd-related-section .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bd-figure img { height: 220px; }
}
@media(max-width:480px) {
  .bd-hero { height: 300px; }
  .bd-hero-cnt h1 { font-size: 1.35rem; }
  .bd-related-section .blog-grid { grid-template-columns: 1fr; }
  .bd-figure img { height: 180px; }
}
@media(prefers-reduced-motion:reduce) {
  .bd-hero-bg { animation: none; }
  .bd-progress { transition: none; }
}

/* ── Simple hero variant (no background image): breadcrumb → H1 (28px) → meta ──
   Placed last so it overrides the dark photo-hero rules + responsive heights. */
.bd-hero.bd-hero--plain {
  height: auto;
  display: block;
  overflow: visible;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 1.75rem 0 1.5rem;
}
.bd-hero--plain .bd-hero-cnt {
  padding-bottom: 0;
  color: var(--text-b);
}
.bd-hero--plain .bd-breadcrumb ol,
.bd-hero--plain .bd-breadcrumb ol a { color: var(--text-m); }
.bd-hero--plain .bd-breadcrumb ol a:hover { color: var(--primary); }
.bd-hero--plain .bd-breadcrumb ol li:last-child { color: var(--text-b); }
.bd-hero--plain .bd-hero-cnt h1 {
  font-size: 28px;
  color: var(--text-h);
  text-shadow: none;
  margin-bottom: .75rem;
}
.bd-hero--plain .bd-meta { color: var(--text-m); }
.bd-hero--plain .bd-meta-item svg { opacity: .7; }
