@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Figtree:ital,wght@0,300..900;1,300..900&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Hanken+Grotesk:ital,wght@0,100..900;1,100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Karla:ital,wght@0,200..800;1,200..800&family=Kumbh+Sans:wght@100..900&family=League+Spartan:wght@100..900&family=Lexend+Deca:wght@100..900&family=Manrope:wght@200..800&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Outfit:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&family=Young+Serif&display=swap");

:root {
  /*COLORES*/

  --Very-Dark-Grayish-Blue: hsl(217, 19%, 35%);
  --Desaturated-Dark-Blue: hsl(214, 17%, 51%);
  --Grayish-Blue: hsl(212, 23%, 69%);
  --Light-Grayish-Blue: hsl(210, 46%, 95%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background-color: var(--Light-Grayish-Blue);
  font-family: "Manrope", sans-serif;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.container {
  border-radius: 1rem;
  max-width: 600px;
  padding: 1.8rem;
  position: relative;
  margin-top: 5rem;

  .card {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 1rem;
    border-radius: 10px;
    background-color: white;

    .card__img {
      width: 100%;
      position: relative;
      display: flex;
      align-items: start;
      overflow: hidden;

      img {
        width: 100%;
        height: auto;
        border-radius: 10px 10px 0 0;
        object-fit: cover;
        object-position: top;
        max-height: 280px;
      }
    }

    .card__content {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
      padding: 1rem 2rem;
      .card__title {
        font-size: 1.3rem;
        color: var(--Very-Dark-Grayish-Blue);
        line-height: 1.8rem;
      }
      .card__description {
        font-size: 1rem;
        color: var(--Desaturated-Dark-Blue);
        line-height: 1.5rem;
      }

      .card__profile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        .card__profile__person {
          display: flex;
          gap: 1rem;
          align-items: center;
          .card__profile--img {
            img {
              width: 40px;
              height: 40px;
              border-radius: 50%;
            }
          }
          .card__profile--name {
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
            font-size: 1rem;
            color: var(--Very-Dark-Grayish-Blue);
            font-weight: 700;
          }
          .card__profile--date {
            color: var(--Grayish-Blue);
            font-size: 1rem;
            font-weight: 500;
          }
        }
        .card__profile--share {
          display: flex;
          justify-content: center;
          align-items: center;
          border-radius: 50%;
          background-color: var(--Light-Grayish-Blue);
          padding: 0.9rem;
          cursor: pointer;
          transition: all 0.3s ease;
          z-index: 1000;
          img {
            width: 20px;
            height: 20px;
          }
          &:hover,
          &.active {
            background-color: var(--Desaturated-Dark-Blue);
            img {
              filter: brightness(0) invert(1);
            }
          }
        }
      }
    }

    .card__share {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background-color: var(--Very-Dark-Grayish-Blue);
      padding: 1.5rem 2rem;
      margin-top: -5.5rem;
      border-radius: 0 0 10px 10px;
      transition: all 0.3s ease;
      opacity: 0;
      visibility: hidden;
      .card__share--gruop {
        display: flex;
        align-items: center;
        gap: 1rem;
      }
      .card__share--title {
        color: var(--Grayish-Blue);
        font-size: 1rem;
        font-weight: 500;
        letter-spacing: 0.3rem;
        text-transform: uppercase;
      }
      .card__share--icons {
        display: flex;
        gap: 1rem;
        align-items: center;
        justify-content: center;
        a {
          color: white;
          font-size: 1.5rem;
          transition: all 0.3s ease;
          font-weight: 100;
          &:hover {
            color: var(--Desaturated-Dark-Blue);
          }
        }
      }
      .card__share--arrow {
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 50%;
        background-color: var(--Desaturated-Dark-Blue);
        padding: 0.9rem;
        cursor: pointer;
        transition: all 0.3s ease;
        img {
          width: 20px;
          height: 20px;
        }
        &:hover {
          background-color: var(--Grayish-Blue);
          img {
            filter: brightness(0) invert(1);
          }
        }
      }
    }
    .card__share--active {
      opacity: 1;
      visibility: visible;
    }
  }
}

footer {
  background-color: #333;
  width: 100%;
  margin-top: 20px;
  color: #fff;
  padding: 20px;
  text-align: center;
  border-top: 2px solid #555;
  font-family: var(--Lexend);

  p {
    margin: 10px 0;
  }

  a {
    color: #1e90ff;
    text-decoration: none;
    font-weight: bold;
    &:hover {
      color: #ff6347;
      text-decoration: underline;
    }
  }
}

@media (min-width: 800px) {
  .container {
    max-width: 990px;
    margin-top: 10rem;
    .card {
      flex-direction: row;
      gap: 0;
      .card__img {
        width: 50%;
        margin-left: 2rem;
        img {
          height: 100%;
          min-height: 100%;
          border-radius: 10px 0 0 10px;
          object-position: left;
          max-width: 380px;
        }
      }
      .card__content {
        width: 60%;
        padding: 2rem;
        gap: 1.4rem;
        .card__title {
          font-size: 1.5rem;
          line-height: 2rem;
        }
      }

      .card__share {
        position: absolute;
        bottom: 130px;
        right: -70px;
        width: auto;
        border-radius: 0.5em;
        padding: 1.3rem;
        &::after {
          content: "";
          position: absolute;
          left: 44%;
          top: 100%;
          width: 0;
          height: 0;
          border-left: 10px solid transparent;
          border-right: 10px solid transparent;
          border-top: 12px solid var(--Very-Dark-Grayish-Blue);
        }
        .card__share--gruop {
          gap: 1.5rem;
        }
        .card__share--title {
          letter-spacing: 0.5rem;
          font-size: 1rem;
        }
      }
    }
  }
  footer {
    width: 40%;
    margin: 3rem auto;
    border-radius: 20px;
    margin-bottom: 1rem;
  }
}
