*,
*::before,
*::after {
    box-sizing: border-box;
}
/* Custom colors */
: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%);
}




body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    font-size: 0.8125rem;
    background-color: var(--Light-Grayish-Blue);
}

.card {
    width: 90%;
    max-width: 50.375rem;
    background-color: white;
    border-radius: 0.8rem;
    overflow: hidden;
    position: relative;
}

/* image inside the card */
.card img {
    width: 100%;
    height: 12.5rem;
    object-fit: cover;
}


/*content section inside the card */
.content-section {
    padding: 1.25rem 1.875rem 0.3125rem;
}

.content-section h1 {
    color: var(--Very-Dark-Grayish-Blue);
    font-weight: 700;
}

.content-section p {
    color: var(--Desaturated-Dark-Blue);
    font-weight: 500;
    text-align: left;
    line-height: 1.6;
}




/* user info section inside the content section */
.user-info {
    display: flex;
    margin: 1.5625rem 0 0.3125rem;
}

.user-info img {
    width: 2.5rem;
    height: 2.5rem;
    display: block;
    border-radius: 50%;
    margin-right: 0.9375rem;
}

.user-info button {
    margin-left: auto;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.0625rem;
    color: var(--Desaturated-Dark-Blue);
    background-color: var(--Light-Grayish-Blue);
    border: none;
    border-radius: 50%;
    z-index: 10;
}

.user-info button.active {
    color: var(--Light-Grayish-Blue);
    background-color: var(--Desaturated-Dark-Blue);
}

.user-info button:hover,:focus {
    outline: 1px solid var(--Desaturated-Dark-Blue);
    cursor: pointer;
}




/* name and date section inside the user info */
.name-date h2 {
    font-size: 0.8125rem;
    font-weight: 700;
    margin: 0 0 0.125rem;
    color: var(--Very-Dark-Grayish-Blue);
}

.name-date span {
    color: var(--Desaturated-Dark-Blue);
}


/* share panel at the bottom of the card */
.share-panel {
    display: flex;
    opacity: 0;
    pointer-events: none;
    transform: translateY(1.25rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    background: var(--Very-Dark-Grayish-Blue);
    color: white;
    padding: 1rem 1.9rem;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

.share-panel.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.share-panel span {
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.375rem;
    opacity: 0.6;
}

.share-panel img {
    width: 1.25rem;
    height: 1.25rem;
}



/* Responsive styles for desktop screen */
@media (min-width: 48rem) {
    
    .card {
        display: flex;
        overflow: visible;
    }

    

    .image-section img {
        height: 100%;
        border-top-left-radius: 0.8rem;
        border-bottom-left-radius: 0.8rem;
    }

    .content-section {
        position: relative;
    }

    .share-panel {
        position: absolute;
        border-radius: 0.9375rem;
        bottom: 4.375rem;
        left: 58%;
        min-width: 15.625rem;
        max-width: none;
        z-index: 10;
        padding: 0.7rem 1.5rem;
    }

    .share-panel::after {
        content: "";
        position: absolute;
        left: 65%;
        top: 100%;
        transform: translateX(-50%);
        border-width: 0.5625rem;
        border-style: solid;
        border-color: var(--Very-Dark-Grayish-Blue) transparent transparent transparent;
    }

    .share-panel button {
        display: none;
    }
}