/* RESET STYLES & HELPER CLASSES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
:root {
  --level-1: #79ebb2;
  --level-2: #ffd689;
  --level-3: #bed3fa;
  --level-4: #ffbac4;
  --black: black;
}

* {
  padding: 0;
  box-sizing: border-box;
}

ol {
  list-style: none;
}

body {
  margin: 50px 0 100px;
  text-align: center;
  font-family: "Times New Roman", sans-serif;
}

.container {
  max-width: 1000px;
  padding: 0 10px;
  margin-top: 40px;
  margin-bottom: -40px;
}

.rectangle {
  position: relative;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  border: 2px solid black;
}

section p {
  margin-top: 1em;
  margin-bottom: 1em;
  text-align: justify;
  font-family: "Times New Roman", serif;
}

ul {
  padding-left: 20px;
  margin-left: 1em; 
}

/* LEVEL-1 STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.level-1 {
  width: 50%;
  margin: 0 auto 40px;
  background: var(--level-1);
  color: #020202;
  font-size: 1.2em;
  text-transform: none;
  font-weight: bold;
}

.level-1::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 22px;
  background: var(--black);
}


/* LEVEL-2 STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.level-2-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.level-2-wrapper::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 25%;
  width: 50%;
  height: 2px;
  background: var(--black);
}


.level-2-wrapper li {
  position: relative;
}

.level-2-wrapper > li::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background: var(--black);
}

.level-2 {
  width: 70%;
  margin: 0 auto 40px;
  background: var(--level-2);
  color: #020202;
  font-size: 1.2em;
  font-weight: normal !important;
}

.level-2::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background: var(--black);
}

.level-2::after {
  display: none;
  content: "";
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-100%, -50%);
  width: 20px;
  height: 2px;
  background: var(--black);
}


/* LEVEL-3 STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.level-3-wrapper {
  display: flex;
  justify-content: space-around;
  gap: 20px; 
  width: 100%;
  margin: 0 auto;
}

.level-3 {
  flex: 1; 
  margin: 0 30px; 
  padding: 20px;
  box-sizing: border-box;
  text-align: left; 
  background: var(--level-3);
  color: #020202;
  font-size: 1em;
  font-weight: normal;
}


.level-3-wrapper > li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -100%);
  width: 2px;
  height: 30px;
  background: var(--black);
}

/* LEVEL-4 STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.level-4 {
  width: 50%;
  margin: 0 auto 40px;
  background: var(--level-4);
  color: #020202;
  font-size: 1.2em;
  text-transform: none;
  margin-top: 40px;
  font-weight: bold;
}


/* MQ STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@media screen and (max-width: 700px) {
  .rectangle {
    padding: 20px 10px;
  }

  .level-1,
  .level-2  {
    width: 100%;
  }

  .level-1 {
    margin-bottom: 20px;
  }

  .level-4 {
    margin-top: 40px;
  }

  .level-1::before,
  .level-2-wrapper > li::before {
    display: none;
  }
  
  .level-2-wrapper,
  .level-2-wrapper::after,
  .level-2::after {
    display: block;
  }

  .level-2-wrapper {
    width: 90%;
    margin-left: 10%;
  }

  .level-2-wrapper::before {
    left: -20px;
    width: 2px;
    height: calc(72.1%);
  }

  .level-2-wrapper > li:not(:first-child) {
    margin-top: 50px;
  }
}

