/* ============================================================
   CSS 10.06 — position: sticky: normal, until it reaches the top — then it sticks
   ============================================================
   .sticky-head { position: sticky; top: 0; }
   sticky needs a "top" (or bottom) value — that's where it sticks.
   Used for: table headers, section titles, navigation bars.

   The box scrolls by itself (overflow: auto, lesson 06),
   and each heading sticks to the top of THAT box.
   ============================================================ */

.sticky-box {
  height: 240px;
  overflow: auto;                   /* the box gets its own scroll bar */
}

.sticky-head {
  position: sticky;
  top: 0;                           /* stick when it reaches the top edge */
  background-color: #2D62EF;        /* needs a background, or the list shows through it */
}
/* Try it: remove  background-color  from .sticky-head → while scrolling,
   the list text shows through the heading. */


/* ------------------------------------------------------------
   Only to make the list visible — not part of this lesson
   ------------------------------------------------------------ */
.sticky-box {
  max-width: 420px;
  border: 2px solid #E4E4E4;
  border-radius: 10px;
}

.sticky-box p {
  margin: 0;
  padding: 8px 14px;
  border-bottom: 1px solid #F0F0F0;
}

.sticky-head {
  margin: 0;
  padding: 8px 14px;
  color: #FFFFFF;
}
