@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root{
    --main-background: hsl(210, 46%, 95%);
    --card-background: hsl(0, 0%, 100%);
    --text-color: hsl(214, 17%, 51%);
    --heading-color: hsl(217, 19%, 35%);
}

body{
    background-color: var(--main-background);
    color: var(--text-color);
    font-size: 13px;
    font-weight: 500;
    font-family: 'Manrope', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

main{
    max-width: 425px;
    background-color: var(--card-background);
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    margin: 1.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    z-index: 0;
}

main .image-container{
    overflow: hidden;
}

main .image-container img{
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 10px 10px 0 0;
    transition: all 0.5s linear;
}

main .image-container img:hover{
    transform: scale(1.05); /* Zoom effect on hover */
}

main .text .text-up{
    padding: 2rem;
}

.text-up h1{
    color: var(--heading-color);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.text .text-down{
   /* border: 2px solid red; */
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.text-down .profile{
  /* border: 3px solid yellow; */
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem 1rem 2rem;
}

.profile img{
    max-width: 3rem;
    border-radius: 50%;
}

.profile .profile-desc h2{
    color: var(--heading-color);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.text-down .share #share-icon{
   /* border: 4px solid black; */
    display: block;
    position: absolute;
    bottom: 1.5rem;
    right: 2rem;
    width: auto;
    background-color: var(--main-background);
    padding: 0.5rem;
    border-radius: 50%;
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.3);
    z-index: 1;
    cursor: pointer;
    transition: all 0.3s linear;
}

.text-down .share #share-icon:hover{
    transform: scale(1.1);
}

.text-down .share-links{
    position: absolute;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    height: 0%;
    overflow: hidden;
    background-color: var(--heading-color);
    z-index: 0;
    transition: all 0.3s ease-in-out;
    border-radius: 0.5rem;
}

.text-down.active .share-links{
    height: auto;
    padding: 1.5rem 2rem 1.75rem 2rem;
}

.share-links span{
    text-transform: uppercase;
    letter-spacing: 5px;
}

.share-links a:hover{
    transform: scale(1.1);
}

/* Media Queries - for responsiveness */
@media (max-width: 350px) {
  .text-down .profile {
    gap: 0.5rem;
    padding: 0 1.5rem 1rem 1.5rem;
  }
  .profile .profile-desc h2 {
    font-size: 0.8rem;
  }
  .text-down .share-links {
    gap: 0.5rem;
  }
}

@media (min-width: 850px) {
  body {
    font-size: 1rem;
  }
  main {
    max-width: 850px;
    grid-template-columns: auto auto;
    grid-template-rows: auto;
    margin: 5rem;
  }
  main .image-container img {
    border-radius: 10px 0 0 10px;
  }
  main .text .text-up {
    padding: 2.5rem;
  }
  .text-up h1 {
    font-size: 1.5rem;
  }
  .text-down .profile {
    padding: 0 2.5rem 2rem 2.5rem;
  }
  .profile .profile-desc h2 {
    font-size: 1rem;
  }
  .text-down .share #share-icon {
    bottom: 2rem;
    right: 2.5rem;
    padding: 0.75rem;
  }
  .text-down.active #share-icon {
    background: var(--heading-color);
    box-shadow: none;
  }
  .text-down .share-links {
    display: none;
    position: absolute;
    bottom: 5.5rem;
    right: -4.5rem;
    z-index: 2;
    width: max-content;
    height: max-content;
    overflow: visible;
    border-radius: 0.8rem;
  }
  .share-links::after {
    position: absolute;
    content: "";
    bottom: -0.5rem;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: 1.5rem;
    height: 1.5rem;
    background: hsl(217, 19%, 35%);
    z-index: 3;
    transform: rotate(45deg);
  }
  .text-down.active .share-links {
    display: flex;
    padding: 1rem 2.5rem;
  }
}

