/* =========================================================
   LEARN — RIGHT SECTION NAV
   Desktop = fixed grid column
   Mobile = slide-in drawer
========================================================= */

/* ------------------------------
   Desktop / base
------------------------------ */
.learn-section-nav {
    scrollbar-width: none;
    background: #ffffff;
    grid-column: 3;
    grid-row: 2;
    position: relative;
    z-index: 20;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    /* overflow-y: hidden; */
    overflow-x: hidden;
    /* border-left: 1px solid rgb(191 191 191 / 35%); */
    box-sizing: border-box;
}

.learn-section-nav-inner {
  width: 100%;
  box-sizing: border-box;
  padding: 140px 16px 24px;
}

.learn-actions {
    padding-bottom: 1rem;
/*     background: #181923; */
    top: 0;
    position: sticky;
    /* overflow: hidden; */
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: stretch;
    width: 100%;
}
.learn-section-divider {
  border: none;
  height: 1px;
  margin: 10px 0 10px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,0.10),
    transparent
  );
  opacity: 0.35;
}

.learn-section-list {
    padding: 0 4px 68px 0;
    scroll-behavior: auto;
    overflow-y: visible;
    list-style: none;
    margin: 0;
    /* padding: 0; */
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.learn-section-item {
  width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 10px;
}
.learn-section-link {
    font-size: 0.75rem;
    display: block;
    width: 100%;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #ffffff00;
    border-radius: 10px;
    /* background: rgba(255,255,255,0.045); */
    /* padding: 10px 12px; */
    color: #181923;
    text-align: left;
    cursor: pointer;
    transition: color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 120ms ease;
}
.learn-section-link:hover {
/*   color: #ffffff; */
  /* background: rgba(255,255,255,0.08); */
  border-color: rgba(22, 22, 22, 0.724);
}

.learn-section-link:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(122,166,255,0.24),
    0 0 0 2px rgba(0,0,0,0.50);
}

/* =========================================================
   LEARN — RIGHT SECTION NAV ACTIVE STATE
   Works on desktop and mobile
========================================================= */

.learn-section-item.is-active .learn-section-link {
    color: #181923;
    font-weight: 400;
    border-color: rgba(20, 20, 21, 0.42);
    /* box-shadow: 0 0 0 1px rgba(122,166,255,0.14) inset,
    0 8px 22px rgba(0,0,0,0.18),
    0 0 18px rgba(122,166,255,0.12); */
}

.learn-section-item.is-active .learn-section-link::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-right: 5px;
    border-radius: 999px;
    vertical-align: middle;
    background: #18192357;
    box-shadow: 0 0 10px rgba(141,183,255,0.55);
}
.learn-section-nav-toggle {
  display: none;
}
/* 
.learn-section-nav {
  scrollbar-width: thin;
} */

/* ------------------------------
   Mobile drawer mode
------------------------------ */

