/* =========================================
   BLOG PAGE STYLES
   ========================================= */

/* --- Layout --- */
.blog-layout {
    display: flex;
    gap: 40px;
    margin-bottom: 80px;
}
.blog-main { flex: 1; }
.blog-sidebar { width: 300px; flex-shrink: 0; }

/* --- Blog Grid (Listing Page) --- */
.blog-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}
.blog-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.blog-img { position: relative; height: 220px; overflow: hidden; }
.blog-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.blog-card:hover .blog-img img { transform: scale(1.1); }

.blog-date {
    position: absolute; top: 15px; left: 15px;
    background: var(--primary); color: var(--dark);
    padding: 5px 12px; font-size: 0.8rem; font-weight: 700;
    border-radius: 4px;
}

.blog-content { padding: 20px; }
.blog-meta {
    font-size: 0.8rem; color: #888; margin-bottom: 10px;
    display: flex; gap: 15px;
}
.blog-meta i { color: var(--primary); margin-right: 5px; }

.blog-content h3 { font-size: 1.2rem; margin-bottom: 10px; line-height: 1.4; }
.blog-content h3 a { color: var(--dark); }
.blog-content h3 a:hover { color: var(--primary); }

.blog-content p { color: #666; font-size: 0.9rem; line-height: 1.6; margin-bottom: 15px; }
.read-more { font-weight: 600; font-size: 0.9rem; color: var(--dark); }
.read-more:hover { color: var(--primary); }

/* --- Sidebar Styles --- */
.sidebar-widget {
    background: #fff; border: 1px solid #eee; padding: 25px;
    border-radius: 8px; margin-bottom: 30px;
}
.widget-title {
    font-size: 1.1rem; margin-bottom: 20px;
    padding-bottom: 10px; border-bottom: 1px solid #eee;
    position: relative;
}
.widget-title::before {
    content: ''; position: absolute; bottom: -1px; left: 0;
    width: 40px; height: 2px; background: var(--primary);
}

/* Search Widget */
.search-widget form { display: flex; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.search-widget input { width: 100%; border: none; padding: 10px; outline: none; }
.search-widget button { background: var(--dark); color: #fff; border: none; padding: 0 15px; cursor: pointer; }
.search-widget button:hover { background: var(--primary); color: var(--dark); }

/* Categories Widget */
.blog-cat-list li {
    border-bottom: 1px solid #f4f4f4; padding: 10px 0;
}
.blog-cat-list li:last-child { border: none; }
.blog-cat-list li a { display: flex; justify-content: space-between; color: #555; }
.blog-cat-list li a:hover { color: var(--primary); padding-left: 5px; }

/* Recent Posts Widget */
.rp-item { display: flex; gap: 15px; margin-bottom: 20px; }
.rp-item:last-child { margin-bottom: 0; }
.rp-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 5px; }
.rp-content h4 { font-size: 0.9rem; line-height: 1.4; margin-bottom: 5px; }
.rp-content h4 a { color: var(--dark); }
.rp-content h4 a:hover { color: var(--primary); }
.rp-content span { font-size: 0.75rem; color: #888; }

/* Tags Widget */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tags-cloud a {
    background: #f4f4f4; padding: 5px 12px; font-size: 0.85rem; color: #555; border-radius: 4px;
}
.tags-cloud a:hover { background: var(--primary); color: var(--dark); }

/* --- Single Blog Details --- */
.blog-single .blog-img { height: 400px; border-radius: 8px; margin-bottom: 25px; }
.single-content h2 { font-size: 2rem; margin-bottom: 20px; }
.single-content p { margin-bottom: 20px; font-size: 1rem; color: #555; line-height: 1.8; }

blockquote {
    background: #f9f9f9; border-left: 5px solid var(--primary);
    padding: 20px 30px; margin: 30px 0; font-style: italic; font-size: 1.1rem; color: var(--dark);
}

.blog-list { margin-left: 20px; margin-bottom: 20px; }
.blog-list li { list-style: disc; margin-bottom: 10px; color: #555; }

.post-footer {
    border-top: 1px solid #eee; padding-top: 20px; margin-top: 40px;
    display: flex; justify-content: space-between; align-items: center;
}
.post-tags span { font-weight: 700; margin-right: 5px; }
.post-tags a { color: #666; }
.post-tags a:hover { color: var(--primary); }
.post-share a {
    width: 35px; height: 35px; background: #f4f4f4; color: var(--dark);
    display: inline-flex; justify-content: center; align-items: center;
    border-radius: 50%; margin-left: 5px; transition: 0.3s;
}
.post-share a:hover { background: var(--primary); }

/* Comments */
.comments-area { margin-top: 60px; }
.comments-title { font-size: 1.5rem; margin-bottom: 30px; }

.comment-item { display: flex; gap: 20px; margin-bottom: 30px; }
.comment-avatar img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.comment-content { flex: 1; background: #f9f9f9; padding: 20px; border-radius: 8px; }
.c-head { display: flex; justify-content: space-between; margin-bottom: 10px; }
.c-head h5 { font-size: 1rem; font-weight: 700; }
.c-head span { font-size: 0.8rem; color: #888; }
.reply-btn { font-size: 0.85rem; color: var(--primary); font-weight: 600; margin-top: 10px; display: inline-block; }

.comment-form { margin-top: 50px; background: #fff; border-top: 1px solid #eee; padding-top: 30px; }
.comment-form .form-row { display: flex; gap: 20px; margin-bottom: 20px; }
.comment-form input, .comment-form textarea {
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; outline: none;
}
.comment-form textarea { height: 120px; resize: none; margin-bottom: 20px; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--primary); }

/* Responsive */
@media (max-width: 991px) {
    .blog-layout { flex-direction: column; }
    .blog-sidebar { width: 100%; }
    .blog-single .blog-img { height: 300px; }
}