/* ============================================================
   Article Cards
   ============================================================ */
.post, #page .page, .bulletin,
.single-picture .picture, .type-attachment,
.single-tao .tao, .single-video .video {
    position: relative;
    background: var(--surface);
    margin: 0 0 20px;
    padding: 24px 24px 56px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-lg);
    transition: box-shadow var(--transition), border-color var(--transition);
    overflow: hidden;
}

.post .entry-content {
    position: relative;
}

#articleDetail .entry-content {
    margin-top: 24px;
}

.post:not(#articleDetail):not(#page) {
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-rows: auto 1fr;
    height: 200px;
    padding: 0;
}

.post:not(#articleDetail):not(#page) .entry-content {
    grid-column: 2;
    grid-row: 2;
    padding: 0 24px 42px 20px;
    overflow: hidden;
}

.post:hover, #page .page:hover {
    box-shadow: var(--shadow-md);
    border-color: #c8d8e8;
}

@media screen and (max-width: 900px) {
    .post:not(#articleDetail), #page .page, .bulletin,
    .single-picture .picture, .type-attachment,
    .single-tao .tao, .single-video .video {
        display: flex;
        flex-direction: column;
        height: auto;
        margin: 0 0 12px;
        padding: 0 0 46px;
    }

    /* 覆盖基础样式中高特异性的 grid 布局，确保小屏下切换为 flex 竖排 */
    .post:not(#articleDetail):not(#page) {
        display: flex;
        flex-direction: column;
        height: auto;
        grid-template-columns: unset;
        grid-template-rows: unset;
    }

    .post .entry-header {
        grid-column: unset;
        grid-row: unset;
        padding: 14px 16px 0;
        order: 2;
    }

    .post .entry-content {
        grid-column: unset;
        grid-row: unset;
        padding: 8px 16px 0;
        order: 3;
    }

    .post .entry-more {
        position: absolute !important;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        order: 4;
    }

    .post .entry-more a {
        position: static;
        display: block;
        text-align: center;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        line-height: 46px;
        width: 100%;
    }

    .pagenav-clear {
        margin: 10px 0 0;
    }

    .post .thumbnail {
        grid-column: unset;
        grid-row: unset;
        width: 100%;
        height: 180px;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        order: 1;
        flex-shrink: 0;
    }

    .thumbnail a img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }

    .entry-meta {
        position: static;
        flex-wrap: wrap;
        gap: 8px;
        font-size: 12px;
        margin-top: 8px;
        white-space: normal;
        padding: 0;
    }
}

.post:not(#articleDetail) .thumbnail {
    grid-column: 1;
    grid-row: 1 / -1;
}

.post:not(#articleDetail) .entry-header {
    grid-column: 2;
    grid-row: 1;
    padding: 16px 24px 8px 20px;
    align-self: start;
}

.post:not(#articleDetail) .entry-more {
    position: absolute;
    bottom: 0;
    right: 0;
    width: auto;
    height: auto;
}

.entry-header h2 {
    margin: 0;
}

.entry-header h2 a {
    font-size: 1.5rem;
    line-height: 1.4;
    color: var(--text);
    font-weight: 700;
    transition: color var(--transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entry-header h2 a:hover {
    color: var(--primary);
}

.archive-content {
    color: var(--text-muted);
    overflow: hidden;
    font-size: 14px;
    line-height: 1.8;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.title-l {
    display: none;
}

.entry-more a {
    display: block;
    background: var(--primary);
    color: #fff;
    line-height: 36px;
    padding: 0 22px;
    border-radius: var(--radius-lg) 0 var(--radius-lg) 0;
    font-size: 13px;
    font-weight: 500;
    transition: background var(--transition);
    letter-spacing: .3px;
}

.entry-more a:hover {
    background: var(--primary-h);
    color: #fff !important;
}

/* Article meta */
.entry-meta {
    color: var(--text-muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    overflow: hidden;
    margin-top: 8px;
}

.entry-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.format-aside .entry-meta, .type-bulletin .entry-meta {
    margin-top: 0;
}

.entry-meta a {
    color: var(--primary);
}

.entry-meta .link-price {
    background: #ff4400;
    font-size: 1.4rem;
    color: #fff;
    font-weight: bold;
    margin: 0 5px 0 0;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

/* New / format badge */
.new-icon, .post-format {
    position: absolute;
    background: var(--accent);
    top: -1px;
    right: -1px;
    line-height: 20px;
    color: #fff;
    padding: 0 8px;
    border-radius: 0 var(--radius-lg) 0 var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    animation: fade-in 1.2s;
    -webkit-animation: fade-in 1.2s;
}

.new-icon {
    font-size: 11px;
}

.format-cat {
    float: left;
    background: var(--accent);
    margin: 0 10px 0 0;
    background: rgba(229, 57, 53, .78);
}

.format-cat a, .format-cat a:hover {
    color: #fff;
    line-height: 28px;
    padding: 0 10px;
}

/* Thumbnail */
.thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 220px;
    height: 200px;
    overflow: hidden;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.thumbnail a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    border-radius: 0;
}

.thumbnail:hover a img {
    transform: scale(1.05);
}

.thumbnail .cat {
    background: var(--accent);
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(229, 57, 53, .78);
    border-radius: var(--radius-lg) 0 0 0;
}

.thumbnail .cat a {
    color: #fff;
    line-height: 28px;
    padding: 0 10px;
}

.type-bulletin .thumbnail {
    display: none;
}

