/* FILE: articles/style.css */

/* --- 1. Base Settings --- */
body {
    font-family: 'Inter', sans-serif;
}

/* --- 2. MANAJEMEN GAMBAR ARTIKEL (Sesuai Request) --- */

/* A. Cover Image Utama (Header) */
/* Mengunci rasio gambar jadi 16:9 cinematic, crop tengah otomatis */
.cover-image-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Rasio standard video/monitor */
    overflow: hidden;
    position: relative;
    background-color: #1e293b;
    /* Warna placeholder sebelum gambar load */
    border-radius: 1rem;
    /* Rounded */
}

.cover-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* INI KUNCINYA: Gambar akan dicrop tengah, tidak gepeng */
    object-position: center;
    transition: transform 0.7s ease;
}

.cover-image-container:hover img {
    transform: scale(1.05);
    /* Efek zoom dikit pas hover */
}

/* B. Gambar di dalam Konten Artikel (Chart/Screenshot) */
/* Mencegah gambar bertumpuk dan memberikan ruang napas */
.prose img {
    display: block;
    max-width: 100%;
    height: auto;
    /* Menjaga aspek rasio asli */
    margin: 2.5rem auto;
    /* Jarak atas bawah luas, kiri kanan auto (tengah) */
    border-radius: 0.75rem;
    border: 1px solid #334155;
    /* Border tipis biar rapi */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    cursor: zoom-in;
    /* Memberitahu user gambar bisa diklik */
}

/* --- 3. Animasi Custom --- */
@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* --- 4. Lightbox (Fitur Zoom Gambar) --- */
/* Overlay Hitam saat gambar diklik */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: zoom-out;
    animation: fadeIn 0.2s ease-out;
    backdrop-filter: blur(5px);
}

.lightbox-img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 0 50px rgba(225, 29, 72, 0.2);
    /* Glow warna accent dikit */
    animation: slideDown 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}