.cert-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 25px;
    margin-top: 0;
}

.cert-card {
    position: relative;
    background: #fff;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.cert-img-box {
    position: relative;
    width: 100%;
    padding-bottom: 141.4%;
    /* A4 ratio */
    background: #fbfbfb;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: var(--transition);
}

.cert-img-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: var(--transition);
}

.cert-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.cert-overlay i {
    color: #fff;
    font-size: 2.5rem;
    transform: scale(0.6);
    transition: var(--transition);
    background: var(--point-color);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.cert-card:hover .cert-img-box {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
    border-color: var(--point-color);
}

.cert-card:hover .cert-img-box img {}

.cert-card:hover .cert-overlay {
    opacity: 1;
}

.cert-card:hover .cert-overlay i {
    transform: scale(1);
}

.cert-info {
    margin-top: 25px;
    text-align: center;
    flex-grow: 1;
}

.cert-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    line-height: 1.5;
    transition: var(--transition);
    word-break: keep-all;
    margin: 0;
}

.cert-card:hover .cert-info h3 {
    color: var(--point-color);
}

/* Modal Styling */
.cert-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(15px);
    z-index: 100000;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.cert-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.cert-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    transform: scale(0.9);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.cert-modal-overlay.active .cert-modal-content {
    transform: scale(1);
}

.cert-modal-content img {
    max-width: 100%;
    max-height: 85vh;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cert-modal-close {
    position: absolute;
    top: -60px;
    right: 0;
    color: #fff;
    font-size: 35px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: 0.3s;
}

.cert-modal-close:hover {
    background: #fff;
    color: #000;
    transform: rotate(90deg);
}


@media (max-width: 1024px) {
    .cert-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px 20px;
    }

    .premium-cert-section {
        padding: 30px 0;
    }
}

@media (max-width: 768px) {
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px 15px;
    }

    .cert-info h3 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .cert-grid {
        grid-template-columns: 1fr;
    }

    .cert-img-box {
        margin: 0 auto;
    }
}