/* =========================================================
   Blog & Single Post CSS
   ========================================================= */

/* --- 1. Blog Grid (home.php) --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    border-color: var(--primary-color);
}

.blog-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f8fafc;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.blog-meta i { color: var(--primary-color); margin-right: 5px; }

.blog-title {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.blog-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-title a:hover {
    color: var(--primary-color);
}

.blog-excerpt {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 12px;
}

/* Pagination */
.blog-pagination {
    margin-top: 50px;
    text-align: center;
}
.blog-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    transition: 0.3s;
    background: var(--surface-color);
}
.blog-pagination .page-numbers.current,
.blog-pagination .page-numbers:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* --- 2. Single Post Content (single.php) --- */
.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.post-content p {
    margin-bottom: 25px;
}

.post-content h2, 
.post-content h3, 
.post-content h4 {
    color: var(--text-main);
    margin-top: 40px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.post-content h2 { font-size: 28px; }
.post-content h3 { font-size: 24px; }

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
}

.post-content ul, 
.post-content ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content blockquote {
    border-left: 5px solid var(--primary-color);
    background: rgba(0, 136, 204, 0.05);
    padding: 20px 25px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    font-size: 20px;
    color: var(--text-main);
}

/* =========================================================
   Mobile Responsiveness (Max Width: 768px)
   ========================================================= */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .single-post-header h1 {
        font-size: 30px !important;
    }
    
    .post-content {
        font-size: 16px;
    }
    
    .post-content h2 { font-size: 24px; }
    .post-content h3 { font-size: 20px; }
}