/* ============================================
   LATEST NEWS COMPONENT STYLES
   ============================================ */

/* ===== WRAPPER (Pembungkus Utama) ===== */
.latest-wrapper {
    max-width: 720px;
    margin: 0 auto;
    background: #ffffff;
    padding: 0;
    border-radius: 8px;
}

/* Margin 16px Kiri & Kanan khusus untuk Mobile */
@media (max-width: 768px) {
    .latest-wrapper {
        margin-left: 16px;
        margin-right: 16px;
        padding: 0;
    }
}

/* ===== SECTION LATEST (Pengganti section-header) ===== */
.section-latest {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.section-latest .red-bar {
    display: inline-block;
    width: 6px;
    height: 22px;
    background: linear-gradient(rgb(122, 0, 0) 0%, rgb(200, 12, 44) 100%);
    border-radius: 3px;
    transform: skewX(-15deg);
    flex-shrink: 0;
}

.section-latest .header-text {
    font-size: 22px;
    font-weight: 800;
    font-style: italic;
    color: #777;
    letter-spacing: 1px;
}

/* ===== NEWS ITEM ===== */
.news-item {
    padding: 20px 0;
    border-bottom: 1px dashed #ccc;
}

.news-item:last-child {
    border-bottom: none;
}

.news-top {
    display: flex;
    gap: 16px;
    align-items: center;
}

.news-thumb {
    flex-shrink: 0;
    width: 160px;
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ddd;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* ✅ UPDATE: Batasi Judul 3 Baris */
.news-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0 0 8px 0;
    padding: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.news-title a:hover {
    color: #d32f2f;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.category-tag {
    display: inline-block;
    padding: 2px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    background: #fff;
    text-decoration: none;
}

.news-time {
    font-size: 13px;
    color: #888;
}

/* ===== SNIPPET / DESKRIPSI ===== */
.news-snippet {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    line-height: 1.6;
    margin-top: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== RESPONSIVE 480px ===== */
@media (max-width: 480px) {
    .section-latest .red-bar {
        width: 5px;
        height: 30px;
    }

    .section-latest .header-text {
        font-size: 20px;
    }

    .news-top {
        gap: 12px;
    }

    .news-thumb {
        width: 95px;
        height: 95px;
    }

    /* ✅ UPDATE: Batasi Judul 3 Baris */
    .news-title {
        font-size: 16px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .news-snippet {
        font-size: 13px;
    }
}

/* ===== RESPONSIVE 360px (MOBILE KECIL) ===== */
@media (max-width: 360px) {
    .section-latest .red-bar {
        width: 4px;
        height: 26px;
    }

    .section-latest .header-text {
        font-size: 20px;
    }

    .news-item {
        padding: 14px 0;
    }

    .news-top {
        gap: 10px;
    }

    .news-thumb {
        width: 80px;
        height: 80px;
    }

    /* ✅ UPDATE: Batasi Judul 3 Baris */
    .news-title {
       font-family: Barlow, sans-serif;
       font-size: 16px;
       font-weight: 700;
       line-height: 22px;
       letter-spacing: 0.4px;
       color: #222;
       margin: 0 0 6px 0;
       display: -webkit-box;
       -webkit-line-clamp: 3;
       -webkit-box-orient: vertical;
       overflow: hidden;
    }

    .category-tag {
        font-size: 11px;
        padding: 2px 8px;
    }

    .news-time {
        font-size: 11px;
    }

    /* Hide snippet di mobile */
    .news-snippet {
        display: none;
    }
}