/* ============================================================
   Prosperra Infra Blog System — Styles
   Uses your site's color palette where possible.
   Override the CSS variables below to match your live theme.
   ============================================================ */

:root {
    --pi-primary: #1a2b4b;
    /* dark navy — change to match your brand */
    --pi-accent: #c9a227;
    /* gold accent — change to match your brand */
    --pi-text: #2b2b2b;
    --pi-muted: #6b7280;
    --pi-border: #e5e7eb;
    --pi-bg-soft: #f8f9fb;
    --pi-radius: 10px;
}

/* ---------- Base ---------- */
body.pi-blog {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--pi-text);
    line-height: 1.7;
    background: #fff;
}

/* ---------- Blog listing / cards ---------- */
.pi-page-hero {
    background: var(--pi-primary);
    color: #fff;
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.pi-page-hero h1 {
    color: #fff;
    font-weight: 700;
    margin: 0;
}

.pi-page-hero p {
    color: rgba(255, 255, 255, .75);
    margin: .5rem 0 0;
}

.pi-blog-card {
    border: 1px solid var(--pi-border);
    border-radius: var(--pi-radius);
    overflow: hidden;
    background: #fff;
    transition: transform .2s, box-shadow .2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pi-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.pi-blog-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.pi-blog-card .card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.pi-blog-card .card-cat {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
    color: var(--pi-accent);
    margin-bottom: 8px;
}

.pi-blog-card h3 {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.pi-blog-card h3 a {
    color: var(--pi-primary);
    text-decoration: none;
}

.pi-blog-card h3 a:hover {
    color: var(--pi-accent);
}

.pi-blog-card .card-excerpt {
    color: var(--pi-muted);
    font-size: .95rem;
    flex: 1;
}

.pi-blog-card .card-meta {
    font-size: .82rem;
    color: var(--pi-muted);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--pi-border);
}

.pi-blog-card .btn-read {
    display: inline-block;
    margin-top: 12px;
    color: var(--pi-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: .9rem;
}

.pi-blog-card .btn-read:hover {
    color: var(--pi-accent);
}

/* ---------- Filters / search ---------- */
.pi-filters {
    background: var(--pi-bg-soft);
    padding: 16px;
    border-radius: var(--pi-radius);
    margin-bottom: 30px;
}

.pi-cat-pills a {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--pi-border);
    color: var(--pi-text);
    text-decoration: none;
    font-size: .88rem;
    margin: 0 6px 6px 0;
}

.pi-cat-pills a:hover,
.pi-cat-pills a.active {
    background: var(--pi-primary);
    color: #fff;
    border-color: var(--pi-primary);
}

/* ---------- Single blog ---------- */
.pi-breadcrumbs {
    font-size: .85rem;
    color: var(--pi-muted);
    margin: 20px 0 12px;
}

.pi-breadcrumbs a {
    color: var(--pi-muted);
    text-decoration: none;
}

.pi-breadcrumbs a:hover {
    color: var(--pi-accent);
}

.pi-article-header {
    margin-bottom: 24px;
}

.pi-article-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--pi-primary);
    line-height: 1.25;
    margin-bottom: 16px;
}

.pi-article-meta {
    font-size: .9rem;
    color: var(--pi-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.pi-article-meta .dot {
    opacity: .4;
}

.pi-featured-image {
    width: 100%;
    height: auto;
    border-radius: var(--pi-radius);
    margin-bottom: 32px;
}

.pi-blog-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.pi-blog-content h2 {
    font-size: 1.6rem;
    color: var(--pi-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.pi-blog-content h3 {
    font-size: 1.3rem;
    color: var(--pi-primary);
    margin-top: 1.5rem;
    margin-bottom: .75rem;
}

.pi-blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}

.pi-blog-content blockquote {
    border-left: 4px solid var(--pi-accent);
    background: var(--pi-bg-soft);
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    font-style: italic;
    color: #444;
}

.pi-blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.pi-blog-content table th,
.pi-blog-content table td {
    border: 1px solid var(--pi-border);
    padding: .6rem .8rem;
    text-align: left;
}

.pi-blog-content table th {
    background: var(--pi-bg-soft);
}

.pi-blog-content ul,
.pi-blog-content ol {
    margin: 1rem 0;
    padding-left: 1.4rem;
}

.pi-blog-content a {
    color: var(--pi-accent);
    text-decoration: underline;
}

/* ---------- Tags ---------- */
.pi-tags {
    margin: 2rem 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--pi-border);
}

.pi-tags a {
    display: inline-block;
    padding: 4px 12px;
    background: var(--pi-bg-soft);
    border-radius: 14px;
    font-size: .82rem;
    color: var(--pi-text);
    text-decoration: none;
    margin: 0 6px 6px 0;
}

.pi-tags a:hover {
    background: var(--pi-primary);
    color: #fff;
}

/* ---------- Share buttons ---------- */
.pi-share {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.pi-share a,
.pi-share button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: .88rem;
    text-decoration: none;
    color: #fff;
    border: 0;
    cursor: pointer;
}

.pi-share .fb {
    background: #1877f2;
}

.pi-share .tw {
    background: #000;
}

.pi-share .li {
    background: #0a66c2;
}

.pi-share .wa {
    background: #25d366;
}

.pi-share .cp {
    background: var(--pi-muted);
}

/* ---------- Related / prev-next ---------- */
.pi-related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--pi-border);
}

.pi-related h2 {
    font-size: 1.3rem;
    color: var(--pi-primary);
    margin-bottom: 1.25rem;
}

.pi-prev-next {
    display: flex;
    gap: 16px;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.pi-prev-next a {
    flex: 1 1 260px;
    padding: 18px 20px;
    background: var(--pi-bg-soft);
    border-radius: var(--pi-radius);
    text-decoration: none;
    color: var(--pi-text);
    border: 1px solid var(--pi-border);
}

.pi-prev-next a:hover {
    background: #fff;
    border-color: var(--pi-primary);
}

.pi-prev-next .label {
    font-size: .75rem;
    text-transform: uppercase;
    color: var(--pi-muted);
    letter-spacing: .5px;
}

.pi-prev-next .title {
    font-weight: 600;
    color: var(--pi-primary);
    margin-top: 4px;
}

/* ---------- Pagination ---------- */
.pi-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 40px 0;
}

.pi-pagination a,
.pi-pagination span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid var(--pi-border);
    color: var(--pi-text);
    text-decoration: none;
    font-size: .9rem;
}

.pi-pagination .active {
    background: var(--pi-primary);
    color: #fff;
    border-color: var(--pi-primary);
}

.pi-pagination a:hover {
    border-color: var(--pi-primary);
}

/* ---------- Empty state ---------- */
.pi-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--pi-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .pi-article-header h1 {
        font-size: 1.6rem;
    }

    .pi-page-hero {
        padding: 40px 0 30px;
    }

    .pi-blog-card img {
        height: 180px;
    }
}