/* POST DETAIL PAGE */
.post-detail {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
}

/* Header */
.post-header {
    margin-bottom: 32px;
    text-align: center;
}
.post-category {
    display: inline-block;
    background: var(--blue-100);
    color: var(--blue-700);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    text-decoration: none;
    transition: background var(--transition);
}
.post-category:hover {
    background: var(--blue-200);
}
.post-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    color: var(--color-heading);
    line-height: 1.2;
    margin-bottom: 20px;
}
.post-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 0.9rem;
    color: var(--gray-500);
    flex-wrap: wrap;
}
.post-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.post-meta-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Featured Image */
.post-featured-image {
    width: 100%;
    max-width: var(--max-width);
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin: 0 auto 40px;
    box-shadow: var(--shadow-md);
}

/* Content */
.post-content {
    font-size: 1.125rem;
    line-height: 1.5;
    color: var(--color-text);
}
.post-content h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-heading);
    margin: 48px 0 20px;
    line-height: 1.3;
}
.post-content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-heading);
    margin: 40px 0 16px;
}
.post-content p {
    margin: 0;
    padding: 0;
}
.post-content p:empty {
    line-height: 1.5;
    min-height: 1.5em;
}
.post-content br {
    display: block;
    content: "";
    margin: 0;
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 32px 0;
    box-shadow: var(--shadow-sm);
}
.post-content ul,
.post-content ol {
    margin: 24px 0;
    padding-left: 28px;
}
.post-content li {
    margin-bottom: 12px;
    line-height: 1.7;
}
.post-content blockquote {
    border-left: 4px solid var(--blue-400);
    background: var(--blue-50);
    padding: 20px 24px;
    margin: 32px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--blue-900);
}
.post-content a {
    color: var(--blue-600);
    text-decoration: underline;
    transition: color var(--transition);
}
.post-content a:hover {
    color: var(--blue-700);
}

/* Tags */
.post-tags {
    margin: 48px 0 32px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}
.post-tags h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.tag-item {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.85rem;
    transition: background var(--transition);
}
.tag-item:hover {
    background: var(--gray-200);
}

/* Related Posts */
.related-posts {
    max-width: var(--max-width);
    margin: 60px auto 40px;
    padding: 0 20px;
}
.related-posts h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 24px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.related-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    display: block;
}
.related-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.related-card-body {
    padding: 16px;
}
.related-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-heading);
    line-height: 1.3;
    margin-bottom: 8px;
}
.related-card-date {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Comments */
.post-comments {
    max-width: var(--max-width);
    margin: 60px auto 40px;
    padding: 0 20px;
}
.comments-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 32px;
}
.comment {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}
.comment-author {
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 4px;
}
.comment-date {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 12px;
}
.comment-body {
    line-height: 1.7;
    color: var(--color-text);
}

/* Comment Form */
.comment-form {
    background: var(--gray-50);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-top: 40px;
}
.comment-form h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 24px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition);
    background: var(--color-surface);
    color: var(--color-text);
}
.form-control:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
}
.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive */
@media (max-width: 768px) {
    .post-detail { padding: 0 16px; }
    .post-title { font-size: 1.8rem; }
    .post-meta { gap: 12px; }
    .post-content { font-size: 1.05rem; }
    .related-posts { padding: 0 16px; }
    .related-grid { grid-template-columns: 1fr; }
    .post-comments { padding: 0 16px; }
    .comment-form { padding: 24px 20px; }
}
