/* Single post layout. */
.single-post .blog-wrapper {
  padding-top: 24px;
  background:
    radial-gradient(circle at 12% 0, rgba(3, 119, 164, 0.05), transparent 28rem),
    linear-gradient(180deg, #f8fafc 0, #fff 36rem);
}

.single-post .blog-wrapper > .row {
  align-items: flex-start;
  width: min(var(--edu-layout-max), calc(100% - (var(--edu-layout-gutter) * 2))) !important;
  max-width: var(--edu-layout-max) !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

.single-post .blog-wrapper > .row > .large-9.col {
  padding: 0 12px 0 0 !important;
}

.single-post article {
  margin-bottom: 24px !important;
}

.single-post article > .article-inner {
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.2vw, 26px);
  background: #fff;
  border: 1px solid var(--edu-line);
  border-radius: 14px;
  box-shadow: var(--edu-shadow-sm);
}

.single-post .edu-post-section-nav {
  order: -1;
  width: 100%;
  min-width: 0;
}

.single-post .edu-post-section-nav:empty {
  display: none;
}

.single-post .entry-header-text {
  padding: 0 0 14px !important;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--edu-line);
}

.single-post .entry-header-text .entry-title {
  margin: 0;
  color: #1d2939 !important;
  font-size: 24px !important;
  line-height: 1.3 !important;
  letter-spacing: -0.025em;
}

.single-post .entry-content {
  padding: 0 !important;
  color: #364152;
  font-size: 16px;
  line-height: 1.72;
}

.single-post .entry-content > p {
  margin-bottom: 15px;
}

.single-post .entry-content > h2,
.single-post .entry-content > h3 {
  scroll-margin-top: 100px;
  color: var(--edu-ink) !important;
  letter-spacing: -0.015em;
}

.single-post .entry-content > h2 {
  margin: 30px 0 14px;
  padding: 11px 14px;
  border-left: 4px solid var(--edu-primary);
  border-radius: 0 var(--edu-radius-sm) var(--edu-radius-sm) 0;
  background: linear-gradient(90deg, #fff3f1, rgba(255, 255, 255, 0));
  font-size: 20px !important;
  line-height: 1.4;
}

.single-post .entry-content > h3 {
  margin: 24px 0 10px;
  padding: 8px 12px;
  border-left: 3px solid var(--edu-secondary);
  border-radius: 0 6px 6px 0;
  background: #f2f8fb;
  font-size: 18px !important;
  line-height: 1.45;
}

.single-post .entry-content > ul:not(.custom-horizontal-menu) {
  margin: 0 0 18px;
  padding: 14px 18px 10px 38px;
  border: 1px solid var(--edu-line);
  border-radius: var(--edu-radius-sm);
  background: var(--edu-surface-soft);
}

.single-post .entry-content > ul:not(.custom-horizontal-menu) > li {
  margin: 0 0 8px;
}

.single-post .entry-content figure {
  margin: 20px auto 24px;
}

.single-post .entry-content figure img {
  display: block;
  border-radius: 10px;
}

.single-post .entry-content figcaption {
  padding-top: 7px;
  color: var(--edu-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* Navigation pills above the post title. */
.single-post .custom-horizontal-menu {
  display: flex !important;
  flex-flow: row wrap !important;
  gap: 8px !important;
  margin: 0 0 16px !important;
  padding: 10px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #fff7f5 0%, #f4faff 100%) !important;
  box-shadow: 0 5px 18px rgba(30, 48, 70, 0.07);
  list-style: none;
}

.single-post .custom-horizontal-menu li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.single-post .custom-horizontal-menu a {
  display: block;
  padding: 9px 14px !important;
  border: 1px solid #d4dde7 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #344054 !important;
  box-shadow: 0 2px 7px rgba(30, 48, 70, 0.05);
  font-size: 12px !important;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.015em;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease !important;
}

.single-post .custom-horizontal-menu a:is(:hover, .active, .active-link) {
  border-color: var(--edu-primary) !important;
  background: var(--edu-primary) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(201, 21, 17, 0.18);
}

.single-post .custom-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0 0 18px;
  padding: 9px 11px;
  border-radius: var(--edu-radius-sm);
  background: var(--edu-surface-soft);
  color: var(--edu-muted);
  font-size: 13px;
}

.single-post .custom-post-meta span {
  margin: 0 !important;
}

/* Table of contents. */
.single-post #ez-toc-container {
  width: 100% !important;
  margin: 18px 0 24px !important;
  padding: 14px 16px !important;
  border: 1px solid #d9e7f1 !important;
  border-radius: 10px !important;
  background: #f5faff !important;
  box-shadow: none !important;
}

.single-post #ez-toc-container .ez-toc-title {
  color: var(--edu-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.single-post #ez-toc-container a {
  color: #42566e !important;
  line-height: 1.55;
  text-decoration: none !important;
}

.single-post #ez-toc-container a:hover {
  color: var(--edu-primary) !important;
}

