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

:root{
  --very-dark-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;
  font-size: calc(0.9rem + 0.3vw);
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 3em;
}

.article-preview{
  background-color: #ffffff;
  border-radius: 0.9em;
  width: 25rem;
  max-width: 90vw;
  max-height: fit-content;
  height: 700px;
}

.drawer-image img{
  width: 100%;
  height: 17rem;
  border-radius: 0.9em 0.9em 0 0;
}

.text-section{
  padding: 1em;
  margin: 1em;

    h3{
      color: var(--very-dark-blue);
      font-size: 1.4rem;
      font-weight: 600;
      margin-bottom: 0.5em;
      line-height: 1.2;
    }

    p{
      color: var(--desaturated-dark-blue);
      font-size: 1.1rem;
      line-height: 1.5;
      margin-bottom: 0.7em;
    }
}

.author-info{
  display: flex;
  align-items: center;
}

.avatar{
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  margin-right: 1em;
}

.author-details{
  padding-top: 10px;

  h4{
    color: var(--very-dark-blue);
    font-size: 1.05rem;
    font-weight: 600;
  }
  p{
    color: var(--grayish-blue);
    font-size: 1rem;
  }
}

.share-icon{
  margin-left: auto;
  padding-left: 0;
  background-color: var(--light-grayish-blue);
  border-radius: 50%;
  padding: 0.5em; /* space inside the circle */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer; 
}

.share{
    background-color: var(--very-dark-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.7em;
    color: #ffffff;
    border-radius: 0.7em;
    gap: 0.5em;
  }

 

  .share-container {
  position: relative;
  display: inline-block;
 }

@media screen and (min-width: 900px) {
  body {
    display: flex;
    padding-top: 9em;
  }

  .article-preview{
    width: 870px;
    height: 350px;
    display: flex;
    flex-direction: row;
    border-radius: 0.9em;
    /* overflow: hidden; */
  }

  .drawer-image img{
    height: 350px; 
    width: 370px; 
    object-fit: cover;
    border-radius: 0.9em 0 0 0.9em;
  }

  .text-section {
    width: 70%;
    padding: 2em;
    margin: 0;
  }

  .share-icon {
    margin-left: auto;
    padding-left: 0;
    background-color: var(--light-grayish-blue);
    border-radius: 50%;
    padding: 0.5em; /* space inside the circle */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
  }

  .share-icon{
    margin-left: 90px;
  }

  .share-icon:hover {
    background-color: var(--grayish-blue); /* or slightly darker */
    transition: background-color 0.3s ease;
  }
  
  .share-icon:active {
    background-color: var(--desaturated-dark-blue); /* or slightly darker */
  }

  .share{
    background-color: var(--very-dark-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.7em;
    color: #ffffff;
    border-radius: 0.7em;
    gap: 0.5em;
  }

  .social-icons{
    display: flex;
    gap: 1em;
    cursor: pointer;
    padding: 0.3em;
    /* position: absolute; */
  }

  .share-container {
  position: relative;
  display: inline-block;
 }

  .share-popup {
    position: absolute;
    bottom: 120%;
    right: 50;
    background-color: var(--very-dark-blue);
    /* padding: 0.7em 1em; */
    border-radius: 0.7em;
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 1em;
    color: #fff;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  }
  
}
