/* CSS - Name: "positionstyles.css" */
/* Activity 1 styles */
.content1 {
   display: grid;
   grid-template-columns: 1fr 1fr;
   justify-items: center;
   gap: 20px;

}

.red1 { 
  width: 100%; 
  height: 100px; 
  background-color: red; 
  grid-column: 1/3;

} 
.green1 {
  width: 200px; 
  height: 200px; 
  background-color: green; 

} 

.yellow1 {
  width: 200px; 
  height: 200px; 
  background-color: gold; 

} 

.blue1 {
  width: 100%; 
  height: 100px; 
  background-color: blue; 
  grid-column: 1/3;

} 
/* Activitystyles */ 
.content2 {
  /* This is the parent of the activity 2 boxes. */
  display: grid;
  grid-template-columns: 50px 50px 50px 50px 50px;
  position: relative;
  width: 250px;
  height: 250px;


/* I combined all them together to make it easier to handle */
} .red2, .green2, .yellow2, .blue2 {
  width: 80px; 
  height: 80px; 
  position: absolute; 

} 
       
.red2 {
  background-color: red;
  z-index: 1;
  top: 10px; 
  left: 10px;

} 
        
.green2 { 
background-color: green;
z-index: 2;
top: 30px;
left: 30px;

} 

.yellow2 {
  background-color: yellow;
  z-index: 3;
  top: 50px;
  left: 50px;

} 

.blue2 {
  background-color: blue;
  z-index: 4;
  top: 70px;
  left: 70px;

}

/* Activity 3 styles */ 
.content3 {
  /* This is the parent of the activity 3 boxes. */
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 100px;

}

.red3 {
  width: 100%; 
  height: 100px; 
  background-color: red; 
  grid-column: 1/3;

} 

.green3 {
  height: 300px; 
  background-color: green;

} 

.yellow3 { 
  height: 300px; 
  background-color: yellow; 

} 

.blue3 {
  width: 100%;
  height: 100px; 
  background-color: blue;
  grid-column: 1/3; 

} 

/* Activity 4 styles */ 
.content4 {
  /* This is the parent of the activity 4 boxes. */
  height: 400px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 0;

}

.red4 {
  width: auto; 
  height: auto; 
  background-color: red; 
  grid-column: 1/2;
  grid-row: 1/4;

} 

.green4 {
  width: auto; 
  height: auto; 
  background-color: green; 
  grid-column: 2/3;
  grid-row: 1/2;

} 

.yellow4 {
  width: auto; 
  height: auto; 
  background-color: yellow; 
  grid-column: 2/3;
  grid-row: 2/3;

}

.blue4 {
  width: auto; 
  height: auto; 
  background-color: blue;
  grid-column: 2/3;
  grid-row: 3/4;

} 

/* Activity 5 styles */ 
.content5 {
  /* This is the parent of the activity 5 boxes. */
  height: 400px;
  overflow: hidden;

}

.red5 { 
  width: 100%; 
  height: 100px; 
  background-color: red;
  clear: both;

} 

.green5 { 
  float: left;
  width: 200px; 
  height: 100px; 
  background-color: green; 

} 

.yellow5 {
  box-sizing: border-box;
  overflow: show;
  height: 200px;
  background-color: yellow; 
  padding: 10px;

} 

.blue5 {
  width: 100%; 
  height: 100px; 
  background-color: blue; 
  clear: both;

} 


/* Activity 6 styles */ 
.content6 {
  /* This is the parent of the activity 6 boxes. */
  height: 400px;
  width: 500px; 
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  position: relative; 

}


.red6, .green6, .yellow6, .blue6 {
  position: relative; 

}

.red6 {
  width: 250px;
  height: 120px;
  background-color: red; 
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  justify-self: start; 
  align-self: start;
  z-index: 2; 

} 

.green6 {
  width: 150px; 
  height: 150px; 
  background-color: green; 
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  justify-self: start; 
  align-self: end;
  margin-top: -50px; 
  margin-left: 0px;
  z-index: 4; 

} 

.yellow6 {
  width: 180px; 
  height: 250px;
  background-color: gold; 
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  justify-self: end; 
  align-self: end;
  margin-top: -150px;
  margin-left: 0px; 
  z-index: 4;

} 

.blue6 {
  width: 300px;
  height: 250px;
  background-color: blue; 
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  justify-self: center;
  align-self: center;
  margin-top: 50px; 
  z-index: 3; 

}

.activity {
  width: 70%; 
  margin: 20px auto; 
  font-family: Arial, sans-serif; 
  border: 1px solid black; 
  padding: 10px; 
  clear:both; 
  overflow: auto;
} 
.hint {
  border: 1px solid grey;
  background: #e0e0e0;
  padding: .5em;
  position: relative;
  margin: 1em 0;
}
.hint h3 {
  margin: 0;
}
.hint:hover {
  background: #d0d0d0;
}
.hint > div {
  display: none;
}

.hint input[type=checkbox] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 1;
  cursor: pointer;
}

.hint input[type=checkbox]:checked ~ div {
  display: block;
}

.hint i {
  position: absolute;
  transform: translate(-6px, 0);
  margin-top: 16px;
  right: 10px;
  top: -3px;
}
.hint i:before, .hint i:after {
  content: "";
  position: absolute;
  background-color: black;
  width: 3px;
  height: 9px;
}
.hint i:before {
  transform: translate(2px, 0) rotate(45deg);
}
.hint i:after {
  transform: translate(-2px, 0) rotate(-45deg);
}

.hint input[type=checkbox]:checked ~ i:before {
  transform: translate(-2px, 0) rotate(45deg);
}
.hint input[type=checkbox]:checked ~ i:after {
  transform: translate(2px, 0) rotate(-45deg);
}
.hint a {
  position: relative;
  z-index: 1;
}