/* CSS - Name: "positionstyles.css" */

/* ========== Activity 1 ========== */
.content1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: center;
  gap: 20px;
}

.red1,
.blue1 {
  width: 100%;
  height: 100px;
}

.red1 {
  background-color: red;
  grid-column: 1 / 3;
}

.green1,
.yellow1 {
  width: 200px;
  height: 200px;
}

.green1 {
  background-color: green;
}

.yellow1 {
  background-color: gold;
}

.blue1 {
  background-color: blue;
  grid-column: 1 / 3;
}

/* ========== Activity 2 ========== */
.content2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  justify-items: center;
}

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

.green2 {
  background-color: green;
  width: 200px;
  height: 200px;
  justify-self: start;
}

.yellow2 {
  background-color: gold;
  width: 200px;
  height: 200px;
  justify-self: end;
}

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

/* ========== Activity 3 ========== */
.content3 {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.red3 {
  background-color: red;
  width: 100%;
  height: 100px;
}

.green3 {
  background-color: green;
  width: 48%;
  height: 200px;
}

.yellow3 {
  background-color: gold;
  width: 48%;
  height: 200px;
}

.blue3 {
  background-color: blue;
  width: 100%;
  height: 100px;
}

/* ========== Activity 4 ========== */
.content4 {
  position: relative;
  height: 400px;
}

.red4 {
  background-color: red;
  width: 100px;
  height: 100px;
  position: absolute;
  top: 0;
  left: 0;
}

.green4 {
  background-color: green;
  width: 100px;
  height: 100px;
  position: absolute;
  top: 50px;
  left: 50px;
}

.yellow4 {
  background-color: gold;
  width: 100px;
  height: 100px;
  position: absolute;
  top: 100px;
  left: 100px;
}

.blue4 {
  background-color: blue;
  width: 100px;
  height: 100px;
  position: absolute;
  top: 150px;
  left: 150px;
}

/* ========== Activity 5 ========== */
.content5 {
  height: 400px;
}

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

.green5 {
  background-color: green;
  width: 100px;
  height: 100px;
  float: right;
}

.yellow5 {
  background-color: gold;
  width: 100px;
  height: 100px;
  clear: both;
  margin: 0 auto;
}

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

/* ========== Activity 6 ========== */
.content6 {
  display: grid;
  place-items: center;
  height: 400px;
  position: relative;
}

.red6 {
  background-color: red;
  width: 250px;
  height: 250px;
  z-index: 1;
}

.green6 {
  background-color: green;
  width: 200px;
  height: 200px;
  position: absolute;
  z-index: 2;
}

.yellow6 {
  background-color: gold;
  width: 150px;
  height: 150px;
  position: absolute;
  z-index: 3;
}

.blue6 {
  background-color: blue;
  width: 100px;
  height: 100px;
  position: absolute;
  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;
}
