/* ============================================================
   Luminous — theme docs revamp
   Wider reading layout + right-hand services sidebar with three
   sharp-cornered promo boxes (mega-menu design language).
   Injected only on the 7 theme-docs collections.
   ============================================================ */

/* ---------- Wider three-column layout ---------- */
.api-div-wrap {
  max-width: 1480px !important;
  padding-left: 24px;
  padding-right: 24px;
}
@media (min-width: 768px) {
  .api-menu-wrap { width: 22% !important; }
}
/* some collections' page CSS lacks the stacked-mobile rules — force them */
@media (max-width: 767px) {
  .api-div-wrap { flex-direction: column !important; }
  .api-menu-wrap { width: 100% !important; position: static !important; }
  .docs-wrap { padding-left: 20px; padding-right: 20px; }
}
.docs-wrap {
  width: auto !important;
  flex: 1 1 0;
  min-width: 0;
}
/* docs top bar matches the widened content container */
.nav-container {
  max-width: 1480px !important;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- Sidebar ---------- */
.lum-docs-aside {
  flex: none;
  width: 300px;
  margin-top: 40px;
  margin-left: 34px;
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lum-docs-aside-label {
  color: #5c5c63;
  font-family: Poppins, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* ---------- Boxes: solid bg, sharp corners, line art ---------- */
.lum-docs-box {
  --db-bg: #f3f1ea;
  --db-fg: #121217;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 20px 16px;
  background: var(--db-bg);
  color: var(--db-fg);
  border-radius: 0; /* sharp */
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1),
    box-shadow 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.lum-docs-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px -14px rgba(18, 18, 23, 0.35);
  color: var(--db-fg);
}

.lum-docs-box-art {
  position: absolute;
  right: -12px;
  bottom: 40px;
  width: 120px;
  height: 120px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.13;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.3s ease;
}
.lum-docs-box:hover .lum-docs-box-art {
  transform: translate(-4px, -4px) rotate(-3deg);
  opacity: 0.2;
}

.lum-docs-box-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: Poppins, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 12px;
}
.lum-docs-box-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.lum-docs-box-title {
  position: relative;
  font-family: Poppins, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 7px;
}
.lum-docs-box-desc {
  position: relative;
  font-family: Poppins, sans-serif;
  font-size: 12.5px;
  line-height: 1.6;
  opacity: 0.75;
  margin-bottom: 18px;
  max-width: 30ch;
}
.lum-docs-box-foot {
  position: relative;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--db-fg) 22%, transparent);
  font-family: Poppins, sans-serif;
  font-size: 12.5px;
  font-weight: 500;
}
.lum-docs-box-foot svg {
  width: 14px;
  height: 14px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.lum-docs-box:hover .lum-docs-box-foot svg { transform: translate(3px, -3px); }

/* ============================================================
   Left TOC rail — de-boxed, brand-styled
   ============================================================ */
.api-menu-wrap {
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  padding: 0 !important;
}
.table-of-contents-section {
  padding: 0 14px 0 0 !important;
  border-right: 1px solid rgba(18, 18, 23, 0.08);
}
/* section label */
.table-of-contents-section::before {
  content: "Tutorials";
  display: block;
  color: #5c5c63;
  font-family: Poppins, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 42px 0 14px 12px;
}
.collection-item-4 {
  border-bottom: none !important;
  margin-bottom: 2px !important;
  padding: 0 !important;
}
/* row */
.nav-link-cms {
  padding: 8px 12px;
  border-left: 2px solid transparent;
  gap: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.nav-link-cms:hover { background-color: rgba(18, 18, 23, 0.04); }
.nav-link-cms:has(.w--current) {
  background-color: rgba(8, 84, 165, 0.06);
  border-left-color: #0854a5;
}
/* link text */
.page-link {
  flex: 1;
  color: #121217 !important;
  font-family: Poppins, sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  padding: 0 !important;
  transition: color 0.2s ease;
}
.page-link:hover { color: #0854a5 !important; }
.page-link.w--current {
  width: auto !important;
  color: #0854a5 !important;
  font-weight: 600 !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}
/* emoji icons: consistent, leading */
.image-126 {
  max-width: 16px !important;
  margin-right: 11px !important;
  flex: none;
}
/* long lists scroll inside the sticky rail */
@media (min-width: 768px) {
  .api-menu-wrap {
    position: sticky;
    top: 80px;
    align-self: flex-start;
  }
  .collection-list-wrapper-2 {
    max-height: calc(100vh - 110px);
    overflow: auto;
  }
}
@media (max-width: 767px) {
  .table-of-contents-section {
    border-right: none;
    padding: 0 !important;
  }
  .table-of-contents-section::before { margin-top: 24px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .lum-docs-aside { width: 260px; margin-left: 24px; }
}
@media (max-width: 991px) {
  /* the page CSS keeps the row layout until 767px — let the sidebar wrap
     below the menu+content row as a full-width band of boxes */
  .api-div-wrap { flex-wrap: wrap; }
  .lum-docs-aside {
    position: static;
    width: 100%;
    margin: 40px 0 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .lum-docs-aside-label { grid-column: 1 / -1; }
}
@media (max-width: 699px) {
  .lum-docs-aside { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .lum-docs-box, .lum-docs-box-art, .lum-docs-box-foot svg { transition: none !important; }
}
