@import "../../components/section-testimonials/assets/styles.css";
/* ============================================
   Bảo mật thông tin — Page Layout
   ============================================ */

.baomat-page {
  width: 100%;
  padding: 3.5rem 0 3.75rem;
  padding-top: 8rem;
}

.baomat__container {
  width: min(100%, 87.5rem);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ============================================
   Breadcrumb
   ============================================ */
.baomat__breadcrumbs {
  display: flex;
  /* flex-wrap: wrap; */
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.06rem;
}

.baomat__breadcrumb {
  color: rgba(66, 66, 66, 0.6);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  flex-shrink: 0;
}

.baomat__breadcrumb--active {
  color: #424242;
  font-weight: 600;
  -webkit-line-clamp: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  flex-shrink: inherit;
}

.baomat__breadcrumb-separator {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: rgba(66, 66, 66, 0.6);
}

/* ============================================
   Header
   ============================================ */
.baomat__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.baomat__title {
  color: var(--Text-Body-T1, #2e2e2e);
  font-family: SVN-Gilroy, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 120%;
  letter-spacing: -0.03056rem;
}

.baomat__back-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 5rem;
  height: 5rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(
    --Color-Buttons-Buttons-color,
    linear-gradient(92deg, #09b8b3 3.04%, #4dcbdf 99%)
  );
  color: #fff;
  text-align: center;
  font-family: SVN-Gilroy, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 150%;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.baomat__back-button:hover {
  opacity: 0.88;
  color: #fff;
}

/* ============================================
   Banner
   ============================================ */
.baomat__banner {
  width: 100%;
  border-radius: 1.5rem;
  overflow: hidden;
  margin-bottom: 3.94rem;
}

.baomat__banner-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ============================================
   Layout: sidebar + content
   ============================================ */
.baomat__layout {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

/* ============================================
   Sidebar — TOC
   ============================================ */
.baomat__sidebar {
  position: sticky;
  top: 6rem;
  width: 23.625rem;
  flex-shrink: 0;
  height: fit-content;
}

.baomat__toc {
  padding: 2.5rem 1.875rem 1.875rem 1.875rem;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 3px 40px 1px rgba(214, 214, 221, 0.4);
  font-family: SVN-Gilroy, sans-serif;
}

.baomat__toc-title {
  margin: 0 0 1rem;
  color: #2e2e2e;
  font-family: SVN-Gilroy, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
}

.baomat__toc-nav {
  /* populated by JS */
}

.baomat__toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: baomat-toc-counter;
}

.baomat__toc-item {
  margin: 0 0 0.875rem;
  counter-increment: baomat-toc-counter;
  color: rgba(66, 66, 66, 0.8);
  font-size: 1rem;
  line-height: 1.5;
}

.baomat__toc-item:last-child {
  margin-bottom: 0;
}

.baomat__toc-link {
  color: rgba(66, 66, 66, 0.8);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.baomat__toc-link:hover,
.baomat__toc-item.is-active .baomat__toc-link {
  color: #09b8b3;
  font-weight: 600;
}

.baomat__toc-item.is-active::before {
  color: #09b8b3;
  font-weight: 600;
}

/* ============================================
   Main content
   ============================================ */
.baomat__main {
  flex: 1;
  min-width: 0;
}

.baomat__content {
  color: #424242;
  font-family: SVN-Gilroy, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  word-break: break-word;
  overflow-wrap: break-word;
  text-align: justify;
}

.baomat__content > :first-child {
  margin-top: 0;
}

/* Headings */
.baomat__content h1 {
  margin: 2.5rem 0 1rem;
  color: #2e2e2e;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.baomat__content h2 {
  margin: 2rem 0 1rem;
  color: #323232;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.baomat__content h3 {
  margin: 1.75rem 0 0.75rem;
  color: #323232;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
}

.baomat__content h4 {
  margin: 1.5rem 0 0.75rem;
  color: #323232;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.baomat__content h5 {
  margin: 1.25rem 0 0.5rem;
  color: #323232;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.baomat__content h6 {
  margin: 1rem 0 0.5rem;
  color: #323232;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Paragraph */
.baomat__content p {
  margin: 0 0 1rem;
  color: rgba(66, 66, 66, 0.8);
  text-align: justify;
  font-size: 1rem;
  font-style: normal;
  font-weight: 500;
  line-height: 150%; /* 1.5rem */
}
.baomat__content strong {
  color: #424242;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01006rem;
}
/* Links */
.baomat__content a {
  color: #09b8b3;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}

.baomat__content a:hover {
  color: #07a09b;
}

/* Lists */
.baomat__content ul,
.baomat__content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.baomat__content ul {
  list-style: disc;
}

.baomat__content ol {
  list-style: decimal;
}

.baomat__content li {
  margin: 0 0 0.5rem;
  line-height: 1.75;
}

.baomat__content li:last-child {
  margin-bottom: 0;
}

/* Blockquote */
.baomat__content blockquote {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid #09b8b3;
  border-radius: 0 0.5rem 0.5rem 0;
  background: rgba(9, 184, 179, 0.05);
  color: #2e2e2e;
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.baomat__content blockquote p {
  margin: 0;
}

/* Images */
.baomat__content img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1rem;
  margin: 1.75rem 0;
}

/* Tables */
.baomat__content table {
  width: 100%;
  margin: 1.75rem 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
  overflow-x: auto;
  display: block;
}

.baomat__content thead {
  background: linear-gradient(92deg, #09b8b3 3.04%, #4dcbdf 99%);
  color: #fff;
}

.baomat__content th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

.baomat__content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(66, 66, 66, 0.08);
  vertical-align: top;
}

.baomat__content tbody tr:nth-child(even) {
  background: rgba(9, 184, 179, 0.03);
}

/* HR */
.baomat__content hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid rgba(66, 66, 66, 0.1);
}

/* Clearfix */
.baomat__content::after {
  content: "";
  display: table;
  clear: both;
}

/* ============================================
   Responsive — Tablet ≤ 1024px
   ============================================ */
@media screen and (max-width: 1024px) {
  .baomat__sidebar {
    width: 18rem;
  }
}
.baomat__toc-toggle {
  display: none;
}
/* ============================================
   Responsive — Mobile ≤ 767.98px
   ============================================ */
@media screen and (max-width: 767.98px) {
  .baomat__toc-toggle {
    display: block;
  }
  .baomat__toc-item.is-hidden {
    display: none;
  }

  .baomat__toc-toggle {
    margin-top: 0.88rem;
    cursor: pointer;
    color: #2b98ff;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 600;
    line-height: 150%; /* 1.3125rem */
  }
  .baomat-page {
    padding: 0;
  }

  .baomat__container {
    padding: 3rem 1rem;
    padding-top: 6rem;
    padding-bottom: 3rem; /* chừa chỗ cho fixed bar */
  }

  .baomat__header {
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .baomat__title {
    color: #424242;
    align-items: start;
    font-size: 1.5rem;
    font-style: normal;
    font-weight: 700;
    line-height: 120%; /* 1.8rem */
    letter-spacing: -0.03056rem;
    text-transform: capitalize;
  }

  .baomat__back-button {
    display: none;
    width: auto;
    height: auto;
    padding: 0.625rem 1.25rem;
    flex-direction: row;
    gap: 0.5rem;
    font-size: 0.875rem;
  }

  .baomat__banner {
    border-radius: 0.875rem;
    margin-bottom: 2rem;
  }

  .baomat__layout {
    flex-direction: column;
    gap: 0;
  }

  .baomat__sidebar {
    position: static;
    width: 100%;
    order: 1;
    margin-bottom: 2rem;
  }

  .baomat__main {
    order: 1;
  }

  .baomat__toc {
    padding: 1.25rem 1rem;
  }

  .baomat__toc-title {
    font-size: 1rem;
  }

  .baomat__toc-item {
    font-size: 0.875rem;
    margin-bottom: 0.625rem;
  }

  .baomat__content {
    font-size: 0.9375rem;
  }

  .baomat__content h2 {
    font-size: 1.3125rem;
  }

  .baomat__content h3 {
    font-size: 1.125rem;
  }

  .baomat__content h4 {
    font-size: 1rem;
  }
}

/* ============================================
   Mobile TOC — Fixed bottom bar
   ============================================ */
.baomat-toc-bar {
  display: none;
}
@media screen and (max-width: 767.98px) {
  .baomat-toc-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 3.25rem;
    padding: 0 1.25rem;
    background: #fff;
    border-top: 1px solid rgba(66, 66, 66, 0.1);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }

  .baomat-toc-bar.is-visible {
    transform: translateY(0);
    pointer-events: auto;
  }

  .baomat-toc-bar__title {
    color: #2e2e2e;
    font-family: SVN-Gilroy, sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.4;
  }

  .baomat-toc-bar__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: #09b8b3;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: background 0.2s;
  }

  .baomat-toc-bar__toggle:hover {
    background: rgba(9, 184, 179, 0.08);
  }

  /* ============================================
     Mobile TOC — Drawer
     ============================================ */
  .baomat-toc-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear 0.35s;
    contain: paint;
    isolation: isolate;
  }

  .baomat-toc-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  /* inset-top = env(safe-area-inset-top): backdrop tối KHÔNG phủ lên dải status bar/notch.
     iOS để kẹt buffer đen ở dải này khi overlay tối đóng lại → "khoảng đen ở trên".
     Chừa dải đó ra cho body::before (nền trắng) giữ, triệt tiêu nguồn gây đen. */
  .baomat-toc-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    z-index: 0;
    transition: opacity 0.3s ease;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  .baomat-toc-drawer.is-open .baomat-toc-drawer__backdrop {
    opacity: 1;
  }

  .baomat-toc-drawer__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 1.25rem 1.25rem 0 0;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    will-change: transform;
    z-index: 1;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-transform: translateY(100%);
  }

  .baomat-toc-drawer.is-open .baomat-toc-drawer__panel {
    transform: translateY(0);
    -webkit-transform: translateY(0);
  }

  .baomat-toc-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(66, 66, 66, 0.08);
    flex-shrink: 0;
  }

  .baomat-toc-drawer__title {
    color: #2e2e2e;
    font-family: SVN-Gilroy, sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
  }

  .baomat-toc-drawer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    background: transparent;
    color: #424242;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: background 0.2s;
    flex-shrink: 0;
  }

  .baomat-toc-drawer__close:hover {
    background: rgba(66, 66, 66, 0.06);
  }

  .baomat-toc-drawer__body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 1rem 1.25rem 2rem;
    flex: 1;
  }

  /* TOC list bên trong drawer */
  .baomat-toc-drawer__body ul {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: baomat-drawer-counter;
  }

  .baomat-toc-drawer__body ul li {
    margin: 0 0 1rem;
    padding: 0;
    counter-increment: baomat-drawer-counter;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .baomat-toc-drawer__body ul li:last-child {
    margin-bottom: 0;
  }

  .baomat-toc-drawer__body ul li a {
    color: #2e2e2e;
    font-family: SVN-Gilroy, sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.55;
    text-decoration: none;
  }

  .baomat-toc-drawer__body ul li a:hover,
  .baomat-toc-drawer__body ul li a.active {
    color: #09b8b3;
  }

  /* "Xem thêm" link */
  .baomat-toc-drawer__see-more {
    display: inline-block;
    margin-top: 1rem;
    color: #09b8b3;
    font-family: SVN-Gilroy, sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
  }

  .baomat-toc-drawer__see-more:hover {
    text-decoration: underline;
  }
}

