/* ==========================================================================
   1. CMS content section
   ========================================================================== */

.cms-content-section-wrapper {
  max-width: 1277rem;
  margin: 0 auto;
  padding: 24rem 12rem 24rem 38rem;
  background: #170513;
  border-radius: 16rem;
  backdrop-filter: blur(58px);
  border: 1px solid #2d0d2f;
  color: #ddd8cd;
}

.cms-content-section {
  padding-right: 13rem;
  height: 865rem;
  overflow-y: scroll;
  overflow-x: hidden;
}
.cms-content-section.about-us {
  height: 1025rem;
}
.cms-content-section::-webkit-scrollbar {
  width: 7rem;
  margin-right: 10rem;
}

.cms-content-section::-webkit-scrollbar-track {
  background: #d9d9d91a;
  /* Optional: Round the track edges too */
  border-radius: 1000px !important;
}

.cms-content-section::-webkit-scrollbar-thumb {
  background: linear-gradient(178.12deg, #3e1273 1.59%, #e72887 89.35%);
  border-radius: 1000px !important;
}
/* ==========================================================================
   1. Billboard Card Layout & Typography Overlays
   ========================================================================== */
.content-img {
  width: 90%;
  max-width: 1024rem;
  margin: auto;
  margin-top: 48rem;
}
.content-img:first-of-type {
  margin-top: unset;
}
.content-img img {
  width: 100%;
}
.image-caption {
  text-align: center;
  font-size: 16rem;
  font-style: italic;
  line-height: 22rem;
  color: #ddd8cd;
  margin-block: 16rem 30rem;
  padding: 0 40rem;
}

/* ==========================================================================
   2. Content Blocks Styles
   ========================================================================== */
.article-content-block {
  margin-bottom: 45rem;
}

.content-heading-primary {
  font-size: 22rem;
  line-height: 44rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 5rem;
}

.content-heading-secondary {
  font-size: 18rem;
  font-weight: 700;
  color: #fecb45;
  margin-bottom: 10rem;
  line-height: 24rem;
  text-transform: uppercase;
}

.content-paragraph {
  font-size: 16rem;
  line-height: 22rem;
  margin-bottom: 16rem;
}

.content-paragraph a {
  color: #fecb45;
  text-decoration: underline;
}
.content-list {
  padding-left: 20rem;
  font-size: 16rem;
  line-height: 22rem;
  margin-bottom: 16rem;
}
.text-gold-highlight,
.p-text-gold {
  color: #fecb45;
  font-weight: 400;
}
.p-text-gold {
  margin-bottom: 0rem;
}
.end-text {
  font-weight: 700;
  font-size: 22rem;
  line-height: 28rem;
  letter-spacing: 0%;
  text-transform: uppercase;
  margin-block: 31rem 11rem;
  color: #ddd8cd;
}
/* ==========================================================================
   3. Analytical Specification Table Styles
   ========================================================================== */
.info-table-wrap.desktop {
  display: block;
}
.info-table-wrap.mobile {
  display: none;
}
.info-table-wrap {
  width: 100%;
  max-width: 1440rem;
  margin: 0 auto 30rem;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: "SVN-Gilroy", sans-serif;
  color: #f4eefe;
  background: transparent;
}

.table-2-column tr th,
.table-2-column tr td {
  width: 50%;
}

.info-table thead th {
  font-size: 16rem;
  line-height: 22rem;
  font-weight: 500;
  color: #fecb45;
  padding: 13rem 26rem;
  position: relative;
}
.info-table thead {
  background: linear-gradient(
    90deg,
    rgba(27, 13, 40, 0) 0%,
    #442562 50%,
    rgba(27, 13, 40, 0) 100%
  );
  position: relative;
}
.info-table thead::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 9;
  height: 1rem;
  background: url("../icon/table-divider.svg") top center no-repeat;
  background-size: cover;
  opacity: 0.7;
  background-blend-mode: color-dodge;
  width: 100%;
}
.info-table tbody tr {
  position: relative;
}

