/*
File: single.css
Contains styles for single posts and pages.
*/

/* --- Single Post Elements --- */
.entry-meta {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.5em;
}
.entry-meta a {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
}
.entry-meta a:hover {
    color: var(--color-primary);
}
.entry-meta .posted-on {
    color: #64748b;
}
.entry-meta .meta-separator {
    margin: 0 0.5em;
}

.post-thumbnail { margin-bottom: 2em; }
.post-thumbnail img { width: 100%; height: auto; border-radius: 12px; }
.single .entry-header { margin-bottom: 1.5em; }
.single .entry-title { margin-bottom: 0.5em; }

/* --- Author Box --- */
.author-bio { display: flex; gap: 20px; background-color: #fff; padding: 1.5em; margin: 40px 0; align-items: center; border: 1px solid #e2e8f0; border-radius: 12px; }
.author-avatar img { border-radius: 50%; }
.author-name { margin: 0 0 10px 0; }
.author-description { margin: 0 0 15px 0; font-size: 0.95rem; }

/* --- Related Posts --- */
.related-posts {
    margin: 40px 0;
    padding: 2em;
    background-color: #f8fafc;
    border-radius: 12px;
}
.related-posts-title { font-size: 1.8rem; margin-bottom: 30px; text-align: center; margin-top: 0; }
.related-posts .post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* CORRECTED: 3 columns */
    gap: 20px;
}
.related-posts .grid-item {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid #e2e8f0;
}
.related-posts .grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}
.related-posts .grid-item-thumbnail img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}
.related-posts .grid-item-content {
    padding: 15px;
}
.related-posts .grid-item .entry-title {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0 0 5px;
    font-weight: 700;
}
.related-posts .grid-item .entry-meta {
    font-size: 0.8rem;
    color: #777;
}

/* --- Comment Section --- */
.comments-area { margin-top: 40px; padding: 2.5em; background-color: #fff; border-radius: 12px; border: 1px solid #e2e8f0; }
.comments-title, .comment-reply-title { font-size: 1.8rem; margin-bottom: 30px; margin-top: 0; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { border-bottom: 1px solid var(--color-border); padding: 30px 0; }
.comment-list .comment:last-child { border-bottom: 0; }
.comment-body { display: flex; gap: 20px; }
.comment-author img { border-radius: 50%; }
.comment-content { flex: 1; }
.comment-meta { font-size: 0.9rem; margin-bottom: 10px; }
.comment-meta .fn { font-weight: bold; font-style: normal; }
.comment-meta a { text-decoration: none; color: #777; }
.comment-reply-link { font-size: 0.85rem; font-weight: bold; background-color: #f0f0f0; padding: 5px 10px; border-radius: 3px; text-decoration: none; }
.comment-reply-link:hover { background-color: var(--color-primary); color: #fff; }
.comment-list .children { list-style: none; padding-left: 40px; }
.comment-form label { display: block; margin-bottom: 5px; font-weight: bold; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 10px; border: 1px solid var(--color-border); border-radius: 3px; margin-bottom: 20px; }
.comment-form .form-submit input { background-color: var(--color-primary); color: #fff; border: 0; padding: 12px 30px; font-size: 1rem; font-weight: bold; border-radius: 3px; cursor: pointer; }
.comment-form .form-submit input:hover { opacity: 0.9; }

/* --- Responsive Single Post Elements --- */
@media (max-width: 992px) {
    .related-posts .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .author-bio { flex-direction: column; text-align: center; }
    .comment-body { flex-direction: column; }
    .comment-list .children { padding-left: 20px; }
    .single .entry-header { margin-bottom: 1em; }
    .comments-area { padding: 1.5em; }
    .related-posts .post-grid { grid-template-columns: 1fr; }
}