/* ============================================
   Dieu khoan dich vu TOC sync with single-post
   ============================================ */
body.page-id-1471 .baomat__toc {
  width: 100%;
  margin: 0 0 2rem;
  padding: 2.5rem 1.875rem 1.875rem 1.875rem;
  border: 1px solid rgba(66, 66, 66, 0.08);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 0.25rem 1.5rem rgba(17, 24, 39, 0.06);
  font-family: "SVN-Gilroy", sans-serif;
}

body.page-id-1471 .baomat__toc-title {
  margin: 0 0 1rem;
  padding: 0;
  color: #2e2e2e;
  font-family: "SVN-Gilroy", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}

body.page-id-1471 .baomat__toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: transparent;
}

body.page-id-1471 .baomat__toc-item {
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
  color: rgba(66, 66, 66, 0.8);
  font-size: 0.9375rem;
  line-height: 1.55;
}

body.page-id-1471 .baomat__toc-item:last-child {
  margin-bottom: 0;
}

body.page-id-1471 .baomat__toc-link {
  display: inline;
  color: rgba(66, 66, 66, 0.8);
  font-weight: 600;
  line-height: 1.55;
  text-decoration: none;
  background: transparent;
  transition: color 0.2s ease;
}

body.page-id-1471 .baomat__toc-link:hover {
  color: #09b8b3;
}

