: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%);
    --font-size: 13px;
    --font-family: "Manrope", sans-serif;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size);
    background-color: var(--light-grayish-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.card {
    background: #fff;
    border-radius: 10px;
    overflow: visible;
    max-width: 730px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.card__image {
    width: 100%;
    height: auto;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.card__content {
    position: relative;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.card__title {
    color: var(--very-dark-grayish-blue);
    font-weight: 700;
    font-size: 1.25rem;
}

.card__text {
    color: var(--desaturated-dark-blue);
    margin-bottom: 56px;
}

.card__author {
    position: absolute;
    display: flex;
    bottom: 20px;
    left: 30px;
    gap: 1rem;
}

.author__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.author__name {
    font-weight: 700;
    color: var(--very-dark-grayish-blue);
}

.author__date {
    color: var(--grayish-blue);
}

.card__share {
    position: relative;
}

.share__button {
    background: var(--light-grayish-blue);
    border: none;
    border-radius: 50%;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1;
    position: absolute;
    right: 32px;
    bottom: 20px;
}

.share__button.active {
    background: var(--desaturated-dark-blue);
}

.share__tooltip.active {
    display: flex;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
    height: 65px;
}

.share__button.active img {
    filter: brightness(4);
}

.share__tooltip {
    display: none;
    align-items: center;
    gap: 1rem;
    background-color: var(--very-dark-grayish-blue);
    color: var(--grayish-blue);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    top: 0px;
    right: 0px;
    font-size: 0.75rem;
    letter-spacing: 3px;
}

.share__tooltip::after {
    content: "";

    border-width: 8px;
    border-style: solid;
    border-color: var(--very-dark-grayish-blue) transparent transparent transparent;
}

.share__tooltip a img {
    width: 20px;
    height: 20px;
}

.card__footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

@media (min-width: 768px) {
    .share__tooltip.active {
        display: flex;
        border-radius: 10px;
        height: auto;
    }

    .card {
        flex-direction: row;
    }

    .card__text {
        color: var(--desaturated-dark-blue);
        margin-bottom: 0;
    }


    .card__author {
        position: static;
        display: flex;
        bottom: 10px;
        left: 0;
        gap: 1rem;
    }

    .card__image {
        width: 40%;
        object-fit: cover;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
        border-top-right-radius: 0;
    }

    .card__content {
        width: 60%;
    }

    .card__footer {
        position: static;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .share__tooltip {
        position: absolute;
        display: none;
        align-items: center;
        gap: 1rem;
        background-color: var(--very-dark-grayish-blue);
        color: var(--grayish-blue);
        padding: 0.75rem 1.5rem;
        border-radius: 10px;
        top: -60px;
        right: -90px;
        font-size: 0.75rem;
        letter-spacing: 3px;
    }

    .share__tooltip::after {
        content: "";
        position: absolute;
        bottom: -22px;
        left: 54%;
        scale: 204%;
        transform: translateX(-50%);
        border-width: 8px;
        border-style: solid;
        border-color: var(--very-dark-grayish-blue) transparent transparent transparent;
    }

    .share__button {
        background: var(--light-grayish-blue);
        border: none;
        border-radius: 50%;
        padding: 0.5rem;
        cursor: pointer;
        position: relative;
        z-index: 1;
        right: 0;
        bottom: 0;
    }
}
