@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;700&display=swap");

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

body {
    font-family: 'Manrope', sans-serif;
    background-color: hsl(210, 46%, 95%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.article-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 40px 40px -10px rgba(201, 213, 225, 0.503415);
    overflow: hidden;
    max-width: 730px;
    width: 100%;
    position: relative;
}

.article-image img{
    width: 100%;
    height: 200px;
    position: relative;
}

.article-image img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
}

.article-content {
    padding: 36px 40px 20px;
}

.article-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    color: hsl(217, 19%, 35%);
    margin-bottom: 12px;
}

.article-text {
    font-size: 13px;
    line-height: 1.5;
    color: hsl(214, 17%, 51%);
    margin-bottom: 20px;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-info img{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.author-details h4 {
    font-size: 13px;
    font-weight: 700;
    color: hsl(217, 19%, 35%);
    margin-bottom: 2px;
}

.author-details p {
    font-size: 13px;
    color: hsl(212, 23%, 69%);
}

.share-btn{
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: hsl(210, 46%, 95%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.share-btn:hover {
    background: hsl(212, 23%, 69%);
}

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

.share-btn img {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.share-popup {
    position: absolute;
    bottom: 20em;
    right: 13em;
    transform: translateX(-50%);
    background: hsl(217, 19%, 35%);
    border-radius: 10px;
    padding: 18px 36px;
    display: none;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 10px rgba(201, 213, 225, 0.503415);
    z-index: 1000;
}

.share-popup.active {
    display: flex;
}

.share-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid hsl(217, 19%, 35%);
}

.share-text {
    font-size: 13px;
    font-weight: 500;
    color: hsl(212, 23%, 69%);
    letter-spacing: 5px;
    text-transform: uppercase;
}

.social-icons {
    display: flex;
    gap: 16px;
}

.social-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.social-icon:hover {
    transform: scale(1.2);
}

.share-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: hsl(217, 19%, 35%);
    border-radius: 0 0 10px;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 18px 32px;
    z-index: 5;
}

.share-overlay.active {
    display: flex;
}

.share-overlay .social-section {
    display: flex;
    align-items: center;
    gap: 16px;
}
.hidden {
    display: none !important;
}

/* Desktop styles */
@media (min-width: 768px) {
    .article-card {
        display: flex;
        max-width: 730px;
        height: 280px;
    }

    .article-image img{
        flex: 0 0 285px;
        width: 285px;
        height: 100%;
    }

    .article-content {
        flex: 1;
        padding: 32px 40px;
        display: flex;
        flex-direction: column;
    }

    .article-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .article-text {
        flex: 1;
        margin-bottom: 20px;
    }

    .share-overlay {
        display: none !important;
    }
}

/* Mobile styles */
@media (max-width: 767px) {
    .article-card {
        max-width: 327px;
    }

    .article-image img{
        height: 200px;
    }

    .article-content {
        padding: 36px 32px 20px;
    }

    .article-title {
        font-size: 16px;
    }

    .share-popup {
        display: none !important;
    }
}

/* Tablet Styles for the share popup */

@media (min-width: 768px) and (max-width: 899px) {
    .share-popup {
        bottom: 28em;
        right: -8em;
    }
}

@media (min-width: 900px) and (max-width: 1024px) {
    .share-popup {
        bottom: 30em;
        right: -6em;
    }
}