.info-table tbody tr::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  z-index: 9;
  height: 1rem;
  background: url("../icon/table-divider.svg") top center no-repeat;
  background-size: cover;
  opacity: 0.5;
  background-blend-mode: color-dodge;
  width: 100%;
}

/* Last row: same SVG divider at bottom (reuses ::after — do not use ::before on tr) */
.info-table tbody tr:last-child::after {
  top: 0;
  bottom: 0;
  height: auto;
  background-image: url("../icon/table-divider.svg"),
    url("../icon/table-divider.svg");
  background-position: top center, bottom center;
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 1rem, 100% 1rem;
}
.info-table tbody td {
  font-size: 16rem;
  font-weight: 400;
  line-height: 22rem;
  color: #ddd8cd;
  padding: 13rem 23rem;
}

.info-table tbody tr {
  position: relative;
}

.info-table tbody tr:nth-child(odd) {
  background: linear-gradient(
    90deg,
    rgba(27, 13, 40, 0) 0%,
    #2b1143 50%,
    rgba(27, 13, 40, 0) 100%
  );
}
.info-table tbody tr:nth-child(even) {
  background: transparent;
}
.info-table.table-3-column tbody tr:nth-child(odd) {
  background: transparent;
}
.info-table.table-3-column thead th:first-of-type {
  width: 24%;
}

.w-56 {
  width: 56% !important;
}
.w-24 {
  width: 24%;
}
.info-table.table-4-column tbody tr {
  background: linear-gradient(
    90deg,
    rgba(27, 13, 40, 0) 0%,
    #2b1143 50%,
    rgba(27, 13, 40, 0) 100%
  );
}
.info-table th:first-child,
.info-table td:first-child {
  text-align: right;
}
.info-table th:not(:first-child),
.info-table td:not(:first-child) {
  text-align: left;
  border-left: 1px solid #ffffff26;
}
.info-table.table-3-column th:not(:first-child) {
  width: 37%;
}
/* .info-table th,
.info-table td {
  width: 50%;
} */
.info-table th:last-child,
.info-table td:last-child {
  text-align: left;
}

.rating-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.star {
  line-height: 1;
  color: #ffcf40;
  filter: drop-shadow(0 0 4px rgba(255, 207, 64, 0.45));
}

/* 4-column widths similar to screenshot */
.table-4-column th,
.table-4-column td {
  width: 25%;
}

.value-cell {
  color: #ffffff;
  text-align: right;
}

.highlight-gold-cell {
  color: #ffd700;
  font-weight: 700;
}

.highlight-gold-cell i {
  margin-left: 4rem;
  font-size: 14rem;
}

