/* CERTIFICADOS.CSS - Estilos optimizados para producción */

/* Colores personalizados */
.bg-custom-primary { background-color: #EF3738 !important; }
.text-custom-primary { color: #EF3738 !important; }
.btn-custom-primary { background-color: #EF3738; border-color: #EF3738; color: white; }
.btn-custom-primary:hover { background-color: #B71C1C; border-color: #B71C1C; color: white; }
.btn-outline-custom-primary { border-color: #EF3738; color: #EF3738; }
.btn-outline-custom-primary:hover { background-color: #EF3738; color: white; }

/* Sección de búsqueda */
.search-section { background: #F9F9F9; border-radius: 5px; padding: 20px; }

/* Tarjetas de certificados */
.certificate-card { border: 1px solid #dee2e6; border-left: 4px solid #EF3738; margin-bottom: 10px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.certificate-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }

/* Contenedor del certificado para PDF - CRÍTICO */
.certificate-container { 
    position: fixed; 
    top: -10000px; 
    left: -10000px; 
    width: 1000px; 
    height: 700px; 
    background-color: white; 
    z-index: -1000; 
    font-family: 'Georgia', 'Times New Roman', 'Noto Serif', serif !important;
}
.certificate { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

/* Texto superpuesto en el certificado - CRÍTICO */
.text-overlay { 
    position: absolute; 
    width: 80%; 
    top: 55%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    text-align: center; 
    color: #000000 !important; 
    font-family: 'Georgia', 'Times New Roman', 'Noto Serif', serif !important;
    line-height: 1.5;
}
.text-overlay * {
    color: #000000 !important;
}
.name-text { 
    font-size: 26px; 
    font-weight: 700; 
    margin-bottom: 20px; 
    color: #000000 !important; 
}
.event-text { 
    font-style: italic; 
    font-size: 20px; 
    margin: 20px 0; 
    color: #000000 !important;
}
.hours-text { 
    font-size: 18px; 
    margin-top: 25px; 
    color: #000000 !important;
}

/* Sección QR */
.qr-section { 
    position: absolute; 
    bottom: 30px; 
    right: 30px; 
    text-align: center; 
    background: white; 
    padding: 10px; 
    border-radius: 5px; 
    border: 1px solid #ddd;
    font-family: 'Arial', sans-serif !important;
    color: #000000 !important;
}
.qr-text { 
    font-size: 12px; 
    margin-bottom: 5px; 
    font-weight: bold;
    color: #000000 !important;
}

/* PESTAÑAS DE BÚSQUEDA */
.search-tabs .nav-link { 
    color: #6c757d !important; 
    font-weight: 500; 
    border: none !important; 
    border-bottom: 3px solid transparent !important; 
    background-color: transparent !important; 
    transition: all 0.3s ease; 
    padding: 0.5rem 1rem; 
}
.search-tabs .nav-link.active { 
    color: white !important; 
    background-color: #EF3738 !important; 
    border-bottom: 3px solid #EF3738 !important; 
}

/* Reset específico para botones en pestañas */
button.nav-link { 
    background: transparent; 
    border: none; 
    outline: none; 
    cursor: pointer; 
}

/* Badges personalizados */
.badge.bg-custom-primary { background-color: #EF3738 !important; color: white !important; }

/* Secciones separadas */
.verificar-section { border-radius: 8px; border: 1px solid #dee2e6; }
.descargar-section { border-radius: 8px; border: 1px solid #EF3738; }

/* Estilos para botones de compartir */
.btn-share-linkedin {
    background-color: #0077b5;
    border-color: #0077b5;
    color: white;
}
.btn-share-linkedin:hover {
    background-color: #005885;
    border-color: #005885;
    color: white;
}

.share-link-container {
    background: #F9F9F9;
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
    display: none;
}

.share-link {
    font-size: 12px;
    word-break: break-all;
    color: #EF3738;
}

/* Grupo de botones vertical */
.btn-group-vertical .btn {
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .certificate-card .row { text-align: center; }
    .certificate-card .text-end { text-align: center !important; margin-top: 15px; }
    .search-section { padding: 15px; }
    .verificar-section, .descargar-section { padding: 15px !important; }
    
    .btn-group-vertical {
        width: 100%;
    }
    
    .certificate-container {
        width: 100vw;
        height: 70vh;
    }
}

/* Garantizar que las pestañas activas tengan siempre el color correcto */
.nav-tabs .nav-item .nav-link.active { 
    background-color: #EF3738 !important; 
    color: white !important; 
    border-color: #EF3738 !important; 
}

/* Mejoras de accesibilidad */
.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(239, 55, 56, 0.25);
}

/* Animaciones suaves */
.certificate-card, .btn {
    transition: all 0.3s ease;
}

/* FUENTES FORZADAS PARA CERTIFICADOS */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:wght@400;700&display=swap');

.certificate-container {
    font-family: "Georgia", "Times New Roman", "Noto Serif", serif !important;
}

.text-overlay {
    font-family: "Georgia", "Times New Roman", "Noto Serif", serif !important;
    font-weight: normal !important;
}

.name-text {
    font-family: "Georgia", "Times New Roman", "Noto Serif", serif !important;
    font-weight: 700 !important;
}

.event-text {
    font-family: "Georgia", "Times New Roman", "Noto Serif", serif !important;
    font-style: italic !important;
}

.hours-text {
    font-family: "Georgia", "Times New Roman", "Noto Serif", serif !important;
}

/* Preload fonts invisible */
.font-preloader {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    pointer-events: none;
}

.font-preloader div {
    font-family: "Georgia", serif;
    font-size: 26px;
    font-weight: 700;
}

.font-preloader .times {
    font-family: "Times New Roman", serif;
    font-size: 26px;
    font-weight: 700;
}

.font-preloader .noto {
    font-family: "Noto Serif", serif;
    font-size: 26px;
    font-weight: 700;
}