/* Estilos generales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* Estilos para el encabezado */
header {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Estilos para la navegación */
.navbar-nav .nav-link {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: -1px;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link.active {
    color: #0d6efd;
    font-weight: 500;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0;
    height: 3px;
    background-color: #0d6efd;
    border-radius: 3px 3px 0 0;
}

/* Estilos para los cards */
.card {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
}

/* Estilos para los formularios */
.form-label.required::after {
    content: "*";
    color: #dc3545;
    margin-left: 4px;
}

.form-control:focus, 
.form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Campos inválidos */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Estilos para las alertas */
.alert {
    border-radius: 0.5rem;
}

/* Estilos para los botones */
.btn {
    border-radius: 0.3rem;
    padding: 0.5rem 1rem;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

/* Estilos para el progreso */
.progress {
    height: 0.75rem;
    border-radius: 0.5rem;
}

/* Estilos para las tablas */
.table {
    vertical-align: middle;
}

.table-responsive {
    border-radius: 0.3rem;
    overflow: hidden;
}

/* Estilos para la página de inicio */
.tool-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #0d6efd;
}

.home-section {
    padding: 3rem 0;
}

.home-section:nth-child(even) {
    background-color: #f8f9fa;
}

.home-header {
    background-image: linear-gradient(to right, #0d6efd, #0a58ca);
    padding: 3rem 0;
    color: white;
    margin-bottom: 2rem;
}

.feature-item {
    padding: 1.5rem;
    border-radius: 0.5rem;
    height: 100%;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Estilos para la lista de recomendaciones */
.list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.75rem 1.25rem;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Animaciones */
.fade-in {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Estilos para pantallas pequeñas */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
    }
}

/* Personalización de colores para etiquetas de calificación */
.qualification-id {
    background-color: #28a745;
    color: white;
}

.qualification-it {
    background-color: #007bff;
    color: white;
}

.qualification-potential {
    background-color: #ffc107;
    color: #343a40;
}

.qualification-not {
    background-color: #dc3545;
    color: white;
}

/* Estilos para el módulo de financiación */
.content-with-formatting h4 {
    color: #0d6efd;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-top: 1.5rem;
}

.content-with-formatting ol > li {
    margin-bottom: 1.5rem;
}

.content-with-formatting .d-flex {
    margin-bottom: 0.5rem;
}

.content-with-formatting .d-flex .fw-bold {
    color: #495057;
    min-width: 120px;
}

.content-with-formatting pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 1rem;
    margin: 1rem 0;
}

.content-with-formatting ul {
    margin-left: 1rem;
}

/* Tarjetas de programas de financiación */
.financing-program {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background-color: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.financing-program:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.financing-program h5 {
    color: #0d6efd;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.program-detail {
    display: flex;
    margin-bottom: 0.5rem;
}

.program-detail-label {
    font-weight: 600;
    width: 150px;
    color: #495057;
}

.program-detail-value {
    flex-grow: 1;
}

/* Tooltips informativos */
.info-tooltip {
    cursor: help;
    color: #0d6efd;
    transition: color 0.2s ease;
}

.info-tooltip:hover {
    color: #0a58ca;
}

/* Estilo para tooltips de Bootstrap */
.tooltip-inner {
    max-width: 300px;
    font-size: 0.9rem;
    line-height: 1.4;
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    text-align: left;
}
