﻿.certificate-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    width: 100%;
    margin: 20px auto;
}

.certificate-item {
    width: 100%;
    cursor: pointer;
    border-radius: 6px;
    transition: transform 0.15s, box-shadow 0.15s;
}

    .certificate-item:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

.certificate-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    inset: 0;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.certificate-modal-content {
    position: relative;
    max-width:700px;
    max-height: 70%;
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.certificate-modal-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.certificate-modal-close,
.certificate-modal-download {
    position: absolute;
    top: 10px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.certificate-modal-close {
    right: 10px;
}

.certificate-modal-download {
    left: 10px;
}

@media (max-width: 768px) {
    .certificate-gallery {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .certificate-modal-content {
        max-width: 90%;
        max-height: 60%;
    }
}