@media (max-width: 1100px) {
  .learn-section-nav {
    border-top-left-radius: 18px;
    position: fixed;
    top:0;
    right: 0;
    bottom: 0;

    z-index: 120;
    width: min(310px, 84vw);
    min-width: 0;
    max-width: min(310px, 84vw);
    height: 92dvh;

    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255,255,255,0.12);
    border-bottom-left-radius: 16px;

    transform: translateX(calc(100% - 20px));
    transition: transform 280ms cubic-bezier(.22,.61,.36,1);

    overflow: hidden;
    box-sizing: border-box;
  }

  .learn-section-nav.is-open {
    transform: translateX(0);
  }
  .learn-section-nav-inner {
      display: flex;
      flex-direction: column;
      height: 100%;
      min-height: 0;
      padding: 12px 3px 20px;
      overflow: hidden;
  }
  .learn-actions,
  .learn-section-divider {
    flex: 0 0 auto;
  }

  .learn-section-list {
      scrollbar-width: none;
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin: 0;
      padding: 0 4px 58px 0;
      list-style: none;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
  }

  .learn-section-link {
    font-size: 12.5px;

  }

  .learn-section-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    position: fixed;
    top: calc(var(--nav-height, 72px) + 18px);
    right: 12px;
    z-index: 130;

    width: 42px;
    height: 42px;
    padding: 0;

    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    background: rgba(20,22,26,0.88);
    color: #d8dbe2;

    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
    backdrop-filter: blur(8px);

    transition:
      transform 160ms ease,
      background-color 160ms ease,
      border-color 160ms ease,
      opacity 160ms ease;
  }

  .learn-section-nav-toggle:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.18);
  }

  .learn-section-nav-toggle:active {
    transform: scale(0.96);
  }

  .learn-section-nav-toggle::before {
    content: "";
    width: 11px;
    height: 11px;
    display: block;

    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(-135deg);
    margin-left: 3px;
    transition: transform 220ms ease, margin 220ms ease;
  }

  .learn-section-nav.is-open + .learn-section-nav-toggle::before,
  .learn-section-nav-toggle.is-open::before {
    transform: rotate(45deg);
    margin-left: -3px;
  }

  .learn-section-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(0,0,0,0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
  }

  .learn-section-nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 700px) {
  .learn-section-nav {
    width: min(286px, 86vw);
    max-width: min(286px, 86vw);
  }

  .learn-section-nav-toggle {
    top: calc(var(--nav-height, 72px) + 14px);
    right: 10px;
    width: 40px;
    height: 40px;
  }
  .learn-section-link {
    padding: 10px 16px;
  }
  .learn-section-item.is-active .learn-section-link::before {
      margin-right: 10px;
      content: "";
      display: inline-block;
      width: 6px;
      height: 6px;
      margin-left: -11px;
      border-radius: 999px;
      vertical-align: middle;
      background: #c7cbd0;
      box-shadow: 0 0 10px rgba(141,183,255,0.55);
  }
  .learn-section-item {
    flex: 0 0 auto;
    background: #c7cbd0;
  }  
  .learn-section-item.is-active .learn-section-link {
      color: #ffffff;
      font-weight: 400;
      background: #161726;
      border-color: rgba(20, 20, 21, 0.42);
      /* box-shadow: 0 0 0 1px rgba(122,166,255,0.14) inset,
      0 8px 22px rgba(0,0,0,0.18),
      0 0 18px rgba(122,166,255,0.12); */
  }  
  .learn-actions {
      padding-bottom: 1rem;
      /* background: #181923; */
      top: 0;
      position: sticky;
      /* overflow: hidden; */
      display: flex;
      flex-direction: row;
      gap: 8px;
      align-items: stretch;
      width: 100%;
  }  
}
.learn-section-nav-toggle {
  position: fixed;
  right: 1rem;
  top: 50%;
  z-index: 80;

  display: flex;
  align-items: center;
  gap: 0.55rem;

  max-width: 13rem;
  min-height: 3.25rem;
  padding: 0.55rem 0.75rem;

  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;

  background: rgba(31, 34, 45, 0.92);
  color: #f8fafc;

  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  transform: translateY(-50%);
}

.learn-section-nav-toggle-icon {
  display: grid;
  place-items: center;

  width: 2rem;
  height: 2rem;

  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);

  font-size: 1.8rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.learn-section-nav-toggle.is-open .learn-section-nav-toggle-icon {
  transform: rotate(180deg);
}

.learn-section-nav-toggle-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  text-align: left;
}

.learn-section-nav-toggle-kicker {
  font-size: 0.65rem;
  line-height: 1;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.learn-section-nav-toggle-title {
  max-width: 9rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.1;
}

.learn-section-nav-toggle-count {
  font-size: 0.68rem;
  color: rgba(248, 250, 252, 0.62);
}

.learn-section-item.is-mobile-current .learn-section-link {
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.45),
    0 0 24px rgba(96, 165, 250, 0.12);
}

.learn-section-dock-trigger {
  display: none;
}

@media (max-width: 1100px) {
.learn-section-dock-trigger {
    background: #181923;
    border-radius: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    max-width: 190px;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.14);
    /* border-radius: 999px; */
    /* background: rgba(31,34,45,0.92); */
    color: #f8fafc;
    cursor: pointer;
}

  .learn-section-dock-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #93c5fd;
    font-weight: 800;
  }

  .learn-section-dock-meta {
    display: grid;
    min-width: 0;
    text-align: left;
  }

  .learn-section-dock-kicker {
    font-size: 9px;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .learn-section-dock-title {
    max-width: 110px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
  }
}