/*
Theme Name: WebDentaku Custom Blog
Author: WebDentaku
Description: Custom theme 4-Column Grid layout.
Version: 1.6
*/

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f8fafc;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
}

/* Header & Footer Full Width */
header, nav, .header, #header {
    width: 100%;
    max-width: 100%;
}

/* Main Blog Container */
.blog-container {
    width: 95%;
    max-width: 1450px;
    margin: 30px auto;
    padding: 0 10px;
    min-height: 65vh;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: #0f172a;
    border-bottom: 3px solid #2563eb;
    display: inline-block;
    padding-bottom: 6px;
}

/* 🌟 Featured Posts (2 Columns) */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

.featured-card {
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.1);
}

.featured-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.featured-content {
    padding: 20px;
}

/* 📰 LATEST POSTS GRID (EXACTLY 4 COLUMNS PER ROW) */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.post-thumb img {
    width: 100%;
    height: 170px;
    object-fit: cover;
}

.post-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-badge {
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 10px;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 6px 0;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.4;
    display: block;
}

.post-title:hover {
    color: #2563eb;
}

.post-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 10px;
}

.post-card-content p {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 14px;
    flex-grow: 1;
}

.read-more-btn {
    display: inline-block;
    margin-top: auto;
    color: #2563eb;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
}

.read-more-btn:hover {
    text-decoration: underline;
}

/* 📱 Responsive Adjustments */
@media (max-width: 1200px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 850px) {
    .featured-grid, .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .featured-grid, .posts-grid {
        grid-template-columns: 1fr;
    }
}