/*
---------------------------------------------
Article Layout Styles
---------------------------------------------
*/

/* ===== Critical Fixes ===== */

/* Fix: prevent background-header class from interfering (if custom.js loaded) */
.background-header {
  display: none !important;
}

/* Fix: header base state for article page */
.header-area {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Fix: override section margin from main CSS */
.article-section {
  margin-top: 0 !important;
}

/* Fix: ensure site footer is visible */
body > footer {
  display: block !important;
  margin-top: 30px;
}

/* Fix: article footer should not get site footer styles */
article > footer.article-footer-section {
  margin-top: 10px;
  padding-top: 30px;
}

/* ===== Breadcrumb ===== */

.breadcrumb-nav {
  margin-top: 90px;
  padding: 0 15px;
}

main .page-content {
  margin-top: 20px !important;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  margin: 0;
}

.breadcrumb-list li {
  list-style: none;
  font-size: 13px;
  color: #666;
}

.breadcrumb-list li a {
  color: #ec6090;
  transition: color 0.3s;
}

.breadcrumb-list li a:hover {
  color: #fff;
}

.breadcrumb-list li + li::before {
  content: "›";
  margin: 0 10px;
  color: #555;
}

/* ===== Article Header ===== */

.article-header {
  max-width: 800px;
  margin: 0 auto 40px auto;
  text-align: center;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

.article-category {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background-color: #e75e8d;
  padding: 5px 16px;
  border-radius: 25px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.article-date,
.article-read {
  font-size: 14px;
  color: #888;
}

.article-date i,
.article-read i {
  color: #ec6090;
  margin-right: 6px;
}

.article-header h1 {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 20px;
}

.article-subtitle {
  font-size: 18px !important;
  color: #999 !important;
  line-height: 1.7 !important;
  max-width: 680px;
  margin: 0 auto 30px auto;
}

.article-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.article-author img {
  width: 48px !important;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ec6090;
}

.author-info {
  text-align: left;
  font-style: normal;
}

.author-info a {
  font-size: 15px;
  color: #fff;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.author-info a:hover {
  color: #ec6090;
}

.author-info span {
  font-size: 13px;
  color: #888;
}

/* ===== Article Banner Image ===== */

article > header.article-header {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  height: auto;
  z-index: auto;
  background-color: transparent;
  min-height: auto;
}

.article-banner {
  margin-bottom: 40px;
  border-radius: 23px;
  overflow: hidden;
}

.article-banner img {
  width: 100%;
  border-radius: 23px;
  display: block;
}

figure.article-banner,
figure.article-image {
  margin-left: 0;
  margin-right: 0;
}

.img-caption,
figcaption.img-caption {
  display: block;
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-top: 12px;
  font-style: italic;
}

/* ===== Table of Contents ===== */

.article-toc {
  max-width: 800px;
  margin: 0 auto 50px auto;
  background-color: #1f2122;
  border-radius: 23px;
  padding: 30px 40px;
  border-left: 4px solid #ec6090;
}

.article-toc h2.toc-title {
  font-size: 20px;
  color: #ec6090;
  margin-bottom: 18px;
  font-weight: 700;
}

.article-toc h2.toc-title::after {
  display: none;
}

.article-toc ol {
  padding-left: 20px;
  margin: 0;
  counter-reset: toc-counter;
}

.article-toc ol li {
  list-style: none;
  counter-increment: toc-counter;
  margin-bottom: 10px;
  position: relative;
  padding-left: 10px;
}

.article-toc ol li::before {
  content: counter(toc-counter) ".";
  color: #ec6090;
  font-weight: 700;
  position: absolute;
  left: -18px;
}

.article-toc ol li a {
  color: #ccc;
  font-size: 15px;
  transition: all 0.3s;
}

.article-toc ol li a:hover {
  color: #ec6090;
  padding-left: 5px;
}

/* ===== Article Body ===== */

.article-body {
  max-width: 800px;
  margin: 0 auto;
}

/* ===== Article Sections ===== */

.article-section {
  margin-top: 0;
  margin-bottom: 50px;
  padding-bottom: 50px;
  border-bottom: 1px solid #353637;
}

.article-section:last-child {
  border-bottom: none;
  margin-bottom: 30px;
  padding-bottom: 30px;
}

.article-section h2 {
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  padding-bottom: 12px;
  position: relative;
}

.article-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #ec6090, #e75e8d);
  border-radius: 3px;
}

.article-section p {
  font-size: 16px;
  line-height: 1.85;
  color: #b0b0b0;
  margin-bottom: 18px;
}

/* ===== Global text color fix for article content ===== */
/* Mencegah teks gelap yang tidak terbaca di background gelap */

.article-body,
.article-body p,
.article-body li,
.article-body span,
.article-body div,
.article-body td,
.article-body th,
.article-body dd,
.article-body dt,
.article-body label,
.article-body small {
  color: #b0b0b0;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6,
.article-body strong,
.article-body b,
.article-body th {
  color: #fff;
}

.article-body em,
.article-body i:not(.fa):not(.fa-brands):not(.fab):not(.fas):not(.far) {
  color: #c0c0c0;
}

.article-body a {
  color: #ec6090;
  transition: color 0.3s;
}

.article-body a:hover {
  color: #f99;
}

/* Regular ul/ol inside article (tanpa class .article-list) */
.article-body ul:not(.article-list),
.article-body ol:not(.article-list) {
  margin: 20px 0 25px 0;
  padding-left: 25px;
}

.article-body ul:not(.article-list) li {
  list-style: disc;
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.7;
  color: #b0b0b0;
  padding: 3px 0;
}

.article-body ol:not(.article-list):not(.numbered) li {
  list-style: decimal;
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.7;
  color: #b0b0b0;
  padding: 3px 0;
}

.article-body ul:not(.article-list) li::marker {
  color: #ec6090;
}

.article-body ol:not(.article-list):not(.numbered) li::marker {
  color: #ec6090;
  font-weight: 700;
}

/* Table inside article */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.article-body table th,
.article-body table td {
  padding: 12px 15px;
  border: 1px solid #353637;
  font-size: 15px;
}

.article-body table th {
  background-color: #1f2122;
  color: #fff;
  font-weight: 600;
}

.article-body table td {
  color: #b0b0b0;
}

.article-body table tr:nth-child(even) td {
  background-color: rgba(31, 33, 34, 0.5);
}

/* Code/pre inside article */
.article-body code {
  background-color: #1f2122;
  color: #ec6090;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
}

.article-body pre {
  background-color: #1f2122;
  color: #ccc;
  padding: 20px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.6;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Horizontal rule */
.article-body hr {
  border: none;
  border-top: 1px solid #353637;
  margin: 30px 0;
}

/* ===== Article Images inside sections ===== */

.article-image {
  margin: 30px 0;
  border-radius: 23px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  border-radius: 23px;
  display: block;
  transition: transform 0.4s;
}

.article-image:hover img {
  transform: scale(1.02);
}

/* ===== Blockquote ===== */

.article-quote {
  margin: 30px 0;
  padding: 25px 30px;
  background-color: #1f2122;
  border-left: 4px solid #ec6090;
  border-radius: 0 23px 23px 0;
}

.article-quote p {
  font-size: 18px !important;
  font-style: italic;
  color: #ddd !important;
  line-height: 1.7;
  margin-bottom: 10px !important;
}

.article-quote cite {
  font-size: 14px;
  color: #ec6090;
  font-style: normal;
  font-weight: 600;
}

/* ===== Lists inside Article ===== */

.article-list {
  margin: 20px 0 25px 0;
  padding-left: 0;
}

.article-list li {
  position: relative;
  padding: 10px 15px 10px 30px;
  margin-bottom: 8px;
  font-size: 15px;
  color: #b0b0b0;
  line-height: 1.7;
  background-color: #1f2122;
  border-radius: 12px;
  list-style: none;
}

.article-list li::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 18px;
  width: 8px;
  height: 8px;
  background-color: #ec6090;
  border-radius: 50%;
}

ol.article-list.numbered {
  counter-reset: list-counter;
}

ol.article-list.numbered li {
  counter-increment: list-counter;
  padding-left: 40px;
}

ol.article-list.numbered li::before {
  content: counter(list-counter);
  background-color: #ec6090;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 12px;
  left: 10px;
}

/* ===== Article Footer (Tags & Share) ===== */

.article-footer-section {
  max-width: 800px;
  margin: 10px auto 0 auto;
  padding: 30px 0 0 0;
  border-top: 1px solid #353637;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.article-tags .tag {
  font-size: 13px;
  color: #ccc;
  border: 1px solid #555;
  padding: 6px 18px;
  border-radius: 25px;
  transition: all 0.3s;
  cursor: pointer;
  display: inline-block;
}

.article-tags .tag:hover {
  border-color: #ec6090;
  color: #ec6090;
}

.article-share {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.article-share span {
  font-size: 14px;
  color: #888;
  font-weight: 600;
}

.article-share a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #1f2122;
  color: #ccc;
  font-size: 16px;
  transition: all 0.3s;
}

.article-share a:hover {
  background-color: #ec6090;
  color: #fff;
}

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

@media (max-width: 767px) {
  .article-header h1 {
    font-size: 28px;
  }

  .article-subtitle {
    font-size: 16px !important;
  }

  .article-section h2 {
    font-size: 24px;
  }

  .article-toc {
    padding: 20px 25px;
  }

  .article-meta {
    gap: 10px;
  }

  .article-share {
    justify-content: flex-start;
    margin-top: 20px;
  }

  .article-quote {
    padding: 20px;
  }

  .article-quote p {
    font-size: 16px !important;
  }
}

@media (max-width: 992px) {
  .article-header h1 {
    font-size: 32px;
  }
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}
