/* ==========================================================================
   Procode Category Archive — style.css  v2.0.0
   ========================================================================== */

/* ── LAYOUT WRAPPER ──────────────────────────────────────────────────── */
.pca-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* ── PAGE TITLE ──────────────────────────────────────────────────────── */
.pca-archive-title {
    font-size: 26px;
    font-weight: 800;
    border-left: 5px solid #d60000;
    padding-left: 14px;
    margin: 0 0 28px;
    color: #111;
}

/* ── SUB-CATEGORY FILTER BAR ─────────────────────────────────────────── */
.pca-subcat-filter-wrap {
    background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
    border: 1px solid #efcfcf;
    border-left: 4px solid #d60000;
    border-radius: 14px;
    padding: 16px 16px 14px;
    margin: 0 0 26px;
    box-shadow: 0 8px 20px rgba(214, 0, 0, 0.08);
}
.pca-subcat-filter-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #7b1b1b;
    margin-bottom: 11px;
}
.pca-subcat-filter-list {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.pca-subcat-filter-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: #8f0f0f;
    background: #ffeaea;
    border: 1px solid #efb3b3;
    border-radius: 20px;
    padding: 7px 13px;
    white-space: nowrap;
    transition: transform 0.15s, background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.pca-subcat-filter-link:hover {
    background: #d60000;
    color: #fff;
    border-color: #d60000;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(214,0,0,0.24);
}
.pca-subcat-filter-link:focus-visible {
    outline: 2px solid #d60000;
    outline-offset: 2px;
}
.pca-subcat-filter-list::-webkit-scrollbar {
    height: 7px;
}
.pca-subcat-filter-list::-webkit-scrollbar-thumb {
    background: #e0a5a5;
    border-radius: 10px;
}
.pca-subcat-filter-list::-webkit-scrollbar-track {
    background: #f8e4e4;
}

/* ── SUB-CATEGORY GROUP ──────────────────────────────────────────────── */
.pca-subcat-group {
    margin-bottom: 44px;
}
.pca-subcat-group:last-child {
    margin-bottom: 0;
}

/* Heading row: title + "View All" link */
.pca-subcat-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #d60000;
    padding-bottom: 10px;
    margin-bottom: 18px;
}

.pca-subcat-title {
    font-size: 19px;
    font-weight: 800;
    margin: 0;
    color: #111;
}
.pca-subcat-title a {
    text-decoration: none;
    color: inherit;
}
.pca-subcat-title a:hover {
    color: #d60000;
}

.pca-subcat-viewall {
    font-size: 13px;
    font-weight: 700;
    color: #d60000;
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 12px;
    border: 1px solid #d60000;
    border-radius: 20px;
    transition: background 0.2s, color 0.2s;
}
.pca-subcat-viewall:hover {
    background: #d60000;
    color: #fff;
}

/* ── 3-COLUMN POST GRID ──────────────────────────────────────────────── */
.pca-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* ── POST CARD ───────────────────────────────────────────────────────── */
.pca-post-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    transition: transform 0.2s, box-shadow 0.2s;
}
.pca-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.13);
}
.pca-post-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Thumbnail */
.pca-card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
}
.pca-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.pca-post-card:hover .pca-card-img img {
    transform: scale(1.04);
}

/* Card body */
.pca-card-body {
    padding: 14px;
}
.pca-card-cat {
    background: #d60000;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.pca-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    color: #111;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pca-card-date {
    font-size: 12px;
    color: #888;
}

/* ── PAGINATION ──────────────────────────────────────────────────────── */
.pca-pagination {
    margin-top: 30px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.pca-pagination a,
.pca-pagination span {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    background: #fff;
}
.pca-pagination .current,
.pca-pagination a:hover {
    background: #d60000;
    color: #fff;
    border-color: #d60000;
}

/* ── SIDEBAR ─────────────────────────────────────────────────────────── */
.pca-sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.pca-widget {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pca-widget-title {
    font-size: 16px;
    font-weight: 800;
    border-bottom: 2px solid #d60000;
    padding-bottom: 10px;
    margin: 0 0 16px;
    color: #111;
}

/* Recent post item */
.pca-recent-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
}
.pca-recent-item:last-child { border-bottom: none; }
.pca-recent-item img {
    width: 72px;
    min-width: 72px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
}
.pca-recent-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category list */
.pca-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pca-cat-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    text-decoration: none;
}
.pca-cat-list li:last-child a { border-bottom: none; }
.pca-cat-list li a:hover { color: #d60000; }
.pca-cat-count {
    background: #f5f5f5;
    color: #888;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 20px;
}

/* No posts */
.pca-no-posts {
    grid-column: 1 / -1;
    font-size: 15px;
    color: #888;
    padding: 20px 0;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .pca-wrap { grid-template-columns: 1fr 260px; }
}

@media (max-width: 900px) {
    .pca-wrap { grid-template-columns: 1fr; }
    .pca-posts-grid { grid-template-columns: repeat(2, 1fr); }
    .pca-sidebar { order: 2; }
}

@media (max-width: 560px) {
    .pca-posts-grid { grid-template-columns: 1fr; }
    .pca-archive-title { font-size: 20px; }
    .pca-subcat-title { font-size: 16px; }
    .pca-subcat-viewall { font-size: 12px; padding: 3px 10px; }
    .pca-subcat-filter-wrap { padding: 12px; }
    .pca-subcat-filter-link {
        max-width: 220px;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}
