/* =========================
   BERITA INDEX
========================= */

.news-filter{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:30px;
}

.news-card{
    height:100%;
    overflow:hidden;
    background:var(--white);
    border:1px solid var(--border);
    border-radius:18px;
    transition:.2s ease;
}

.news-card:hover{
    transform:translateY(-3px);
    box-shadow:0 12px 30px rgba(0,0,0,.07);
}

.news-image{
    display:block;
    width:100%;
    height:auto;
    aspect-ratio:16 / 9;
    overflow:hidden;
    background:#f1f5f9;
    padding:0;
    margin:0;
}

.news-image img{
    display:block;
    width:100%;
    height:100%;
    max-width:none;
    max-height:none;
    object-fit:cover;
    object-position:center;
    margin:0;
    padding:0;
    transition:transform .2s ease;
}

.news-card:hover .news-image img{
    transform:scale(1.03);
}

.image-placeholder{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f1f5f9;
    color:var(--muted);
    font-size:28px;
}

.news-body{
    padding:18px;
}

.news-meta{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:7px;
    color:var(--muted);
    font-size:.75rem;
    margin-bottom:9px;
}

.news-meta span:first-child{
    color:var(--primary);
    font-weight:700;
}

.news-body h3{
    font-size:1.05rem;
    line-height:1.45;
    font-weight:700;
    margin-bottom:9px;
}

.news-body h3 a{
    color:var(--text);
    text-decoration:none;
}

.news-body h3 a:hover{
    color:var(--primary);
}

.news-body p{
    color:var(--muted);
    font-size:.86rem;
    line-height:1.7;
    margin-bottom:15px;
}

.read-more{
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:var(--primary);
    text-decoration:none;
    font-size:.82rem;
    font-weight:700;
}

.read-more:hover{
    color:var(--primary-dark);
}


/* =========================
   DETAIL BERITA
========================= */

.news-detail{
    background:var(--white);
    border:1px solid var(--border);
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,.05);
}

.news-detail-image{
    display:block;
    width:100%;
    aspect-ratio:16 / 8;
    overflow:hidden;
    background:#f1f5f9;
    padding:0;
    margin:0;
}

.news-detail-image img{
    display:block;
    width:100%;
    height:100%;
    max-width:none;
    max-height:none;
    object-fit:cover;
    object-position:center;
    margin:0;
    padding:0;
}

.news-detail-summary{
    margin:30px 35px 0;
    padding:18px 20px;
    border-left:4px solid var(--primary);
    background:rgba(127,29,29,.05);
    color:var(--text);
    font-size:1rem;
    line-height:1.8;
    font-weight:600;
}

.news-detail-content{
    padding:30px 35px 40px;
    color:var(--text);
    font-size:1rem;
    line-height:1.9;
}

.news-detail-content img{
    display:block;
    width:100%;
    max-width:100%;
    height:280px;
    object-fit:cover;
    object-position:center;
    border-radius:12px;
    margin:0 0 20px;
}

@media(max-width:767.98px){
    .news-detail-content img{
        height:170px;
    }
}


/* =========================
   DETAIL SIDEBAR
========================= */

.news-sidebar{
    position:sticky;
    top:90px;
}

.sidebar-title{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:16px;
    padding-bottom:12px;
    border-bottom:2px solid var(--border);
}

.sidebar-title span{
    font-size:13px;
    font-weight:800;
    letter-spacing:.5px;
    color:var(--primary);
}

.sidebar-title a{
    font-size:13px;
    color:var(--primary);
    text-decoration:none;
    font-weight:700;
}

.sidebar-news-list{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.sidebar-news-item{
    display:flex;
    gap:12px;
    padding:10px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--white);
    text-decoration:none;
    color:var(--text);
    transition:.2s ease;
}

.sidebar-news-item:hover{
    border-color:var(--primary-light);
    transform:translateY(-1px);
}

.sidebar-news-image{
    width:95px;
    min-width:95px;
    height:55px;
    overflow:hidden;
    border-radius:8px;
    background:#f1f5f9;
    padding:0;
    margin:0;
}

.sidebar-news-image img{
    display:block;
    width:100%;
    height:100%;
    max-width:none;
    object-fit:cover;
    object-position:center;
    margin:0;
    padding:0;
}

.sidebar-image-placeholder{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--muted);
    font-size:22px;
}

.sidebar-news-content{
    min-width:0;
}

