/* ================================================================== */
/*                      ESTILOS GLOBALES DEL TEMA                     */
/* ================================================================== */

/* --- Fondo de Pantalla y Texto Principal --- */
body {
    font-family: Arial, sans-serif;
    padding-top: 70px;
    background-image: linear-gradient(rgba(13, 44, 84, 0.85), rgba(13, 44, 84, 0.85)), url('../img/fondo1.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    color: #f8f9fa !important; /* Color de texto principal claro */
}

/* --- Barra de Navegación --- */
.navbar {
    background-color: rgba(13, 44, 84, 0.9) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand, .nav-link {
    color: #ffffff !important;
}

.nav-link:hover {
    color: #d1d1d1 !important;
}

.navbar-logo {
    height: 40px;
    width: auto;
}

.dropdown-menu {
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.dropdown-item {
    color: #0d2c54 !important;
}

.dropdown-item:hover {
    background-color: #0d2c54 !important;
    color: #ffffff !important;
}

/* --- Contenedores y Secciones Principales --- */
main.container, .container-fluid {
    background-color: transparent !important;
    box-shadow: none !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
}

.border-bottom {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.text-muted {
    color: #d1d1d1 !important;
}

/* --- Tarjetas (Cards) --- */
.card {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #f8f9fa !important;
}

.card-header {
    background-color: rgba(13, 44, 84, 0.7) !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* --- Listas --- */
.list-group-item {
    background-color: transparent !important;
    color: #f0f0f0 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.list-group-item-action:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* --- Tablas --- */
.table {
    background-color: rgba(0, 0, 0, 0.2) !important;
    color: #f8f9fa !important;
}

.table th, .table td {
    background-color: transparent !important;
    color: #f8f9fa !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.table thead th {
    background-color: rgba(13, 44, 84, 0.7) !important;
    color: #ffffff !important;
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.table tbody tr:hover td {
    color: #ffffff !important;
}

/* --- Formularios --- */
.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #212529 !important;
    border: 1px solid #ced4da !important;
}

label {
    color: #f8f9fa !important;
}

/* --- Bloques de Código (para Documentación) --- */
code {
    background-color: rgba(0, 0, 0, 0.5) !important;
    color: #f8f9fa !important;
    padding: .2rem .4rem;
    border-radius: .25rem;
}

pre {
    background-color: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #f8f9fa !important;
    padding: 1rem;
    border-radius: .25rem;
}

pre code {
    background-color: transparent !important;
}


/* --- Botones --- */
.btn-primary {
    background-color: #0d2c54 !important;
    border-color: #0d2c54 !important;
}

.btn-primary:hover {
    background-color: #1a5ca1 !important;
    border-color: #1a5ca1 !important;
}

/* --- Paginación --- */
.pagination .page-link {
    color: #0d2c54 !important;
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
}

.pagination .page-item.active .page-link {
    color: #ffffff !important;
    background-color: #0d2c54 !important;
    border-color: #0a2240 !important;
}

.pagination .page-link:hover {
    color: #ffffff !important;
    background-color: #1a5ca1 !important;
    border-color: #175291 !important;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d !important;
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

/* --- Enlaces generales --- */
a {
    color: #87ceeb !important;
}

a:hover {
    color: #ffffff !important;
}

/* --- Estilos para el Mapa Estratégico --- */
.mapa-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 20px;
}

.mapa-columns {
    display: flex;
    flex-direction: row;
    gap: 20px;
    min-width: fit-content;
}

.mapa-area-column {
    width: 300px;
    flex-shrink: 0;
}

.objetivo-card {
    background-color: rgba(255, 255, 255, 0.1) !important; /* Fondo claro semi-transparente */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    color: #ffffff !important;
}

.indicadores-list {
    list-style: none;
    padding-left: 15px;
    margin-top: 5px;
    font-size: 0.85em;
    color: #d1d1d1 !important; /* Gris claro para los indicadores */
}

/* --- Estilos para el Mapa de Relaciones --- */
.mapa-wrapper-relaciones {
    width: 100%;
    overflow-x: auto;
    padding: 20px 10px;
    background-color: rgba(0, 0, 0, 0.2) !important; /* Fondo oscuro semi-transparente */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px;
}

.mapa-perspectivas-container {
    display: flex;
    flex-direction: row;
    gap: 30px;
    min-width: fit-content;
}

.perspectiva-columna {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.perspectiva-header {
    text-align: center;
    padding: 10px;
    background-color: rgba(13, 44, 84, 0.8) !important; /* Azul corporativo semi-transparente */
    color: white !important;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nivel-seccion {
    background-color: rgba(0, 0, 0, 0.2) !important; /* Fondo oscuro semi-transparente */
    border-radius: 5px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.nivel-header {
    color: #87ceeb !important; /* Azul cielo para que resalte */
    border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.objetivo-card-rel {
    background-color: rgba(13, 44, 84, 0.5) !important; /* Azul corporativo más sutil */
    border: 1px solid rgba(13, 44, 84, 0.9) !important;
    color: #ffffff !important;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 0.9em;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.objetivo-card-rel:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: rgba(13, 44, 84, 0.7) !important;
}

/* --- Estilos para la Jerarquía Organizacional --- */
.org-tree, .puesto-list {
    list-style-type: none;
    padding-left: 0;
}

.org-tree ul {
    padding-left: 25px;
    margin-left: 10px;
    border-left: 1px dashed rgba(255, 255, 255, 0.3) !important;
}

.org-tree > li {
    background-color: rgba(0, 0, 0, 0.2) !important;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.puesto-list {
    padding-left: 35px;
}

.puesto-item {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

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

.puesto-item span, .area-item span {
    color: #f8f9fa !important;
}

/* ================================================================== */
/*                  ESTILOS PARA EL ASISTENTE DE VOZ                  */
/* ================================================================== */

.voice-assistant-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1050; /* Asegura que esté sobre otros elementos */
}

.voice-assistant-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0d2c54;
    color: white;
    border: 2px solid white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.voice-assistant-btn:hover {
    background-color: #1a5ca1;
    transform: scale(1.1);
}

.voice-assistant-btn.listening {
    background-color: #dc3545; /* Rojo para indicar que está escuchando */
    animation: pulse 1.5s infinite;
}

.voice-status-indicator {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    display: none; /* Oculto por defecto */
    transition: opacity 0.3s;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}
