/* =========================================================
   BERITA & INFORMASI NJAEXPRESS (HOME – CLEAN CARD SIDE + SCROLL)
   - Card menyatu (tanpa garis tepi/border)
   - Gambar kiri + teks kanan (desktop)
   - Scroll horizontal (kanan-kiri), tidak turun kebawah
   - Hover menonjol + aksen warna halus
   - Tombol "Lihat Semua Berita" di tengah
========================================================= */

.section-berita-home {
    background: #ffffff;
    padding-top: 40px;
    padding-bottom: 60px;
}

.section-berita-home .section-title {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
        sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    text-align: center;
}

.section-berita-home .section-subtitle {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial,
        sans-serif;
    text-align: center;
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 18px;
}

/* container card -> horizontal scroll */
.section-berita-home .berita-cards {
    display: flex;
    flex-wrap: nowrap;
    gap: 22px;

    overflow-x: auto;
    overflow-y: visible; /* ✅ ganti ini (sebelumnya hidden) */

    padding: 14px 6px 28px; /* ✅ tambah bawah supaya aman */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    /* scrollbar Firefox */
    scrollbar-width: thin;
    scrollbar-color: #cbd5f5 #f3f4f6;

    align-items: stretch; /* ✅ biar tinggi card stabil */
}

/* scrollbar Chrome/Safari/Edge */
.section-berita-home .berita-cards::-webkit-scrollbar {
    height: 6px;
}
.section-berita-home .berita-cards::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 999px;
}
.section-berita-home .berita-cards::-webkit-scrollbar-thumb {
    background: #cbd5f5;
    border-radius: 999px;
}
.section-berita-home .berita-cards::-webkit-scrollbar-thumb:hover {
    background: #94a3e0;
}

/* =========================================================
   CARD: BERSIH (TANPA GARIS TEPI) + MENYATU
========================================================= */
.section-berita-home .berita-card {
    scroll-snap-align: start;

    /* ukuran card (desktop) */
    flex: 0 0 700px;
    max-width: 860px;
    min-height: 300px;

    /* layout gambar kiri - teks kanan */
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0; /* ⬅️ biar menyatu */
    align-items: stretch; /* ⬅️ gambar ikut tinggi card */

    padding: 0; /* ⬅️ padding pindah ke body */
    border-radius: 22px;
    background: #ffffff;

    border: none; /* ⬅️ HILANGKAN GARIS TEPI */
    box-shadow: 0 12px 30px rgba(15, 27, 45, 0.12); /* mirip card “kenapa memilih” */
    overflow: hidden;
    position: relative;

    transition: transform 0.22s ease, box-shadow 0.22s ease,
        background 0.22s ease;
}

/* aksen warna halus (bukan garis tepi) */
.section-berita-home .berita-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(57, 136, 255, 0.993),
        rgba(46, 42, 42, 0.055)
    );
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
    z-index: 0;
}

/* hover menonjol */
.section-berita-home .berita-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 55px rgba(15, 27, 45, 0.18);
}
.section-berita-home .berita-card:hover::before {
    opacity: 1;
}

/* =========================================================
   THUMBNAIL: MENYATU (TANPA BORDER / FRAME)
========================================================= */
.section-berita-home .berita-card-thumb {
    display: block;
    height: 100%; /* ⬅️ IKUT TINGGI CARD (biar menyatu) */
    min-height: 100%;
    width: 100%;
    border: none;
    border-radius: 0;
    overflow: hidden;
    background: transparent; /* ⬅️ hilangkan “frame” warna */
}

.section-berita-home .berita-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform 0.35s ease;
}
.section-berita-home .berita-card:hover .berita-card-thumb img {
    transform: scale(1.06);
}

.section-berita-home .berita-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #6b7280;
    background: #eef2ff;
}

/* =========================================================
   BODY (KANAN): padding di sini biar clean
========================================================= */
.section-berita-home .berita-card-body {
    padding: 18px 22px 22px; /* ✅ tambah padding bawah */
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.section-berita-home .berita-card-meta {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 10px;
}

/* Judul max 2 baris */
.section-berita-home .berita-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.section-berita-home .berita-card-title a {
    color: inherit;
    text-decoration: none;
}
.section-berita-home .berita-card:hover .berita-card-title a {
    color: var(--primary-dark);
}

/* Excerpt max 3 baris */
.section-berita-home .berita-card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* paksa link pasti kelihatan */
.section-berita-home .berita-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-top: 8px; /* ⬅️ atur jarak ke atas */
    color: #ff1b1c;
    font-size: 16px; /* ✅ normal & profesional */
    font-weight: 800;
    text-decoration: none;

    padding-top: 8px; /* ✅ jarak aman */
    line-height: 1.2;
}
.section-berita-home .berita-card:hover .berita-card-link {
    color: var(--primary-dark, #003b99);
    transform: translateX(2px);
}

/* =========================================================
   TOMBOL LIHAT SEMUA: TENGAH
========================================================= */
.section-berita-home .btn-seeall {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px auto 0; /* ⬅️ ini yang bikin ke tengah */
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    background: rgba(0, 82, 204, 0.1);
    border: 1px solid rgba(0, 82, 204, 0.22);
    color: var(--primary-dark);
    text-decoration: none;
    width: fit-content;
}

.section-berita-home .btn-seeall:hover {
    transform: translateY(-2px);
    background: rgba(0, 82, 204, 0.16);
    box-shadow: 0 14px 28px rgba(15, 27, 45, 0.14);
}

/* pastikan tombol benar-benar di tengah */
.section-berita-home .section-inner > .btn-seeall {
    display: flex;
    justify-content: center;
    width: fit-content;
}

/* jika tidak ada berita */
.section-berita-home .berita-empty-text {
    font-size: 14px;
    color: #806b6b;
    text-align: center;
}

/* =========================================================
   RESPONSIVE
========================================================= */

/* Tablet: masih boleh 2 kolom tapi jangan paksa 400px */
@media (max-width: 1024px) {
    .section-berita-home .berita-card {
        flex: 0 0 92vw;
        max-width: 92vw;
        grid-template-columns: minmax(240px, 42%) 1fr; /* aman */
    }

    .section-berita-home .berita-card-thumb {
        height: 260px;
    }

    .section-berita-home .berita-card-body {
        padding: 16px 18px;
        position: relative;
        z-index: 1; /* ✅ supaya konten selalu di atas ::before */
    }
}

/* HP: ubah jadi 1 kolom (gambar atas, teks bawah) */
@media (max-width: 640px) {
    .section-berita-home .berita-card {
        grid-template-columns: 1fr; /* gambar atas, teks bawah */
    }

    .section-berita-home .berita-card-thumb {
        height: 220px; /* bebas: 220/240/260 */
        min-height: auto;
    }

    .section-berita-home .berita-card-body {
        padding: 16px 18px;
        box-shadow: inset 1px 0 0 rgba(15, 23, 42, 0.06);
        background: #fff;
    }
}
