/* =========================================================
   BERITALINEA HOMEPAGE LAYOUT
   Layout homepage portal berita: rekomendasi, news feed, sidebar
   ========================================================= */

.beritalinea-homepage-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 18px 54px;
    font-family: inherit;
}

.beritalinea-homepage-wrap *,
.beritalinea-homepage-wrap *::before,
.beritalinea-homepage-wrap *::after {
    box-sizing: border-box;
}

/* Supaya halaman homepage lebih bersih */
.home .entry-title,
.page .entry-title:has(+ .entry-content .beritalinea-homepage-wrap) {
    display: none;
}

.beritalinea-homepage-wrap a {
    color: inherit;
    text-decoration: none;
}

.beritalinea-homepage-wrap a:hover {
    color: #0b63ce;
}

.bl-section {
    margin-bottom: 38px;
}

.bl-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.bl-section-head h2 {
    margin: 0;
    color: #0b3f9e;
    font-size: 23px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.bl-section-head a {
    flex: 0 0 auto;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
}

/* Rekomendasi */
.bl-rekom-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.bl-rekom-card {
    overflow: hidden;
    border: 1px solid #dfe7f3;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.bl-rekom-card:hover {
    transform: translateY(-2px);
    border-color: #bdd4f4;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.09);
}

.bl-rekom-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e5e7eb;
}

.bl-rekom-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bl-rekom-content {
    padding: 11px 12px 14px;
}

.bl-rekom-content h3 {
    margin: 8px 0 7px;
    color: #0b1220;
    font-size: 15px;
    line-height: 1.28;
    font-weight: 800;
}

/* Label kategori */
.bl-cat {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f15b2a;
    color: #ffffff !important;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 800;
    white-space: nowrap;
}

.bl-cat-default {
    background: #0b63ce;
}

.bl-meta {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

/* Layout utama */
.bl-main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 30px;
    align-items: start;
}

.bl-main-layout.bl-no-sidebar {
    grid-template-columns: 1fr;
}

.bl-main-content {
    min-width: 0;
}

/* News feed */
.bl-news-feed {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.bl-news-item {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.bl-news-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 8px;
    background: #e5e7eb;
}

.bl-news-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bl-news-content h2 {
    margin: 8px 0 8px;
    color: #07111f;
    font-size: 25px;
    line-height: 1.18;
    font-weight: 850;
    letter-spacing: -0.025em;
}

.bl-excerpt {
    margin-top: 10px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.72;
}

/* Sidebar */
.bl-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bl-widget {
    border: 1px solid #dfe7f3;
    border-radius: 13px;
    background: #ffffff;
    padding: 20px 20px 18px;
}

.bl-widget h3 {
    margin: 0 0 14px;
    color: #07111f;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 850;
}

.bl-widget ol,
.bl-widget ul {
    margin: 0;
    padding-left: 20px;
}

.bl-widget li {
    margin-bottom: 10px;
    color: #111827;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 650;
}

.bl-widget p {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
}

/* Placeholder gambar jika post belum punya featured image */
.bl-thumb-placeholder {
    width: 100%;
    height: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #0b3f9e, #f15b2a);
    color: #ffffff;
    text-align: center;
    font-weight: 900;
}

.bl-thumb-placeholder span {
    color: #ffffff;
}

/* Tambahan agar header tema lebih mendekati contoh, jika class theme mendukung */
.site-header,
#masthead {
    border-bottom: 1px solid #dbe4f0;
}

.site-branding .site-title,
.site-title,
.site-title a {
    color: #0b3f9e;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.main-navigation a,
.primary-menu a,
.menu a {
    font-weight: 800;
}

/* Responsive */
@media (max-width: 1100px) {
    .bl-rekom-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bl-main-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .beritalinea-homepage-wrap {
        padding: 20px 14px 40px;
    }

    .bl-section-head h2 {
        font-size: 20px;
    }

    .bl-rekom-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .bl-news-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bl-news-content h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .bl-rekom-grid {
        grid-template-columns: 1fr;
    }
}
