/* ==========================================================================
   Procode Single Post — single-style.css  v1.0.0
   ========================================================================== */

/* ── MAIN WRAPPER ────────────────────────────────────────────────────── */
.psp-wrap {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* ── LAYOUT ──────────────────────────────────────────────────────────── */
.psp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.psp-main {
    min-width: 0;
}

.psp-sidebar {
    position: sticky;
    top: 20px;
}

/* ── ARTICLE ─────────────────────────────────────────────────────────── */
.psp-article {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid #eee;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    margin-bottom: 36px;
}

/* META ROW */
.psp-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.psp-meta-cat {
    background: #d60000;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 3px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.psp-meta-cat:hover { background: #a80000; }
.psp-meta-date,
.psp-meta-author {
    font-size: 13px;
    color: #888;
}
.psp-meta-date::before { content: '•'; margin-right: 8px; color: #ccc; }
.psp-meta-author::before { content: '•'; margin-right: 8px; color: #ccc; }

/* TITLE */
.psp-title {
    font-size: 30px;
    font-weight: 900;
    line-height: 1.35;
    color: #111;
    margin: 0 0 24px;
}

/* CONTENT */
.psp-content {
    font-size: 16px;
    line-height: 1.85;
    color: #333;
}
.psp-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}
.psp-content p { margin: 0 0 18px; }
.psp-content h2,
.psp-content h3 {
    font-weight: 800;
    margin: 28px 0 12px;
    color: #111;
}
.psp-content ul,
.psp-content ol {
    padding-left: 22px;
    margin-bottom: 18px;
}
.psp-content a {
    color: #d60000;
    text-decoration: underline;
}

/* ── PREV / NEXT NAV ─────────────────────────────────────────────────── */
.psp-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}
.psp-nav-item a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, border-color 0.2s;
    height: 100%;
    box-sizing: border-box;
}
.psp-nav-item a:hover {
    background: #fff5f5;
    border-color: #d60000;
}
.psp-nav-next a {
    align-items: flex-end;
    text-align: right;
}
.psp-nav-label {
    font-size: 12px;
    font-weight: 700;
    color: #d60000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.psp-nav-post-title {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── RELATED POSTS ───────────────────────────────────────────────────── */
.psp-related {
    margin-bottom: 20px;
}
.psp-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #d60000;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.psp-related-title {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    margin: 0;
}
.psp-related-viewall {
    font-size: 13px;
    font-weight: 700;
    color: #d60000;
    text-decoration: none;
    padding: 4px 14px;
    border: 1px solid #d60000;
    border-radius: 20px;
    transition: background 0.2s, color 0.2s;
}
.psp-related-viewall:hover {
    background: #d60000;
    color: #fff;
}

/* Sidebar list layout */
.psp-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

/* RELATED CARD */
.psp-related-card {
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    display: block;
    transition: transform 0.2s, box-shadow 0.2s;
}
.psp-related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.psp-related-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
}
.psp-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.psp-related-card:hover .psp-related-img img {
    transform: scale(1.04);
}
.psp-related-body {
    padding: 12px;
}
.psp-related-cat {
    background: #d60000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.psp-related-post-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: #111;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.psp-related-date {
    font-size: 12px;
    color: #888;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .psp-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .psp-sidebar {
        position: static;
    }
    .psp-article { padding: 20px 16px; }
    .psp-title { font-size: 22px; }
    .psp-related-grid { grid-template-columns: repeat(2, 1fr); }
    .psp-nav { grid-template-columns: 1fr; }
    .psp-nav-next a { align-items: flex-start; text-align: left; }
}

@media (max-width: 480px) {
    .psp-related-grid { grid-template-columns: 1fr; }
    .psp-title { font-size: 19px; }
}
