/* ==========================================================================
   Posts CSS — Phase 15.3 Task 3+4
   Posts list + detail pages
   ========================================================================== */

/* Base */
.yp-posts-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: #fafafa;
    color: #1a1a1a;
}

/* Breadcrumb */
.yp-posts-breadcrumb {
    list-style: none;
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: #999;
    margin: 16px auto 0;
    padding: 0 20px;
}
.yp-posts-breadcrumb a {
    color: #e74c3c;
    text-decoration: none;
}
.yp-posts-breadcrumb a:hover {
    text-decoration: underline;
}

/* Category Navigation */
.yp-posts-cat-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.yp-posts-cat-btn {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.yp-posts-cat-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}
.yp-posts-cat-btn.active {
    background: #e74c3c !important;
    color: #fff !important;
}

/* Post Cards */
.yp-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.yp-posts-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    border: 1px solid #eee;
    transition: box-shadow 0.2s, transform 0.2s;
}
.yp-posts-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}
.yp-posts-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.4;
}

/* Type Badge */
.yp-posts-type-badge {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Detail page */
.yp-posts-detail {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px 60px;
}
.yp-posts-detail__content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 30px;
    word-break: break-word;
}
.yp-posts-detail__contact {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}
.yp-posts-detail__contact a {
    color: #e74c3c;
    text-decoration: none;
}
.yp-posts-detail__contact a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .yp-posts-grid {
        grid-template-columns: 1fr;
    }
    .yp-posts-detail h1 {
        font-size: 22px !important;
    }
    .yp-posts-cat-nav {
        gap: 6px;
    }
    .yp-posts-cat-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}
@media (max-width: 480px) {
    .yp-posts-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .yp-posts-card {
        padding: 16px;
    }
}
