/* ============================================================
   CSS 06.08 — Margin collapse: 30 + 20 is not 50
   ============================================================
   Top and bottom margins of boxes next to each other
   → only the BIGGER one is used.
   A's bottom margin (30px) and B's top margin (20px) touch
   → a 30px gap.
   (Left and right margins never collapse.)
   Simple habit to avoid confusion: give margins only on ONE side,
   e.g. always margin-bottom.
   ============================================================ */

.collapse-a {
  margin: 0 0 30px;                 /* bottom 30px */
}

.collapse-b {
  margin: 20px 0 0;                 /* top 20px    */
}
/* Try it: change A's margin-bottom to 10px → the gap becomes 20px
   (B's margin is now the bigger one). */


/* ------------------------------------------------------------
   Only to make the boxes visible — not part of this lesson
   ------------------------------------------------------------ */
.collapse-demo {
  background-color: #E4E4E4;
  padding: 1px 12px;
  border-radius: 8px;
}

.collapse-a,
.collapse-b {
  background-color: #FFFFFF;
  border: 2px solid #2D62EF;
  padding: 8px 12px;
}