.sidebar-news-meta{
    display:flex;
    gap:5px;
    align-items:center;
    margin-bottom:5px;
    font-size:10px;
    color:var(--muted);
    white-space:nowrap;
    overflow:hidden;
}

.sidebar-news-content h5{
    margin:0;
    font-size:13px;
    line-height:1.45;
    font-weight:700;
    display:-webkit-box;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden;
}


/* =========================
   SHARE
========================= */

.news-share{
    display:flex;
    align-items:center;
    gap:14px;
    margin-top:28px;
    padding-top:22px;
    border-top:1px solid var(--border);
}

.news-share > span{
    font-size:13px;
    font-weight:700;
    color:var(--muted);
}

.share-buttons{
    display:flex;
    gap:9px;
}

.share-btn{
    width:40px;
    height:40px;
    border-radius:50%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    text-decoration:none;
    font-size:17px;
    transition:.2s ease;
}

.share-btn:hover{
    color:#fff;
    transform:translateY(-2px);
}

.share-wa{
    background:#25d366;
}

.share-fb{
    background:#1877f2;
}

.share-x{
    background:#111827;
}


/* =========================
   TABLET
========================= */

@media (max-width:991.98px){

    .news-sidebar{
        position:static;
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width:575.98px){

    /* FILTER */
    .news-filter{
        flex-wrap:nowrap;
        overflow-x:auto;
        padding-bottom:5px;
        margin-right:-12px;
        scrollbar-width:none;
    }

    .news-filter::-webkit-scrollbar{
        display:none;
    }

    .news-filter .filter-item{
        flex:0 0 auto;
    }

    /* CARD */
    .news-card{
        border-radius:11px;
    }

    /* GAMBAR INDEX */
    .news-image{
        display:block;
        width:100% !important;
        height:115px !important;
        aspect-ratio:auto !important;
        overflow:hidden !important;
        padding:0 !important;
        margin:0 !important;
    }

    .news-image img{
        display:block !important;
        width:100% !important;
        height:115px !important;
        max-width:none !important;
        max-height:none !important;
        object-fit:cover !important;
        object-position:center !important;
        margin:0 !important;
        padding:0 !important;
    }

    .image-placeholder{
        width:100%;
        height:115px;
    }

    /* BODY */
    .news-body{
        padding:10px 10px 11px;
    }

    .news-meta{
        gap:4px;
        font-size:9px;
        margin-bottom:6px;
    }

    .news-body h3{
        font-size:12px;
        line-height:1.4;
        margin-bottom:6px;
    }

    .news-body p{
        font-size:10px;
        line-height:1.5;
        margin-bottom:9px;
        display:-webkit-box;
        -webkit-line-clamp:2;
        -webkit-box-orient:vertical;
        overflow:hidden;
    }

    .read-more{
        gap:4px;
        font-size:10px;
    }

    /* DETAIL */
    .news-detail{
        border-radius:12px;
    }

    .news-detail-image{
        display:block;
        width:100% !important;
        height:160px !important;
        aspect-ratio:auto !important;
        overflow:hidden !important;
        padding:0 !important;
        margin:0 !important;
    }

    .news-detail-image img{
        display:block !important;
        width:100% !important;
        height:160px !important;
        max-width:none !important;
        max-height:none !important;
        object-fit:cover !important;
        object-position:center !important;
        margin:0 !important;
        padding:0 !important;
    }

    .news-detail-summary{
        margin:18px 14px 0;
        padding:13px 14px;
        font-size:.86rem;
        line-height:1.7;
    }

    .news-detail-content{
        padding:20px 15px 25px;
        font-size:.9rem;
        line-height:1.8;
    }

    /* SIDEBAR */
    .sidebar-news-image{
        width:85px;
        min-width:85px;
        height:55px;
    }

    .sidebar-news-item{
        gap:10px;
        padding:8px;
    }

    .sidebar-news-content h5{
        font-size:12px;
        line-height:1.4;
    }

    .sidebar-news-meta{
        font-size:9px;
    }

    /* SHARE */
    .news-share{
        align-items:flex-start;
        flex-direction:column;
        gap:9px;
        margin-top:22px;
        padding-top:18px;
    }

    .share-btn{
        width:40px;
        height:40px;
        font-size:16px;
    }
}

@media(max-width:400px){
    .news-detail-content img{
        height:150px;
    }
}
