/* Certificates Gallery Page Styles */

.cert-nav {
    background: #fff;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.cert-nav h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #333;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a6cf7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.back-btn:hover {
    color: #3a56d7;
}

/* Gallery Page */
.gallery-header {
    text-align: center;
    padding: 4rem 0 2rem;
}

.gallery-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #efedf0e3;
}

.gallery-header p {
    color: #c9ceef;
    font-size: 1.1rem;
}

/* Certificates Grid */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0 4rem;
}

.certificate-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cert-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.cert-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.certificate-card:hover .cert-thumbnail img {
    transform: scale(1.05);
}

.cert-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(74, 108, 247, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    color: white;
}

.certificate-card:hover .cert-overlay {
    opacity: 1;
}

.cert-overlay i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cert-info {
    padding: 1.5rem;
}

.cert-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    color: #333;
}

.cert-meta {
    color: #4a6cf7;
    font-weight: 500;
    margin: 0 0 0.8rem 0;
}

.cert-desc {
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    background: rgba(0,0,0,0.7);
}

.modal-nav {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
}

.nav-btn {
    background: #4a6cf7;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: #3a56d7;
}

.certificate-fullview {
    flex: 1;
    display: flex;
    padding: 2rem;
    gap: 2rem;
    max-height: 70vh;
    overflow: auto;
}

.certificate-fullview img {
    flex: 1;
    max-width: 60%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.certificate-details {
    flex: 1;
    padding: 1rem;
}

.certificate-details h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.certificate-details p {
    color: #666;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.modal-actions {
    padding: 1rem 2rem;
    background: #f8f9fa;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.action-btn {
    padding: 0.8rem 1.5rem;
    background: #4a6cf7;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: background 0.3s;
}

.action-btn:hover {
    background: #3a56d7;
}

/* Main page preview styles */
.certificates-preview {
    text-align: center;
    padding: 3rem 0;
}

.preview-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.preview-item {
    width: 250px;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1rem;
    text-align: center;
}

.view-certificates-btn {
    margin-top: 2rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #4a6cf7;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #3a56d7;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 108, 247, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .certificates-grid {
        grid-template-columns: 1fr;
    }
    
    .certificate-fullview {
        flex-direction: column;
        padding: 1rem;
    }
    
    .certificate-fullview img {
        max-width: 100%;
        max-height: 50vh;
    }
    
    .modal-nav {
        padding: 0.5rem;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
    }
}