/* ==========================================================================
   BLOG SINGLE ARTICLE — Lanyard Medan
   Palette: Crimson (#9E0C17) on White & Dark Slate (#0f172a)
   ========================================================================== */

:root {
  --single-crimson: #9E0C17;
  --single-crimson-hover: #800a12;
  --single-crimson-soft: #fff5f5;
  --single-crimson-border: #fee2e2;
  --single-ink: #0f172a;
  --single-slate: #334155;
  --single-muted: #475569;
  --single-subtle: #64748b;
  --single-border: #e8e8e8;
  --single-border-hover: #cbd5e1;
  --single-line: #f1f5f9;
  --single-bg: #ffffff;
  --single-surface: #fafafa;
  --single-surface-alt: #f8fafc;
}

.blog-detail-page,
.blog-detail-page *,
.blog-detail-page *::before,
.blog-detail-page *::after {
  box-sizing: border-box;
}

.blog-detail-page {
  background: var(--single-bg);
  color: var(--single-ink);
  font-family: inherit;
}

.blog-detail-page img {
  max-width: 100%;
}

.article-shell-container {
  width: min(calc(100% - 48px), 1240px);
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   1. ARTICLE 2-COLUMN HERO HEADER
   -------------------------------------------------------------------------- */
.article-header {
  background: #ffffff;
  border-bottom: 1px solid var(--single-line);
  padding: clamp(48px, 6vw, 76px) 0 clamp(40px, 5vw, 64px);
}

.article-hero-2col {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

.article-hero-2col__copy {
  max-width: 640px;
  text-align: left;
}

/* Breadcrumb */
.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--single-subtle);
  font-size: 13.5px;
}

.article-breadcrumb a {
  color: var(--single-muted);
  text-decoration: none;
  transition: color 160ms ease;
}

.article-breadcrumb a:hover {
  color: var(--single-crimson);
}

.article-breadcrumb__sep {
  color: var(--single-border);
}

.article-breadcrumb__current {
  color: var(--single-ink);
  font-weight: 750;
}

/* Eyebrow Pill */
.article-eyebrow-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 14px 6px 10px;
  border-radius: 9999px;
  background: var(--single-crimson-soft);
  border: 1px solid var(--single-crimson-border);
}

.article-eyebrow-sparkle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--single-crimson);
}

.article-eyebrow-sparkle svg {
  width: 100%;
  height: 100%;
}

.article-eyebrow-label {
  color: var(--single-crimson);
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Title */
.article-header h1 {
  margin: 0 0 20px;
  color: var(--single-ink);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

/* Meta Bar */
.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--single-muted);
  font-size: 13.5px;
  font-weight: 650;
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--single-crimson);
}

.article-meta-dot {
  color: var(--single-border);
}

/* Featured Hero Image */
.article-hero-2col__media {
  position: relative;
}

.article-featured-media {
  margin: 0;
  border-radius: 24px;
  border: 1px solid var(--single-border);
  overflow: hidden;
  box-shadow: 0 12px 36px rgb(15 23 42 / 0.06);
  background: var(--single-surface-alt);
  aspect-ratio: 4 / 3;
}

.article-featured-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.article-featured-media:hover img {
  transform: scale(1.03);
}

/* --------------------------------------------------------------------------
   2. MAIN CONTENT 2-COLUMN LAYOUT & SIDEBAR (70:30)
   -------------------------------------------------------------------------- */
.article-main-layout {
  background: #ffffff;
  padding: clamp(48px, 6vw, 72px) 0;
}

.article-grid-container {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: clamp(32px, 4vw, 48px);
  align-items: stretch;
}

.article-main-column {
  min-width: 0;
}

/* Sidebar */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
}

.article-sidebar__sticky-group {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 96px !important;
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 20;
}

/* Sidebar General Card Box */
.article-sidebar-card {
  background: var(--single-surface);
  border: 1px solid var(--single-border);
  border-radius: 20px;
  padding: 22px 24px;
}

/* Desktop TOC (Collapsible, default closed) */
.article-toc--desktop {
  background: var(--single-surface);
  border: 1px solid var(--single-border);
  border-radius: 20px;
  padding: 16px 20px;
  transition: all 180ms ease;
}

.article-toc--desktop summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--single-ink);
  font-size: 13.5px;
  font-weight: 850;
  letter-spacing: 0.02em;
  list-style: none;
  user-select: none;
}

