/* ============================================
   Blog Grid Item Component - Shared Styles
   Used in: home.php, archive, single-post.php
   ============================================ */

/* Post Item Card */
.post-item {
    width: 100%;
    box-shadow: 0px 4px 4px 0px #00000040;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

.post-item .img {
    width: 100%;
}

.post-item .img img {
    width: 100%;
    height: auto;
    aspect-ratio: 5/3;
    object-fit: cover;
    display: block;
}

.post-item .txt {
    padding: 20px 25px 0;
}

/* Categories in grid item */
.post-item .post-categories {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 10px;
}

.post-item h3 {
    font-family: 'Lexend', sans-serif;
    font-weight: 500;
    font-size: 24px;
    margin-bottom: 10px;
    line-height: 125%;
}

.post-item .post-extract {
    font-size: 20px;
    font-weight: 300;
    line-height: 120%;
    font-family: 'Inter', sans-serif;
}

.post-extract p {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
            line-clamp: 3;
}

/* Loading spinner */
.blog-spinner {
    padding: 40px 0;
    text-align: center;
    font-weight: 700;
}

/* Shortcode [latest_posts] container */
.latest-posts-shortcode .related-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.post-item .post-categories * {
    color: #3CA755;
    font-family: 'Inter';
    font-size: 15px;
    font-weight: 400;
}

.post-item .post-category-item:hover {
    text-decoration: underline;
}

/* Media Queries */
@media (max-width: 1024px) {
    .post-item h3 {
        font-size: 23px;
    }
    
    .post-extract p {
        font-size: 18px;
    }
    
    .latest-posts-shortcode .related-posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .post-item {
        width: 100%;
    }

    .post-item h3 {
        font-size: 20px;
    }
    
    .post-item .post-categories {
        font-size: 15px;
    }
    
    .latest-posts-shortcode .related-posts {
        grid-template-columns: 1fr;
    }
}