/* ==========================================================================
   Flash News Widget — Tirto.id Clone
   Layout: 3 Kolom Grid, Responsive
   ========================================================================== */

.flashnews-widget {
    background: #fff;
    padding-top: 14px;
    padding-bottom: 6px;
    margin-top: 10px;
    margin-bottom: 22px;
    font-family: 'Inter', Arial, Roboto, sans-serif;
    box-sizing: border-box;
}

.flashnews-widget *,
.flashnews-widget *::before,
.flashnews-widget *::after {
    box-sizing: border-box;
}

.flashnews-widget-inner {
    max-width: 1033px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

/* Garis Atas */
.flashnews-header-topline {
    height: 1px;
    background: #2c2c2c;
    margin-bottom: 14px;
    width: 100%;
}

/* Header Kiri Kanan */
.flashnews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.flashnews-title-main {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    margin: 0;
    line-height: 1.2;
}

.flashnews-more {
    font-size: 14px;
    color: #2d5bd1;
    text-decoration: none;
    font-weight: 500;
}
.flashnews-more:hover {
    text-decoration: underline;
}

/* Dotted line below header, as seen in Tirto */
.flashnews-header-separator {
    height: 1px;
    border-bottom: 1px dotted #ccc;
    margin-bottom: 24px;
    width: 100%;
}

/* ==========================================================================
   GRID & KOLOM
   ========================================================================== */
.flashnews-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.flashnews-column {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Pemisah Antar Kolom di Tengah Gap */
.flashnews-column:not(:first-child)::before {
    content: '';
    position: absolute;
    left: -14px; /* Setengah dari gap 28px */
    top: 0;
    bottom: 0;
    border-left: 1px solid #efefef;
}

/* ==========================================================================
   ITEM BERITA
   ========================================================================== */
.flashnews-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #f1f1f1;
}

.flashnews-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Konten Kiri (Kategori, Waktu, Judul) */
.flashnews-content {
    flex: 1;
    padding-right: 16px;
}

.flashnews-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 6px;
    line-height: 1.2;
}

.flashnews-category {
    color: #2d5bd1;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.flashnews-category:hover {
    text-decoration: underline;
}

.flashnews-time {
    font-size: 12px;
    color: #777;
    margin-left: 6px;
}

.flashnews-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.flashnews-title a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.flashnews-title a:hover {
    color: #0d47a1;
}

/* Thumbnail Kanan */
.flashnews-thumb-link {
    display: block;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.flashnews-thumb {
    margin: 0;
    padding: 0;
    width: 76px;
    height: 76px;
    line-height: 0;
    overflow: hidden;
}

.flashnews-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.flashnews-item:hover .flashnews-thumb img {
    transform: scale(1.03);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Tablet: 2 Kolom */
@media (max-width: 1024px) {
    .flashnews-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Reset border pada kolom pertama dari baris kedua */
    .flashnews-column:nth-child(3)::before {
        display: none; /* Kolom 3 pindah ke baris 2 posisi kiri, jadi tidak perlu border kiri */
    }
    
    .flashnews-title-main {
        font-size: 24px;
    }
}

/* Mobile: 1 Kolom */
@media (max-width: 768px) {
    .flashnews-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .flashnews-column {
        margin-bottom: 0;
    }
    
    .flashnews-column:not(:first-child)::before {
        display: none; /* Hilangkan semua border vertikal di mobile */
    }
    
    /* Tambahkan border antar kolom di mobile agar seperti border antar item */
    .flashnews-column:not(:last-child) {
        border-bottom: 1px solid #f1f1f1;
        margin-bottom: 18px;
        padding-bottom: 18px;
    }
    
    /* Perbaikan thumbnail dan title di mobile */
    .flashnews-thumb {
        width: 90px;
        height: 68px;
        flex-shrink: 0;
        border-radius: 6px;
    }
    
    .flashnews-thumb img {
        border-radius: 6px;
    }
    
    .flashnews-title {
        font-size: 15px;
        line-height: 1.4;
    }
}
