/* --- General & Variables --- */
:root {
    --bg-color: #F8F9FA;
    --card-color: #FFFFFF;
    --accent-color: #E53935;
    --text-color: #212529;
    --text-on-dark: #FFFFFF;
    --subtext-color: #6C757D;
    --border-color: #E9ECEF;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    margin: 0;
    line-height: 1.7;
}

/* --- IMPROVED: Content-Aware Banner --- */
.banner {
    width: 100%;
    /* CHANGED: Use min-height to allow banner to grow. */
    min-height: 50vh;
    /* REMOVED: height: 90vh; */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-on-dark);
    overflow: hidden;
    /* ADDED: Padding to ensure space around content, even if it's tall. */
    padding: 5vh 0;
    box-sizing: border-box; /* Ensures padding is included in height calculation */
}

.banner-background {
    position: absolute;
    top: -10%; left: -5%; right: -5%; bottom: -10%;
    background: url('https://images.unsplash.com/photo-1542831371-29b0f74f9713?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    filter: blur(2px) brightness(0.7);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 40px;
    opacity: 0;
    animation: fadeIn 1.2s 0.2s ease-out forwards;
}

.banner-icon {
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px auto; /* Simplified centering */
}

.banner .category {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* --- Title (Font size is now controlled by JS) --- */
.banner h1 {
    font-family: var(--font-heading);
    /* The font-size is now dynamically set by main.js */
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 3px 10px rgba(0,0,0,0.4);
    margin: 0;
    position: relative;
    transition: font-size 0.3s ease-out; /* ADDED: Smooth transition for font size changes */
}

.banner h1::before {
   content: '';
}

.post-meta {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 1rem;
    font-weight: 500;
}

.post-meta .author { font-style: italic; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Main Layout & Other styles ... (No changes below unless specified) --- */
.container { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.content-flex { display: flex; gap: 40px; }
.blog-content { flex: 2; }
.sidebar { flex: 1; }
.blog-content, .sidebar-widget { background: var(--card-color); padding: 40px; border-radius: 12px; box-shadow: 0 8px 40px var(--shadow-color); }
.blog-content h2 { font-family: var(--font-heading); font-size: 2rem; margin-top: 0; }
.blog-content img { max-width: 100%; border-radius: 12px; margin: 25px 0; }
.sidebar { display: flex; flex-direction: column; gap: 30px; }
sidebar-widget { padding: 0; }
.latest-posts .post, .categories .category-item { display: flex; align-items: center; gap: 15px; padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid var(--border-color); }
.latest-posts .post:last-child, .categories .category-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.latest-posts img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }
.latest-posts .post-info h3 { font-size: 1rem; margin: 0 0 5px; font-weight: 600; cursor: pointer; transition: color 0.2s; }
.latest-posts .post-info h3:hover { color: var(--accent-color); }
.latest-posts .post-info p { font-size: 0.85rem; margin: 0; color: var(--subtext-color); }
/* PERUBAHAN: Memperbaiki tata letak daftar kategori */
.categories .category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid #f2f2f2;
}
.categories .category-item:last-child { border-bottom: none; }

.category-item a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.category-item a:hover {
    color: var(--primary-color);
}

.category-item span {
    color: var(--meta-color);
    font-size: 0.9rem;
}
.categories .category-item { cursor: pointer; }
.categories .category-item span:first-child { font-weight: 600; flex-grow: 1; transition: color 0.2s; }
.categories .category-item:hover span:first-child { color: var(--accent-color); }
.categories .category-item span:last-child { color: var(--subtext-color); font-weight: 600; }
.tags span { display: inline-block; background: #E9ECEF; color: var(--subtext-color); padding: 6px 12px; margin: 4px; border-radius: 5px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.tags span:hover { background-color: var(--accent-color); color: #fff; }
.recommendations { margin-top: 60px; padding-top: 40px; width: 100%; border-top: 1px solid var(--border-color); }
.rec-container { max-width: 1200px; margin: 0 auto; padding: 20px; 20px; }
.recommendations h2 { text-align: center; font-family: var(--font-heading); font-size: 2.2rem; margin-bottom: 40px; }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.rec-card { background: var(--card-color); border-radius: 12px; box-shadow: 0 8px 40px var(--shadow-color); overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; }
.rec-card:hover { transform: translateY(-5px); box-shadow: 0 12px 50px rgba(229, 57, 53, 0.1); }
.rec-card img { width: 100%; height: 200px; object-fit: cover; }
.rec-card-content { padding: 20px; }
.rec-card h3 { font-size: 1.2rem; margin: 0 0 8px; }
.rec-card .rec-date { font-size: 0.9rem; color: var(--subtext-color); margin-bottom: 15px; }
.rec-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rec-tags span { padding: 4px 10px; font-size: 0.75rem; background: #E9ECEF; color: var(--subtext-color); border-radius: 5px; font-weight: 600; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.rec-tags span:hover { background-color: var(--accent-color); color: #fff; }

/* --- Responsive --- */
@media (max-width: 992px) { .content-flex { flex-direction: column; } }

@media (max-width: 768px) {
    .banner {
        /* CHANGED: Set a minimal height and use padding for spacing */
        min-height: 50vh;
        padding: 80px 20px; /* Generous padding for mobile */
        height: auto; /* Ensure height can grow */
    }
    .banner-content { padding: 20px; }
    /* Font size for h1 is handled by JS */
    .post-meta { flex-direction: column; align-items: center; gap: 10px; }
    .blog-content { padding: 30px; }
}

.post-link {
    text-decoration: none; /* Menghapus garis bawah dari tautan */
    color: inherit; /* Menggunakan warna teks default */
}

.post-link .post-info h4 {
    color: #333333; /* Memberi warna gelap pada judul post */
    transition: color 0.2s ease-in-out; /* Animasi perubahan warna yang halus */
}

.post-link:hover .post-info h4 {
    color: #6c63ff; /* Mengubah warna judul saat disentuh mouse (hover) */
}

.post-link .post-info p {
    color: #888888; /* Memberi warna abu-abu pada tanggal */
}