:root {
  --clr-very-dark-grayish-blue: hsl(217, 19%, 35%);
  --clr-desaturated-dark-blue: hsl(214, 17%, 51%);
  --clr-grayish-blue: hsl(212, 23%, 69%);
  --clr-light-grayish-blue: hsl(210, 46%, 95%);

  --ff-manrope: 'Manrope', sans-serif;

  --fw-500: 500;
  --fw-700: 700;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  display: block;
}

input,
button,
optgroup,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

body {
  min-height: 100vh;
  font-family: var(--ff-manrope);
  font-size: 0.8125rem;
  font-weight: var(--fw-500);
  line-height: 1.5;
  background-color: var(--clr-light-grayish-blue);
  display: flex;
  justify-content: center;
  align-items: center;
}

.card {
  max-width: 20.5rem;
  border-radius: 0.625rem;
  overflow: hidden;
  background-color: white;
  box-shadow: 0 0.625rem 2.1875rem 0 hsla(212, 23%, 69%, 0.5);
}

.card-image {
  height: 12.5rem;
  width: 100%;
  object-fit: cover;
}

.card-text {
  padding: 2.5rem 2.1875rem 1.25rem 2.1875rem;
}

.card-text h2 {
  font-size: 1rem;
  color: var(--clr-very-dark-grayish-blue);
  margin-bottom: 0.9375rem;
}

.card-text p {
  color: var(--clr-desaturated-dark-blue);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2.1875rem;
  position: relative;
}

.card-author {
  display: flex;
  gap: 0.9375rem;
}

.card-author img {
  width: 2.5rem;
  border-radius: 50%;
}

.card-author h3 {
  font-size: 0.8125rem;
  color: var(--clr-very-dark-grayish-blue);
}

.card-author time {
  color: var(--clr-grayish-blue);
}

.btn {
  border: none;
  width: 2.1875rem;
  height: 2.1875rem;
  border-radius: 50%;
  background-color: var(--clr-light-grayish-blue);
  z-index: 1;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.2s;
}

.btn:hover {
  background-color: var(--clr-desaturated-dark-blue);
}

.btn:hover .btn-image {
  filter: brightness(0) saturate(100%) invert(95%) sepia(9%) saturate(126%)
    hue-rotate(170deg) brightness(98%) contrast(99%);
}

.btn.active {
  background-color: var(--clr-desaturated-dark-blue);
}

.btn .btn-image {
  filter: initial;
}

.btn .btn-image.active {
  filter: brightness(0) saturate(100%) invert(95%) sepia(9%) saturate(126%)
    hue-rotate(170deg) brightness(98%) contrast(99%);
}

.share {
  background-color: var(--clr-very-dark-grayish-blue);
  display: flex;
  align-items: center;
  gap: 0.9375rem;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5rem;
  padding: 0 2.1875rem;
  visibility: hidden;
}

.social-links {
  list-style: none;
  display: flex;
  gap: 0.9375rem;
}

.share span {
  text-transform: uppercase;
  color: var(--clr-grayish-blue);
  letter-spacing: 0.255rem;
}

.show {
  visibility: visible;
}

@media screen and (min-width: 48rem) {
  .card {
    display: flex;
    max-width: 45.625rem;
    overflow: visible;
  }

  .card-image {
    width: 17.8125rem;
    height: auto;
    object-position: left;
    border-top-left-radius: 0.625rem;
    border-bottom-left-radius: 0.625rem;
  }

  .card-text h2 {
    font-size: 1.25rem;
  }

  .card-text {
    padding: 1.875rem 2.5rem 0 2.5rem;
  }

  .card-footer {
    padding: 1.25rem 2.1875rem 1.875rem 2.1875rem;
  }

  .share {
    bottom: 5.9375rem;
    left: 16.875rem;
    padding: 1.125rem 2.5rem;
    width: auto;
    height: auto;
    border-radius: 0.625rem;
    box-shadow: 0 0.625rem 2.1875rem 0 hsla(212, 23%, 69%, 0.5);
  }

  .share::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 0;
    border: 0.8125rem solid transparent;
    border-top-color: var(--clr-very-dark-grayish-blue);
    border-bottom: 0;
    margin-left: -0.8125rem;
    margin-bottom: -0.8125rem;
  }

  .share img {
    max-width: initial;
  }
}
