/**
 * SanggauInformasi.com - Category Feed Stylesheet
 * Responsive, Modern, Mobile-First
 */

/* ── 1. SECTION WRAPPER ── */
.si-category-feed-section {
    margin: 32px 0;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ── 2. SECTION HEADER ── */
.si-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 2px solid #dc2626;
}

.si-feed-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.si-feed-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.si-feed-title {
    font-family: var(--font-heading, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.si-feed-view-all {
    font-size: 12px;
    font-weight: 700;
    color: #dc2626;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.si-feed-view-all:hover {
    color: #991b1b;
    text-decoration: underline;
}

/* ── 3. LAYOUT: GRID (DEFAULT 3 COLS DESKTOP) ── */
.si-feed-container.si-feed-layout-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

@media (max-width: 1023px) {
    .si-feed-container.si-feed-layout-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 639px) {
    .si-feed-container.si-feed-layout-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* ── 4. LAYOUT: LIST (HORIZONTAL) ── */
.si-feed-container.si-feed-layout-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.si-feed-layout-list .si-feed-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.si-feed-layout-list .si-feed-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.si-feed-layout-list .si-feed-thumb-wrap {
    width: 140px;
    flex-shrink: 0;
    aspect-ratio: 16 / 10;
}

@media (max-width: 639px) {
    .si-feed-layout-list .si-feed-thumb-wrap {
        width: 110px;
    }
}

/* ── 5. LAYOUT: FEATURED + LIST ── */
.si-feed-container.si-feed-layout-featured_list {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.si-feed-layout-featured_list .si-feed-card-featured {
    grid-column: span 6;
}

.si-feed-layout-featured_list .si-feed-card:not(.si-feed-card-featured) {
    grid-column: span 6;
    display: flex;
    flex-direction: row;
    gap: 14px;
}

.si-feed-layout-featured_list .si-feed-card:not(.si-feed-card-featured) .si-feed-thumb-wrap {
    width: 120px;
    flex-shrink: 0;
    aspect-ratio: 16 / 10;
}

@media (max-width: 768px) {
    .si-feed-container.si-feed-layout-featured_list {
        grid-template-columns: 1fr;
    }
    .si-feed-layout-featured_list .si-feed-card-featured {
        grid-column: span 1;
    }
    .si-feed-layout-featured_list .si-feed-card:not(.si-feed-card-featured) {
        grid-column: span 1;
    }
}

/* ── 6. ARTIKEL CARD & THUMBNAIL ── */
.si-feed-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.si-feed-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
    margin-bottom: 10px;
}

.si-feed-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.si-feed-card:hover .si-feed-thumb-img {
    transform: scale(1.05);
}

.si-feed-cat-pill {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #dc2626;
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.si-feed-cat-pill-inline {
    display: inline-block;
    color: #dc2626;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

/* ── 7. CARD CONTENT & TYPOGRAPHY ── */
.si-feed-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.si-feed-card-title {
    font-family: var(--font-heading, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
    margin: 0 0 6px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.si-feed-card-featured .si-feed-card-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 8px;
}

.si-feed-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.si-feed-card-title a:hover {
    color: #dc2626;
}

.si-feed-excerpt {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── 8. CARD META ── */
.si-feed-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

.si-feed-date,
.si-feed-read-time {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* ── 9. LOAD MORE BUTTON & SPINNER ── */
.si-feed-load-more-wrap {
    margin-top: 24px;
    text-align: center;
}

.si-feed-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    background: #f8fafc;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.si-feed-load-more-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.1);
}

.si-feed-load-more-btn:active {
    transform: scale(0.98);
}

.si-feed-load-more-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* AJAX In Animation */
.si-feed-card-ajax-in {
    animation: siFadeInUp 0.4s ease forwards;
}

@keyframes siFadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
