/* ==========================================
   SiteRooster Articles Shortcode
   [siterooster_articles]
   ========================================== */

.sr-articles-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-weight: 500;
    -webkit-font-smoothing: auto;
}

/* ==========================================
   Category Filter Tabs
   ========================================== */

.sr-articles-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.sr-articles-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sr-articles-filter-tab:hover {
    color: #374151;
    background: #f3f4f6;
}

.sr-articles-filter-tab.active {
    color: #059669;
    background: rgba(5, 150, 105, 0.08);
    border-color: rgba(5, 150, 105, 0.2);
    font-weight: 600;
}

.sr-articles-filter-count {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.sr-articles-filter-tab.active .sr-articles-filter-count {
    color: #059669;
    background: rgba(5, 150, 105, 0.12);
}

/* ==========================================
   Articles Grid
   ========================================== */

.sr-articles-grid {
    display: grid;
    gap: 28px;
}

.sr-articles-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.sr-articles-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
    .sr-articles-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .sr-articles-cols-3,
    .sr-articles-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Article Card
   ========================================== */

.sr-article-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.sr-article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

/* Image */
.sr-article-card-image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f9fafb;
}

.sr-article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.sr-article-card:hover .sr-article-card-image img {
    transform: scale(1.04);
}

/* Card body */
.sr-article-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Category badge */
.sr-article-card-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #059669;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.15s ease;
    align-self: flex-start;
}

.sr-article-card-cat:hover {
    color: #047857;
}

/* Title */
.sr-article-card-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 8px 0;
    color: #1f2937;
}

.sr-article-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.sr-article-card-title a:hover {
    color: #059669;
}

/* Excerpt */
.sr-article-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0 0 16px 0;
    flex: 1;
}

/* Meta row */
.sr-article-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #9ca3af;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
}

.sr-article-card-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #374151;
}

.sr-article-card-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.sr-article-card-date {
    color: #9ca3af;
}

.sr-article-card-read-time {
    color: #9ca3af;
}

/* Separator dots between meta items */
.sr-article-card-meta > *:not(:last-child)::after {
    content: '·';
    margin-left: 12px;
    color: #d1d5db;
}

/* ==========================================
   Empty State
   ========================================== */

.sr-articles-empty {
    text-align: center;
    padding: 64px 20px;
    color: #9ca3af;
}

.sr-articles-empty svg {
    margin-bottom: 16px;
}

.sr-articles-empty p {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}

/* ==========================================
   Pagination
   ========================================== */

.sr-articles-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
}

.sr-articles-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    transition: all 0.15s ease;
}

.sr-articles-page-btn:hover:not(.disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #059669;
}

.sr-articles-page-btn.disabled {
    color: #d1d5db;
    pointer-events: none;
    cursor: default;
}

.sr-articles-page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sr-articles-page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.sr-articles-page-num:hover:not(.active) {
    background: #f3f4f6;
    color: #059669;
}

.sr-articles-page-num.active {
    background: #059669;
    color: #fff;
    font-weight: 600;
}

.sr-articles-page-ellipsis {
    width: 36px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* ==========================================
   Mobile pagination
   ========================================== */

@media (max-width: 600px) {
    .sr-articles-pagination {
        flex-wrap: wrap;
        gap: 8px;
    }

    .sr-articles-page-numbers {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .sr-articles-page-prev {
        order: 1;
    }

    .sr-articles-page-next {
        order: 2;
        margin-left: auto;
    }
}