:root {
    /* Colors */
    --White: hsl(0, 0%, 100%);
    --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%);
}

/********************* Standard Resets ***********************/

*,
*::before,
*::after {
    /* Ensures padding & border remain within element's size */
    box-sizing: border-box;
}

* {
    /* Remove browser's default margin, padding, and font settings */
    margin: 0;
    padding: 0;
    /* Ensures forms, buttons, etc., match the document font */
    font: inherit;
}

html,
body {
    height: 100%;
    min-height: 100svh;
}

body {
    display: grid;
    place-items: center;
    font-family: "Manrope", sans-serif;
    background-color: var(--Light_Grayish_Blue);
}

img,
picture,
svg,
video {
    /* Prevents inline spacing issues */
    display: block;
    /* Ensures media scales within parent container */
    max-width: 100%;
}

article {
    position: relative;
}

.card {
    width: 100%;
    max-width: 20.4375rem;
    border-radius: 0.625rem;
    background-color: var(--White);
    overflow: hidden;
    box-shadow: 0.625rem 2.5rem 2.5rem -0.625rem hsl(210, 29%, 84%, 0.7);
}

.card__main-image-container {
    height: 12.5rem;
    overflow: hidden;
}

.card__main-image {
    object-position: 0rem -1rem;
}

.card__text-area {
    padding: 2rem 1.875rem 1.125rem;
}

.card__heading {
    color: var(--Very_Dark_Grayish_Blue);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 130%;
    letter-spacing: 0.015625rem;
}

.card__description {
    margin-top: 1.5rem;
    margin-bottom: 3rem;

    color: var(--Desaturated_Dark_Blue);
    font-weight: 500;
    font-size: 0.8125rem;
    line-height: 140%;
}

.card__author {
    display: flex;
    align-items: center;
}

.card__author-avatar {
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 50%;
}

.card__author-details {
    margin-left: 1rem;
    margin-right: 4rem;
}

.card__author-name {
    color: var(--Very_Dark_Grayish_Blue);
    font-weight: 700;
    font-size: 0.8125rem;
    line-height: 140%;
}

.card__author-date {
    color: var(--Grayish_Blue);
    font-weight: 500;
    font-size: 0.8125rem;
    line-height: 140%;
}

.card__share-button {
    border-radius: 50%;
    border: none;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    z-index: 10;
    background-color: var(--Light_Grayish_Blue);
}

#button-share {
    background-color: var(--Light_Grayish_Blue);
}

#button-share:hover {
    border: solid blue 0.125rem;
}

#share-img {
    z-index: 10;
    margin: auto;
    filter: brightness(1);
}

#share-visible {
    display: none;
}

.share__menu {
    width: 20.4375rem;
    height: 4.75rem;
    border-bottom-left-radius: 0.625rem;
    border-bottom-right-radius: 0.625rem;
    background-color: var(--Very_Dark_Grayish_Blue);
    color: var(--Grayish_Blue);

    font-size: 0.8125rem;
    line-height: 140%;
    letter-spacing: 0.25rem;

    position: absolute;
    bottom: 0rem;
}

.share__icons {
    width: 20.4375rem;
    height: 4.75rem;
    display: flex;
    align-items: center;
}

.share__icons p {
    padding-left: 2rem;
    padding-right: 1.5rem;
}

.share__icons a {
    margin-right: 1rem;
}

.share__icons a:hover {
    outline: solid ; 
}

/************************ Responsive *************************/

/* Tablet (min-width: 768px) */
@media (min-width: 48rem) {

    .card {
        max-width: 38rem;
        height: 21.625rem;
        display: flex;
    }

    .card__main-image-container {
        height: 21.625rem;
        min-width: 14.3125rem;
    }

    .card__main-image {
        object-position: 1.25rem 0rem;
        height: 100%;
        transform: scaleX(1.25);
    }

    .card__text-area {
        padding: 2.5625rem 2.25rem 2.5625rem 2rem;
    }

    .card__description {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .card__author-details {
        margin-right: 6.5rem;
    }

    .share__menu {
        width: 15.5rem;
        height: 3.4375rem;
        border-radius: 0.625rem;
        bottom: 6.625rem;
        left: 26.6875rem;
    }

    .share__icons {
        width: 15.5rem;
        height: 3.4375rem;
    }

    /* hack using borders to put a small triangle below the share menu */
    .share__menu::after {
        content: "";
        position: absolute;
        bottom: -0.625rem;
        /* put triangle below the menu */
        left: 50%;
        /* centers it horizontally */
        transform: translateX(-50%);
        /* adjusts so it’s truly centered */
        width: 0;
        height: 0;
        border-left: 0.625rem solid transparent;
        /* left side transparent */
        border-right: 0.625rem solid transparent;
        /* right side transparent */
        border-top: 0.625rem solid var(--Very_Dark_Grayish_Blue);
        /* top side = triangle color */
    }
}

/* Desktop (min-width: 992px) */
@media (min-width: 62rem) {

    .card {
        min-width: 45.625rem;
        height: 17.5rem;
        display: flex;
    }

    .card__main-image-container {
        height: 17.5rem;
        min-width: 17.8125rem;
    }

    .card__main-image {
        object-position: 1.5625rem 0rem;
        /* height: 100%; */
        /* transform: scaleX(1.25); */
    }

    .card__text-area {
        padding: 1.875rem 2.5rem;
    }

    .card__description {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .card__author-details {
        margin-right: 10rem;
    }

    .share__menu {
        width: 15.5rem;
        height: 3.4375rem;
        border-radius: 0.625rem;
        bottom: 6rem;
        left: 34.375rem;
    }

    .share__icons {
        width: 15.5rem;
        height: 3.4375rem;
    }

    /* hack using borders to put a small triangle below the share menu */
    .share__menu::after {
        content: "";
        position: absolute;
        bottom: -0.625rem;
        /* put triangle below the menu */
        left: 50%;
        /* centers it horizontally */
        transform: translateX(-50%);
        /* adjusts so it’s truly centred */
        width: 0;
        height: 0;
        border-left: 0.625rem solid transparent;
        /* left side transparent */
        border-right: 0.625rem solid transparent;
        /* right side transparent */
        border-top: 0.625rem solid var(--Very_Dark_Grayish_Blue);
        /* top side = triangle color */
    }

}