/* --- LAYOUT & VARS --- */
:root { --gap: 32px; }
.cat-wrap { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }

/* --- HEADER & SUBNAV --- */
.cat-header { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.cat-super { font-size: 13px; font-weight: 700; color: var(--brand, #38bdf8); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; display: block; }
.cat-title { font-size: 42px; font-weight: 900; letter-spacing: -1px; margin: 0 0 16px; color: var(--text); line-height: 1.1; }
.cat-desc { font-size: 17px; color: var(--muted); line-height: 1.6; }

/* Subcategory Pills */
.cat-pills {
    display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px;
}
.cat-pill {
    padding: 8px 16px; border-radius: 50px; background: var(--card); border: 1px solid var(--line);
    font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; transition: all .2s;
}
.cat-pill:hover { border-color: var(--brand); color: var(--text); transform: translateY(-2px); }

/* --- GRID SYSTEM --- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }

/* --- CARD DESIGN --- */
.post-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 16px;
    overflow: hidden; display: flex; flex-direction: column; text-decoration: none;
    transition: transform .3s ease, box-shadow .3s ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1) }

.pc-media { aspect-ratio: 16/10; overflow: hidden; background: var(--line); position: relative; }
.pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .pc-media img { transform: scale(1.05); }
.pc-thumb-fallback{width:100%;height:100%;background:linear-gradient(135deg,#c2410c,#a21caf)}

.pc-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.pc-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 12px; line-height: 1.35; }
.post-card:hover .pc-title { color: var(--brand); }
.pc-excerpt { font-size: 15px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 20px; }

/* Author Footer */
.pc-meta { margin-top: auto; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.pc-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.pc-byline { font-size: 12px; font-weight: 600; color: var(--text); }
.pc-date { font-size: 12px; color: var(--muted); margin-left: auto; }

/* --- HERO CARD (First Item) --- */
.cat-grid > .post-card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 0.8fr; }
.cat-grid > .post-card:first-child .pc-media { height: 100%; aspect-ratio: auto; }
.cat-grid > .post-card:first-child .pc-body { padding: 48px; justify-content: center; }
.cat-grid > .post-card:first-child .pc-title { font-size: 32px; }
.cat-grid > .post-card:first-child .pc-excerpt { font-size: 17px; -webkit-line-clamp: 4; }

/* --- IN-FEED CTA (Newsletter/Ad) --- */
.post-cta {
    grid-column: span 1; background: var(--brand); color: var(--brand-ink);
    border-radius: 16px; padding: 32px; display: flex; flex-direction: column;
    justify-content: center; text-align: center;
}
.post-cta h3 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.post-cta p { font-size: 15px; margin-bottom: 20px; opacity: 0.9; line-height: 1.4; }
.cta-btn {
    background: var(--brand-ink); color: #fff; border: none; padding: 12px;
    border-radius: 8px; font-weight: 700; cursor: pointer; text-transform: uppercase; font-size: 13px;
}
.cta-btn:hover { opacity: 0.9; }

/* --- RESPONSIVE --- */
@media (max-width: 1000px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-grid > .post-card:first-child { grid-column: 1 / -1; }
    .post-cta { grid-column: span 2; } /* CTA spans full width on tablet */
}
@media (max-width: 680px) {
    .cat-grid { grid-template-columns: 1fr; gap: 24px; }
    .cat-grid > .post-card:first-child { display: flex; flex-direction: column; }
    .cat-grid > .post-card:first-child .pc-media { aspect-ratio: 16/9; }
    .cat-grid > .post-card:first-child .pc-body { padding: 24px; }
    .cat-grid > .post-card:first-child .pc-title { font-size: 24px; }
    .post-cta { grid-column: span 1; }
    .cat-title { font-size: 32px; }
}

/* --- EMPTY STATE --- */
.cat-empty { text-align: center; padding: 80px 20px; border: 2px dashed var(--line); border-radius: 20px; margin-top: 40px; }
.cat-empty h2 { font-size: 24px; margin-bottom: 12px; color: var(--text); }
.cat-empty-btn { display: inline-block; background: var(--text); color: var(--bg); padding: 10px 20px; border-radius: 8px; text-decoration: none; font-weight: 600; margin-top: 16px; }

.cat-breadcrumb {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.cat-breadcrumb a { text-decoration: none; color: var(--muted); transition: color .2s; }
.cat-breadcrumb a:hover { color: var(--brand); }
.cat-breadcrumb .sep { opacity: 0.5; }
.cat-breadcrumb .current { color: var(--text); }

/* Pagination */
.page-numbers{display:inline-flex; gap:5px; list-style:none; padding:0}
.page-numbers li a, .page-numbers li span{
    display:flex; align-items:center; justify-content:center;
    height:44px; padding:0 18px; border-radius:10px;
    border:1px solid var(--line); color:var(--text); text-decoration:none; font-weight:600;
}
.page-numbers li a:hover{border-color:var(--brand); color:var(--brand-ink); background:var(--brand);}
.page-numbers li span.current{background:var(--text); color:var(--bg); border-color:var(--text);}

/* --- AUTORA LAPA --- */
.author-count { margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--muted); }

/* Meklēšanas rezultātu tipa birka (Treneris / Sporta klubs) */
.pc-type{display:inline-block;align-self:flex-start;margin-bottom:10px;padding:3px 10px;border-radius:50px;background:rgba(56,189,248,.14);border:1px solid rgba(56,189,248,.5);color:var(--text);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.5px}
.search-again{max-width:520px;margin:24px auto 0;display:flex;gap:8px}
.search-again input{flex:1;min-width:0;height:46px;padding:0 14px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--text);font-size:16px;outline:none}
.search-again input:focus{border-color:var(--brand)}
.search-again button{height:46px;padding:0 20px;border:none;border-radius:10px;background:var(--brand);color:var(--brand-ink);font-weight:800;cursor:pointer}
