/* ===== Grid & Card ===== */
.ksnsmx-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 18px;
}
@media (min-width: 900px) {
  .ksnsmx-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ksnsmx-card {
  border: 2px solid #e7d28a;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.ksnsmx-box {
  margin-bottom: 12px;
}

/* ===== Top bar ===== */
.ksnsmx-topbar {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
}
.ksnsmx-logo img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fff;
}
.ksnsmx-title {
  font-weight: 800;
  font-size: 20px;
  color: #0f172a;
  margin: 0 0 8px;
}
.ksnsmx-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.ksnsmx-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}
.ksnsmx-stat .label {
  color: #475569;
  font-size: 14px;
}
.ksnsmx-stat .value {
  font-weight: 800;
  font-size: 18px;
  color: #0b1220;
}

/* ===== Level-1 / 2 / 3 row ===== */
.ksnsmx-levels {
  margin-top: 15px;
  margin-bottom: 15px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  /* display: flex;
  flex-wrap: wrap; */
  gap: 10px;
}
.ksnsmx-levels > div {
  white-space: nowrap;
}
.ksnsmx-levels .lvl-label {
  font-weight: 700;
  margin-right: 4px;
}
.ksnsmx-levels .lvl-total {
  font-weight: 700;
  margin-right: 4px;
}
.ksnsmx-levels .lvl-sub {
  font-weight: 500;
  color: #6b7280;
}

/* ===== Section headings ===== */
.ksnsmx-section-title {
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
  margin: 0 0 10px;
}

/* ===== Gallery ===== */
.ksnsmx-gallery {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.ksnsmx-gallery img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e6e6e6;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ksnsmx-gallery img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.25);
}

/* ===== YouTube list ===== */
.ksnsmx-yt-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 760px) {
  .ksnsmx-yt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.ksnsmx-yt-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fafafa;
  border-radius: 8px;
  padding: 8px;
  min-height: 90px;
}
.ksnsmx-yt-thumb {
  width: 136px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 136px;
}
.ksnsmx-yt-link {
  font-weight: 600;
  color: #e7d28a;
  text-decoration: none;
  word-break: break-word;
}
.ksnsmx-yt-link:hover {
  text-decoration: underline;
}

/* ===== Read more pill (optional) ===== */
.ksnsmx-readmore {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border: 1px solid #cfe1ff;
  border-radius: 6px;
  background: #eef5ff;
  cursor: pointer;
  font-size: 12px;
  color: #e7d28a;
}
.ksnsmx-readmore:hover {
  background: #e2eeff;
}

/* ===== Pager ===== */
.ksnsmx-pager {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.ksnsmx-pager a,
.ksnsmx-pager span {
  padding: 6px 10px;
  border: 1px solid #e7d28a;
  border-radius: 8px;
  text-decoration: none;
}
.ksnsmx-pager .cur {
  background: #e7d28a;
  color: #fff;
  border-color: #e7d28a;
}
.ksnsmx-pager a {
  color: #e7d28a;
}

/* ===== Lightbox (full-screen, big image + centered arrows) ===== */
.ksnsmx-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}
.ksnsmx-lightbox.active {
  display: flex;
}

/* container for the big image */
.ksnsmx-lb-inner {
  width: min(1200px, 96vw);
  max-height: 92vh;
}

/* image full width of container */
.ksnsmx-lb-inner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 92vh;
  border-radius: 12px;
}

/* close button */
.ksnsmx-lb-close {
  position: absolute;
  top: 12px;
  right: 18px;
  color: #fff;
  font-size: 38px;
  cursor: pointer;
  line-height: 1;
}

/* prev/next arrows */
.ksnsmx-lb-prev,
.ksnsmx-lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.75);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.ksnsmx-lb-prev {
  left: 30px;
}
.ksnsmx-lb-next {
  right: 30px;
}
.ksnsmx-lb-prev:hover,
.ksnsmx-lb-next:hover {
  background: rgba(59, 130, 246, 0.9);
  /* transform: scale(1.05); */
}

/* small screens – a bit smaller arrows */
@media (max-width: 480px) {
  .ksnsmx-lb-prev,
  .ksnsmx-lb-next {
    width: 34px;
    height: 34px;
    font-size: 20px;
    left: 16px;
    right: 16px;
  }
}

/* ===== Footer gap ===== */
div#main-content {
  margin-bottom: 50px;
}
