/* ============================================================
   Blog Post Detail Page — VietnamTourPackage.sg
   Requires: blog.css (for .blog-listing-grid, .blog-card etc.)
   ============================================================ */

/* ---- Hero ---- */

.post-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
}

.post-hero-img {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.post-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 14, 26, 0.2) 0%,
    rgba(10, 14, 26, 0.75) 100%
  );
}

.post-hero-content {
  position: relative;
  width: 100%;
  padding: var(--space-12) 0 var(--space-10);
}

.breadcrumb--light ol {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
}

.breadcrumb--light a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb--light a:hover {
  color: var(--amber-300);
}

.post-hero-cat {
  display: inline-block;
  background: var(--amber-500);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  margin-bottom: var(--space-4);
}

.post-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 var(--space-5);
  max-width: 800px;
}

.post-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
}

.post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.post-meta-sep {
  opacity: 0.45;
}

/* ---- Main Layout ---- */

.post-main {
  padding: var(--space-12) 0 var(--space-16);
  background: var(--color-bg-warm);
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

@media (min-width: 960px) {
  .post-layout {
    grid-template-columns: 1fr 340px;
    gap: var(--space-10);
    align-items: start;
  }
}

/* ---- Article Content ---- */

.post-content {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--color-border-default);
  padding: var(--space-10);
}

.post-lede {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink-800);
  line-height: 1.7;
  margin: 0 0 var(--space-8);
}

.post-intro {
  font-size: 1.025rem;
  color: var(--sand-800);
  line-height: 1.75;
  margin: 0 0 var(--space-6);
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--ink-900);
  margin: var(--space-10) 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-default);
  line-height: 1.25;
}

.post-content h2:first-child {
  margin-top: 0;
}

.post-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink-800);
  margin: var(--space-8) 0 var(--space-3);
}

.post-content p {
  font-size: 0.975rem;
  line-height: 1.8;
  color: var(--sand-800);
  margin: 0 0 var(--space-5);
}

.post-content ul,
.post-content ol {
  padding-left: var(--space-6);
  margin: 0 0 var(--space-5);
}

.post-content li {
  font-size: 0.975rem;
  line-height: 1.75;
  color: var(--sand-800);
  margin-bottom: var(--space-2);
}

/* ---- Tables ---- */

.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0 0 var(--space-6);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border-default);
}

.post-content thead {
  background: var(--amber-500);
  color: #fff;
}

.post-content thead th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.83rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.post-content tbody tr {
  border-top: 1px solid var(--color-border-default);
}

.post-content tbody tr:nth-child(even) {
  background: var(--sand-50);
}

.post-content tbody td {
  padding: 0.6rem 1rem;
  color: var(--sand-800);
  vertical-align: top;
  line-height: 1.5;
}

/* ---- Inline links ---- */

.post-content a {
  color: var(--amber-600);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.2s;
}

.post-content a:hover {
  color: var(--amber-800);
}

/* Inline images from Portable Text */
.post-figure {
  margin: var(--space-8) 0;
}

.post-figure img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.post-figure figcaption {
  font-size: 0.8rem;
  color: var(--sand-500);
  text-align: center;
  margin-top: var(--space-2);
}

/* Tip callout */
.post-tip {
  background: var(--amber-50);
  border: 1px solid var(--amber-200);
  border-radius: 8px;
  padding: var(--space-5) var(--space-5);
  margin: var(--space-6) 0;
}

.post-tip-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-700);
  margin-bottom: var(--space-2);
}

.post-tip p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--amber-900);
  line-height: 1.7;
}

/* Author box */
.post-author-box {
  background: var(--sand-50);
  border: 1px solid var(--color-border-default);
  border-radius: 10px;
  padding: var(--space-6);
  margin-top: var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.post-author-top {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.post-author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-border-default);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.post-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.post-author-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sand-500);
}

.post-author-info strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-900);
}

.post-author-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.post-author-licence {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sand-600);
}

.post-author-info span {
  font-size: 0.82rem;
  color: var(--sand-600);
}

.post-author-bio {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--sand-700);
  margin: 0;
}


/* Back link */
.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--amber-600);
  text-decoration: none;
  margin-top: var(--space-6);
  transition: gap 0.2s;
}

.post-back-link:hover {
  gap: var(--space-2);
}

/* ---- Sidebar ---- */

.post-sidebar-sticky {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

@media (min-width: 960px) {
  .post-sidebar-sticky {
    position: sticky;
    top: var(--space-8);
  }
}

.post-sidebar-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--color-border-default);
  padding: var(--space-6);
}

/* CTA card */
.post-sidebar-cta {
}

.post-sidebar-cta-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--amber-600);
  margin: 0 0 var(--space-2);
}

.post-sidebar-cta h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.3;
  margin: 0 0 var(--space-3);
}

.post-sidebar-cta p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--sand-700);
  margin: 0 0 var(--space-5);
}

.btn-sidebar-primary {
  display: block;
  text-align: center;
  background: var(--amber-500);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  margin-bottom: var(--space-3);
  transition: background 0.2s;
}

.btn-sidebar-primary:hover {
  background: var(--amber-600);
}

.btn-sidebar-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: #25d366;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-sidebar-wa:hover {
  background: #1ebe59;
}

/* Quick facts card */
.post-sidebar-facts-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0 0 var(--space-4);
}

.post-sidebar-facts ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.post-sidebar-facts li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: 0.855rem;
  color: var(--sand-700);
  line-height: 1.5;
}

.post-sidebar-facts li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--amber-500);
}

/* ---- Related Posts ---- */

.post-related-section {
  padding: var(--space-12) 0 var(--space-16);
  background: #fff;
  border-top: 1px solid var(--color-border-default);
}

.post-related-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0 0 var(--space-8);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .post-hero {
    min-height: 360px;
  }

  .post-content {
    padding: var(--space-6);
  }

  .post-content h2 {
    font-size: 1.3rem;
    margin-top: var(--space-8);
  }

  .post-related-section .blog-listing-grid {
    grid-template-columns: 1fr;
  }
}
