/* Post Widget Styles */
.digimentor-post-widget .container {
    max-width: 1200px;
    margin: 0 auto;
}

.digimentor-post-widget .articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

/* ── Card ─────────────────────────────────────────────────────── */

.digimentor-post-widget .article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.digimentor-post-widget .article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

/* ── Card image ───────────────────────────────────────────────── */

.digimentor-post-widget .card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.digimentor-post-widget .card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.25));
    transition: opacity 0.25s ease;
}

.digimentor-post-widget .article-card:hover .card-image::before {
    opacity: 0.7;
}

/* ── Category badge ───────────────────────────────────────────── */

.digimentor-post-widget .category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.92);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #2c3e50;
    backdrop-filter: blur(8px);
}

/* ── Card content ─────────────────────────────────────────────── */

.digimentor-post-widget .card-content {
    padding: 20px;
}

/* ── Read time ────────────────────────────────────────────────── */

.digimentor-post-widget .read-time {
    display: flex;
    align-items: center;
    color: #95a5a6;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

/* ── Title ────────────────────────────────────────────────────── */

.digimentor-post-widget .card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.digimentor-post-widget .card-title a {
    color: inherit;
    text-decoration: none;
}

/* ── Excerpt ──────────────────────────────────────────────────── */

.digimentor-post-widget .card-description {
    font-size: 0.875rem;
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Author info row ──────────────────────────────────────────── */

.digimentor-post-widget .author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.digimentor-post-widget .author-avatar {
    /*
     * Ukuran box sepenuhnya relatif terhadap font-size.
     * Slider "Avatar Size" di panel Elementor mengubah font-size,
     * sehingga box (2.6em × 2.6em) dan inisial ikut scale bersama.
     */
    width: 2.6em;
    height: 2.6em;
    border-radius: 50%;
    background: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;   /* default — di-override via avatar_size control */
    font-weight: 600;
    flex-shrink: 0;
    line-height: 1;
}

.digimentor-post-widget .author-name {
    font-size: 0.825rem;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.digimentor-post-widget .meta-divider {
    color: #c8c8c8;
    font-size: 0.75rem;
}

.digimentor-post-widget .post-date {
    font-size: 0.8rem;
    color: #95a5a6;
    white-space: nowrap;
}

/* ── Pagination ───────────────────────────────────────────────── */

.digimentor-post-widget .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 36px;
}

.digimentor-post-widget .pagination button {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: none;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    transition: background 0.2s ease, color 0.2s ease;
}

.digimentor-post-widget .pagination button:hover {
    background: #f3f4f6;
    color: #111827;
}

.digimentor-post-widget .pagination button.active {
    background: #2563eb;
    color: #fff;
    font-weight: 600;
}

.digimentor-post-widget .pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.digimentor-post-widget .pagination button:disabled:hover {
    background: #fff;
    color: #6b7280;
}
.digimentor-post-widget .pagination .dots {
    padding: 0 4px;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .digimentor-post-widget .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .digimentor-post-widget .pagination {
        gap: 4px;
        flex-wrap: wrap;
    }

    .digimentor-post-widget .pagination button {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}
