.certificates a{
    position: relative;
}
.certificates a>img{
    border: 2px solid #c7c7c7;
    border-radius: 5px;
    width: 100%;
    box-shadow: 0 2px 16px 2px rgba(0, 0, 0, 0.2);
}

.hoverImg{
    display: flex; /* Change from 'none' to 'flex' to center buttons */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
    border-radius: 7px;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0; /* Initially hidden */
    transition: opacity 0.3s ease; /* Smooth transition */
}
.certificates a:hover{
    transform: translateY(-2px);
    box-shadow: 0 2px 16px 2px rgba(0, 0, 0, 0.3);
}
.certificates a:hover .hoverImg {
    opacity: 1; /* Show hover image on hover */
}

.certificates .view, .certificates .download{
    height: 40px;
    margin-bottom: 10px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 6px;
    background-color: #ED4249;
    color: #fff;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
.certificates .view i, .certificates .download i{
    margin-left: 5px;
    font-size: 20px !important;
}

/* Popup Modal Styles */
.popup {
    display: none; /* Initially hidden */
    position: fixed;
    top: -20px;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
/* Zoomed Image Style */
#popupImage {
    transition: transform 0.3s ease;
}

/* Add a container for image overflow */
.popup img {
    max-width: 100%;
    max-height: 80vh;
    transform-origin: center center; /* Zoom from the center */
}


.popup .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

/* Popup Modal Tools */
.popup-tools {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10001;
}

.popup-tools button {
    padding: 8px 12px;
    font-size: 18px;
    font-weight: bold;
    background-color: #ED4249;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.popup-tools button:hover {
    background-color: #bf1c21;
}
