.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.post-loading,
.post-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    color: #99a3ad;
    font-size: 1rem;
}

.post-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s ease;
    cursor: pointer;
    border: 1px solid #f0f0f0;
    position: relative;
    display: flex;
    flex-direction: column;
    animation: fadeInScale 0.5s var(--ease-smooth) both;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.post-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.post-img-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    background-color: #eef2f6;
}

.post-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-smooth);
}

.post-card:hover .post-img-box img {
    transform: scale(1.1);
}

.post-content {
    padding: 25px;
    background: var(--white);
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-date i {
    color: var(--primary-blue);
}

.post-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-snippet {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-top: 10px;
}

.post-snippet-text {
    text-align: justify;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
}

.read-more-btn i {
    transition: transform 0.3s var(--ease-smooth);
}

.post-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    min-width: 42px;
    padding: 9px 14px;
    border: 1px solid #e1e8ed;
    background: var(--white);
    color: var(--primary-blue);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.page-btn:hover:not(:disabled):not(.active) {
    background: #f0f7ff;
    border-color: var(--primary-blue);
}

.page-btn.active {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}

.page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .post-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .post-content {
        padding: 20px;
    }

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

    .post-card:hover .post-img-box img {
        transform: none;
    }
}