/* =========================================================
   ITN MALANG - PORTAL GRID SYSTEM & IMAGE FIX
   ========================================================= */

/* 1. UBAH DAFTAR JURNAL MENJADI GRID (3 KOLOM KOTAK-KOTAK) */
ul.journals, .journals > ul {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 30px !important;
    padding-left: 0 !important;
    list-style: none !important;
    margin-top: 30px;
}

/* 2. DESAIN KARTU UNTUK MASING-MASING JURNAL */
ul.journals > li, .journals > ul > li {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05) !important;
    transition: all 0.3s ease !important;
    margin-bottom: 0 !important;
    position: relative;
    border-bottom: 4px solid #004a87 !important; /* Garis bawah biru ITN */
}

/* Efek saat kartu jurnal disentuh mouse */
ul.journals > li:hover, .journals > ul > li:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 25px rgba(0, 74, 135, 0.15) !important;
    border-bottom-color: #f2a900 !important; /* Garis bawah berubah kuning ITN */
}

/* 3. SERAGAMKAN UKURAN GAMBAR SAMPUL SECARA PAKSA */
ul.journals .thumb, .journals > ul > li .thumb {
    width: 100% !important;
    height: 200px !important; /* Tinggi kotak gambar dikunci di 200px */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    overflow: hidden !important;
    background: #f9f9f9 !important; /* Latar belakang abu-abu muda */
    border-radius: 6px !important;
    padding: 10px;
}

/* Memastikan gambar tidak gepeng (proporsional) */
ul.journals .thumb img, .journals > ul > li .thumb img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important; /* Gambar menyesuaikan kotak tanpa terpotong */
    width: auto !important;
    height: auto !important;
}

/* 4. MERAPIKAN JUDUL JURNAL */
ul.journals h3, ul.journals h2 {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    line-height: 1.3 !important;
}

ul.journals h3 a, ul.journals h2 a {
    color: #004a87 !important;
    text-decoration: none !important;
}

ul.journals h3 a:hover, ul.journals h2 a:hover {
    color: #f2a900 !important;
}

/* 5. MEMBATASI TEKS DESKRIPSI AGAR TIDAK TERLALU PANJANG */
ul.journals .description {
    font-size: 0.95rem !important;
    color: #555555 !important;
    text-align: justify !important;
    /* Trik memotong teks maksimal 4 baris */
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important; 
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-bottom: 20px !important;
    width: 100%;
}

/* 6. TOMBOL "VIEW JOURNAL" (Jika Ada) */
ul.journals .cmp_button, ul.journals .btn {
    margin-top: auto !important; /* Mendorong tombol selalu ke bawah */
    background-color: #004a87 !important;
    color: #fff !important;
    border-radius: 4px !important;
    padding: 8px 16px !important;
    font-weight: bold !important;
}
ul.journals .cmp_button:hover, ul.journals .btn:hover {
    background-color: #f2a900 !important;
    color: #000 !important;
}