/* =========================
   Catalog Section
   ========================= */
.catalog-section {
    padding: 60px 20px;
    background: #f9f9f9;
}

.catalog-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #103F2F;
}

/* Semua baris menggunakan flex-wrap dan gap */
.catalog-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
    gap: 20px;
    /* jarak antar kolom */
}

/* Default: 2 kolom (hampir 50%) */
.catalog-row .catalog-card {
    flex: 0 0 48%;
    padding: 20px;
    text-align: center;
    box-sizing: border-box;
}

/* Hilangkan aturan row-3 lama yang membuat 3 kolom */
.row-2 .catalog-card,
.row-3 .catalog-card {
    flex: 0 0 20%;
    /* semua baris menjadi 2 kolom */
}

/* Border kanan */
.catalog-row .catalog-card:not(:last-child) {
    border-right: 1px solid #2CA779;
}

/* Gambar */
.catalog-card img {
    width: auto;
    height: 180px;
    margin-bottom: 15px;
    object-fit: cover;
}

/* Judul dan teks */
.catalog-card h3 {
    margin-bottom: 10px;
    color: #22092C;
}

.catalog-card p {
    margin-bottom: 15px;
    color: #555;
}

/* Tombol */
.catalog-card .btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2CA779;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.catalog-card .btn:hover {
    background: #1f7a55;
}

/* =========================
   Lightbox Modal
   ========================= */
#image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

#image-modal.show {
    display: flex;
}

#modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}

.modal-content {
    display: flex;
    flex-direction: row;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    max-width: 90%;
    max-height: 90%;
}

/* Kolom kiri: gambar besar */
.modal-left {
    flex: 2 1 65%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-left img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    border-radius: 10px;
}

/* Kolom kanan: keterangan */
.modal-right {
    flex: 1 1 35%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    color: #103F2F;
}

.modal-right h3 {
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.modal-right p {
    text-align: left;
    white-space: pre-line;
    /* agar \n atau enter di data-desc diproses sebagai baris baru */
    margin: 0 0 10px 0;
}

/* =========================
   Responsive
   ========================= */

/* Tablet (2 kolom) */
@media (max-width: 991px) and (min-width: 769px) {
    .catalog-row .catalog-card {
        flex: 0 0 48%;
        /* dua kolom */
        border-right: none;
    }
}

/* Mobile (1 kolom) */
@media (max-width: 768px) {
    .catalog-row .catalog-card {
        flex: 0 0 100%;
        /* satu kolom per baris */
        border-right: none;
    }

    .modal-content {
        flex-direction: column;
    }

    .modal-left,
    .modal-right {
        flex: 1 1 100%;
        padding: 10px;
    }

    .modal-left img {
        max-height: 50vh;
    }
}