/* =================================================================
   Blog Pages (Final Version: List, Detail, and Sidebar Styles)
   ================================================================= */

/* --- 1. Genel Blog Sayfası Düzeni --- */
.blog-layout-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
}

@media (min-width: 992px) {
    .blog-layout-container {
        grid-template-columns: 2.5fr 1fr; /* Ana içerik daha geniş */
        align-items: flex-start;
    }
}

/* --- 2. Blog Listeleme Sayfası (index.php) --- */
.blog-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 768px) {
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.blog-post-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.blog-post-card-image-link {
    display: block;
    aspect-ratio: 16 / 9;
    background-color: var(--color-background);
}
.blog-post-card-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-post-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.post-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text-base);
    margin: 0 0 15px 0;
}
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--color-primary); }
.post-excerpt {
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
}
.read-more-link {
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}
.read-more-link:hover { text-decoration: underline; }

/* --- 3. Tekil Yazı Sayfası (post.php) --- */
.single-post-container {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
}
.single-post-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 20px;
}
.single-post-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-base);
    margin: 10px 0;
}
.post-meta {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}
.post-meta a { text-decoration: none; }
.post-meta .category-link, .post-meta .author-link {
    font-weight: 600;
    color: var(--color-primary);
}
.post-meta a:hover { text-decoration: underline; }

.post-featured-image {
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
}
.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}
.post-content {
    font-size: 18px;
    line-height: 1.8;
}
.post-content p, .post-content ul, .post-content ol, .post-content blockquote { margin-bottom: 1.5em; }
.post-content h2, .post-content h3, .post-content h4 { margin-top: 2em; margin-bottom: 1em; line-height: 1.4; color: var(--color-text-base); }
.post-content a { color: var(--color-primary); text-decoration: underline; font-weight: 500; }
.post-content ul, .post-content ol { padding-left: 1.5em; }
.post-content li { margin-bottom: 0.5em; }
.post-content blockquote { border-left: 4px solid var(--color-primary); padding-left: 1em; font-style: italic; color: var(--color-text-muted); }

/* --- 4. Kenar Çubuğu (sidebar.php) --- */
.blog-sidebar-column {
    position: sticky;
    top: 90px;
}
.sidebar-widget {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
}
.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}
.sidebar-search-form .input-wrapper {
    position: relative;
}
.sidebar-search-form input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    height: 44px;
}
.sidebar-search-form button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: none;
    border: none;
    padding: 0 15px;
    color: var(--color-text-muted);
    cursor: pointer;
}
.widget-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.widget-list li a { text-decoration: none; display: block; padding: 10px 0; border-bottom: 1px solid var(--color-border); transition: color 0.2s ease; }
.widget-list li:last-child a { border-bottom: none; }
.widget-list li a:hover .post-title, .widget-list li a:hover .category-name { color: var(--color-primary); }
.recent-posts-list .post-title { font-weight: 500; color: var(--color-text-base); display: block; margin-bottom: 5px; }
.recent-posts-list .post-date { font-size: 13px; color: var(--color-text-muted); }
.category-list a { display: flex; justify-content: space-between; align-items: center; }
.category-list .category-name { font-weight: 500; color: var(--color-text-base); }
.category-list .category-count { font-size: 13px; background-color: var(--color-background); padding: 2px 8px; border-radius: 10px; color: var(--color-text-muted); }

/* --- 5. Paylaşım ve Yorumlar Bölümü --- */
.post-share-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}
.discussion-section {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-top: 30px;
}
.post-share-section h3, .discussion-section h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}
.share-buttons { display: flex; justify-content: flex-start; gap: 10px; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 6px; color: #fff; text-decoration: none; font-weight: 500; font-size: 14px; transition: opacity 0.2s ease; }
.share-btn:hover { opacity: 0.9; color: #fff; }
.share-btn.facebook { background-color: #1877F2; }
.share-btn.twitter { background-color: #1DA1F2; }
.share-btn.whatsapp { background-color: #25D366; }

/* Yorum Formu ve Listesi */
.comment-form-container { margin-bottom: 30px; }
#blog-comment-form .form-control, .reply-form-container .form-control {
    min-height: 120px;
    margin-bottom: 15px;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#blog-comment-form .form-control:focus, .reply-form-container .form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(0, 169, 127, 0.1);
}
#blog-comment-form .button-submit, .reply-form-actions .button-submit, #blog-comment-form .form-button {
    padding: 12px 25px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#blog-comment-form .button-submit:hover, .reply-form-actions .button-submit:hover, #blog-comment-form .form-button:hover {
    background-color: var(--color-primary-dark);
}
.reply-form-actions .button-cancel-reply {
    padding: 12px 25px;
    background-color: var(--color-surface);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.reply-form-actions .button-cancel-reply:hover {
    background-color: var(--color-background);
    color: var(--color-text-base);
}
.login-prompt { padding: 20px; background-color: var(--color-background); border-radius: var(--border-radius); text-align: center; }
.comment-list { display: flex; flex-direction: column; gap: 25px; }

/* Yorum Öğesi Stilleri */
.review-item { display: flex; gap: 15px; }
.review-avatar { flex-shrink: 0; }
.review-avatar a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
}
.review-content { flex-grow: 1; }
.review-header { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.review-author { font-weight: 600; color: var(--color-text-base); text-decoration: none; }
.review-author:hover { text-decoration: underline; }
.review-date { font-size: 13px; color: var(--color-text-muted); }
.review-text { margin: 0; line-height: 1.7; word-break: break-word; }
.review-actions { margin-top: 10px; }
.reply-btn { background: none; border: none; color: var(--color-text-muted); cursor: pointer; font-weight: 500; font-size: 13px; padding: 0; }
.reply-btn:hover { color: var(--color-primary); }
.reply-form-container { margin-top: 15px; border-left: 3px solid var(--color-border); padding-left: 15px; }
.reply-form-container textarea { min-height: 80px; margin-bottom: 10px; }
.reply-form-actions { display: flex; gap: 10px; }
.comment-replies.nested { margin-top: 20px; padding-left: 20px; border-left: 2px solid var(--color-border); }
