.cfpg-c157486c-wrapper {
    position: relative;
    width: 100%;
}

/* Tabs */
.cfpg-c157486c-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    align-items: center;
}

.cfpg-c157486c-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 25px;
    background-color: #ffffff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    outline: none;
    font-family: inherit;
    line-height: 1.4;
}

.cfpg-c157486c-tab:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.cfpg-c157486c-tab.cfpg-c157486c-active {
    background-color: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}

.cfpg-c157486c-tab.cfpg-c157486c-active:hover {
    background-color: #15803d;
    border-color: #15803d;
}

.cfpg-c157486c-tab-icon {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    line-height: 1;
}

.cfpg-c157486c-tab-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Grid - Card Layout */
.cfpg-c157486c-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    transition: opacity 0.3s ease;
}

.cfpg-c157486c-grid.cfpg-c157486c-loading {
    opacity: 0.4;
    pointer-events: none;
}

/* Post Card */
.cfpg-c157486c-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cfpg-c157486c-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* Thumbnail */
.cfpg-c157486c-thumb-link {
    display: block;
    text-decoration: none;
    overflow: hidden;
}

.cfpg-c157486c-thumb {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f3f4f6;
    transition: transform 0.4s ease;
}

.cfpg-c157486c-card:hover .cfpg-c157486c-thumb {
    transform: scale(1.05);
}

.cfpg-c157486c-no-thumb {
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cfpg-c157486c-no-thumb::after {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909M3.75 21h16.5A2.25 2.25 0 0 0 22.5 18.75V5.25A2.25 2.25 0 0 0 20.25 3H3.75A2.25 2.25 0 0 0 1.5 5.25v13.5A2.25 2.25 0 0 0 3.75 21Z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
}

/* Card Body */
.cfpg-c157486c-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.cfpg-c157486c-category {
    display: inline-block;
    width: fit-content;
    padding: 4px 12px;
    border-radius: 20px;
    background-color: #f0fdf4;
    color: #16a34a;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cfpg-c157486c-title {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
}

.cfpg-c157486c-title a {
    color: inherit;
    text-decoration: none;
}

.cfpg-c157486c-title a:hover {
    color: #16a34a;
}

.cfpg-c157486c-excerpt {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    flex: 1;
}

.cfpg-c157486c-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.cfpg-c157486c-date {
    font-size: 13px;
    color: #6b7280;
}

.cfpg-c157486c-readmore {
    font-size: 13px;
    font-weight: 600;
    color: #16a34a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cfpg-c157486c-readmore:hover {
    color: #15803d;
}

.cfpg-c157486c-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
}

/* Loader */
.cfpg-c157486c-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.cfpg-c157486c-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(22, 163, 74, 0.2);
    border-top-color: #16a34a;
    border-radius: 50%;
    animation: cfpg-c157486c-spin 0.7s linear infinite;
}

@keyframes cfpg-c157486c-spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   TABLET RESPONSIVE (768px - 1024px)
   ============================================= */
@media (max-width: 1024px) {
    .cfpg-c157486c-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .cfpg-c157486c-tabs {
        gap: 8px;
        margin-bottom: 20px;
    }

    .cfpg-c157486c-tab {
        padding: 8px 16px;
        font-size: 13px;
    }

    .cfpg-c157486c-thumb {
        height: 180px;
    }

    .cfpg-c157486c-card-body {
        padding: 16px;
        gap: 8px;
    }

    .cfpg-c157486c-title {
        font-size: 16px;
    }

    .cfpg-c157486c-excerpt {
        font-size: 13px;
        line-height: 1.5;
    }

    .cfpg-c157486c-date,
    .cfpg-c157486c-readmore {
        font-size: 12px;
    }

    .cfpg-c157486c-category {
        font-size: 11px;
        padding: 3px 10px;
    }
}

/* =============================================
   MOBILE RESPONSIVE (max-width: 767px)
   ============================================= */
@media (max-width: 767px) {
    /* Tabs: horizontal scroll with fade hint */
    .cfpg-c157486c-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
        margin-bottom: 16px;
        padding-bottom: 4px;
        position: relative;
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    }

    .cfpg-c157486c-tabs::-webkit-scrollbar {
        display: none;
    }

    .cfpg-c157486c-tab {
        padding: 8px 14px;
        font-size: 13px;
        flex-shrink: 0;
        min-height: 40px;
    }

    .cfpg-c157486c-tab-icon svg {
        width: 12px;
        height: 12px;
    }

    /* Grid: single column */
    .cfpg-c157486c-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Cards: horizontal layout on mobile */
    .cfpg-c157486c-card {
        flex-direction: row;
        border-radius: 10px;
    }

    .cfpg-c157486c-card:hover {
        transform: none;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }

    .cfpg-c157486c-thumb-link {
        flex-shrink: 0;
        width: 120px;
    }

    .cfpg-c157486c-thumb {
        height: 100%;
        min-height: 140px;
        border-radius: 10px 0 0 10px;
    }

    .cfpg-c157486c-card-body {
        padding: 12px;
        gap: 6px;
        justify-content: center;
    }

    .cfpg-c157486c-category {
        font-size: 10px;
        padding: 2px 8px;
        letter-spacing: 0.3px;
    }

    .cfpg-c157486c-title {
        font-size: 15px;
        line-height: 1.3;
    }

    .cfpg-c157486c-excerpt {
        font-size: 12px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .cfpg-c157486c-meta {
        padding-top: 8px;
        flex-wrap: wrap;
        gap: 4px;
    }

    .cfpg-c157486c-date {
        font-size: 11px;
    }

    .cfpg-c157486c-readmore {
        font-size: 12px;
    }

    .cfpg-c157486c-no-posts {
        padding: 40px 16px;
        font-size: 14px;
    }

    .cfpg-c157486c-no-thumb::after {
        width: 32px;
        height: 32px;
    }
}

/* =============================================
   SMALL MOBILE (max-width: 480px)
   ============================================= */
@media (max-width: 480px) {
    .cfpg-c157486c-tabs {
        gap: 6px;
        margin-bottom: 12px;
    }

    .cfpg-c157486c-tab {
        padding: 7px 12px;
        font-size: 12px;
        border-radius: 20px;
        min-height: 36px;
    }

    .cfpg-c157486c-grid {
        gap: 12px;
    }

    .cfpg-c157486c-thumb-link {
        width: 100px;
    }

    .cfpg-c157486c-thumb {
        min-height: 120px;
    }

    .cfpg-c157486c-card-body {
        padding: 10px;
        gap: 4px;
    }

    .cfpg-c157486c-title {
        font-size: 14px;
    }

    .cfpg-c157486c-excerpt {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }

    .cfpg-c157486c-meta {
        padding-top: 6px;
    }

    .cfpg-c157486c-date,
    .cfpg-c157486c-readmore {
        font-size: 11px;
    }

    .cfpg-c157486c-category {
        font-size: 9px;
        padding: 2px 6px;
    }
}
