/* blog_style.css - Unified Modern Theme
   Theme: Clean, professional, and responsive with a blue accent.
*/

/* ==========================================================================
   Base & Typography
   ========================================================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f8f9fa; /* Light gray background */
    margin: 0;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #0056b3;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #212529;
}

/* ==========================================================================
   Shared Components (Header, Footer, Breadcrumb, Pagination)
   ========================================================================== */

.blog-main-header {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    text-align: center;
}

.blog-main-header h1 {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    color: #007bff;
}

.blog-main-header p {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
}

.blog-breadcrumb {
    background: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.blog-breadcrumb a:hover {
    text-decoration: underline;
}

.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: #fff;
    color: #007bff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #dee2e6;
}

.blog-pagination a:hover {
    background-color: #007bff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.blog-pagination .current {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.blog-pagination .disabled {
    opacity: 0.6;
    pointer-events: none;
    background: #e9ecef;
    color: #6c757d;
}

/* ==========================================================================
   Blog Index Page (Card Grid)
   ========================================================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.post-card-thumbnail {
    width: 100%;
    height: 200px;
    background-color: #e9ecef;
    overflow: hidden;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-title {
    font-size: 1.25rem;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.post-card-title a {
    color: #212529;
}

.post-card-title a:hover {
    color: #007bff;
}

.post-card-excerpt {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    font-size: 0.85rem;
    color: #6c757d;
}

.post-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-card-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #007bff;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ==========================================================================
   Blog View Page (Single Post)
   ========================================================================== */

.blog-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 992px) {
    .blog-layout {
        grid-template-columns: 2.5fr 1fr; /* Main content and sidebar */
    }
}

.blog-post-main {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.blog-post-title {
    font-size: 2.2rem;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.blog-post-meta {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.blog-post-meta span {
    margin-right: 15px;
}

.blog-post-image {
    width: 100%;
    margin: 0 0 25px 0;
    border-radius: 8px;
}

.blog-post-content {
    font-size: 1.1rem;
    color: #343a40;
}

.blog-post-content p,
.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 1.2rem;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Sidebar */
.blog-sidebar .widget {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.blog-sidebar .widget-title {
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.blog-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-sidebar ul li a {
    display: block;
    padding: 8px 0;
    color: #343a40;
    border-bottom: 1px solid #e9ecef;
}

.blog-sidebar ul li:last-child a {
    border-bottom: none;
}

.blog-sidebar ul li a:hover {
    color: #007bff;
}

/* Comments Section */
.comments-section {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
}

.comments-title {
    font-size: 1.5rem;
    margin: 0 0 20px 0;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.comment-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}
.comment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #007bff;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.comment-content {
    flex-grow: 1;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.comment-author {
    font-weight: 600;
    color: #212529;
}

.comment-date {
    color: #6c757d;
}

.comment-text {
    color: #343a40;
    line-height: 1.6;
}

/* Comment Form */
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-family: inherit;
    margin-bottom: 10px;
    resize: vertical;
    min-height: 100px;
}

.comment-form .btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.comment-form .btn:hover {
    background: #0056b3;
}

.notice-box {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid;
}
.notice-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}
.notice-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Empty State */
.empty-state {
    background: #fff;
    padding: 50px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.empty-state-icon {
    font-size: 4rem;
    color: #ced4da;
    margin-bottom: 15px;
}
.empty-state h3 {
    font-size: 1.5rem;
    color: #495057;
}
.empty-state p {
    color: #6c757d;
}
