/* Certification Page Styles - Restructured with Grid Layout */

.cert-section {
    padding: 6rem 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
}

/* Category Filter */
.cert-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 2rem;
    border: 2px solid #e2e8f0;
    background: white;
    color: var(--text-dark);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--secondary-color), #5ab35a);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(70, 153, 70, 0.3);
}

/* Certificate Grid */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.cert-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 2px solid #edf2f7;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.cert-card:hover::before {
    transform: scaleX(1);
}

.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: var(--secondary-color);
}

.cert-card-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.cert-card-image::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(70, 153, 70, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cert-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.4s ease;
    position: relative;
    z-index: 1;
}

.cert-card:hover .cert-card-image img {
    transform: scale(1.05);
}

.cert-card-body {
    padding: 2rem;
}

.cert-category {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(70, 153, 70, 0.1);
    color: var(--secondary-color);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cert-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--primary-dark);
}

.cert-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.cert-card-meta i {
    color: var(--secondary-color);
}

.cert-card-desc {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.cert-card-action {
    display: flex;
    gap: 1rem;
}

.view-btn {
    flex: 1;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--secondary-color), #5ab35a);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(70, 153, 70, 0.4);
}

.download-btn {
    padding: 0.8rem 1.2rem;
    background: white;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: var(--secondary-color);
    color: white;
}

/* Modal/Lightbox */
.cert-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.cert-modal.active {
    display: flex;
}

.modal-content {
    max-width: 900px;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.modal-image {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

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

    .cert-filter {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .cert-card-action {
        flex-direction: column;
    }

    .download-btn {
        width: 100%;
    }
}
