/* =========================================
 * css/finalsaga.css — Final Saga Page
 * ========================================= */

/* base font 16px */
html,
body {
  font-size: 16px;
}

.finalsaga-page {
  position: relative;
}

html {
  scroll-behavior: smooth;
}

/* layout */
.finalsaga-layout {
  align-items: flex-start;
}

/* main article */
.finalsaga-article {
  background: rgba(10, 15, 30, 0.9);
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #f8f9fa;
  font-size: 16px;
}

@media (min-width: 992px) {
  .finalsaga-article {
    padding: 28px 28px;
  }
}

/* label */
.finalsaga-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff2748, #ff9a3c);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* title 20px */
.finalsaga-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 0.35rem;
}

/* meta */
.finalsaga-article .article-meta {
  font-size: 0.9rem;
  color: #adb5bd;
}

/* section box */
.finalsaga-section {
  background: radial-gradient(circle at top left, rgba(255, 39, 72, 0.12), transparent 60%);
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.finalsaga-section p {
  margin-bottom: 0.75rem;
  line-height: 1.8;
  font-size: 16px;
}

/* section title 18px */
.finalsaga-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* highlight box */
.finalsaga-highlight {
  background: rgba(20, 24, 45, 0.95);
  border-radius: 12px;
  padding: 14px 14px;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  border-left: 3px solid #ff2748;
}

.finalsaga-highlight h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.finalsaga-highlight ul {
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
}

/* video section */
.finalsaga-video {
  background: linear-gradient(135deg, rgba(255, 39, 72, 0.18), rgba(12, 19, 46, 0.95));
}

.finalsaga-video-intro {
  margin-bottom: 0.6rem;
}

.finalsaga-video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  margin-bottom: 0.75rem;
  background: #000;
}

.finalsaga-video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* gallery */
.finalsaga-gallery {
  background: radial-gradient(circle at bottom right, rgba(255, 154, 60, 0.18), rgba(8, 13, 32, 0.98));
}

.finalsaga-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 8px;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.finalsaga-thumb-img {
  border-radius: 10px;
  margin-bottom: 0.4rem;
}

/* figcaption 14px */
.finalsaga-thumb figcaption {
  font-size: 14px;
  color: #e9ecef;
}

/* tags */
.finalsaga-tags a {
  margin-left: 0.25rem;
  text-decoration: none;
  font-size: 16px;
}

.finalsaga-tags a:hover {
  text-decoration: underline;
}

/* sidebar cards */
.finalsaga-toc,
.finalsaga-card {
  background: #050b1f;
  border-radius: 16px;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  border: none;
}

.finalsaga-toc .card-header,
.finalsaga-card .card-header {
  background: transparent;
  color: #ffffff;
  font-weight: 600;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 16px;
}

.finalsaga-toc .card-body,
.finalsaga-card .card-body {
  background: transparent;
  padding: 10px 16px 14px;
  font-size: 16px;
}

/* TOC list: bullet + สีแดง */
.finalsaga-toc .card-body ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.finalsaga-toc .card-body li {
  margin-bottom: 0.35rem;
  color: #f8f9fa;
  font-size: 16px;
}

.finalsaga-toc .card-body li::marker {
  color: #ff2748;
}

/* recommended list */
.finalsaga-card .card-body ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.finalsaga-card .card-body li {
  margin-bottom: 0.35rem;
  color: #f8f9fa;
}

/* links in sidebar */
.finalsaga-toc a,
.finalsaga-card a {
  text-decoration: none;
  color: inherit;
}

.finalsaga-toc a:hover,
.finalsaga-card a:hover {
  text-decoration: underline;
}

/* active link in TOC (จาก JS) */
.finalsaga-toc a.is-active {
  color: #ff9a3c;
  font-weight: 600;
}

/* links in article */
.finalsaga-article a {
  color: #ff9a3c;
  text-decoration: none;
}

.finalsaga-article a:hover {
  text-decoration: underline;
}

/* responsive */
@media (max-width: 575.98px) {
  .finalsaga-article {
    padding: 18px 14px;
  }

  .finalsaga-title {
    font-size: 20px;
  }
}
