/* ===========================
   Berita Detail — flat design, no gradients
   =========================== */

/* Reading progress bar */
.article-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: var(--red);
  z-index: 60;
}

/* Hero */
.article-hero {
  position: relative;
  min-height: 460px;
  padding: 140px 0 96px;
  background: var(--dark);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.article-hero-bg { position: absolute; inset: 0; z-index: 0; }
.article-hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.40;
  transform: scale(1.04);
  animation: hero-zoom 12s ease-out forwards;
}
@keyframes hero-zoom { from { transform: scale(1) } to { transform: scale(1.04) } }
.article-hero-overlay {
  position: absolute; inset: 0;
  background: rgba(20, 20, 22, 0.72);
}
.article-hero-content {
  position: relative; z-index: 10;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.5rem;
}
.article-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 22px;
}
.article-breadcrumb a { transition: color 0.3s; }
.article-breadcrumb a:hover { color: #fff; }
.article-breadcrumb .current { color: #fff; }

.article-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: #fff;
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 14px;
  border-radius: 6px;
  margin-bottom: 18px;
}
.article-cat-badge svg { width: 12px; height: 12px; flex-shrink: 0; }
.article-hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  font-size: 1.7rem;
  line-height: 1.28;
  margin-bottom: 22px;
}
.article-hero-meta { display: flex; align-items: center; gap: 14px; }
.article-hero-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem; flex-shrink: 0;
}
.article-hero-author { color: #fff; font-weight: 600; font-size: 0.9rem; line-height: 1.3; }
.article-hero-sub { color: rgba(255,255,255,0.55); font-size: 0.75rem; margin-top: 3px; }

/* Body section */
.article-section { padding: 0 1.5rem 5rem; background: #fff; position: relative; }

.article-featured {
  height: 400px;
  background: #eef0f3;
  border-radius: 14px;
  overflow: hidden;
  margin: 24px auto 48px;
  position: relative;
  max-width: 840px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 24px 48px -20px rgba(26,26,26,0.35);
}
.article-featured img { width: 100%; height: 100%; object-fit: cover; }
.article-featured .placeholder {
  width: 100%; height: 100%;
  background: #eef0f3;
  display: flex; align-items: center; justify-content: center;
  color: #b6bcc6;
}

.article-meta-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  padding-bottom: 24px; margin-bottom: 36px;
  border-bottom: 1px solid #eef0f3;
  color: #6b7280; font-size: 0.85rem;
}
.article-meta-bar .meta-item { display: flex; align-items: center; gap: 7px; }
.article-meta-bar svg { width: 16px; height: 16px; color: var(--red); }
.article-share { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.article-share-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: #adb3bd; }
.article-share a {
  width: 34px; height: 34px; border-radius: 8px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  border: 1px solid #e5e7eb;
  transition: all 0.25s;
}
.article-share a svg { width: 15px; height: 15px; color: #4b5563; transition: color 0.25s; }
.article-share a:hover { background: var(--red); border-color: var(--red); transform: translateY(-2px); }
.article-share a:hover svg { color: #fff; }

/* Article body typography */
.article-body { font-size: 1.075rem; line-height: 1.9; color: #3f4450; }
.article-body > p:first-child::first-letter {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.5rem;
  float: left;
  line-height: 0.9;
  padding-right: 12px;
  color: var(--red);
}
.article-body p { margin-bottom: 1.6rem; }
.article-body img { border-radius: 12px; margin: 2.2rem 0; border: 1px solid #eef0f3; }
.article-body figure { margin: 2.2rem 0; }
.article-body figcaption { text-align: center; color: #9ca3af; font-size: 0.8rem; margin-top: 10px; }
.article-body h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--dark);
  margin-top: 2.8rem;
  margin-bottom: 1.1rem;
  letter-spacing: -0.01em;
  padding-bottom: 12px;
  border-bottom: 2px solid #eef0f3;
}
.article-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  color: var(--dark);
  margin-top: 2.2rem;
  margin-bottom: 0.9rem;
}
.article-body a { color: var(--red); font-weight: 500; border-bottom: 1px solid rgba(244,67,54,0.35); transition: border-color 0.25s; }
.article-body a:hover { border-bottom-color: var(--red); }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1.6rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body ul li { position: relative; padding-left: 10px; }
.article-body ul li::before {
  content: '';
  position: absolute;
  left: -16px; top: 0.82em;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 2px;
}
.article-body ol { list-style: decimal; }
.article-body ol li::marker { color: var(--red); font-weight: 700; }
.article-body blockquote {
  border-left: 4px solid var(--red);
  background: #fafafa;
  padding: 24px 30px;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--charcoal);
  margin: 2.2rem 0;
  border-radius: 0 12px 12px 0;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body hr { border: 0; border-top: 1px solid #eef0f3; margin: 2.4rem 0; }
.article-body pre {
  background: #18181b;
  color: #e5e7eb;
  border-radius: 12px;
  padding: 20px 24px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
  margin: 2.2rem 0;
}
.article-body code { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; }
.article-body :not(pre) > code {
  background: #f3f4f6;
  color: #d32f2f;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.85em;
}
.article-body table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.92rem; }
.article-body th, .article-body td { border: 1px solid #eef0f3; padding: 12px 16px; text-align: left; }
.article-body th { background: #fafbfc; font-weight: 700; color: var(--dark); }

/* Tags */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 44px; padding-top: 30px; border-top: 1px solid #eef0f3; }
.article-tags span {
  padding: 7px 14px;
  background: #f6f6f8;
  border: 1px solid #ececef;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #4b5563;
  transition: all 0.25s;
  cursor: default;
}
.article-tags span:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Author card */
.article-author-card {
  display: flex; align-items: center; gap: 20px;
  margin-top: 44px; padding: 30px;
  background: #fafbfc;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.article-author-card:hover { border-color: #e5e7eb; box-shadow: 0 16px 40px -24px rgba(26,26,26,0.2); }
.article-author-card .author-avatar-lg {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--dark);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.125rem; flex-shrink: 0;
}
.article-author-card .author-name { font-weight: 700; color: var(--dark); font-size: 1.05rem; }
.article-author-card .author-role { color: var(--red); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin: 2px 0 8px; }
.article-author-card p + p { color: #6b7280; font-size: 0.875rem; line-height: 1.65; margin-bottom: 0; }

/* Sidebar */
.article-sidebar { position: sticky; top: 110px; align-self: start; }
.article-sidebar-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--dark);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.article-sidebar-title::after { content: ''; flex: 1; height: 2px; background: var(--red); opacity: 0.25; }
.sidebar-article {
  display: flex; gap: 14px; margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #f0f0f2;
  border-radius: 12px;
  transition: all 0.28s;
}
.sidebar-article:hover { background: #fafbfc; border-color: #e5e7eb; transform: translateY(-2px); }
.sidebar-article-img { width: 88px; height: 66px; background: #e5e7eb; flex-shrink: 0; overflow: hidden; border-radius: 8px; }
.sidebar-article-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.sidebar-article:hover .sidebar-article-img img { transform: scale(1.1); }
.sidebar-article-title {
  font-size: 0.85rem; font-weight: 600; line-height: 1.45; color: var(--dark);
  transition: color 0.28s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-article:hover .sidebar-article-title { color: var(--red); }
.sidebar-article-cat { font-size: 0.68rem; color: var(--red); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-top: 6px; display: block; }

.sidebar-cta {
  margin-top: 32px; padding: 30px;
  background: var(--dark);
  color: #fff;
  border-radius: 14px;
  border-left: 4px solid var(--red);
}
.sidebar-cta h5 { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; }
.sidebar-cta p { color: #9ca3af; font-size: 0.82rem; line-height: 1.65; margin-bottom: 18px; }
.sidebar-cta a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: var(--red);
  color: #fff;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  border-radius: 8px;
  transition: background 0.25s, transform 0.25s;
}
.sidebar-cta a:hover { background: #d32f2f; transform: translateY(-2px); }

/* Related articles */
.article-related { margin-top: 72px; padding-top: 52px; border-top: 1px solid #eef0f3; }
.related-grid { display: grid; gap: 20px; margin-top: 30px; }
@media (min-width: 768px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }
.related-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s;
}
.related-card:hover { box-shadow: 0 20px 40px -20px rgba(26,26,26,0.2); border-color: #e5e7eb; transform: translateY(-4px); }
.related-card-img { height: 150px; flex-shrink: 0; overflow: hidden; background: #e5e7eb; position: relative; }
.related-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s; }
.related-card:hover .related-card-img img { transform: scale(1.08); }
.related-card-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.related-card-title {
  font-weight: 700; font-size: 0.95rem; line-height: 1.45; color: var(--dark);
  transition: color 0.28s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card:hover .related-card-title { color: var(--red); }
.related-card-meta { margin-top: auto; padding-top: 10px; font-size: 0.72rem; color: #9ca3af; display: flex; align-items: center; justify-content: space-between; }
.related-card-meta a {
  color: var(--red); font-weight: 600; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 4px;
}
.related-card-meta a svg { width: 13px; height: 13px; transition: transform 0.28s; }
.related-card:hover .related-card-meta a svg { transform: translateX(3px); }

/* Back link */
.article-back {
  margin-top: 60px;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--red);
  font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  transition: gap 0.3s, color 0.3s;
}
.article-back:hover { gap: 12px; color: #d32f2f; }
.article-back svg { width: 16px; height: 16px; }

/* Sticky share rail */
.article-rail {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 5;
}
.article-rail-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #adb3bd;
  writing-mode: vertical-rl;
  margin-bottom: 2px;
}
.article-rail a {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s;
}
.article-rail a svg { width: 15px; height: 15px; color: #4b5563; transition: color 0.25s; }
.article-rail a:hover { background: var(--red); border-color: var(--red); transform: translateY(-2px); }
.article-rail a:hover svg { color: #fff; }
.article-rail a.__copied { background: #22c55e; border-color: #22c55e; }
.article-rail a.__copied svg { color: #fff; }
@media (min-width: 1280px) {
  .article-rail { display: flex; }
}

/* Sidebar blocks (TOC) */
.sidebar-block { margin-bottom: 32px; }
.article-toc {
  background: #fafbfc;
  border: 1px solid #eef0f3;
  border-left: 4px solid var(--red);
  border-radius: 12px;
  padding: 20px;
}
.article-toc .article-sidebar-title { margin-bottom: 14px; }
.article-toc .article-sidebar-title::after { display: none; }
.article-toc-nav { display: flex; flex-direction: column; gap: 2px; }
.article-toc-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #4b5563;
  line-height: 1.4;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}
.article-toc-nav a:hover,
.article-toc-nav a.__active {
  background: #fff;
  color: var(--red);
  border-left-color: var(--red);
}

/* Smooth anchor scroll offset for fixed nav */
.article-body h2[id], .article-body h3[id] { scroll-margin-top: 110px; }

@media (min-width: 768px) {
  .article-hero { min-height: 540px; }
  .article-hero-title { font-size: 2.5rem; }
  .article-featured { height: 460px; }
}
@media (max-width: 767px) {
  .article-featured { margin-top: 24px; height: 240px; }
  .article-share { margin-left: 0; }
  .article-meta-bar { gap: 12px; }
  .article-hero { padding-top: 120px; }
}