@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
}

body {
  font-family: 'Manrope', sans-serif;
  font-size: 1.3rem;
  min-height: 100vh;
  background: hsl(210, 46%, 95%);
  display: grid;
  place-items: center;
}

main {
  max-width: 70rem;
  display: flex;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.card-image {
  flex: 0 0 40%;
}

.card-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  border-radius: 8px 0 0 8px;
}

.card-details {
  flex: 1;
  padding: 3rem;
}

h1 {
  font-size: 2rem;
  color: hsl(217, 19%, 35%);
  margin-bottom: 1.5rem;
}

p {
  font-size: 1.2rem;
  color: hsl(214, 17%, 51%);
}

p.mb {
  margin-bottom: 1.5rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-details img:first-child {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
}

.user-details {
  display: flex;
  align-items: center;
}

.user-details div {
  margin-left: 1.5rem;
}

.user-details h2 {
  font-size: 1.2rem;
  color: hsl(217, 19%, 35%);
}

.share {
  background: hsl(210, 46%, 95%);
  height: 3rem;
  width: 3rem;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.share-icons{
  background: hsl(217, 19%, 35%);
  display: flex;
  align-items: center;
  padding: 1.5rem;
  border-radius: 10px;
  position: absolute;
  z-index: 1;
  bottom: 100%;
  margin-left: -5px;
  margin-bottom: 1.8rem;
  visibility: hidden;
}

.share-icons::after{
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 8px;
  border-style: solid;
  border-color: hsl(217, 19%, 35%) transparent transparent transparent;
}

.share-icons p{
  color: #fff;
  letter-spacing: 2px;
}

.share-icons > * {
  margin-right: 1rem;
}

.mb-card-footer{
  display: none;
}

@media only screen and (max-width: 768px) {
  main{
    flex-direction: column;
    width: 100%;
  }
  .card-image img{
    border-radius: 0;
  }
  .card-footer{
    display: none;
  }
  .mb-card-footer{
    background: hsl(217, 19%, 35%);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    color: #fff;
    border-radius: 0 0 8px 8px;
  }
  .mb-card-footer p{
    color: #fff;
  }
  .share{
    margin-left: auto;
  }
  .mb-card-footer > *:not(.share) {
    margin-right: 5rem;
  }
}