/* ============================================================
   ARTICLE / INNER PAGE
   ============================================================ */

html, body {
  overflow-x: hidden;
}

/* BACK TO TOP */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: #cc0000;
  color: #fff;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 4px 16px rgba(255, 32, 32, 0.4);
}

#back-to-top.btt-show {
  opacity: 1;
  transform: translateY(0);
}

#back-to-top:hover {
  background: #ff2020;
}

.page-wrap {
  padding-top: 72px;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
}

/* BREADCRUMB */
.breadcrumb {
  background: #1a0505;
  border-top: 1px solid rgba(255, 32, 32, 0.15);
  border-bottom: 1px solid rgba(255, 32, 32, 0.25);
  padding: 12px 0;
}

.breadcrumb-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #9a7070;
}

.breadcrumb a {
  color: #9a7070;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: #ff2020; }

.breadcrumb-sep { opacity: 0.4; }

.breadcrumb-current {
  color: #ff2020;
  font-weight: 600;
}

/* HERO IMAGE */
.article-hero-img {
  width: 100%;
  border-bottom: 1px solid rgba(255, 32, 32, 0.2);
  line-height: 0;
  text-align: center;
}

.article-hero-img img {
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .article-hero-img img { max-height: 200px; }
}

@media (max-width: 480px) {
  .article-hero-img img { max-height: 150px; }
}

/* HERO IMAGE DUMMY */
.hero-img-dummy {
  width: 100%;
  height: 320px;
  background: linear-gradient(135deg, #1a0000 0%, #3a0000 40%, #1a0000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 32, 32, 0.2);
  position: relative;
  overflow: hidden;
}

.hero-img-dummy::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(255,32,32,0.03) 40px,
    rgba(255,32,32,0.03) 80px
  );
}

.hero-img-dummy-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,32,32,0.5);
  border: 1px dashed rgba(255,32,32,0.3);
  padding: 12px 24px;
  position: relative;
}

/* ARTICLE HERO */
.article-hero {
  background: linear-gradient(180deg, #060000 0%, #030000 100%);
  border-bottom: 1px solid rgba(255, 32, 32, 0.15);
  padding: 56px 0 48px;
}

.article-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

.article-cluster {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ff2020;
  margin-bottom: 16px;
}

.article-cluster::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 2px;
  background: #ff2020;
}

.article-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: #9a7070;
}

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

/* ARTICLE LAYOUT */
.article-layout {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

/* ARTICLE BODY */
.article-body h2 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 36px 0 14px;
  padding-left: 14px;
  border-left: 3px solid #ff2020;
}

.article-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: #f0e2e2;
  margin: 24px 0 10px;
}

.article-body p {
  font-size: 15px;
  color: #9a7070;
  line-height: 1.8;
  margin-bottom: 16px;
}

.article-body p:first-of-type {
  font-size: 16px;
  color: #c0a0a0;
}

.article-body ul {
  margin: 12px 0 20px 0;
  padding: 0;
  list-style: none;
}

.article-body ul li {
  font-size: 14px;
  color: #9a7070;
  padding: 6px 0 6px 20px;
  border-bottom: 1px solid rgba(255, 32, 32, 0.07);
  position: relative;
}

.article-body ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #ff2020;
}

/* TABLE */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}

.article-body th {
  background: rgba(255, 32, 32, 0.12);
  color: #fff;
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid rgba(255, 32, 32, 0.3);
}

.article-body td {
  padding: 9px 14px;
  color: #c8a8a8;
  border-bottom: 1px solid rgba(255, 32, 32, 0.08);
}

.article-body tr:hover td {
  background: rgba(255, 32, 32, 0.04);
  color: #f0e2e2;
}

.article-body .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
}

.article-body .table-wrap table {
  margin: 0;
  min-width: 480px;
}

/* Callout box */
.callout {
  background: rgba(255, 32, 32, 0.06);
  border-left: 3px solid #ff2020;
  padding: 16px 20px;
  margin: 24px 0;
}

.callout p {
  margin: 0;
  font-size: 14px;
  color: #c0a0a0;
  line-height: 1.7;
}

/* SIDEBAR */
.article-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-box {
  background: #040000;
  border: 1px solid rgba(255, 32, 32, 0.15);
  padding: 20px;
}

.sidebar-box h4 {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ff2020;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 32, 32, 0.15);
}

.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.sidebar-links li + li {
  border-top: 1px solid rgba(255, 32, 32, 0.07);
}

.sidebar-links a {
  display: block;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 600;
  color: #9a7070;
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
}

.sidebar-links a:hover {
  color: #ff2020;
  padding-left: 6px;
}

.sidebar-links a.active {
  color: #ff2020;
}

/* SHARE BAR */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: #070000;
  border-bottom: 1px solid rgba(255, 32, 32, 0.1);
  flex-wrap: wrap;
}

.share-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a7070;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #c8a8a8;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: inherit;
}

.share-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.share-wa:hover  { background: rgba(37,211,102,0.15); border-color: rgba(37,211,102,0.4); color: #25d366; }
.share-tw:hover  { background: rgba(29,161,242,0.12); border-color: rgba(29,161,242,0.3); color: #1da1f2; }

@media (max-width: 480px) {
  .share-bar { padding: 10px 16px; gap: 8px; }
  .share-btn { padding: 5px 10px; font-size: 11px; }
}

/* TABLE OF CONTENTS */
.toc-box {
  background: linear-gradient(135deg, #0d0101 0%, #070000 100%);
  border: 1px solid rgba(255, 32, 32, 0.18);
  border-top: 3px solid #cc0000;
  padding: 20px 24px 18px;
  margin: 0 0 40px;
  max-width: 520px;
  position: relative;
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #cc0000;
  margin-bottom: 16px;
}

.toc-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 32, 32, 0.15);
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  counter-reset: toc-counter;
}

.toc-list li {
  counter-increment: toc-counter;
  border-bottom: 1px solid rgba(255, 32, 32, 0.06);
}

.toc-list li:last-child { border-bottom: none; }

.toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: #b08080;
  text-decoration: none;
  transition: color 0.2s, gap 0.2s;
  line-height: 1.4;
}

.toc-link::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-size: 10px;
  font-weight: 800;
  color: rgba(255, 32, 32, 0.35);
  flex-shrink: 0;
  width: 22px;
  transition: color 0.2s;
}

.toc-link:hover {
  color: #f0e2e2;
  gap: 14px;
}

.toc-link:hover::before { color: #ff2020; }

.toc-link.toc-active {
  color: #fff;
  font-weight: 600;
}

.toc-link.toc-active::before { color: #ff2020; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px 20px 60px;
  }
}

@media (max-width: 768px) {
  .page-wrap { padding-top: 60px; }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 16px 48px;
  }
  .article-sidebar { position: static; }

  .article-hero { padding: 36px 0 32px; }
  .article-hero-inner { padding: 0 16px; }
  .article-title { font-size: clamp(22px, 5vw, 32px); }

  .article-body h2 { font-size: 18px; margin: 28px 0 12px; }
  .article-body h3 { font-size: 15px; }
  .article-body p  { font-size: 14px; }
  .article-body p:first-of-type { font-size: 15px; }

  .article-meta { flex-wrap: wrap; gap: 10px; }

  .breadcrumb-inner { padding: 0 16px; font-size: 11px; }
}

@media (max-width: 480px) {
  .article-title { font-size: 20px; }
  .sidebar-box { padding: 14px; }
  .callout { padding: 12px 14px; }
}
