.mg-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
}

.mg-grid-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mg-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.mg-img-container {
    width: 100%;
    height: 320px; /* Tinggi seragam agar sejajar rapi */
    overflow: hidden;
    background-color: #f8f9fa; /* Background bersih untuk foto portrait */
    display: flex;
    align-items: center;
    justify-content: center;
}

.mg-img-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Memastikan seluruh bagian gambar tampil utuh tanpa ada yang terpotong */
    transition: transform 0.5s ease;
}

.mg-grid-item:hover .mg-img-container img {
    transform: scale(1.03);
}

.mg-item-content {
    padding: 16px;
}

.mg-item-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.mg-item-content p {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}