/* ═══════════════════════════════════════════════════════
   PST Blog — Public Stylesheet
   Dark theme matching ps-tech.de design
   ═══════════════════════════════════════════════════════ */

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Body ───────────────────────────────────────────── */
body {
    font-family: 'Poppins', sans-serif;
    background: #0a0f1c;
    color: #e2e8f0;
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: #ff8908; text-decoration: none; transition: color 0.2s; }
a:hover { color: #ffab4a; }

img { max-width: 100%; height: auto; display: block; }

/* ── Layout containers ──────────────────────────────── */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.blog-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Hero section (accounts for fixed nav) ──────────── */
.blog-hero {
    padding-top: 140px;
    padding-bottom: 40px;
    text-align: center;
}

.blog-hero h1 {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.blog-hero h1 span {
    color: #ff8908;
}

.blog-hero p {
    color: #94a3b8;
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* ── Category filter pills ──────────────────────────── */
.cat-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 48px;
}

.cat-filter a {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    transition: all 0.2s;
}

.cat-filter a:hover,
.cat-filter a.active {
    background: #ff8908;
    border-color: #ff8908;
    color: #ffffff;
}

/* ── Post grid ──────────────────────────────────────── */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
    margin-bottom: 60px;
}

/* ── Post card (glass-card style) ───────────────────── */
.post-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 137, 8, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.post-card a {
    color: inherit;
    text-decoration: none;
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card .post-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card .post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.post-card .cat {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(255, 137, 8, 0.15);
    color: #ff8908;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-card h2 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-card p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
}

.post-card .read-more {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #ff8908;
}

/* ── Pagination ─────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 80px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: #ff8908;
    color: #ff8908;
}

.pagination .current {
    background: #ff8908;
    border-color: #ff8908;
    color: #ffffff;
    font-weight: 600;
}

/* ── Single post layout ─────────────────────────────── */
.post-single {
    padding-top: 120px;
    padding-bottom: 80px;
}

.post-single .featured-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 36px;
}

.post-single .post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.post-single .cat {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 137, 8, 0.15);
    color: #ff8908;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-single h1 {
    font-size: 38px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 32px;
}

/* ── Article content ────────────────────────────────── */
.post-single .content h2 {
    font-size: 26px;
    font-weight: 600;
    color: #ffffff;
    margin: 40px 0 16px;
}

.post-single .content h3 {
    font-size: 21px;
    font-weight: 600;
    color: #ffffff;
    margin: 32px 0 12px;
}

.post-single .content p {
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.8;
}

.post-single .content ul,
.post-single .content ol {
    margin: 0 0 20px 24px;
    color: #cbd5e1;
}

.post-single .content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.post-single .content blockquote {
    border-left: 4px solid #ff8908;
    padding: 16px 24px;
    margin: 24px 0;
    background: rgba(255, 137, 8, 0.06);
    border-radius: 0 8px 8px 0;
    color: #e2e8f0;
    font-style: italic;
}

.post-single .content pre {
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 14px;
}

.post-single .content code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14px;
}

.post-single .content p code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

.post-single .content img {
    border-radius: 12px;
    margin: 24px 0;
}

.post-single .content a {
    color: #ff8908;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Language switcher ──────────────────────────────── */
.post-languages {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.post-languages a {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    transition: all 0.2s;
}

.post-languages a:hover,
.post-languages a.active {
    background: #ff8908;
    border-color: #ff8908;
    color: #ffffff;
}

/* ── Back link ──────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
    padding: 10px 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.back-link:hover {
    border-color: #ff8908;
    color: #ff8908;
}

/* ── Empty state ────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: #64748b;
}

.empty-state h2 {
    font-size: 24px;
    color: #94a3b8;
    margin-bottom: 12px;
}

/* ── 404 ────────────────────────────────────────────── */
.not-found {
    text-align: center;
    padding-top: 180px;
    padding-bottom: 120px;
}

.not-found h1 {
    font-size: 72px;
    font-weight: 700;
    color: #ff8908;
    margin-bottom: 16px;
}

.not-found p {
    color: #94a3b8;
    font-size: 18px;
    margin-bottom: 32px;
}

.not-found a {
    display: inline-block;
    padding: 12px 28px;
    background: #ff8908;
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
}

.not-found a:hover {
    background: #e67a00;
}

/* ── Footer ─────────────────────────────────────────── */
.blog-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 40px 24px;
    text-align: center;
    color: #475569;
    font-size: 13px;
}

.blog-footer a {
    color: #64748b;
    margin: 0 12px;
}

.blog-footer a:hover {
    color: #ff8908;
}

.blog-footer .footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 15px;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
    .blog-hero {
        padding-top: 110px;
        padding-bottom: 28px;
    }

    .blog-hero h1 {
        font-size: 28px;
    }

    .blog-hero p {
        font-size: 15px;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .post-single {
        padding-top: 100px;
    }

    .post-single h1 {
        font-size: 26px;
    }

    .post-single .content h2 {
        font-size: 22px;
    }

    .post-single .content h3 {
        font-size: 18px;
    }

    .post-single .featured-img {
        border-radius: 8px;
        max-height: 280px;
    }

    .cat-filter {
        gap: 6px;
    }

    .cat-filter a {
        padding: 6px 14px;
        font-size: 13px;
    }
}
