/* Container Split Setup */
.huong-dan .container {
  display: flex;
  width: 100%;
  margin-top: 51rem;
  gap: 16rem;
}

/* --- LEFT SIDEBAR --- */
.sidebar {
  flex: 1;
  width: 456rem;
}

.sidebar-title {
  font-size: 32rem;
  line-height: 42rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 4rem;
  color: white;
}
.sidebar-title span {
  background: linear-gradient(90deg, #946ae8 0%, #cab7ee 100%);
  color: transparent;
  background-clip: text;
  display: inline-block;
  line-height: 52rem;
}

.topic-list.desktop {
  display: block;
}
.topic-list.mobile {
  display: none;
}
.topic-list {
  list-style: none;
  padding-left: 21rem;
  border-radius: 12rem;
  padding-top: 15rem;
  width: 1280rem;
  height: 850rem;
  background-color: #210923b2;
}

.topic-btn {
  padding: 23rem 24rem;
  margin-bottom: 20rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18rem;
  line-height: 20rem;
  transition: all 0.3s ease;
  background-color: #210925;
  width: 435rem;
}

.topic-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Active Topic Gradient (Matches your image) */
.topic-btn.active {
  background: url("../images/topic-card-bg.webp");
  background-size: cover;
  color: #ffffff;
}
.content-box-wrapper {
  display: block;
  border-radius: 16rem;
  overflow: hidden;
  margin-right: 16rem;
}
/* --- RIGHT CONTENT DISPLAY --- */
.cms-content-section-bg {
  margin: 1rem;
  flex: 2;
  background-color: #39005530;
  box-shadow: -5px 0px 20px 0px #ff23ab26;
  border-radius: 16rem;
  position: relative;
  padding-block: 25rem 22rem;
  padding-inline: 16rem 8rem;
}
.content-box.content-box.cms-content-section {
  overflow-y: scroll;
  height: 886rem;
}
.content-box.content-box.cms-content-section .content-img:first-of-type {
  margin-top: 14rem;
}
.content-box-wrapper {
  position: relative;
  border-radius: 16rem;
  background: transparent;
  height: 933rem;
}

.content-box-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1rem; /* border thickness */
  border-radius: inherit;
  background: linear-gradient(90deg, #e838e5 -1.12%, #fae4b1 100.84%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.content-box.cms-content-section::-webkit-scrollbar-thumb {
  background: linear-gradient(178.12deg, #3e1273 1.59%, #e72887 89.35%);
  border-radius: 50px;
}
.content-box-bg {
  position: absolute;
  top: -1rem;
  background: url("../images/content-box-bg.webp") top center no-repeat;
  background-size: contain;
  left: 0;
  right: 0;
  z-index: -1;
  height: 282rem;
  mix-blend-mode: screen;
}
.content-box.cms-content-section .content-img {
  width: 100%;
}
.topic-title {
  text-transform: uppercase;
  font-size: 20rem;
  line-height: 1.5;
  color: #fae4b1;
}
.content {
  display: none;
}
.content.active {
  display: block;
}
/* Hide all panels by default */
.content-panel {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

/* Show active panel with animation */
.content-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Panel Internal Styling */
.mock-banner {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, #430c4f 0%, #89114c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin: 15px 0 25px 0;
  font-weight: bold;
  border: 1px solid #a62366;
}

.panel-body h4 {
  color: #ffb834;
  margin-bottom: 15px;
}

.panel-body h5 {
  color: #ff2a85;
  margin: 20px 0 10px 0;
}

.panel-body p {
  color: #d1cbd6;
  line-height: 1.6;
  font-size: 0.95rem;
}

.panel-body ul {
  margin-left: 20px;
}

.panel-body li {
  color: #d1cbd6;
  margin-bottom: 10px;
  line-height: 1.5;
  font-size: 0.9rem;
}

/* =========================================
   Mobile Topic Modal
========================================= */
.topic-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  flex-direction: column;
}
.topic-modal.is-open {
  display: flex;
}
.topic-modal-backdrop {
  position: absolute;
  inset: 0;
  background: #0b0214;
  opacity: 0.96;
}
.topic-modal-container {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.topic-modal-header {
  display: flex;
  align-items: center;
  gap: 12rem;
  padding: 16rem 16rem 16rem 12rem;
  background: linear-gradient(180deg, #150021 0%, rgba(21, 0, 33, 0.8) 100%);
  border-bottom: 1rem solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.topic-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 28rem;
  height: 28rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.topic-modal-close img {
  width: 100%;
  height: 100%;
}
.topic-modal-title {
  font-size: 18rem;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  flex: 1;
}
.topic-modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 20rem 16rem 40rem;
}
.topic-modal-body .topic-modal-cms .content-img,
.topic-modal-body .topic-modal-cms .image-caption,
.topic-modal-body .topic-modal-cms .white-title,
.topic-modal-body .topic-modal-cms h1,
.topic-modal-body .topic-modal-cms h2,
.topic-modal-body .topic-modal-cms h3,
.topic-modal-body .topic-modal-cms p,
.topic-modal-body .reveal-up {
  opacity: 1;
  transform: none;
}
.topic-modal-body .topic-title {
  font-size: 20rem;
  line-height: 28rem;
  margin-block: 0 14rem;
  color: #fae4b1;
}
.topic-modal-body .content-heading-primary {
  font-size: 18rem;
  line-height: 24rem;
  margin-bottom: 12rem;
}
.topic-modal-body .content-heading-secondary {
  font-size: 16rem;
  line-height: 22rem;
  margin-bottom: 10rem;
}
.topic-modal-body .content-paragraph,
.topic-modal-body .content-paragraph-bullet,
.topic-modal-body p {
  font-size: 15rem;
  line-height: 22rem;
  margin-bottom: 14rem;
  color: #a6aac4;
}
.topic-modal-body .image-caption {
  text-align: center;
  font-size: 13rem;
  font-style: italic;
  line-height: 20rem;
  color: #8b9fff;
  margin-block: 12rem 18rem;
}
.topic-modal-body .content-img {
  margin-top: 16rem;
  margin-bottom: 0;
  width: 100%;
}
.topic-modal-body .content-img img {
  width: 100%;
  height: auto;
  border-radius: 8rem;
}
.topic-modal-body .content-list {
  padding-left: 20rem;
  font-size: 15rem;
  line-height: 22rem;
  margin-bottom: 14rem;
  color: #a6aac4;
}
.topic-modal-body .content-list li {
  margin-bottom: 10rem;
}
.topic-modal-body .text-gold,
.topic-modal-body .text-gold-highlight {
  color: #ffd43b;
}
.topic-modal-body .end-text {
  font-size: 18rem;
  margin-top: 16rem;
}
.topic-modal-body .info-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16rem;
}

.topic-modal-body .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;
}

.topic-modal-body .info-table .top-cell::before,
.topic-modal-body .info-table .top-cell::after {
  content: none !important;
  display: none !important;
}

/* Compact footer inside modal */
.topic-modal-footer {
  margin-top: 32rem;
  padding-top: 20rem;
  border-top: 1rem solid rgba(255, 255, 255, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14rem;
}
.topic-modal-footer-brand {
  display: flex;
  justify-content: center;
}
.topic-modal-footer-logo {
  width: 100rem;
  height: auto;
  opacity: 0.7;
}
.topic-modal-footer-socials {
  display: flex;
  gap: 16rem;
  align-items: center;
}
.topic-modal-footer-socials .social-item img {
  width: 28rem;
  height: 28rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.topic-modal-footer-socials .social-item:hover img {
  opacity: 1;
}
.topic-modal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6rem 0;
  justify-content: center;
  font-size: 12rem;
  line-height: 18rem;
}
.topic-modal-footer-links a {
  color: #a6aac4;
  text-decoration: none;
  padding-inline: 6rem;
  transition: color 0.2s;
}
.topic-modal-footer-links a:hover {
  color: #ffd43b;
}
.topic-modal-footer-links span {
  color: rgba(255, 255, 255, 0.2);
}
.topic-modal-footer-copy {
  font-size: 11rem;
  line-height: 16rem;
  color: rgba(166, 170, 196, 0.5);
  max-width: 320rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  main {
    min-height: unset !important;
  }
  .dashboard-container {
    flex-direction: column;
  }
  .huong-dan .container {
    padding-inline: 12rem;
    margin-top: 31rem;
  }
  .content-box-wrapper {
    display: none;
  }
  .content-box.content-box.cms-content-section .content-img:first-of-type {
    margin-top: 24rem;
  }
  .sidebar {
    max-width: 100%;
  }
  .sidebar-title {
    font-size: 20rem;
    line-height: 28rem;
    margin-bottom: 12rem;
  }

  .topic-list.desktop {
    display: none;
  }
  .topic-list.mobile {
    display: block;
  }
  .huong-dan.cms-content-section-wrapper .topic-title {
    margin-block: 12rem 24rem;
  }
  .topic-list {
    background: transparent;
    width: fit-content;
    height: auto;
    padding: unset;
  }
  .topic-btn {
    width: 378rem;
    height: 68rem;
    backdrop-filter: blur(30px);
    background: url("../images/topic-card-bg-mb.webp") top center
      no-repeat;
    background-size: cover;
    padding: 20rem 16rem;
    font-size: 16rem;
    margin-bottom: 16rem;
  }
  .topic-btn.active a {
    color: white;
  }
  .topic-btn:last-of-type {
    margin-bottom: unset;
  }
  .topic-btn a {
    text-decoration: none;
    color: #ddd8cd;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .topic-btn.active {
    background: url("../images/topic-card-bg-mb.webp") top center
      no-repeat;
    background-size: cover;
    color: #ffffff;
  }
}
