/* GRID ikut system kau */
.licence-grid {
    margin-top: 30px;
}

/* CARD ikut theme */
.licence-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

/* hover sama feel dengan card lain */
.licence-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

/* logo wrapper supaya semua sama size */
.licence-logo {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.licence-logo img {
    max-height: 70px;
    object-fit: contain;
}

/* title ikut font theme */
.licence-card h4 {
    font-size: 15px;
    font-weight: 600;
}

/* ===== MODAL PREMIUM ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    inset: 0;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}

/* box tengah */
.modal-box {
    position: relative;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
}

/* image */
.modal-box img {
    width: 100%;
    border-radius: 8px;
}

/* close button */
.close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #000;
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    font-size: 18px;
    cursor: pointer;
}

/* =========================
   MOBILE OPTIMIZATION
========================= */

/* Tablet */
@media (max-width: 992px) {
    .licence-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Phone */
@media (max-width: 576px) {

    .licence-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .licence-card {
        padding: 20px;
    }

    .licence-logo {
        height: 70px;
    }

    .licence-logo img {
        max-height: 55px;
    }

    .licence-card h4 {
        font-size: 14px;
    }

    /* modal full width mobile */
    .modal-box {
        width: 95%;
        padding: 10px;
    }

    .close {
        width: 30px;
        height: 30px;
        font-size: 16px;
        line-height: 30px;
        top: -8px;
        right: -8px;
    }
}

/* smooth modal animation */
.modal {
    animation: fadeIn 0.3s ease;
}

.modal-box {
    animation: zoomIn 0.3s ease;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes zoomIn {
    from {transform: scale(0.9);}
    to {transform: scale(1);}
}

/* GRID FIX (override grid-4 kalau tak kemas) */
.licence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* CARD CONSISTENT SIZE */
.licence-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    height: 160px; /* penting: semua sama tinggi */
}

/* HOVER */
.licence-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

/* LOGO AREA CONSISTENT */
.licence-logo {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.licence-logo img {
    max-height: 60px;
    max-width: 100%;
    object-fit: contain;
}

/* TITLE LOCK POSITION */
.licence-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
    min-height: 35px; /* elak text lari */
    display: flex;
    align-items: center;
    justify-content: center;
}

.licence-logo {
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

/* HERO */
.licence-hero {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.licence-hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.licence-hero p {
    font-size: 16px;
    opacity: 0.8;
}

/* GRID */
.licence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

/* CARD */
.licence-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;

    display: flex;
    align-items: center;
    justify-content: center;

    height: 140px;
}

/* hover effect */
.licence-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

/* logo */
.licence-logo img {
    max-height: 60px;
    max-width: 100%;
    object-fit: contain;
}

@media (max-width: 576px) {

    .licence-hero {
        padding: 60px 20px;
    }

    .licence-hero h1 {
        font-size: 26px;
    }

    .licence-hero p {
        font-size: 14px;
    }
}

/* CARD - bagi ruang lebih */
.licence-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;

    display: flex;
    align-items: center;
    justify-content: center;

    height: 160px; /* tambah sikit tinggi */
}

/* LOGO WRAPPER */
.licence-logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LOGO BESAR */
.licence-logo img {
    max-height: 90px;   /* ⬅️ BESARKAN dari 60px */
    max-width: 90%;
    object-fit: contain;
}

@media (max-width: 576px) {

    .licence-card {
        height: 140px;
    }

    .licence-logo img {
        max-height: 75px; /* besar tapi still fit */
    }
}

.licence-card:hover img {
    transform: scale(1.1);
    transition: 0.3s;
}

/* MODAL BACKDROP */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;

    justify-content: center;
    align-items: center;

    padding: 20px;
}

/* BOX CENTER */
.modal-box {
    position: relative;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;

    background: #fff;
    padding: 10px;
    border-radius: 12px;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* IMAGE CONTROL (IMPORTANT FIX) */
.modal-box img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
}

/* CLOSE BUTTON FIX */
.close {
    position: absolute;
    top: -12px;
    right: -12px;

    background: #111;
    color: #fff;

    width: 36px;
    height: 36px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    cursor: pointer;

    z-index: 10000;
}

.modal-box {
    animation: zoomIn 0.25s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* IMAGE WRAPPER */
.img-wrapper {
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 85vh;
}

/* IMAGE */
#modalImg {
    max-width: 100%;
    max-height: 85vh;
    cursor: grab;
    transition: transform 0.2s ease;
    user-select: none;
    touch-action: none;
}

.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 50px;
    height: 50px;
    border-radius: 50%;

    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 6px 18px rgba(0,0,0,0.15);

    transition: all 0.25s ease;
}

.nav i {
    font-size: 18px;
    color: #111;
}

/* hover effect */
.nav:hover {
    background: #111;
}

.nav:hover i {
    color: #fff;
}

/* position */
.nav.left { left: 15px; }
.nav.right { right: 15px; }

@media (max-width: 576px) {
    .nav {
        width: 42px;
        height: 42px;
    }

    .nav i {
        font-size: 15px;
    }
}