/* CSS - Name: "positionstyles.css" */
/* Activity 1 styles */
.content1 {
  /* This is the parent of the activity 1 boxes. */
  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;
} 
/* Activity 2 styles */ 
.content2 {
  /* This is the parent of the activity 2 boxes. */
  position: relative;
}
.content2 div {
  width: 100px;
  height: 100px;
  position: absolute;
}

.red2 {
  width: 100%; 
  height: 100px; 
  background-color: red; 
  z-index: 4;
} 
.green2 { 
  width: 200px; 
  height: 200px; 
  background-color: green; 
  left: 50px;
  top: 50px;
  z-index: 3;
} 
.yellow2 {
  width: 200px; 
  height: 200px; 
  background-color: gold; 
  left: 100px;
  top: 100px;
  z-index: 2;
} 
.blue2 {
  width: 100%; 
  height: 100px; 
  background-color: blue; 
  left: 150px;
  top: 150px;
  z-index: 1;
} 
/* Activity 3 styles */ 
.content3 {
  display: grid;
  grid-template-columns: 1fr 300px 300px 1fr;
  grid-template-rows: 100px 200px 100px 100px;
  grid-template-areas:
    "red3 red3 red3 red3"
    ". yellow3 gap green3"
    "blue3 blue3 blue3 blue3";
  position: relative;
}

.red3 {
  grid-area: red3;
  background-color: red;
  z-index: 1;
}

.green3 {
  grid-area: green3;
  background-color: green;
  z-index: 2;
  width:400px;
}

.yellow3 {
  grid-area: yellow3;
  background-color: gold;
  z-index: 1;
  width:300px;
}

.blue3 {
  grid-area: blue3;
  background-color: blue;
  z-index: 1; /* Align with red3 */
}

/* Adding a gap between yellow and green */
.content3::before {
  content: "";
  grid-area: gap;
}

/* Activity 4 styles */ 
.content4 {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto; 
  gap: 0;
  width: 200px;
  height: 200px; 
}

.red4 {
  background-color: red;
  grid-column: 1; 
  grid-row: span 3; 
}
.green4 {
  background-color: green; 
} 
.yellow4 {
  background-color: gold; 
} 
.blue4 {
  background-color: blue; 
} 
/* Activity 5 styles */ 
.content5 {
  /* This is the parent of the activity 5 boxes. */
  height: 400px;
}

.red5 {
  float: left;
  width: 100%;
  height: 100px;
  background-color: red;
}

.green5 {
  float: left;
  width: 150px;
  height: 150px;
  background-color: green;
}

.yellow5 {
  margin-left: 25px; /* Adjust the margin based on the width of the floated elements */
  width:97%;
  height: 75%;
  background-color: gold;
}

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


/* Activity 6 styles */ 
.content6 {
  /* This is the parent of the activity 6 boxes. */
  position: relative;
}

.content6 div {
  position: absolute;
}

.red6 {
  width: 30%;
  height: 150px;
  background-color: red;
  z-index: 4;
}

.green6 {
  width: 120px;
  height: 100px;
  background-color: green;
  left: 0;
  top: 70px;
  z-index: 5;
  margin-top: 200px;
}

.yellow6 {
  width: 100px;
  height: 220px;
  background-color: yellow;
  left: 250px;
  top: 150px;
  z-index: 5;
}

.blue6 {
  width: 200px;
  height: 200px;
  background-color: blue;
  left: 100px;
  top: 100px;
  z-index: 4;
}

/* Do not make any changes below here */
.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;
}