:root {
    --brand-primary: #1E40AF;
    --brand-secondary: #10B981;
    --brand-accent: #F59E0B;
}

/* El foco de accesibilidad ahora es Ámbar (más visible y cálido) */
:focus { 
    outline: 3px solid var(--brand-accent) !important; 
    outline-offset: 3px; 
}

/* Personalizar los clusters del mapa para que sean verdes (positivos) */
.marker-cluster-small { background-color: rgba(16, 185, 129, 0.6); }
.marker-cluster-small div { background-color: rgba(16, 185, 129, 1); color: white; }

/* Scrollbar con el azul de la marca */
#chat-messages::-webkit-scrollbar-thumb {
    background-color: var(--brand-primary);
    border-radius: 10px;
}

/* Tarjetas estilo LinkedIn Premium */
.oferta-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.oferta-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

/* Efecto de entrada suave para la lista */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

ul[role="list"] li {
    animation: fadeInUp 0.5s ease backwards;
}

/* Scrollbar elegante */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.sr-only { 
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; 
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; 
}

/* Tipografía para dislexia */
.dyslexia-font { 
    font-family: 'Verdana', 'Comic Sans MS', sans-serif !important; 
    letter-spacing: 0.05em; 
    line-height: 1.8; 
}

/* Modo Alto Contraste */
/* --- MODO ALTO CONTRASTE CORREGIDO --- */

/* 1. Quitamos el filter del html/body porque rompe el position:fixed */
.high-contrast {
    background-color: #000 !important;
}

/* 2. Aplicamos colores pero evitamos que el filtro rompa el layout */
.high-contrast *:not(path):not(svg) {
    background-color: #000 !important;
    color: #ffff00 !important; /* Amarillo chillón clásico de accesibilidad */
    border-color: #ffff00 !important;
    background-image: none !important; /* Quitar degradados que oculten texto */
}

/* 3. BLINDAJE DE BOTONES FLOTANTES */
/* Forzamos que mantengan su posición fija y su nivel de capa (z-index) */
.high-contrast .cv-btn, 
.high-contrast .chat-btn {
    position: fixed !important;
    z-index: 9999 !important;
    border: 2px solid #ffff00 !important;
    background-color: #000 !important;
}

/* Aseguramos que el span interno (el que tiene el texto dinámico) no se mueva */
.high-contrast .cv-btn span,
.high-contrast .chat-btn span {
    color: #ffff00 !important;
}

/* 4. Ajuste para que el texto de los botones al hacer hover sea visible */
.high-contrast .cv-btn:hover span::after,
.high-contrast .chat-btn:hover span::after {
    color: #000 !important;
    background-color: #ffff00 !important;
}

/* --- MAPA LEAFLET --- */
#mapa-ofertas { 
    height: 400px; 
    width: 100%; 
    z-index: 1; 
}

/* Evitar que el mapa tape los desplegables o el header */
.leaflet-pane { z-index: 1 !important; }
.leaflet-top, .leaflet-bottom { z-index: 2 !important; }

/* --- COMPONENTES --- */

/* Pantalla de carga */
#loading-overlay.flex {
    display: flex;
}

/* Ajuste de scroll para el Chatbot */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}

/* Colores para las etiquetas de fuente (Dinámicos) */
.fuente-tecno { @apply bg-purple-100 text-purple-800 border-purple-200; }
.fuente-indeed { @apply bg-blue-100 text-blue-800 border-blue-200; }
.fuente-info { @apply bg-orange-100 text-orange-800 border-orange-200; }

/* --- MODO OSCURO (Nativo de Tailwind pero con ajustes) --- */
.dark .leaflet-layer,
.dark .leaflet-control-zoom-in,
.dark .leaflet-control-zoom-out,
.dark .leaflet-control-attribution {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

/* --- ESTILO BASE PARA BOTONES FLOTANTES QUE SE EXPANDEN --- */
.cv-btn, .chat-btn {
    width: 60px;
    height: 60px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alinea el icono al inicio */
    padding-left: 1rem; /* Espacio para que el icono no toque el borde al expandirse */
    position: fixed;
}

/* Pseudo-elemento común para el texto */
.cv-btn span::after, .chat-btn span::after {
    content: "";
    font-size: 0;
    opacity: 0;
    transition: opacity 0.2s ease, margin 0.3s ease;
    font-weight: bold;
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    vertical-align: middle;
}

/* --- LOGICA ESPECIFICA PARA CV --- */
.cv-btn:hover {
    width: 170px; /* Ancho suficiente para "Crear CV" */
    border-radius: 30px;
}
.cv-btn:hover span::after {
    content: " Crear CV";
    font-size: 1rem;
    opacity: 1;
    margin-left: 10px;
}

/* --- LOGICA ESPECIFICA PARA CHAT --- */
.chat-btn:hover {
    width: 190px; /* Un poco más ancho para "Asistente IA" */
    border-radius: 30px;
}
.chat-btn:hover span::after {
    content: " Asistente IA";
    font-size: 1rem;
    opacity: 1;
    margin-left: 10px;
}

/* Evitar efectos raros en móviles (donde no hay hover real) */
@media (max-width: 768px) {
    .cv-btn:hover, .chat-btn:hover {
        width: 60px;
    }
    .cv-btn:hover span::after, .chat-btn:hover span::after {
        content: "";
    }
}