@import url("./styles.css");

.section1 {
  grid-column: 2;
  grid-row: 1;
}
.imgandtitle {
  position: relative;
  overflow: hidden;
}
.imgandtitle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.4);
  width: 200px;
  height: 50px;
  text-align: center;
  border-radius: 10px;
}
.title h2 {
  color: white;
  padding-top: 11px;
  font-size: 20px;
}
@media (min-width: 768px) {
  .title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.4);
    width: 350px;
    height: 90px;
    text-align: center;
    border-radius: 10px;
  }
  .title h2 {
    padding-top: 20px;
    font-size: 40px;
  }
}

.section2 {
  grid-column: 2;
  grid-row: 2;
  justify-content: center;
}
.container {
  padding: 0px 20px;
  grid-template-columns: 1fr 1fr;
}
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5% 5% 0% 0%;
}
.text {
  background-color: var(--main-white);
  color: black;
  padding: 8px 12px;
  border-radius: 0% 0% 5% 5%;
}
.text h3 {
  margin: 5px 0px;
}
.text p {
  margin-bottom: 8px;
}
@media (min-width: 768px) {
  .container {
    padding: 0px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .card {
    flex-direction: row;
    margin-bottom: 80px;
    max-width: 760px;
    height: 270px;
  }
  .card img {
    width: 270px;
    border-radius: 5% 0% 0% 5%;
  }
  .text {
    height: 270px;
    border-radius: 0% 5% 5% 0%;
  }
  .text h3 {
    margin: 8px 0px;
  }
  .text p {
    margin-bottom: 8px;
  }
}