.article-toc--desktop summary::-webkit-details-marker {
  display: none;
}

.article-toc__chevron {
  color: var(--single-crimson);
  transition: transform 200ms ease;
}

.article-toc--desktop[open] .article-toc__chevron,
.article-toc--mobile[open] .article-toc__chevron {
  transform: rotate(180deg);
}

.article-toc--desktop nav {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--single-line);
}

.article-toc--desktop ol {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0 0 0 18px;
  list-style: decimal;
  color: var(--single-subtle);
  font-size: 13.5px;
  line-height: 1.45;
}

.article-toc--desktop a {
  color: var(--single-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 160ms ease;
}

.article-toc--desktop a:hover {
  color: var(--single-crimson);
}

.article-toc--desktop .toc-level-3 {
  margin-left: 12px;
  font-size: 12.5px;
}

/* Mobile TOC */
.article-toc--mobile {
  display: none;
  background: var(--single-surface);
  border: 1px solid var(--single-border);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 24px;
}

.article-toc--mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--single-ink);
  font-size: 14px;
  font-weight: 800;
  list-style: none;
}

.article-toc--mobile summary::-webkit-details-marker {
  display: none;
}

.article-toc--mobile ol {
  margin: 14px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-toc--mobile a {
  color: var(--single-muted);
  font-size: 13.5px;
  text-decoration: none;
}

/* Sidebar Author Box */
.article-author-sidebar {
  display: flex;
  flex-direction: column;
}

.article-author-sidebar__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.article-author-sidebar__header a img,
.article-author-sidebar__header a span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--single-crimson-border);
  background: var(--single-crimson-soft);
  color: var(--single-crimson);
  font-size: 18px;
  font-weight: 850;
  object-fit: cover;
}

.article-author-sidebar__label {
  margin: 0 0 2px;
  color: var(--single-crimson);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-author-sidebar__header h3 {
  margin: 0;
  color: var(--single-ink);
  font-size: 16px;
  font-weight: 850;
}

.article-author-sidebar__header h3 a {
  color: inherit;
  text-decoration: none;
}

.article-author-sidebar__bio {
  margin: 0;
  color: var(--single-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

/* Sidebar Related Posts Widget */
.article-sidebar-related {
  display: flex;
  flex-direction: column;
}

.article-sidebar-related__title {
  margin: 0 0 14px;
  color: var(--single-crimson);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-sidebar-related__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-sidebar-related__item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease;
}

.article-sidebar-related__item:hover {
  transform: translateX(3px);
}

.article-sidebar-related__thumb {
  position: relative;
  width: 72px;
  height: 54px;
  border-radius: 10px;
  border: 1px solid var(--single-border);
  overflow: hidden;
  background: var(--single-surface-alt);
}

.article-sidebar-related__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-sidebar-related__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.article-sidebar-related__body time {
  font-size: 11.5px;
  color: var(--single-subtle);
  margin-bottom: 2px;
}

.article-sidebar-related__body h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--single-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 160ms ease;
}

.article-sidebar-related__item:hover .article-sidebar-related__body h4 {
  color: var(--single-crimson);
}

/* Sidebar WhatsApp Consultation Card */
.article-sidebar-cta {
  background: var(--single-ink);
  color: #ffffff;
  border-radius: 20px;
  padding: 24px;
}

.article-sidebar-cta h4 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.article-sidebar-cta p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13.5px;
  line-height: 1.5;
}

.article-sidebar-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 9999px;
  background: var(--single-crimson);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  transition: all 180ms ease;
}

