/*
 * Editorial styling for single blog posts (is_singular('post')).
 * Enqueued automatically by inc/functions/site-style.php.
 */

/* ===== Page Canvas & Layout ===== */
html body.single-post #main,
.single-post #main {
  background-color: #f6f9f7;
}

.single-post .blog-wrapper.blog-single {
  padding-top: 28px;
  padding-bottom: 56px;
}

.single-post .blog-single .article-inner {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 22px;
  padding: 34px 38px;
  box-shadow:
    0 14px 36px rgba(15, 23, 42, 0.05),
    0 2px 6px rgba(0, 60, 25, 0.03);
}

/* ===== Post Header & H1 ===== */
.single-post .entry-header {
  margin-bottom: 8px;
}

.single-post .entry-header .entry-header-text {
  padding-top: 0;
  padding-bottom: 0;
}

.single-post .entry-header .entry-title {
  margin: 0 0 14px;
  color: var(--vmt-heading, #1f2328);
  font-family: var(--vmt-font-heading, "Lexend", sans-serif);
  font-size: clamp(26px, 2.7vw, 36px);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.single-post .entry-header .entry-divider.is-divider {
  width: 56px;
  max-width: 56px;
  height: 4px;
  margin: 0 0 22px;
  border-radius: 999px;
  background: var(--vmt-grad, linear-gradient(45deg, #009030 0%, #1fb954 50%, #009030 100%));
  opacity: 1;
}

/* ===== Editorial Body Typography ===== */
.single-post .entry-content {
  padding-top: 4px;
  color: var(--vmt-ink, #111827);
  overflow-x: clip;
}

.single-post .entry-content p,
.single-post .entry-content li {
  color: #1f2937;
  font-size: 16.5px;
  line-height: 1.75;
  text-align: left;
}

.single-post .entry-content p {
  margin-bottom: 1.1em;
}

.single-post .entry-content ul,
.single-post .entry-content ol {
  margin: 0 0 1.25em 1.35em;
}

.single-post .entry-content li {
  margin-bottom: 0.45em;
}

.single-post .entry-content li::marker {
  color: var(--vmt-accent, #009030);
}

/* ===== Headings (Lexend + Editorial H2 Accent) ===== */
.single-post .entry-content h2 {
  margin: 1.85em 0 0.75em;
  padding: 12px 18px;
  border-left: 4px solid var(--vmt-accent, #009030);
  border-radius: 0 12px 12px 0;
  background: var(--vmt-tint, #eefaf1);
  color: var(--vmt-heading, #1f2328);
  font-family: var(--vmt-font-heading, "Lexend", sans-serif);
  font-size: clamp(21px, 2.1vw, 25px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.single-post .entry-content h3 {
  margin: 1.55em 0 0.55em;
  color: var(--vmt-heading, #1f2328);
  font-family: var(--vmt-font-heading, "Lexend", sans-serif);
  font-size: clamp(18.5px, 1.8vw, 21px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.single-post .entry-content h4 {
  margin: 1.3em 0 0.45em;
  color: var(--vmt-heading, #1f2328);
  font-family: var(--vmt-font-heading, "Lexend", sans-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.single-post .entry-content h2 strong,
.single-post .entry-content h3 strong,
.single-post .entry-content h4 strong {
  font-weight: inherit;
}

/* ===== Inline Links ===== */
.single-post .entry-content a:not(.button) {
  color: var(--vmt-accent-strong, #089b39);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 144, 48, 0.28);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.single-post .entry-content a:not(.button):hover {
  color: var(--vmt-accent, #009030);
  border-bottom-color: var(--vmt-accent, #009030);
}

.single-post .entry-content a:has(img) {
  border-bottom: 0;
}

/* ===== Images & Captions ===== */
.single-post .entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow:
    0 10px 26px rgba(15, 23, 42, 0.08),
    0 2px 6px rgba(0, 60, 25, 0.04);
}

.single-post .entry-content figure.wp-caption,
.single-post .entry-content .wp-caption {
  max-width: 100%;
  margin: 1.75em auto;
  padding: 0;
  border: 0;
  background: none;
}

.single-post .entry-content figcaption,
.single-post .entry-content .wp-caption-text {
  padding: 10px 8px 0;
  background: none;
  color: var(--vmt-ink-2, #5b6470);
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

/* ===== Blockquotes ===== */
.single-post .entry-content blockquote {
  position: relative;
  margin: 1.65em 0;
  padding: 18px 22px 18px 24px;
  border: 1px solid rgba(0, 144, 48, 0.16);
  border-left: 4px solid var(--vmt-accent, #009030);
  border-radius: 0 14px 14px 0;
  background: linear-gradient(135deg, #eefaf1 0%, #f8fdf9 100%);
  color: var(--vmt-ink, #111827);
  font-size: 16px;
  font-style: normal;
  line-height: 1.7;
  box-shadow: 0 6px 18px rgba(0, 60, 25, 0.04);
}

.single-post .entry-content blockquote p {
  font-size: 16px;
  line-height: 1.7;
}

.single-post .entry-content blockquote p:last-child {
  margin-bottom: 0;
}

/* ===== Clean Zebra Tables ===== */
.vmt-table-wrap {
  overflow-x: auto;
  margin-block: 1.65em;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.vmt-table-wrap table {
  width: 100%;
  min-width: 520px;
  margin: 0;
  border-collapse: collapse;
  border: 0;
}

body .vmt-table-wrap table tbody td,
body .vmt-table-wrap table th {
  padding: 13px 16px;
  border: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
  background: #ffffff;
  color: var(--vmt-ink, #111827);
  font-size: 15px;
  line-height: 1.55;
  vertical-align: top;
}

body .vmt-table-wrap table tbody tr:nth-child(even) td {
  background: #f6faf7;
}

body .vmt-table-wrap table tbody tr:hover td {
  background: #eefaf1;
  transition: background-color 0.15s ease;
}

body .vmt-table-wrap table tbody tr:first-child td,
body .vmt-table-wrap table th,
.vmt-table-wrap table thead td,
.vmt-table-wrap table thead th,
.vmt-table-wrap table:not(:has(thead)) tbody tr:first-child td {
  border: 0;
  border-radius: 0;
  background: #0b5d28;
  color: #ffffff;
  font-weight: 600;
}

body .vmt-table-wrap table tbody tr:first-child:hover td,
body .vmt-table-wrap table thead tr:hover td,
body .vmt-table-wrap table thead tr:hover th {
  background: #0b5d28;
}

.vmt-table-wrap tr:first-child td *,
.vmt-table-wrap th *,
.vmt-table-wrap table thead * {
  color: #ffffff;
}

.entry-content .vmt-table-wrap td p,
.entry-content .vmt-table-wrap th p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

/* ===== Post Footer Tags & Author Box ===== */
.single-post .article-inner footer.entry-meta {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.entry-author-box {
  background-color: #ffffff;
  border: 1.5px solid color-mix(in srgb, var(--vmt-accent, #009030) 30%, #fff);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  font-family: var(--vmt-font-body, "Be Vietnam Pro", system-ui, sans-serif);
  box-sizing: border-box;
}
.entry-author-box * {
  box-sizing: border-box;
}
.entry-author-box__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) {
  .entry-author-box__header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.entry-author-box__profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.entry-author-box__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.entry-author-box__info {
  display: flex;
  flex-direction: column;
}
.entry-author-box__name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}
.entry-author-box__role {
  font-size: 0.9rem;
  color: var(--vmt-accent, #009030);
  margin: 0;
  font-weight: 500;
}
.entry-author-box__social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #4b5563;
}
.entry-author-box__social-link {
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: #f3f4f6;
  transition: all 0.2s ease;
}
.entry-author-box__social-link:hover {
  background-color: #e5e7eb;
  color: var(--vmt-accent, #009030);
}
.entry-author-box__bio {
  font-size: 0.975rem;
  line-height: 1.6;
  color: #374151;
  margin: 0;
}

.single-post .post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.single-post .post-tags li a {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid rgba(0, 144, 48, 0.16);
  border-radius: 999px;
  background: #f3faf5;
  color: var(--vmt-accent-strong, #089b39);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.single-post .post-tags li a:hover {
  background: var(--vmt-accent, #009030);
  color: #ffffff;
}

/* ===== ChatGPT Pasted Markup Normalization ===== */
.entry-content div:is(.flex, .flex-grow):has(.text-message, .markdown),
.entry-content .text-message,
.entry-content .text-message div.flex,
.entry-content .markdown.prose {
  display: block;
  width: auto;
  min-width: 0;
  max-width: 100%;
}

/* ===== Hide Publish Dates ===== */
.single-post .entry-header .entry-meta,
.single-post .posted-on,
.single-post .post-date,
.single-post .box-blog-post .post-meta,
.single-post .box-blog-post .badge.post-date {
  display: none !important;
}

/* ===== Right Sidebar Cards ===== */
.single-post .post-sidebar .widget {
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  background: #ffffff;
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.045),
    0 2px 6px rgba(0, 60, 25, 0.025);
}

.single-post .post-sidebar .widget-title {
  display: block;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--vmt-grad, linear-gradient(45deg, #009030 0%, #1fb954 50%, #009030 100%));
  color: #ffffff;
  font-family: var(--vmt-font-heading, "Lexend", sans-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.single-post .post-sidebar .widget > .is-divider {
  display: none;
}

/* Sidebar UX Block header ("Bài Viết Mới") */
#wrapper .title-sidebar > .col-inner {
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--vmt-grad, linear-gradient(45deg, #009030 0%, #1fb954 50%, #009030 100%)) !important;
  box-shadow: 0 6px 14px rgba(0, 144, 48, 0.18);
}

.single-post .post-sidebar .title-sidebar {
  padding-bottom: 14px;
}

.single-post .post-sidebar .title-sidebar .is-border {
  display: none;
}

.single-post .post-sidebar .title-sidebar h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  text-align: left;
}

.single-post .post-sidebar .title-sidebar h3 span {
  font-size: 100% !important;
  color: #ffffff !important;
}

/* Sidebar post cards */
.single-post .post-sidebar .post-item {
  padding-bottom: 12px;
}

.single-post .post-sidebar .post-item + .post-item {
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.single-post .post-sidebar .post-item:last-child {
  padding-bottom: 0;
}

.single-post .post-sidebar .box-blog-post {
  align-items: center;
  border-radius: 12px;
  transition: background-color 0.2s ease;
}

.single-post .post-sidebar .box-blog-post:hover {
  background: #f4fbf6;
}

.single-post .post-sidebar .box-blog-post .box-image {
  overflow: hidden;
  border-radius: 10px !important;
}

.single-post .post-sidebar .box-blog-post .box-text {
  padding: 4px 6px 4px 12px !important;
}

.single-post .post-sidebar .box-blog-post .post-title {
  margin: 0;
  color: var(--vmt-heading, #1f2328);
  font-family: var(--vmt-font-heading, "Lexend", sans-serif);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.single-post .post-sidebar .box-blog-post:hover .post-title,
.single-post .post-sidebar .box-blog-post .post-title a:hover {
  color: var(--vmt-accent, #009030);
}

.single-post .post-sidebar .box-blog-post .is-divider {
  display: none;
}

/* ===== Responsive Refinements ===== */
@media (max-width: 849px) {
  .single-post .blog-wrapper.blog-single {
    padding-top: 16px;
    padding-bottom: 36px;
  }

  .single-post .blog-single .article-inner {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .single-post .entry-content h2 {
    padding: 10px 14px;
    font-size: 20px;
  }

  .single-post .entry-content p,
  .single-post .entry-content li {
    font-size: 16px;
    line-height: 1.72;
  }

  .single-post .post-sidebar .widget {
    padding: 16px;
    border-radius: 16px;
  }
}
