/* Certificate Cards */
.certificate-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    color: #fff;
    margin: 15px 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(0, 255, 238, 0.1);
    backdrop-filter: blur(15px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.certificate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--main-color), #7b2cbf);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s ease;
}

.certificate-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(0, 255, 238, 0.3);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 255, 238, 0.1);
}

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

.certificate-card img {
    max-width: 100%;
    max-height: 180px;
    margin-bottom: 20px;
    object-fit: contain;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.certificate-card img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 255, 238, 0.1);
}

.certificate-card h5 {
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
    color: var(--main-color);
    line-height: 1.4;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Libre Baskerville', serif;
}

.certificate-card .badge-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    flex-grow: 1;
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 20px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    font-family: "Fira Mono", monospace;
}

.certificate-card .btn {
    margin-top: auto;
    background: rgba(0, 255, 238, 0.1);
    color: var(--main-color);
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(0, 255, 238, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-family: "Fira Mono", monospace;
}

.certificate-card .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 255, 238, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.certificate-card .btn:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 238, 0.5);
    background: rgba(0, 255, 238, 0.15);
    box-shadow: 0 6px 20px rgba(0, 255, 238, 0.2);
    color: #fff;
}

.certificate-card .btn:hover::before {
    opacity: 1;
}

#more-certificates-btn, #show-less-btn {
    background: rgba(0, 255, 238, 0.1);
    color: var(--main-color);
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    width: fit-content;
    border: 1px solid rgba(0, 255, 238, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-family: "Fira Mono", monospace;
}

#more-certificates-btn::before, #show-less-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 255, 238, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#more-certificates-btn:hover, #show-less-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 238, 0.5);
    background: rgba(0, 255, 238, 0.15);
    box-shadow: 0 6px 20px rgba(0, 255, 238, 0.2);
    color: #fff;
}

#more-certificates-btn:hover::before, #show-less-btn:hover::before {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .certificate-card {
        padding: 20px;
        margin: 10px 0;
    }

    .certificate-card img {
        max-height: 150px;
    }

    .certificate-card h5 {
        font-size: 16px;
        min-height: 40px;
    }

    .certificate-card .badge-info {
        font-size: 13px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

@media (max-width: 576px) {
    .certificate-card {
        padding: 15px;
    }

    .certificate-card img {
        max-height: 120px;
    }

    .certificate-card h5 {
        font-size: 15px;
        min-height: 35px;
    }
}