/* ============================================================
   SINGLE POST — single.css
   Matches Figma node 148:5138 (Chi tiết)
   ============================================================ */

/* ---------- Banner ---------- */
.single-banner {
  position: relative;
  width: 100%;
  height: 25rem; /* 400px @ 1vw base */
  overflow: hidden;
}

.single-banner__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.single-banner__overlay {
  position: absolute;
  inset: 0;
  background: rgba(58, 42, 26, 0.4);
}

/* ---------- Breadcrumb ---------- */
.single-breadcrumb {
  background: var(--pri, #fbae17);
  height: 2.875rem; /* 46px */
  display: flex;
  align-items: center;
  overflow: hidden;
}

.single-breadcrumb__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0 5rem;
}

.single-breadcrumb__inner a,
.single-breadcrumb__inner .rank-math-breadcrumb a {
  color: #fff;
  font-size: 1rem;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
}

.single-breadcrumb__inner a:hover {
  text-decoration: underline;
}

.single-breadcrumb__sep {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.single-breadcrumb__current,
.single-breadcrumb__inner .rank-math-breadcrumb span.last {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40rem;
}

/* RankMath breadcrumb overrides */
.single-breadcrumb .rank-math-breadcrumb p {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0;
}

.single-breadcrumb .rank-math-breadcrumb .separator {
  color: #fff;
  opacity: 0.8;
}

/* ---------- Main container (two-column) ---------- */
.single-container {
  display: grid;
  grid-template-columns: 1fr 19.375rem; /* 918px + 310px with gap */
  gap: 2.5rem;
  padding: 2.5rem 0rem 4rem;
  align-items: start;
}

/* ---------- Article ---------- */
.single-article {
  min-width: 0;
}

.single-article__title {
  font-family: "Baloo 2", sans-serif;
  font-size: 1.75rem; /* 28px */
  font-weight: 800;
  line-height: 1.5; /* ~42px */
  color: #2f1b08;
  margin-bottom: 1.25rem;
}

/* Meta row */
.single-article__meta {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  margin-bottom: 1.5rem;
}

.single-article__meta-author {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--pri, #fbae17);
  font-size: 1rem;
  font-weight: 600;
}

.single-article__meta-author svg {
  flex-shrink: 0;
}

.single-article__meta-dot {
  display: inline-block;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background: var(--pri, #fbae17);
  flex-shrink: 0;
}

.single-article__meta-date {
  color: var(--pri, #fbae17);
  font-size: 1rem;
  font-weight: 600;
}

/* ---------- Post content (entry-content) ---------- */
.single-article__content {
  color: #2f1b08;
  font-size: 1rem;
  font-weight: 400;
  line-height: 2rem; /* 32px */
}

/* Headings */
.single-article__content h1,
.single-article__content h2,
.single-article__content h3,
.single-article__content h4,
.single-article__content h5,
.single-article__content h6 {
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  color: #2f1b08;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.single-article__content h1 {
  font-size: 2rem;
}
.single-article__content h2 {
  font-size: 1.5rem;
  line-height: 2.25rem;
} /* 24px / 36px */
.single-article__content h3 {
  font-size: 1.25rem;
}
.single-article__content h4 {
  font-size: 1.125rem;
}
.single-article__content h5 {
  font-size: 1rem;
}
.single-article__content h6 {
  font-size: 0.875rem;
}

/* Paragraphs */
.single-article__content p {
  margin-bottom: 1rem;
  line-height: 2rem;
}

/* Links */
.single-article__content a {
  color: var(--Second, #683f19);
  text-decoration: underline;
  display: inline;
}

.single-article__content a:hover {
  color: var(--pri, #fbae17);
}

/* Unordered lists */
.single-article__content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.single-article__content ul li {
  margin-bottom: 0.5rem;
  line-height: 2rem;
}

.single-article__content ul li::marker {
  color: var(--pri, #fbae17);
}

/* Ordered lists */
.single-article__content ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.single-article__content ol li {
  margin-bottom: 0.5rem;
  line-height: 2rem;
}

.single-article__content ol li::marker {
  color: var(--Second, #683f19);
  font-weight: 600;
}

/* Nested lists */
.single-article__content ul ul,
.single-article__content ol ol,
.single-article__content ul ol,
.single-article__content ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Blockquote */
.single-article__content blockquote {
  border-left: 4px solid var(--pri, #fbae17);
  background: rgba(251, 174, 23, 0.08);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: #2f1b08;
}

.single-article__content blockquote p {
  margin-bottom: 0;
}

/* Images */
.single-article__content img {
  max-width: 100%;
  height: auto;
  border-radius: 1.25rem; /* 20px */
  display: block;
  margin: 1.5rem auto;
}

/* Figure / caption */
.single-article__content figure {
  margin: 1.5rem 0;
}

.single-article__content figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: rgba(47, 27, 8, 0.6);
  margin-top: 0.5rem;
}

/* Tables */
.single-article__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.single-article__content th,
.single-article__content td {
  border: 1px solid rgba(47, 27, 8, 0.15);
  padding: 0.625rem 0.875rem;
  text-align: left;
  vertical-align: top;
}

.single-article__content th {
  background: var(--Second, #683f19);
  color: #fff;
  font-weight: 600;
}

.single-article__content tr:nth-child(even) td {
  background: rgba(251, 174, 23, 0.06);
}

/* Code */
.single-article__content code {
  background: rgba(47, 27, 8, 0.07);
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.875em;
  font-family: "Courier New", Courier, monospace;
  color: var(--Second, #683f19);
}

.single-article__content pre {
  background: #2f1b08;
  color: #fafafa;
  border-radius: 0.75rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.single-article__content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* Horizontal rule */
.single-article__content hr {
  border: none;
  border-top: 1px solid rgba(47, 27, 8, 0.15);
  margin: 2rem 0;
}

/* Strong / em */
.single-article__content strong,
.single-article__content b {
  font-weight: 700;
  color: #2f1b08;
}

.single-article__content em,
.single-article__content i {
  font-style: italic;
}

/* Embeds / iframes */
.single-article__content iframe,
.single-article__content video {
  max-width: 100%;
  border-radius: 0.75rem;
  display: block;
  margin: 1.5rem auto;
}

/* WordPress alignment classes */
.single-article__content .alignleft {
  float: left;
  margin: 0 1.5rem 1rem 0;
}

.single-article__content .alignright {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

.single-article__content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.single-article__content .wp-caption {
  max-width: 100%;
}

.single-article__content .wp-caption-text {
  text-align: center;
  font-size: 0.875rem;
  color: rgba(47, 27, 8, 0.6);
  margin-top: 0.375rem;
}

/* ---------- Tags ---------- */
.single-article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(47, 27, 8, 0.12);
}

.single-article__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.875rem;
  border-radius: 2rem;
  border: 1px solid var(--pri, #fbae17);
  color: var(--Second, #683f19);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.25s;
}

.single-article__tag:hover {
  background: var(--pri, #fbae17);
  color: #fff;
}

/* ---------- Sidebar ---------- */
.single-sidebar {
  position: sticky;
  top: 10.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Table of contents */
.single-toc {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--pri, #fbae17);
  border-bottom: 4px solid var(--pri, #fbae17);
  border-radius: 1.25rem;
  overflow: hidden;
  padding: 1.4375rem 0.9375rem 1.25rem;
  position: relative;
}

.single-toc__title {
  font-family: "Baloo 2", sans-serif;
  font-size: 1.75rem; /* 28px */
  font-weight: 800;
  color: var(--pri, #fbae17);
  line-height: 1.64; /* ~46px */
  margin-bottom: 0.75rem;
}

.single-toc__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.single-toc__body a {
  display: flex;
  align-items: center;
  min-height: 3.0625rem; /* 49px */
  font-size: 1rem;
  font-weight: 500;
  color: #2f1b08;
  line-height: 1.5;
  transition: color 0.2s;
}

.single-toc__body a:hover,
.single-toc__body a.active {
  color: var(--pri, #fbae17);
}

/* Related posts */
.single-related__title {
  font-family: "Baloo 2", sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--pri, #fbae17);
  line-height: 1.64;
  margin-bottom: 0.75rem;
}

.single-related__list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.single-related__item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.single-related__thumb {
  width: 7.5rem; /* 120px */
  height: 5rem; /* 80px */
  border-radius: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
}

.single-related__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
  margin: 0;
}

.single-related__thumb-placeholder {
  width: 100%;
  height: 100%;
  background: #eaeaea;
  border-radius: 0.5rem;
}

.single-related__info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.single-related__item-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2f1b08;
  line-height: 1.375rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.single-related__item-meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--pri, #fbae17);
  font-size: 0.75rem;
  font-weight: 500;
}

.single-related__item-dot {
  display: inline-block;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background: var(--pri, #fbae17);
}

.single-related__divider {
  height: 1px;
  background: #eaeaea;
  width: 100%;
}

/* ============================================================
   TABLET — max-width: 1024px
   ============================================================ */
@media (max-width: 1024px) {
  .single-container {
    grid-template-columns: 1fr;
    padding: 2rem 2rem 3rem;
    gap: 2rem;
  }

  .single-sidebar {
    position: static;
  }

  .single-toc,
  .single-related {
    max-width: 100%;
  }

  .single-breadcrumb__inner {
    padding: 0 2rem;
  }
}

/* ============================================================
   MOBILE — max-width: 639px
   ============================================================ */
@media (max-width: 639px) {
  .single-banner {
    height: 15rem;
  }

  .single-breadcrumb__inner {
    padding: 0 1rem;
    gap: 0.5rem;
  }

  .single-breadcrumb__inner a,
  .single-breadcrumb__current {
    font-size: 0.875rem;
  }

  .single-container {
    padding: 1.5rem 1rem 2.5rem;
    gap: 1.5rem;
  }

  .single-article__title {
    font-size: 1.375rem;
    line-height: 1.4;
  }

  .single-article__content h2 {
    font-size: 1.25rem;
  }
  .single-article__content h3 {
    font-size: 1.125rem;
  }

  .single-article__content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .single-toc__title,
  .single-related__title {
    font-size: 1.375rem;
  }

  .single-related__thumb {
    width: 5.5rem;
    height: 4rem;
  }
}