.article-sidebar-cta__btn:hover {
  background: var(--single-crimson-hover);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   3. ARTICLE CONTENT PROSE TYPOGRAPHY
   -------------------------------------------------------------------------- */
.article-content {
  color: var(--single-slate);
  font-size: 16px;
  line-height: 1.8;
}

.article-content p {
  margin: 0 0 24px;
}

.article-content h2 {
  margin: 48px 0 18px;
  color: var(--single-ink);
  font-size: clamp(2rem, 3.2vw, 2.5rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.22;
  scroll-margin-top: 96px;
}

.article-content h3 {
  margin: 36px 0 14px;
  color: var(--single-ink);
  font-size: clamp(1.6rem, 2.45vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.3;
  scroll-margin-top: 96px;
}

.article-content h4 {
  margin: 28px 0 12px;
  color: var(--single-ink);
  font-size: 21px;
  font-weight: 800;
  scroll-margin-top: 96px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content strong {
  color: var(--single-ink);
  font-weight: 800;
}

.article-content a {
  color: var(--single-crimson);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 160ms ease;
}

.article-content a:hover {
  color: var(--single-crimson-hover);
}

.article-content img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--single-border);
  margin: 32px 0;
}

.article-content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  background: var(--single-crimson-soft);
  border-left: 4px solid var(--single-crimson);
  border-radius: 0 16px 16px 0;
  color: var(--single-ink);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   4. SHARE & TAGS
   -------------------------------------------------------------------------- */
.article-share-container {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--single-line);
}

.article-share {
  background: var(--single-surface);
  border: 1px solid var(--single-border);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.article-share span {
  margin-bottom: 0;
  color: var(--single-ink);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-share div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid var(--single-border);
  color: var(--single-slate);
  font-size: 12.5px;
  font-weight: 750;
  text-decoration: none;
  transition: all 180ms ease;
}

.share-button:hover {
  border-color: var(--single-crimson);
  color: var(--single-crimson);
  transform: translateY(-1px);
}

.article-share--mobile {
  display: none;
}

/* Tags */
.article-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.article-tags span {
  color: var(--single-subtle);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.article-tags div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-tags a {
  display: inline-flex;
  padding: 4px 12px;
  background: var(--single-surface);
  border: 1px solid var(--single-border);
  border-radius: 9999px;
  color: var(--single-slate);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 160ms ease;
}

.article-tags a:hover {
  border-color: var(--single-crimson);
  color: var(--single-crimson);
  background: var(--single-crimson-soft);
}

/* --------------------------------------------------------------------------
   5. COMMENTS SECTION
   -------------------------------------------------------------------------- */
.article-comments {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--single-line);
}

.article-section-heading {
  margin-bottom: 28px;
}

.article-section-heading p {
  margin: 0 0 6px;
  color: var(--single-crimson);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-section-heading h2 {
  margin: 0;
  color: var(--single-ink);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 850;
  letter-spacing: -0.03em;
}

.comment-form {
  background: var(--single-surface);
  border: 1px solid var(--single-border);
  border-radius: 22px;
  padding: 28px;
  margin-bottom: 36px;
}

.comment-form h3 {
  margin: 0 0 20px;
  color: var(--single-ink);
  font-size: 17px;
  font-weight: 850;
}

.comment-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.comment-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--single-ink);
  font-size: 13.5px;
  font-weight: 750;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid var(--single-border);
  border-radius: 12px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--single-ink);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--single-crimson);
  box-shadow: 0 0 0 3px rgb(158 12 23 / 0.12);
}

.comment-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.comment-form__footer p {
  margin: 0;
  color: var(--single-subtle);
  font-size: 12.5px;
}

.comment-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 9999px;
  border: none;
  background: var(--single-crimson);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 180ms ease;
}

.comment-form button:hover {
  background: var(--single-crimson-hover);
  transform: translateY(-1px);
}

.comment-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--single-line);
}

.comment-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--single-crimson-soft);
  color: var(--single-crimson);
  font-size: 16px;
  font-weight: 850;
}

.comment-item header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.comment-item strong {
  color: var(--single-ink);
  font-size: 14.5px;
  font-weight: 800;
}

.comment-item time {
  color: var(--single-subtle);
  font-size: 12px;
}

.comment-item p {
  margin: 0;
  color: var(--single-slate);
  font-size: 14px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   6. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .article-hero-2col {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .article-hero-2col__copy {
    max-width: 100%;
  }

  .article-grid-container {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .article-sidebar__sticky-group {
    position: static !important;
  }

  .article-toc--desktop {
    display: none;
  }

  .article-toc--mobile {
    display: block;
  }

  .article-share--mobile {
    display: block;
  }
}

@media (max-width: 640px) {
  .article-shell-container {
    width: min(calc(100% - 32px), 100%);
  }

  .article-header {
    padding: 36px 0 32px;
  }

  .article-header h1 {
    font-size: clamp(1.85rem, 7.5vw, 2.35rem);
  }

  .comment-form__row {
    grid-template-columns: 1fr;
  }

  .comment-form__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .comment-form button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-detail-page *,
  .blog-detail-page *::before,
  .blog-detail-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
