/*
 * akmaekki TODO:
 * Maybe move this to assets/css, but then it
 * has to be added maybe to layouts/partials/head.html
 */

/* Certificates section */
.certificates-section {
    padding: 4rem 1rem;
    text-align: center;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 2rem auto 0;
}

.certificate-thumb {
    width: 100%;
    cursor: pointer;
    border-radius: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.certificate-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.certificate-dialog {
    position: relative;
    border: none;
    padding: 0;
    background: transparent;
}

.certificate-dialog img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
}

.dialog-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;

    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.4rem;
    cursor: pointer;
}


.dialog-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.certificate-dialog::backdrop {
    background: rgba(0, 0, 0, 0.85);
}

/* Mobile */
@media (max-width: 768px) {
    .certificates-grid {
        grid-template-columns: 1fr;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox.open {
    display: flex;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 3rem;
    color: white;
    cursor: pointer;
}
