/* css/posts.css - Post Entry and List Styles */

.post-entry {
    background: var(--p5-white);
    margin-bottom: 20px;
    /* Reduced margin */
    position: relative;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    transition: transform 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    align-items: stretch;
    min-height: 160px;
    /* Reduced min-height */
}

.post-entry:hover {
    transform: translateX(10px);
}

.post-entry::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    /* Thinner accent */
    background: var(--p5-black);
    z-index: 2;
}

.post-content-wrap {
    padding: 15px 20px;
    /* Reduced padding */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.post-tag {
    background: var(--p5-yellow);
    color: black;
    padding: 1px 6px;
    margin-left: 10px;
    font-size: 0.75rem;
    border: 1px solid black;
    box-shadow: 1px 1px 0 black;
}

.post-title {
    font-size: 1.6rem;
    /* Reduced font size */
    margin: 5px 0 10px 0;
    color: var(--p5-black);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1px;
}

.post-title:hover {
    color: var(--p5-red);
}

.post-summary {
    font-size: 1rem;
    line-height: 1.5;
    color: #444;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limit to 2 lines */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
}

.post-entry:hover .card-actions {
    opacity: 1;
}

/* 全卡片点击链接层 (Stretched Link) */
.post-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* 位于内容之上，但在按钮(z-index:5)之下 */
    cursor: pointer;
}

/* 文章封面样式 */
.post-cover {
    width: 220px;
    /* Reduced width */
    min-width: 180px;
    max-width: 300px;
    background-size: cover;
    background-position: center;
    background-color: var(--p5-red);

    /* Card Styling */
    margin: 10px;
    /* Reduced margin */
    border: 2px solid var(--p5-black);
    box-shadow: 3px 3px 0 var(--p5-red);
    transform: rotate(0.5deg);
    transition: transform 0.3s;

    flex-shrink: 0;
    position: relative;
}

.post-entry:hover .post-cover {
    transform: rotate(0deg) scale(1.02);
}

/* Mobile Adaptation for Posts */
@media (max-width: 768px) {
    .post-entry {
        flex-direction: column;
        min-height: auto;
    }

    .post-cover {
        width: 100%;
        min-width: 100%;
        max-width: none;
        height: 200px;
        margin: 0;
        /* Reset margin */
        border: none;
        /* Reset border */
        border-bottom: 3px solid var(--p5-black);
        box-shadow: none;
        /* Reset shadow */
        transform: none;
        /* Reset rotation */
    }

    .post-content-wrap {
        padding: 20px;
    }

    .post-title {
        font-size: 1.8rem;
    }

    .card-actions {
        opacity: 1;
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 15px;
        justify-content: flex-end;
    }
}