@media screen and (max-width: 768px) {
  .huong-dan .topic-title {
    margin-block: 12rem 24rem;
  }
  .topic-title {
    color: #fae4b1;
    font-size: 20rem;
    line-height: 1;
    text-transform: uppercase;
  }
  .cms-content-section-wrapper {
    padding: 12rem;
    max-width: unset;
  }
  .cms-content-section,
  .cms-content-section.about-us {
    height: unset;
    overflow: unset;
    padding: unset;
  }

  .content-img {
    width: 378rem;
    margin-top: 22rem;
  }
  .image-caption {
    font-size: 14rem;
    line-height: calc(22 / 14);
    margin-block: 16rem 22rem;
    padding: unset;
  }
  /* Content Block Updates */
  .content-heading-primary {
    font-size: 20rem;
    margin-bottom: 12rem;
    line-height: calc(26 / 22);
  }

  .content-paragraph {
    font-size: 15rem;
    text-align: left;
    line-height: calc(22 / 15);
  }
  .content-list {
    font-size: 15rem;
  }
  .info-table-wrap.desktop {
    display: none;
  }
  .info-table-wrap.mobile {
    display: block;
  }

  .info-table-wrap {
    width: 402rem;
    margin-inline: -14rem;
    overflow-x: auto;
    /* Optional but highly recommended: adds momentum scrolling on iOS devices */
    -webkit-overflow-scrolling: touch;
    display: block;
  }
  .info-table-wrap::-webkit-scrollbar {
    display: none;
  }
  .info-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 400rem; /* adjust if needed */
  }

  .info-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
  }
  .info-table th,
  .info-table td {
    text-align: left;
    border-bottom: 1px solid #ffffff26;
  }
  /* Single vertical divider — avoid stacking border-left + inset shadow */
  .info-table th:not(:first-child),
  .info-table td:not(:first-child) {
    border-left: 1px solid #ffffff26;
    box-shadow: none;
  }
  /* Sticky first-col tables: inset shadow stays visible over sticky backgrounds */
  .info-table:not(.table-2-column) th:not(:first-child),
  .info-table:not(.table-2-column) td:not(:first-child) {
    border-left: none;
    box-shadow: inset 1px 0 0 #ffffff26;
  }
  /* SVG header divider stacks on top of border-bottom — hide on mobile */
  .info-table thead::after {
    content: none;
  }
  /* 2-col tables fit the screen — sticky covers the divider, turn it off */
  .info-table.table-2-column th:first-child,
  .info-table.table-2-column tr:first-child th,
  .info-table.table-2-column tr:first-child td {
    position: static;
    z-index: auto;
  }
  .info-table tr:first-child th:first-child {
    z-index: 3; /* keep top-left cell above others */
  }
  .info-table tr:first-child th,
  .info-table tr:first-child td {
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .info-table tr:first-child th:first-child {
    z-index: 4;
  }

  .info-table.table-4-column {
    width: 512rem;
  }
  .boi-hoan .info-table.table-3-column {
    width: 1024rem;
  }
  .info-table.table-3-column {
    width: 723rem;
  }
  .info-table.table-6-column {
    width: 1215rem;
  }
  .info-table.table-3-column tr th {
    max-width: 115rem;
    width: 115rem;
  }

  .table-2-column tr th,
  .table-2-column tr td {
    width: 100%;
  }

  /* Match homepage: soft thead gradient, not sticky solid fill */
  .info-table.table-2-column thead th,
  .info-table:not(.table-3-column):not(.table-4-column):not(.table-6-column):not(
      .table-more-column
    )
    thead
    th {
    background: unset;
    min-width: 0;
  }

  .info-table tr th {
    font-size: 15rem;
    line-height: calc(22 / 16);
    font-weight: 500;
    color: #fecb45;
    padding-inline: 11rem 13rem;
    min-width: 115rem;
    width: 25%;
    height: 48rem;
    position: relative;
    background:
      linear-gradient(90deg, rgba(27, 13, 40, 0) 0%, #442562 50%), #170513;
  }

  .info-table tr td {
    height: 48rem;
    padding-inline: 11rem 7rem;
  }

  .info-table.table-4-column .w-90 {
    width: 90rem;
  }
  .info-table.table-4-column .w-100 {
    width: 100rem;
  }
  .info-table.table-4-column .w-110 {
    width: 110rem;
  }
  /* Row borders already painted via th/td — skip tr to avoid double lines */
  .info-table tr {
    border-bottom: none;
  }
  .info-table tr th {
    border-bottom: 1px solid #ffffff26;
  }
  /* .info-table tr:not(:first-child) th {
    background: linear-gradient(90deg, rgba(27, 13, 40, 0) 0%, #2b1143 50%);
  } */
  /* .info-table tr th {
    background: linear-gradient(90deg, rgba(27, 13, 40, 0) 0%, #2b1143 50%);
  } */

  .info-table .top-cell {
    background: #430d10;
    color: #fecb45;
    font-size: 15rem;
    font-weight: 500;
    line-height: 22rem;
    height: auto;
    min-height: 48rem;
    white-space: normal;
    overflow: visible;
  }

  .info-table .top-cell::before,
  .info-table .top-cell::after {
    content: none !important;
    display: none !important;
  }
  .info-table.table-4-column tbody tr,
  .info-table.table-6-column tbody tr,
  .info-table.table-more-column tbody tr {
    background: unset;
  }
  .info-table tbody tr::after {
    content: unset;
  }
}
