/* Certifications Page Styles */
.certifications-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.cert-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.cert-tab-btn {
    padding: 10px 25px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    transition: all 0.3s ease;
}

.cert-tab-btn:hover, .cert-tab-btn.active {
    background: #E60012;
    color: white;
    border-color: #E60012;
    box-shadow: 0 4px 10px rgba(230, 0, 18, 0.3);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

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

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

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

.cert-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cert-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.cert-image-wrapper {
    position: relative;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    background: #fff;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    cursor: pointer;
}

.cert-image-wrapper img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    transition: transform 0.5s ease;
}

.cert-item:hover .cert-image-wrapper img {
    transform: translate(-50%, -50%) scale(1.05);
}

.cert-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    font-size: 14px;
    padding: 20px;
    text-align: center;
}

.cert-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.zoom-btn {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 20px;
    cursor: pointer;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cert-item:hover .zoom-btn {
    transform: scale(1);
}

.cert-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cert-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cert-desc {
    font-size: 13px;
    color: #777;
    line-height: 1.6;
    margin-top: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modal Styles */
.cert-modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    padding-top: 50px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgb(0,0,0); 
    background-color: rgba(0,0,0,0.9); 
}

.cert-modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80vh;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

.cert-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.cert-modal-close:hover,
.cert-modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

#modalCaption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-size: 18px;
    margin-top: 15px;
}

@media only screen and (max-width: 700px){
    .cert-modal-content {
        width: 100%;
    }
}