* {
  box-sizing: border-box;
}

body {
  background-color: #bac1c1;
}

.container-3 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: center;
    background-color: black;
    color: aquamarine;
    padding: 16px 0;
    border-radius: 10px;
}
.logo {
    grid-column: 2 / 3;
}
img {
    width: 250px;
    height: 50px;
}
ul {
    grid-column: 8 / 12;
    justify-self: end;
}
ul li {
    list-style: none;
    display: inline-block;
    margin-left: 24px;
}

.container {
  display: grid;
  grid-template-columns: repeat(12, [col-start] 1fr);
  gap: 20px;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Mobile first */
.container > * {
  border: 1px solid green;
  background-color: rgb(133, 135, 154);
  padding: 10px;
  grid-column: col-start / span 12;
  border-radius: 10px;
}

@media (min-width: 576px) {
  .sidebar {
    grid-column: col-start / span 3;
    grid-row: 3;
  }
  .ads {
    grid-column: col-start / span 3;
  }
  .content, .footer {
    grid-column: col-start 4 / span 9;
  }
  nav ul {
    display: flex;
    justify-content: space-between;
  }
}

@media (min-width: 768px) {
  .nav {
    grid-column: col-start / span 2;
    grid-row: 2 / 4;
  }
  .content {
    grid-column: col-start 3 / span 8;
    grid-row: 2 / 4;
    border: 1px solid;
    border-radius: 10px;
    background-color: black;
  }
  .sidebar {
    grid-column: col-start 11 / span 2;
    border-radius: 10px;
  }
  .ads {
    grid-column: col-start 11 / span 2;
    border-radius: 10px;
  }
  .footer {
    grid-column: col-start / span 12;
    border-radius: 10px;
  }
  nav ul {
    flex-direction: column;
  }
}
.container-2 {
  display: grid;
  height: 700px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  background-color: dodgerblue;
  border: 0px;
  border-radius: 10px;
  padding: 10px;
  gap: 10px;
}

/* Modified to target both div and a elements which are direct children of container-2 */
.container-2 > div, .container-2 > a {
  background-color: #f1f1f1;
  border: 0px solid black;
  border-radius: 10px;
  padding: 0px;
  padding-bottom: 0px;
  font-size: 30px;
  text-align: center;
  /* Ensure the anchor tag acts like a block-level grid item */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  /* Remove default link styling for the new grid item */
  text-decoration: none; 
  color: inherit;
}

ul a {
    color: aquamarine;
}
.nav {
    background-color: black;
    border-radius: 10px;
}
.container-2 div img {
    border: 0px;
    border-radius: 10px;
}
.bg {
   background-repeat: no-repeat;
   background-size: cover;
   /* Now that .bg is the grid item, it gets the 200px height naturally */
}
h4 {
    color: white;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-weight: 500;
    margin: 0;
    
}
span {
    background: rgb(0, 0, 0); /* Fallback for older browsers without RGBA-support */
    background: rgba(0, 0, 0, 0.3);
}