/* ========== HOW-TO PAGES ========== */

.how-to-container {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  padding: 100px 0 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ── Left column ── */
.how-to-container .left-col {
  flex: 0 0 240px;
  width: 240px;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e6ebf1 transparent;
}

.how-to-container .left-col::-webkit-scrollbar {
  width: 3px;
}
.how-to-container .left-col::-webkit-scrollbar-thumb {
  background: #e6ebf1;
  border-radius: 3px;
}

/* Hide the Bootstrap navbar toggler — we show everything expanded */
.blog-sidebar .navbar-toggler {
  display: none;
}

/* Always show the menu regardless of Bootstrap collapse state */
.blog-sidebar .collapse {
  display: block !important;
}

/* ── Reset all list/link styles ── */
#menu-how-to-menu,
#menu-how-to-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ── Top-level items (e.g. "WordPress: How to") ── */
#menu-how-to-menu > li > a {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #8898aa;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 12px 0 5px;
  border-top: 1px solid #e6ebf1;
  margin-top: 6px;
  pointer-events: none;
  cursor: default;
}

#menu-how-to-menu > li:first-child > a {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

/* ── Second-level items (e.g. "WordPress Getting Started") ── */
#menu-how-to-menu > li > .sub-menu > li > a {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: #425466;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s;
}

#menu-how-to-menu > li > .sub-menu > li > a:hover {
  background: #f0f4f8;
  color: #0a2540;
}

/* Second-level items that have children (sub-categories like "Lead Capture & Boosters") */
#menu-how-to-menu > li > .sub-menu > li.menu-item-has-children > a {
  font-weight: 500;
  color: #0a2540;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 0 3px 0;
  border-radius: 0;
  background: transparent !important;
  cursor: default;
  pointer-events: none;
  margin-top: 4px;
}

/* ── Third-level items (e.g. "Instant Lead Capture") ── */
#menu-how-to-menu > li > .sub-menu > li > .sub-menu {
  border-left: 2px solid #e6ebf1;
  margin: 2px 0 6px 8px;
  padding-left: 0;
}

#menu-how-to-menu > li > .sub-menu > li > .sub-menu > li > a {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: #8898aa;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 5px;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s;
}

#menu-how-to-menu > li > .sub-menu > li > .sub-menu > li > a:hover {
  background: #f0f4f8;
  color: #425466;
}

/* ── Fourth-level items (e.g. individual OIDC/SAML providers) ── */
#menu-how-to-menu > li > .sub-menu > li > .sub-menu > li > .sub-menu {
  border-left: 2px solid #e6ebf1;
  margin: 2px 0 4px 8px;
  padding-left: 0;
}

#menu-how-to-menu > li > .sub-menu > li > .sub-menu > li > .sub-menu > li > a {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #aab5c2;
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 5px;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s;
}

#menu-how-to-menu > li > .sub-menu > li > .sub-menu > li > .sub-menu > li > a:hover {
  background: #f0f4f8;
  color: #425466;
}

/* ── Active / current page highlight ── */
#menu-how-to-menu .current-menu-item > a,
#menu-how-to-menu .current-menu-item > a:hover {
  background: #eef0ff !important;
  color: #1300FC !important;
  font-weight: 500;
  pointer-events: auto;
  cursor: pointer;
}

/* Highlight the ancestor chain leading to the current item */
#menu-how-to-menu .current-menu-ancestor > a {
  color: #0a2540;
}

/* ── Right column (main content) ── */
.how-to-container .right-col {
  flex: 1;
  min-width: 0;
  max-width: 780px;
}

.right-col h1.singlepost {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 500;
  color: #0a2540;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 4px;
}

.right-col .thedate-single p {
  font-size: 13px;
  color: #8898aa;
  margin-bottom: 32px;
}

/* Step headings */
.right-col .step-number {
  font-size: 15px;
  font-weight: 600;
  color: #1300FC;
  margin-bottom: 8px;
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.right-col .step p,
.right-col .step ul,
.right-col .step ol {
  font-size: 16px;
  line-height: 1.75;
  color: #425466;
  margin-bottom: 8px;
}

.right-col .step ul,
.right-col .step ol {
  padding-left: 22px;
}

.right-col .step li {
  margin-bottom: 6px;
}

.right-col .step code {
  background: #f0f4f8;
  color: #0a2540;
  font-size: 13px;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: 'SFMono-Regular', Consolas, monospace;
}

.right-col .step a {
  color: #1300FC;
}

/* Step screenshots */
.right-col .images-wrap {
  margin: 16px 0 8px;
}

.right-col .images-wrap img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e6ebf1;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Step dividers */
.right-col .step-divider-content {
  border: none;
  border-top: 1px solid #e6ebf1;
  margin: 32px 0 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .how-to-container {
    flex-direction: column;
    gap: 0;
    padding-top: 80px;
  }

  .how-to-container .left-col {
    flex: none;
    width: 100%;
    position: static;
    max-height: none;
    overflow: visible;
    border: 1px solid #e6ebf1;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 32px;
  }

  /* Collapse sub-menus on mobile by default */
  #menu-how-to-menu > li > .sub-menu {
    display: none;
  }

  /* Show only the section containing the current page */
  #menu-how-to-menu > li.current-menu-ancestor > .sub-menu {
    display: block;
  }
}