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

body {   
    background-color: hsl(210, 46%, 95%);
    font-weight: 500;
    font-family: 'Manrope';
    color: hsl(212 23% 69%);
    line-height: 1.5;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    gap: 2rem;
}

p {
    font-size: 0.8125rem;
}

h3, h4 {
    font-weight: 700;
    color: hsl(217, 19%, 35%);
}

h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 0.8125rem;
}

.article {
    max-width: 20rem;
    background-color: hsl(0, 0%, 100%);
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 0.5rem;
    position: relative;
}

.card-image > img {
    display: block;
    max-width: 100%; 
    border-top-right-radius: 0.5rem;
    border-top-left-radius: 0.5rem; 
}

.card-text {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    padding: 2rem 2rem 0.5rem;
}

.author {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

.author-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.author-info > img {
    width: auto;
    height: 3rem;
    border-radius: 50%;
}

.share-icon {
    background-color: hsl(210, 46%, 95%);
    border: none;
    cursor: pointer;
    border-radius: 50%;
    height: 2rem;
    width: 2rem;
    z-index: 3;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease-in-out;
}

.share-icon > img {
    width: 1rem;
    height: 1rem;
}

.attribution { 
    font-size: 11px; 
    text-align: center; 
}

.attribution a { 
    color: hsl(228, 45%, 44%); 
}

.footer {
    background-color: hsl(217, 19%, 35%);
    color: hsl(212, 23%, 69%);
    display: flex;
    gap: 1rem;
    max-width: 100%;
    position: absolute;
    padding: 1rem 2rem;
    right: 0;
    left: 0;
    bottom: 0rem;
    justify-content: flex-start;
    letter-spacing: 0.2rem;
    align-items: center;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    opacity: 0;
    transition: all 0.5s ease-in-out;
}

.footer.active {
    opacity: 1;
    bottom: 0;
}

.footer p {
    letter-spacing: 5px;
}

.share-icon.active {
    background-color: hsl(212, 23%, 69%);
    opacity: 0.6;
    transition: all 0.5s ease-in-out;
}


@media (min-width: 49rem) {
    h3 {
        font-size: 1.3rem;
    }
    .article {
        flex-direction: row;
        max-width: 43rem;
    }

    .card-text {
        gap: 1rem;
        padding: 2rem;
    }

    .card-image > img {
        height: 100%;
        max-height: 100%;
        max-width: 17rem;
        object-position: top left;
        flex: 1;
        object-fit: cover;
        border-radius: 0.5rem 0 0 0.5rem;
    }

    .text {
        flex: 2;
        line-height: 1.6;
    }

    h3 {
        margin-bottom: 0.5rem;
    }

    .share-icon.active {
         background-color: hsl(217, 19%, 35%);
    }

    .footer {
        width: fit-content;
        bottom: 3rem;
        left: unset;
        right: -4rem;
    }

    .footer.active {
        bottom: 6.3rem;
        width: unset;
        opacity: 1; 
        padding: 0.9rem 2rem;
        border-radius: 0.5rem;
        right: -4rem;
        left: unset;
        background-color: hsl(217, 19%, 35%);
        justify-content: center;
        gap: 0.7rem;
    }

    .footer.active::before {
        content: "";
        position: absolute;
        right: 5.4rem;
        bottom: -1rem;
        background-color: hsl(217, 19%, 35%);
        width: 1rem;
        height: 2rem;
        transform: rotate(45deg) translateX(-50%);
    }
} 