/* Estilos para la sección de certificados - Sin carousel */

/* Estilos para filtros y grid de certificados */
.certificates-filter {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.filter-options {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(90deg, rgba(102, 51, 238, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    border-color: rgba(139, 92, 246, 0.4);
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(102, 51, 238, 0.2);
}

.certificates-counter {
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

#certificateCount {
    font-weight: 600;
    color: #8b5cf6;
}

.certificates-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.certificate-compact-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.certificate-compact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(102, 51, 238, 0.1), rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.certificate-compact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.2);
}

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

.certificate-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}

.certificate-category {
    font-size: 0.85rem;
    color: rgba(139, 92, 246, 0.9);
    background: rgba(139, 92, 246, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    position: relative;
    z-index: 1;
}

.certificate-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 1;
}

.certificate-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: white;
    position: relative;
    z-index: 1;
}

.certificate-issuer {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.certificate-actions {
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
}

.view-certificate {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.view-certificate:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: translateY(-3px);
    color: white;
}

.no-certificates-found {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: none;
}

.no-certificates-found i {
    font-size: 3rem;
    color: rgba(139, 92, 246, 0.7);
    margin-bottom: 1.5rem;
    display: block;
}

.no-certificates-found h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.no-certificates-found p {
    color: rgba(255, 255, 255, 0.7);
}

/* Estilos para el modal */
.certificate-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.certificate-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    position: relative;
    padding: 2rem;
    animation: modalIn 0.3s ease forwards;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: rotate(90deg);
}

.certificate-viewer {
    width: 100%;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.certificate-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center;
    transition: transform 0.3s ease;
}

.modal-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.zoom-control {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-control:hover {
    background: rgba(139, 92, 246, 0.3);
}

/* Animaciones */
@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.certificates-container .certificate-item {
    animation: fadeIn 0.5s ease forwards;
}

/* Clases para filtración de certificados */
.certificate-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.certificate-item[style*="display: none"] {
    opacity: 0;
    transform: scale(0.8);
}

.certificate-item[style*="display: block"] {
    opacity: 1;
    transform: scale(1);
}

/* Estilos para tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 10px);
}

/* Ajustes responsive */
@media (max-width: 992px) {
    .certificates-container {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .certificates-filter {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filter-options {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .filter-btn {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .certificates-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .certificate-compact-card {
        padding: 1.2rem;
    }
    
    .certificate-title {
        font-size: 1.1rem;
    }
    
    .certificate-issuer {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }
    
    .view-certificate {
        width: 36px;
        height: 36px;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    .certificate-viewer {
        height: 70vh;
    }
    
    .modal-controls {
        bottom: 1.5rem;
    }
    
    .zoom-control {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .certificate-compact-card {
        padding: 1rem;
    }
    
    .certificate-header {
        margin-bottom: 0.8rem;
    }
    
    .certificate-category, 
    .certificate-date {
        font-size: 0.8rem;
    }
    
    .certificate-title {
        font-size: 1rem;
    }
    
    .certificate-issuer {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .view-certificate {
        width: 32px;
        height: 32px;
    }
    
    .no-certificates-found {
        padding: 3rem 1.5rem;
    }
    
    .no-certificates-found i {
        font-size: 2.5rem;
    }
    
    .no-certificates-found h3 {
        font-size: 1.3rem;
    }
    
    .close-modal {
        top: 0.8rem;
        right: 0.8rem;
        width: 36px;
        height: 36px;
    }
    
    .zoom-control {
        width: 32px;
        height: 32px;
    }
}