/* Share one content-table design across articles and school detail pages. */
:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) {
  --table-red: #ea170d;
  --table-red-dark: #a90f09;
  --table-text: #334155;
  --table-line: #e2e8f0;
  width: 100% !important;
  margin: 28px 0 34px !important;
  overflow: hidden;
  border: 1px solid #d20d00 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 10px;
  background-color: #fff !important;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.75)),
    url("https://duhocedutime.edu.vn/wp-content/uploads/2025/04/logoedutime.svg") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: clamp(230px, 45%, 390px) auto !important;
  color: var(--table-text) !important;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.11);
  scrollbar-color: var(--table-red) #f1f5f9;
  scrollbar-width: thin;
}

:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) thead tr {
  background: linear-gradient(135deg, var(--table-red-dark), var(--table-red)) !important;
}

:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) thead th {
  padding: 5px 10px !important;
  border: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-bottom: 3px solid #f1c84a !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
  vertical-align: middle;
}

:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) thead th:last-child {
  border-right: 0 !important;
}

:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) tbody,
:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) tbody tr {
  background: transparent !important;
}

:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) tbody td {
  padding: 8px 9px !important;
  border: 0 !important;
  border-right: 1px solid var(--table-line) !important;
  border-bottom: 1px solid var(--table-line) !important;
  background: rgba(255, 255, 255, 0.76) !important;
  color: var(--table-text) !important;
  font-size: 13px !important;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  text-align: left;
  vertical-align: middle;
  transition: background-color 0.2s ease;
}

:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) tbody tr:nth-child(even) td {
  background: rgba(255, 246, 245, 0.76) !important;
}

:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) tbody tr:hover td {
  background: rgba(238, 249, 253, 0.92) !important;
}

:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) tbody td:last-child {
  border-right: 0 !important;
}

:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) tbody tr:last-child td {
  border-bottom: 0 !important;
}

:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) tbody td strong {
  color: var(--table-red-dark) !important;
  font-weight: 700;
}

:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table)::-webkit-scrollbar {
  height: 7px;
}

:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table)::-webkit-scrollbar-track {
  background: #f1f5f9;
}

:is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table)::-webkit-scrollbar-thumb {
  border-radius: 20px;
  background: var(--table-red);
}

@media (max-width: 767px) {
  :is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) {
    display: block !important;
    width: 100% !important;
    margin: 22px 0 28px !important;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 12px;
    background-position: center !important;
    background-size: 290px auto !important;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.1);
    -webkit-overflow-scrolling: touch;
  }

  :is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) thead,
  :is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) tbody {
    width: max-content;
    min-width: 100%;
  }

  :is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) :is(th, td) {
    min-width: 135px;
    white-space: normal;
  }

  :is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) :is(th, td):first-child {
    min-width: 210px;
  }

  :is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) thead th {
    padding: 13px 11px !important;
    font-size: 12px !important;
  }

  :is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) tbody td {
    padding: 11px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    font-size: 14px !important;
  }

  :is(body:not(.single-truonghoc) .entry-content, body.single-truonghoc .edu-school-article-content, body.page-template-page-right-sidebar .page-inner) table:not(.shop_table):not(.hb-scholarship-table) tbody tr:nth-child(even) td {
    background: rgba(255, 246, 245, 0.8) !important;
  }
}

