@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(#0f4675, #0f4675 50%, #fff 50%, #fff 100%);
}

.container {
  width: 1100px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4rem;
}

.container .box {
  position: relative;
  width: 320px;
  background: #fff;
  padding: 100px 40px 60px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1);
}

.container .box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ff226d;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s;
}

.container .box:hover::before {
  transform: scaleY(1);
  transform-origin: bottom;
  transition: transform 0.5s;
}

.container .box h2 {
  position: absolute;
  left: 40px;
  top: 60px;
  font-size: 4em;
  font-weight: 800;
  z-index: 1;
  opacity: 0.1;
  transition: 0.5s;
}

.container .box:hover h2 {
  opacity: 1;
  color: #fff;
  transform: translateY(-40px);
}

.container .box h3 {
  position: relative;
  font-size: 1.5em;
  z-index: 2;
  color: #333;
  transition: 0.5s;
}

.container .box p {
  position: relative;
  z-index: 2;
  color: #555;
  transition: 0.5s;
}

.container .box:hover h3,
.container .box:hover p {
  color: #fff;
}

@media screen and (max-width: 380px) {
  .container {
    margin-inline: 1rem;
  }

  .container .box {
    width: 100%;
    padding: 100px 20px 50px;
  }
}
