/* assets/css/blog.css */
/* Versi Modern & Profesional */

/* === HERO SECTION === */
.blog-hero {
    background: linear-gradient(rgba(13, 17, 23, 0.7), rgba(13, 17, 23, 0.7)), url('../images/background-blog.jpg') no-repeat center center/cover;
    padding: 5rem 1rem;
    text-align: center;
    color: #fff;
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3rem); /* Ukuran font responsif */
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.blog-hero p {
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto;
    opacity: 0.9;
}

/* === LAYOUT KONTEN BLOG === */
.blog-content-section {
    padding: 4rem 1rem;
    background-color: var(--bg-secondary-color, #f8f9fa);
}

.blog-container {
    display: grid;
    grid-template-columns: 1fr 340px; /* Konten utama dan sidebar */
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.main-content {
    width: 100%;
}

.filter-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--border-color, #e9ecef);
    padding-bottom: 1rem;
}

/* === KARTU ARTIKEL (Featured & Grid) === */
.featured-post-card, .post-card {
    background-color: var(--bg-color, #fff);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color, #e9ecef);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-post-card:hover, .post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* Artikel Unggulan */
.featured-post-card {
    margin-bottom: 2.5rem;
}

.featured-post-card .post-image-link img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.featured-post-card .post-content {
    padding: 2rem;
}

.featured-post-card .post-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.featured-post-card .post-title a {
    color: var(--text-primary-color);
    text-decoration: none;
}

.featured-post-card .post-excerpt {
    font-size: 1.05rem;
    color: var(--text-secondary-color);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.featured-post-card .post-author {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Grid Artikel Biasa */
.post-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.post-card .post-image-link img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-card .post-content {
    padding: 1.5rem;
}

.post-card .post-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
}

.post-card .post-title a {
    color: var(--text-primary-color);
    text-decoration: none;
    transition: color 0.3s;
}
.post-card .post-title a:hover {
    color: var(--accent-color);
}

/* Meta Info (Kategori, Tanggal) */
.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.post-category {
    background-color: var(--accent-color-light, #e0ebff);
    color: var(--accent-color, #0d6efd);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}
.post-category:hover {
    background-color: var(--accent-color);
    color: #fff;
}

.post-date {
    color: var(--text-secondary-color);
}

.no-posts-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    background-color: var(--bg-color);
    border-radius: 16px;
    color: var(--text-secondary-color);
}

/* === SIDEBAR === */
.sidebar .widget {
    background-color: var(--bg-color);
    padding: 1.75rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.sidebar .widget-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-form {
    position: relative;
}

.search-form input {
    width: 100%;
    padding: 12px 45px 12px 18px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary-color);
    color: var(--text-primary-color);
    font-size: 1rem;
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    height: 38px;
    width: 38px;
    border: none;
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}
.search-form button:hover {
    background: var(--accent-color-dark);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li a {
    display: block;
    padding: 0.8rem 0.2rem;
    color: var(--text-secondary-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.3s, padding-left 0.3s;
    font-weight: 500;
}

.category-list li:last-child a {
    border-bottom: none;
}

.category-list li a:hover, .category-list li a.active {
    color: var(--accent-color);
    font-weight: 700;
    padding-left: 0.5rem;
}

/* === [BARU] RESPONSIVE DESIGN === */

/* Tablet & Layar Sedang (Sidebar pindah ke bawah) */
@media (max-width: 992px) {
    .blog-container {
        grid-template-columns: 1fr; /* Ubah jadi 1 kolom */
        gap: 3rem;
    }
    .post-card-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 kolom artikel */
    }
}

/* Mobile (Kartu artikel jadi lebih besar) */
@media (max-width: 768px) {
    .blog-content-section {
        padding: 3rem 1rem;
    }
    .featured-post-card .post-image-link img {
        height: 300px;
    }
    .featured-post-card .post-title {
        font-size: 1.7rem;
    }
    .featured-post-card .post-excerpt {
        font-size: 1rem; /* Teks excerpt lebih kecil */
    }
    .post-card .post-title {
        font-size: 1.1rem; /* Judul kartu biasa lebih kecil */
    }
}

/* Small Mobile (Semua jadi 1 kolom) */
@media (max-width: 576px) {
    .blog-hero p {
        font-size: 1.05rem; /* Teks di hero lebih kecil */
    }
    .post-card-grid {
        grid-template-columns: 1fr; /* 1 kolom artikel */
    }
    .featured-post-card .post-image-link img {
        height: 250px;
    }
    .featured-post-card .post-title {
        font-size: 1.5rem; /* Judul unggulan lebih kecil */
    }
}
