
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap');

/* Resets*/

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

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

body, h1, h2, h3, h4, p,
figure, blockquote, ul, ol {
  margin: 0;
  padding: 0;
}

ul[role='list'], ol[role='list'] {
  list-style: none;
}

body {
  min-height: 100vh;
  line-height: 1.5;
}

h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

h1, h2,
h3, h4 {
  text-wrap: balance;
}

a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

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

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

textarea:not([rows]) {
  min-height: 10em;
}

:target {
  scroll-margin-block: 5ex;
}

/* Root variables */
:root {
--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%);
--white: hsl(0, 0%, 100%);
}

body {
background-color: var(--Light-Grayish-Blue);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh;
gap: 1rem;
font-size: 0.8125rem;
font-family: "Manrope", serif;
font-weight: 500;
}

.card {
border-radius: 10px;
box-shadow: 0 4px 10px  rgba(0, 0, 0, 0.1);
max-width: 20rem;
background-color: var(--white);
overflow: hidden;
}

.hidden {
  display: none;
}
.open {
  display: flex;
  gap: 1rem;
  align-items: center;
  background-color: var(--Very-Dark-Grayish-Blue);
}
.share-btn-active {
  background-color: var(--Very-Dark-Grayish-Blue);
}

.share-btn-img-active {
  filter: brightness(500%);
}

.card-image {
  width: 100%;
  height: auto;
}
.card-description {
padding: 2rem 2rem 1rem;
    
}
.card-heading {
  color: var(--Very-Dark-Grayish-Blue);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5rem;
  margin-block-end: 1rem;
  
}
.card-note {
  color: var(--Grayish-Blue);
}
.card-footer {
  position: relative;
  display: flex;
  justify-content: space-between;    
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
}

.author-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.avatar {
    border-radius: 50%;
    height: 2.5rem;
    width: 2.5rem;
}
.name{
  font-weight: 700;
  color: var(--Very-Dark-Grayish-Blue);
}
.date {
  display: block;
  color: var(--Grayish-Blue);
}
.share-btn {
  border-radius: 50%;
  border: none;
  width: 2rem;
  height: 2rem;
  padding: 10px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  
}

.share-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  
}
.share-popup {
  position: absolute;
  top: 0px;
  left: 0px;
  height: 5rem;
  width: 100%;
  padding-left: 1.5rem;
}
.share-list-icons {
  padding-left: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.share-text {
  text-transform: uppercase;
  font-size: 0.6875rem; 
  letter-spacing: 0.3rem;
  color: var(--Grayish-Blue);
}
.share-list-item {
  list-style-type: none;
}
.share-btn-wrapper {
  z-index: 1;
  } 
.attribution { font-size: 11px; text-align: center; }
.attribution a { color: hsl(228, 45%, 44%); }

@media (min-width: 48rem) {
  .card {
    max-width: 45rem;
    display: flex;
    overflow: visible;
  }
  .card-image {
    height: 100%;
    
  }
  .card-footer {
    position: unset;
    padding-top: 0.5rem;
    padding-bottom: 1.5rem;
  }
  .share-wrapper {
    position: relative;
  }
  .share-popup {
    width: 14rem;
    height: 3rem;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 8px;
    padding: 0 1.5rem;
  }
  .share-popup::before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-left: 0.5rem solid transparent;
    border-right: 0.5rem solid transparent;
    border-top: 0.5rem solid var(--Very-Dark-Grayish-Blue);
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
  }
  
}