/* Sidebar: each widget becomes its own card; the full-height border is removed. */
.single-post .post-sidebar {
  align-self: flex-start;
  height: auto !important;
  padding: 0 0 0 12px !important;
  border: 0 !important;
}

.single-post .post-sidebar .widget {
  overflow: hidden;
  margin: 0 0 18px !important;
  padding: 0 14px 10px !important;
  border: 1px solid var(--edu-line) !important;
  border-radius: var(--edu-radius-md) !important;
  background: #fff;
  box-shadow: var(--edu-shadow-sm);
}

.single-post .post-sidebar .widget-title {
  display: flex !important;
  align-items: center;
  gap: 9px;
  margin: 0 -14px 8px !important;
  padding: 12px 14px !important;
  border: 0 !important;
  border-bottom: 2px solid var(--edu-primary) !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: var(--edu-ink) !important;
  font-size: 14px !important;
  line-height: 1.35;
  text-align: left;
  text-transform: uppercase !important;
}

.single-post .post-sidebar .widget-title::before {
  width: 4px;
  height: 18px;
  flex: 0 0 4px;
  border-radius: 999px;
  background: var(--edu-primary);
  content: "";
}

.single-post .post-sidebar .menu {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.single-post .post-sidebar .menu > li {
  margin: 0 !important;
  border-bottom: 1px solid #edf1f5 !important;
}

.single-post .post-sidebar .menu > li:last-child {
  border-bottom: 0 !important;
}

.single-post .post-sidebar .menu > li > a {
  position: relative;
  display: block;
  padding: 9px 18px 9px 2px !important;
  color: #465467 !important;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.45;
}

.single-post .post-sidebar .menu > li > a::after {
  position: absolute;
  top: 50%;
  right: 2px;
  color: #a7b0bc;
  content: "›";
  transform: translateY(-50%);
}

.single-post .post-sidebar .menu > li > a:hover {
  color: var(--edu-primary) !important;
}

.single-post .post-sidebar .widget_media_image {
  padding: 8px !important;
}

.single-post .post-sidebar .widget_media_image img {
  display: block;
  width: 100%;
  border-radius: var(--edu-radius-sm);
}

@media (max-width: 849px) {
  .single-post .blog-wrapper {
    padding: 8px 0 90px;
  }

  .single-post .blog-wrapper > .row {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  .single-post .blog-wrapper > .row > .large-9.col,
  .single-post .post-sidebar {
    width: 100% !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  .single-post article > .article-inner {
    padding: 12px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  /* Flatsome's sticky mobile search header is 58px high. */
  .single-post .custom-horizontal-menu {
    position: sticky !important;
    top: 58px !important;
    z-index: 990;
    flex-flow: row nowrap !important;
    gap: 7px !important;
    width: calc(100% + 24px);
    max-width: none;
    margin: 0 -12px 16px !important;
    padding: 9px 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-right: 0 !important;
    border-left: 0 !important;
    border-radius: 0 0 10px 10px !important;
    background: #fff !important;
    box-shadow: 0 8px 18px rgba(30, 48, 70, 0.11);
    overscroll-behavior-x: contain;
    scroll-padding-inline: 12px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .single-post .custom-horizontal-menu::-webkit-scrollbar {
    display: none;
  }

  .single-post .custom-horizontal-menu li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .single-post .custom-horizontal-menu a {
    padding: 8px 12px !important;
    font-size: 11px !important;
  }

  .single-post .post-sidebar {
    margin-top: 18px;
  }
}
@media (max-width: 549px) {
  .single-post .entry-header-text .entry-title {
    font-size: 24px !important;
  }

  .single-post .entry-content {
    font-size: 15px;
    line-height: 1.68;
  }

  .single-post .entry-content > h2 {
    margin-top: 25px;
    padding: 9px 11px;
    font-size: 20px !important;
  }

  .single-post .entry-content > h3 {
    font-size: 18px !important;
  }

  .single-post .custom-horizontal-menu {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }

  .single-post .custom-horizontal-menu li {
    width: auto !important;
  }

  .single-post .custom-horizontal-menu a {
    width: auto !important;
    padding: 7px 10px !important;
  }
}
