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

p,
h1,
h2,
h3,
h4,
h5,
h6,
ul,
ol,
figure {
    margin: 0;
}

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

:root {
    --background-color: hsl(213, 44%, 95%);
    --hd-color: hsl(219, 15%, 30%);
    --txt-color: hsl(210, 9%, 51%);
    --share-color: hsl(212, 19%, 80%);
    --share-active-color: hsl(213, 17%, 51%);
    --share-txt-color: hsl(219, 17%, 61%);
    --share-content-color: hsl(219, 19%, 35%);

    --size-paragraph: 13px;
    --font-family: "Manrope", sans-serif;
    --fs-rg: 1rem;
    --fs-md: 1.5rem;
    --fs-lg: 2rem;
    --fs-xl: 2.5rem;
}

body {
    font-size: var(--size-paragraph);
    font-family: var(--font-family);
    min-height: 100dvh;
    color: var(--txt-color);

    background-color: var(--background-color);

    display: flex;
    flex-direction: column;
    align-items: center;

    p {
        line-height: 1.5;
    }

    h1,
    h2 {
        line-height: 1.4;
    }
}

.container {
    flex-grow: 1;

    display: flex;
    align-items: center;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 90%;
    width: 315px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background-color: white;

    .card__img img {
        width: 100%;
        aspect-ratio: 6/4;
        object-fit: cover;
        object-position: top;

    }
}

@media (width>=1000px) {
    .card {
        flex-direction: row;
        flex-shrink: 1;
        width: 690px;
        overflow: visible;

        .card__img img {
            height: 100%;
            object-fit: cover;
            object-position: left;
            border-top-left-radius: 10px;
            border-bottom-left-radius: 10px;
        }
    }
}

.card__content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    padding-bottom: 1rem;

    h1 {
        color: var(--hd-color);
        font-size: var(--fs-rg);
    }
}

@media (width>=1000px) {
    .card__content h1 {
        font-size: 20px;
    }
}

.cardcon__info {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 1rem 2rem;
}

.info__autor {
    display: flex;
    align-items: center;
    gap: 1rem;

    img {
        aspect-ratio: 1/1;
        width: 40px;
        border-radius: 1rem;
    }
}

.info__user {
    display: flex;
    flex-direction: column;

    font-size: 13px;
    gap: 5px;

    h2 {
        color: var(--hd-color);
        font-size: 13px;
    }

    span {
        font-size: 12px;
    }
}


.info__share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;

    border-radius: 2rem;
    aspect-ratio: 1/1;
    width: 30px;
    background-color: var(--share-color);
    cursor: pointer;
}

.share-content {
    display: none;
    gap: 1rem;

    width: 100%;
    height: 72px;
    padding: 1rem 2rem;
    align-items: center;
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--share-content-color);

    span {
        font-weight: 500;
        font-size: 15px;
        text-transform: uppercase;
        letter-spacing: 5px;
        color: var(--share-txt-color);
    }

    .sharecon__icon {
        display: flex;
        gap: 1rem;
    }
}

.share-content.is-open {
    display: flex;
}

@media (width>=1000px) {
    .share-content {
        bottom: auto;
        top: 55%;
        right: -80px;


        height: auto;
        width: auto;
        border-radius: 10px;
    }

    .share-content::after {
        content: "";
        position: absolute;
        top: 51px;
        right: 115px;

        border: 13px;
        border-style: solid;
        border-color: var(--share-content-color) transparent transparent transparent;
    }
}

.fade-out {
    animation: fadeOut 0.5s forwards;
}

.fade-in {
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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