.certificates {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.trainer-certs-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.trainer-certs-sub {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 4rem;
}

.trainer-certs-slider {
    overflow-x: auto;
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.trainer-certs-slider::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.trainer-certs-list {
    display: flex;
    gap: 2rem;
    padding: 0 1rem;
    /* Padding for scroll start/end */
}

.trainer-cert-card {
    min-width: 300px;
    width: 300px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trainer-cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.trainer-cert-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.4;
}

.trainer-cert-img {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.trainer-cert-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Modal */
.cert-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cert-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.cert-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.cert-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    z-index: 2001;
}

.cert-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.cert-modal-close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.cert-modal-close:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .certificates {
        padding: 4rem 0;
    }

    .trainer-certs-title {
        font-size: 2.2rem;
        margin-bottom: 0.5rem;
    }

    .trainer-certs-sub {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .trainer-cert-card {
        min-width: 260px;
        width: 260px;
    }

    .cert-modal-close {
        top: -40px;
        right: 0;
    }
}