body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

header {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem 0;
}

h1 {
    margin: 0;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.certificate {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    text-align: center;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.certificate:hover {
    transform: scale(1.03);
}

.certificate img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid #ddd;
}

.certificate p {
    padding: 10px;
    font-weight: bold;
}


/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
}

#caption {
    text-align: center;
    color: white;
    padding: 10px;
}

.close {
    position: absolute;
    top: 30px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}


.dark-mode {
    background-color: #121212;
    color: white;
}
.dark-mode .certificate {
    background-color: #1e1e1e;
}

.download-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px;
    border-radius: 50%;
    display: none;
}

.certificate:hover .download-btn {
    display: block;
}