/* body.page-id-1471 .baomat__toc-item.is-active .baomat__toc-link,
body.page-id-1471
  .baomat__toc-list:not(:has(.baomat__toc-item.is-active))
  > .baomat__toc-item:first-child
  > .baomat__toc-link {
  background: linear-gradient(92deg, #09b8b3 3.04%, #4dcbdf 99%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
} */

body.page-id-1471 .baomat-toc-drawer__body ul li a {
  color: rgba(66, 66, 66, 0.8);
}

body.page-id-1471 .baomat-toc-drawer__see-more {
  color: #2b98ff;
  font-size: 1rem;
  line-height: 130%;
}

@media screen and (max-width: 767.98px) {
  .baomat__breadcrumbs {
    margin-bottom: 1rem;
  }
  .baomat__breadcrumb-separator {
    background: #424242;
  }
  body.page-id-1471 .baomat__toc {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    width: calc(100vw - 2rem);
    margin-left: auto;
    margin-right: auto;
    border-radius: 1rem;
    box-shadow: 0 3px 40px 1px rgba(214, 214, 221, 0.4);
  }

  body.page-id-1471 .baomat__toc-title {
    font-size: 1rem;
  }

  body.page-id-1471 .baomat__toc-link {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 150%;
    letter-spacing: -0.00875rem;
  }

  body.page-id-1471 .baomat__toc-item {
    font-size: 0.875rem;
    margin-bottom: 0.625rem;
  }

  body.page-id-1471 .baomat__toc-item.is-active .baomat__toc-link,
  body.page-id-1471 .baomat__toc-link:active,
  body.page-id-1471 .baomat__toc-link:focus,
  body.page-id-1471 .baomat__toc-link:hover,
  body.page-id-1471
    .baomat__toc-list:not(:has(.baomat__toc-item.is-active))
    > .baomat__toc-item:first-child
    > .baomat__toc-link,
  body.page-id-1471 .baomat-toc-drawer__body ul li a:hover,
  body.page-id-1471 .baomat-toc-drawer__body ul li a.active,
  body.page-id-1471 .baomat-toc-drawer__body ul li a:active,
  body.page-id-1471 .baomat-toc-drawer__body ul li a:focus {
    background: none !important;
    color: rgba(66, 66, 66, 0.8) !important;
    -webkit-text-fill-color: rgba(66, 66, 66, 0.8) !important;
  }
}
