/* ============================================================
   EMPLEO INCLUSIVO — Design System v2.0
   Paleta accesible · Micro-animaciones · WCAG 2.1 AA
   ============================================================ */

:root {
    /* --- Paleta principal (WCAG AA en fondos claros) --- */
    --primary-color: #1e3a8a;         /* Azul índigo moderno */
    --primary-hover: #1e40af;
    --primary-light: #dbeafe;
    --secondary-color: #0f766e;       /* Teal profundo */
    --secondary-light: #ccfbf1;
    --accent-color: #f59e0b;          /* Ámbar cálido */
    --accent-light: #fef3c7;
    --success-color: #15803d;
    --danger-color: #b91c1c;
    --info-color: #0369a1;

    /* Bootstrap overrides */
    --bs-primary: #1e3a8a;
    --bs-primary-rgb: 30, 58, 138;

    /* --- Neutros --- */
    --text-dark: #0f172a;
    --text-body: #1e293b;
    --text-muted-accessible: #4b5563; /* ratio 7:1 sobre blanco ✅ */
    --bg-light: #f8fafc;
    --bg-subtle: #f1f5f9;
    --border-color: rgba(15, 23, 42, 0.08);

    /* --- Sombras --- */
    --shadow-xs:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm:  0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-md:  0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-lg:  0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-hover: 0 20px 40px rgba(30, 58, 138, 0.15);

    /* --- Radios --- */
    --radius-sm: 0.5rem;
    --radius-md: 0.875rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.75rem;
    --radius-pill: 50rem;

    /* --- Transiciones --- */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   BASE & LAYOUT
   ============================================================ */

html {
    min-height: 100vh;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #fafbfd;
    color: var(--text-body);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
}

/* ============================================================
   BOOTSTRAP OVERRIDES
   ============================================================ */

.text-primary { color: var(--primary-color) !important; }
.text-info    { color: var(--info-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger  { color: var(--danger-color) !important; }

.bg-primary {
    background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important;
}

/* ============================================================
   TIPOGRAFÍA ACCESIBLE (WCAG 1.4.4, 1.4.12)
   ============================================================ */

h1, h2, h3 {
    color: var(--text-dark);
    letter-spacing: -0.025em;
    line-height: 1.2;
    font-weight: 700;
}

h4, h5, h6 {
    color: var(--text-dark);
    letter-spacing: -0.01em;
    line-height: 1.4;
}

/* Excepciones para texto blanco en fondos oscuros */
.text-white h1, .text-white h2, .text-white h3, .text-white h4,
.hero-section h1, .hero-section h2, .hero-section h3, .hero-section h4,
footer h1, footer h2, footer h3, footer h4, footer p, footer small {
    color: white !important;
}

.text-muted {
    color: var(--text-muted-accessible) !important;
}

/* Tamaños mínimos (WCAG 1.4.4) */
.small, small { font-size: 1rem !important; line-height: 1.6; }
.x-small      { font-size: 0.9375rem !important; font-weight: 700 !important; }
.text-muted.small { font-size: 1rem !important; color: var(--text-muted-accessible) !important; }

/* Campos de formulario con área táctil mínima de 44px (WCAG 2.5.5); el texto a 16px evita además
   que iOS haga zoom automático al tocar el campo. */
.form-control:not(textarea):not([type="file"]):not(.form-control-sm),
.form-select:not([multiple]):not([size]):not(.form-select-sm) {
    min-height: 44px;
    font-size: 1rem;
}
.form-control[type="file"] { min-height: 44px; line-height: 1.9; }

p, li {
    line-height: 1.75;
    margin-bottom: 0.5em;
}

.lead {
    font-size: 1.125rem !important;
    line-height: 1.8 !important;
    color: var(--text-body);
}

/* ============================================================
   NAVBAR — Refinada y con identidad de marca
   ============================================================ */

header {
    position: relative;
    z-index: 1040;
}

.navbar {
    padding-top: 0;
    padding-bottom: 0;
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow var(--transition-base), background-color var(--transition-base);
    position: relative;
    z-index: 1040;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md) !important;
    background-color: rgba(255, 255, 255, 0.98) !important;
}

/* Dropdown SIEMPRE sobre cualquier contenido de página */
.navbar .dropdown-menu {
    z-index: 9999 !important;
}

.navbar-brand {
    letter-spacing: -0.5px;
    font-weight: 800;
    color: var(--primary-color) !important;
    padding: 0.75rem 0;
    transition: opacity var(--transition-fast);
}

.navbar-brand:hover { opacity: 0.85; }

.navbar-brand img {
    transition: transform var(--transition-base);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar .nav-link {
    color: var(--text-body) !important;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.75rem 0.875rem !important;
    min-height: 48px;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
    position: relative;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 0.875rem;
    right: 0.875rem;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.navbar .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: var(--primary-light);
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    transform: scaleX(1);
}

.navbar .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 700;
    background-color: var(--primary-light);
}

/* Nav link danger (Apoyar) */
.navbar .nav-link.text-danger { color: #b91c1c !important; }
.navbar .nav-link.text-danger:hover { background-color: #fee2e2; }
.navbar .nav-link.text-danger::after { background-color: #b91c1c; }

/* Nav link primary (Publicar) */
.navbar .nav-link.text-primary {
    color: var(--primary-color) !important;
    font-weight: 700;
}
.navbar .nav-link.text-primary:hover { background-color: var(--primary-light); }

/* Botón hamburguesa (WCAG 2.5.5) */
.navbar-toggler {
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color) !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.navbar-toggler:hover { border-color: var(--primary-color) !important; background-color: var(--primary-light); }

/* Dropdown */
.dropdown-menu {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0.5rem !important;
    animation: dropdownIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-item {
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast), color var(--transition-fast);
    font-size: 0.9375rem;
}
.dropdown-item:hover { background-color: var(--primary-light); }

/* ============================================================
   BOTONES (WCAG 2.5.5 — target mínimo 48px)
   ============================================================ */

.btn {
    transition: all var(--transition-base);
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

/* Ripple effect sutil */
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition-fast); pointer-events: none !important;
}
.btn:active::before { opacity: 1; }

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    box-shadow: 0 1px 3px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3) !important;
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    border-width: 2px !important;
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.2) !important;
}

.btn-warning {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--text-dark) !important;
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover, .btn-warning:focus {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35) !important;
}

.btn-light {
    background-color: rgba(255,255,255,0.9) !important;
    border-color: rgba(255,255,255,0.2) !important;
}
.btn-light:hover {
    background-color: white !important;
    transform: translateY(-2px);
}

.btn-success {
    color: white !important;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
}

/* ============================================================
   HERO SECTION — Moderno e impactante
   ============================================================ */

.hero-section {
    background: linear-gradient(135deg, #0f1f5c 0%, #1e3a8a 35%, #0f766e 100%) !important;
    color: white !important;
    border: none;
    position: relative;
    /* Sin z-index: no crea stacking context propio que interfiera con el navbar */
    overflow: hidden;
}

/* Orbes decorativos animados */
.hero-section::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroOrb 8s ease-in-out infinite alternate;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroOrb 10s ease-in-out infinite alternate-reverse;
    pointer-events: none;
}

@keyframes heroOrb {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, -20px) scale(1.05); }
}

/* Grid animado de fondo */
.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Animaciones de entrada del hero. Sin "opacity: 0" de base: el fill-mode "both"
   oculta durante el retraso y, si la animación no corre, el texto queda visible. */
.hero-animate-up {
    animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-animate-up:nth-child(1) { animation-delay: 0.1s; }
.hero-animate-up:nth-child(2) { animation-delay: 0.2s; }
.hero-animate-up:nth-child(3) { animation-delay: 0.3s; }
.hero-animate-up:nth-child(4) { animation-delay: 0.4s; }
.hero-animate-up:nth-child(5) { animation-delay: 0.5s; }

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

.hero-animate-right {
    animation: slideRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}
@keyframes slideRight {
    from { opacity: 0; transform: translateX(32px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Buscador hero */
.hero-search-container {
    border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.97) !important;
    backdrop-filter: blur(8px);
    transition: all var(--transition-base);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15) !important;
}

.hero-search-container:hover,
.hero-search-container:focus-within {
    border-color: var(--accent-color) !important;
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.25), 0 0 0 4px rgba(245,158,11,0.1) !important;
    transform: translateY(-2px);
}

.hero-search-container select.form-select:focus {
    border-radius: var(--radius-pill) !important;
    background-color: #fffbeb !important;
}

@media (max-width: 767.98px) {
    .hero-search-container {
        border-radius: var(--radius-lg) !important;
        padding: 0.75rem !important;
    }
}

/* Tags/badges del hero */
.hero-badge {
    background: rgba(255,255,255,0.12) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    backdrop-filter: blur(4px);
    transition: all var(--transition-fast);
}

.hero-badge:hover {
    background: rgba(255,255,255,0.2) !important;
    transform: translateY(-2px);
}

/* Cards laterales del hero */
.hero-value-card {
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition-base);
}

.hero-value-card:hover {
    background: rgba(255,255,255,0.14) !important;
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.15);
}

/* ============================================================
   CARDS DE EMPLEO — Premium
   ============================================================ */

.card {
    border: 1px solid var(--border-color) !important;
}

.card-hover {
    transition: all var(--transition-base);
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover) !important;
    border-color: rgba(30, 58, 138, 0.12) !important;
}

/* Card de empleo premium */
.job-card {
    background: white;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    transition: all var(--transition-base);
    overflow: hidden;
    position: relative;
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.job-card:hover::before {
    opacity: 1;
}

.job-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover) !important;
    border-color: rgba(30, 58, 138, 0.15) !important;
}

/* Logo de empresa */
.job-card-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background-color: white;
    padding: 2px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border-color);
}

.job-card-logo-placeholder {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-weight: 800;
    color: white;
    font-size: 1.3rem;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Empresa sin logo: un cuadro sobrio (ícono de edificio si es confidencial, inicial si no).
   Antes cada tarjeta mostraba una letra sobre un color al azar y tres avisos se veían con la misma "C". */
.job-card-logo-neutro {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background-color: #eef2f7;
    border: 1px solid var(--border-color);
    color: #475569;
    font-size: 1.25rem;
}

.job-card-logo-inicial {
    background-color: #e8edf8;
    color: var(--primary-color);
    font-weight: 800;
}

.job-card .min-w-0 {
    min-width: 0;
}

.job-card-titulo {
    font-size: 1.1875rem;
    line-height: 1.3;
    color: var(--text-dark);
    overflow-wrap: anywhere;
}

/* Datos de la oferta: una línea por dato, sin cortar el texto con puntos suspensivos */
.job-card-datos li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-muted-accessible);
    margin-bottom: 0.3rem;
}

.job-card-datos li > i {
    flex-shrink: 0;
    width: 1.1rem;
    margin-top: 0.1rem;
}

html.a11y-high-contrast .job-card-logo-neutro {
    background-color: #000000;
    color: #fde047;
    border-color: #fde047;
}

/* Imagen de tarjeta */
.job-card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    object-position: center;
}

/* Gradientes placeholder empresa */
.company-placeholder-1 { background: linear-gradient(135deg, #1e3a8a 0%, #3b5bdb 100%); }
.company-placeholder-2 { background: linear-gradient(135deg, #065f46 0%, #0f766e 100%); }
.company-placeholder-3 { background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 100%); }
.company-placeholder-4 { background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%); }
.company-placeholder-5 { background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 100%); }

.company-placeholder {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Badges */
.badge {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    padding: 0.35em 0.75em !important;
}

/* Badge con dot animado para "Urgente" */
.badge-urgente {
    animation: pulse-badge 2s ease-in-out infinite;
}
@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.4); }
    50%       { box-shadow: 0 0 0 5px rgba(185, 28, 28, 0); }
}

/* Card texto */
.card-text {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-body);
}

/* ============================================================
   SECCIONES & LAYOUT
   ============================================================ */

.rounded-4  { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }

/* Gradiente de fondo global */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

/* Backdrop blur */
.backdrop-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Scroll horizontal */
.horizontal-scroll-container {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f4f8;
    padding-bottom: 15px;
}
.horizontal-scroll-container::-webkit-scrollbar { height: 6px; }
.horizontal-scroll-container::-webkit-scrollbar-track { background: #f0f4f8; border-radius: 10px; }
.horizontal-scroll-container::-webkit-scrollbar-thumb { background-color: var(--primary-color); border-radius: 10px; border: 2px solid #f0f4f8; }

/* ============================================================
   FOOTER — Completo y con identidad
   ============================================================ */

footer {
    width: 100%;
    background: linear-gradient(135deg, #0f1f5c 0%, var(--primary-color) 60%, #0f766e 100%) !important;
    color: rgba(255,255,255,0.85);
    padding: 3rem 0 2rem;
}

/* Contraste AA sobre todo el degradado (el extremo verde azulado #0f766e es el más exigente): texto casi
   blanco y opaco. Los selectores llevan "footer" + clase para ganarle a ".text-muted.small" (gris, !important),
   que antes dejaba los enlaces en gris sobre azul oscuro (~2:1). */
footer a,
footer a.text-muted,
footer a.text-muted.small {
    color: #f8fafc !important;
    text-decoration: underline;
    text-decoration-color: rgba(248, 250, 252, 0.5);
    text-underline-offset: 3px;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}
footer a:hover,
footer a:focus-visible {
    color: #ffffff !important;
    text-decoration-color: #fbbf24;
}
footer a.btn { text-decoration: none; }

footer .text-muted,
footer .text-muted.small,
footer small.text-muted {
    color: #e2e8f0 !important;
}

/* Enlaces del pie con área táctil de 44px en el celular */
@media (max-width: 767.98px) {
    footer .d-flex > a:not(.btn) {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* ============================================================
   UTILIDADES
   ============================================================ */

.py-2\.5 {
    padding-top: 0.625rem !important;
    padding-bottom: 0.625rem !important;
}

.z-1 { z-index: 1; }
.z-2 { z-index: 2; }

.opacity-10 { opacity: 0.1 !important; }
.opacity-85 { opacity: 0.85; }

.mt-lg-n5 { margin-top: 0; }
@media (min-width: 992px) {
    .mt-lg-n5 { margin-top: -3rem !important; }
}

/* Animación de entrada para secciones.
   Visibles por defecto: solo se ocultan cuando el script de _Layout confirma que el
   IntersectionObserver está activo (agrega html.js-anim). Si el JS falla o no corre,
   la página se ve completa. */
.section-fade-in {
    opacity: 1;
    transform: none;
}
html.js-anim .section-fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
html.js-anim .section-fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Aviso promocional de plataforma (_AvisosPlataforma): franja delgada teal, una línea en
   escritorio y como máximo dos en el celular, subordinada al hero de la página. */
.aviso-franja {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 0.75rem;
    padding: 0 0.25rem 0 1rem;
    margin-bottom: 0.75rem;
    min-height: 44px;
}
.aviso-franja-texto {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1rem;
    line-height: 1.35;
    padding: 0.4rem 0;
}
.aviso-franja-texto strong { font-weight: 600; }
.aviso-franja-texto a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}
.aviso-franja-texto a:hover { text-decoration-thickness: 2px; }
.aviso-franja-texto a:focus-visible,
.aviso-franja-cerrar:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
    border-radius: 4px;
}
.aviso-franja-cerrar {
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    color: #fff;
    border-radius: 50%;
}
.aviso-franja-cerrar:hover { background: rgba(255, 255, 255, 0.15); }
.a11y-high-contrast .aviso-franja { background: #000; border: 2px solid #fff; }

/* Contador animado */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.03em;
}

/* ============================================================
   ACCESIBILIDAD (WCAG 2.1)
   ============================================================ */

/* WCAG 2.4.7 + 2.4.11 — Focus rings */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #0f172a !important; /* contraste >= 3:1 sobre fondos claros */
    outline-offset: 3px;
    border-radius: 4px;
    box-shadow: 0 0 0 6px var(--accent-color) !important; /* halo ambar: visible tambien sobre fondos oscuros */
}

.hero-section select.form-select:focus {
    border-radius: var(--radius-pill) !important;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.3) !important;
}

/* WCAG 2.4.1 — Skip to content */
.visually-hidden-focusable:focus {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 9999 !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    background: var(--accent-color) !important;
    color: var(--text-dark) !important;
    border-radius: 0 0 8px 0 !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

/* Tarjetas de accesibilidad (WCAG 1.4.3 Contraste Mínimo >= 4.5:1) */
.accessibility-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xs);
}
.accessibility-card.active {
    background: #f0fdf4;
    border-color: #86efac;
    box-shadow: 0 4px 8px rgba(21, 128, 61, 0.08);
}
.accessibility-card.active i {
    color: var(--success-color);
    font-size: 1.75rem;
    background: #dcfce7;
    padding: 8px;
    border-radius: 12px;
}
.accessibility-card.inactive {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
}
.accessibility-card.inactive i {
    color: var(--text-muted-accessible);
    font-size: 1.5rem;
    background: #e2e8f0;
    padding: 8px;
    border-radius: 12px;
}
.accessibility-card-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--primary-color);
}
.accessibility-card.inactive .accessibility-card-title {
    color: var(--text-body);
}
.accessibility-card-status {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* WCAG 1.4.10 — Reflow y soporte para Zoom 200%-400% y Alto Contraste */
@media (max-height: 520px) {
    .navbar.sticky-top,
    aside.sticky-top,
    .card.sticky-top {
        position: static !important;
    }
    .mobile-sticky-cta {
        position: fixed !important;
        padding: 0.4rem 0.75rem calc(0.4rem + env(safe-area-inset-bottom, 0px)) 0.75rem !important;
    }
}

@media (forced-colors: active) {
    .hero-section h1 span {
        -webkit-text-fill-color: currentColor !important;
        background: none !important;
    }
}

/* ============================================================
   PREFERENCIA DE MOVIMIENTO REDUCIDO (WCAG 2.3.3)
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .hero-section::before,
    .hero-section::after,
    .section-fade-in,
    html.js-anim .section-fade-in,
    .hero-animate-up,
    .hero-animate-right {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .card-hover:hover,
    .job-card:hover,
    .btn:hover {
        transform: none !important;
    }
}

/* ============================================================
   RESPONSIVE MOBILE (< 768px)
   ============================================================ */

@media (max-width: 767.98px) {

    /* Hero: reducir tamaño del heading y padding */
    .hero-section {
        border-radius: 0.75rem !important;
        padding: 2rem 1.25rem !important;
    }

    .hero-section h1.display-4 {
        font-size: 2rem !important;
        letter-spacing: -0.02em;
    }

    .hero-section .fs-5 {
        font-size: 1rem !important;
    }

    /* Ocultar grid bg en mobile para rendimiento */
    .hero-grid-bg { display: none; }

    /* Buscador: apilado verticalmente, bordes redondeados */
    [id="filterForm"] {
        flex-direction: column;
    }

    [id="filterForm"] > div {
        width: 100% !important;
        padding: 0.25rem 0.5rem !important;
    }

    /* Ocultar separador vertical en mobile */
    [id="filterForm"] .col-auto { display: none !important; }

    /* Buscador: bordes redondeados grandes en mobile */
    .hero-animate-up > div[style*="border-radius: 50rem"] {
        border-radius: 1.25rem !important;
        padding: 0.75rem 1rem !important;
    }

    /* Botón buscar: ancho completo en mobile */
    [id="filterForm"] button[type="submit"] {
        width: 100% !important;
        justify-content: center;
        margin-top: 0.25rem;
        border-radius: 0.75rem !important;
    }

    /* CTAs: columna en mobile */
    .hero-section .d-flex.flex-wrap.align-items-center.gap-3 {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .hero-section .d-flex.flex-wrap.align-items-center.gap-3 > a,
    .hero-section .d-flex.flex-wrap.align-items-center.gap-3 > div > a {
        width: 100% !important;
        justify-content: center;
    }

    /* Badge: texto más pequeño en mobile */
    .hero-section [style*="background: #f59e0b"] span:last-child {
        font-size: 0.875rem !important;
    }

    /* Navbar: padding reducido en mobile */
    .navbar-brand span { font-size: 1rem; }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section h1.display-4 {
        font-size: 2.5rem !important;
    }
}
/* ============================================================
   FIX CHROME: DROPDOWN SIN TRANSFORM PERMANENTE
   ============================================================ */

/* Animamos solo opacidad para no romper las coordenadas en Chrome */
.dropdown-menu {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0.5rem !important;
    animation: dropdownIn 0.15s ease-out forwards;
}

@keyframes dropdownIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Aseguramos z-index absoluto y sobre el hero */
.navbar .dropdown-menu {
    z-index: 10000 !important;
}

header[role="banner"] {
    position: relative;
    z-index: 1050 !important;
}

article header,
.post-content header {
    position: static !important;
    z-index: 1 !important;
}

.hero-section {
    position: relative;
    z-index: 1 !important;
}
/* --- UTILIDADES NUEVAS (Home) --- */
.bg-gradient-dark { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important; }
.bg-gradient-b2b { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important; }
.bg-gradient-community { background: linear-gradient(135deg, #fbfcfe 0%, #f4f7fd 100%) !important; }
.border-left-primary { border-left: 5px solid var(--primary-color) !important; }

/* Scroll snap para móviles */
.mobile-scroll-snap {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.mobile-scroll-snap::-webkit-scrollbar {
    display: none;
}
.mobile-scroll-snap > div {
    scroll-snap-align: center;
}

/* Sticky Bottom Bar Mobile */
.mobile-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px)) 1rem;
    z-index: 1045;
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid var(--border-color);
    pointer-events: auto;
}

.mobile-sticky-cta a,
.mobile-sticky-cta button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.mobile-sticky-cta a *,
.mobile-sticky-cta button * {
    pointer-events: none;
}

@media (max-width: 991.98px) {
    body:not(.nav-menu-open) {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }
    /* Formularios y asistentes no muestran la barra inferior fija (ver esPaginaDeTarea en _Layout) */
    body.sin-cta-movil:not(.nav-menu-open) {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

@media (min-width: 992px) {
    .mobile-sticky-cta {
        display: none !important;
    }
}

/* Ficha de una oferta en el celular: "Postular" siempre a la vista (ver Detalle.cshtml) */
.detalle-postular-fijo {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px)) 1rem;
    z-index: 1045;
}

.detalle-postular-fijo .btn {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.0625rem;
}

body.nav-menu-open .detalle-postular-fijo,
body.modal-open .detalle-postular-fijo {
    display: none !important;
}

@media (max-width: 991.98px) {
    body.con-barra-postular:not(.nav-menu-open) {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }
}

html.a11y-high-contrast .detalle-postular-fijo {
    background-color: #000000 !important;
    border-top: 2px solid #fde047 !important;
}

/* Al llegar desde la barra fija, "¿Cómo postular?" no queda pegado al borde */
#como-postular {
    scroll-margin-top: 5rem;
}
/* ============================================================
   RESPONSIVE NAVBAR & USER MOBILE DRAWER
   ============================================================ */

#mainNav {
    z-index: 1055 !important;
}

body.nav-menu-open .mobile-sticky-cta {
    display: none !important;
}

/* Menú de escritorio en pantallas de notebook (992–1599px): los 8 elementos medían ~1.315px y la página
   se desbordaba hacia el lado, dejando "Crear cuenta" fuera de la vista. Se compactan (sin íconos, menos
   espacio) y, si aun así no caben, pasan a una segunda línea en vez de desbordarse (flex-wrap solo
   parte la línea cuando hace falta). */
@media (min-width: 992px) and (max-width: 1599.98px) {
    #mainMenu {
        flex-wrap: wrap;
        row-gap: 0.25rem;
    }
    #mainMenu > .navbar-nav { flex-wrap: wrap; }
    #mainMenu > .navbar-nav.ms-auto { margin-left: auto; padding-bottom: 0.25rem; }
    #mainNav .navbar-brand { margin-right: 0.75rem !important; }
    #mainMenu .navbar-nav { gap: 0.25rem !important; }
    #mainMenu .navbar-nav .nav-link {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    #mainMenu .navbar-nav .nav-link > i:not(.bi-chevron-down),
    #mainMenu .navbar-nav .btn > i {
        display: none;
    }
}

@media (max-width: 991.98px) {
    #mainMenu.collapse,
    #mainMenu.collapsing {
        max-height: calc(100dvh - 65px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: 0.5rem;
        padding-bottom: 2.5rem;
    }

    .user-mobile-card,
    .guest-mobile-card {
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        border: 1px solid rgba(30, 58, 138, 0.12) !important;
    }

    .user-mobile-card .user-avatar-circle {
        background-color: var(--primary-color) !important;
    }

    .user-mobile-card .nav-link {
        font-size: 0.92rem;
        background-color: #ffffff;
        border: 1px solid rgba(15, 23, 42, 0.05);
        transition: all 0.15s ease;
    }

    .user-mobile-card .nav-link:active,
    .user-mobile-card .nav-link:hover {
        background-color: #e2e8f0;
        transform: translateX(2px);
    }
}

/* Ocultar resúmenes y mensajes de validación ASP.NET Core cuando no hay errores */
.validation-summary-valid,
.field-validation-valid {
    display: none !important;
}

/* ============================================================
   HERRAMIENTAS DE ACCESIBILIDAD WCAG 2.1 AA / AAA
   ============================================================ */

html.a11y-font-lg {
    font-size: 112.5% !important; /* 18px base */
}

html.a11y-font-xl {
    font-size: 125% !important;   /* 20px base */
}

/* Navegación por teclado y resaltado de enlaces */
html.a11y-focus-links a:not(.btn) {
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    font-weight: 600 !important;
}

html.a11y-focus-links *:focus,
html.a11y-focus-links *:focus-visible {
    outline: 3px solid #f59e0b !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 5px rgba(15, 23, 42, 0.35) !important;
}

/* Modo Alto Contraste (WCAG AAA) */
html.a11y-high-contrast body {
    background-color: #0b0f19 !important;
    color: #ffffff !important;
}

html.a11y-high-contrast .card,
html.a11y-high-contrast .bg-white,
html.a11y-high-contrast .bg-light,
html.a11y-high-contrast .navbar,
html.a11y-high-contrast footer,
html.a11y-high-contrast .modal-content,
html.a11y-high-contrast .dropdown-menu {
    background-color: #111827 !important;
    color: #ffffff !important;
    border: 1px solid #fbbf24 !important;
}

html.a11y-high-contrast h1,
html.a11y-high-contrast h2,
html.a11y-high-contrast h3,
html.a11y-high-contrast h4,
html.a11y-high-contrast h5,
html.a11y-high-contrast h6,
html.a11y-high-contrast .text-dark,
html.a11y-high-contrast .text-secondary,
html.a11y-high-contrast .text-muted,
html.a11y-high-contrast label,
html.a11y-high-contrast p,
html.a11y-high-contrast li,
html.a11y-high-contrast .nav-link {
    color: #ffffff !important;
}

html.a11y-high-contrast a:not(.btn),
html.a11y-high-contrast .text-primary {
    color: #fde047 !important;
}

html.a11y-high-contrast .form-control,
html.a11y-high-contrast .form-select {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #fde047 !important;
}

/* El botón del menú (hamburguesa) quedaba gris oscuro sobre fondo oscuro: casi invisible justo en el
   control principal de navegación del celular. */
html.a11y-high-contrast .navbar-toggler {
    border: 2px solid #fde047 !important;
    background-color: #000000 !important;
}
html.a11y-high-contrast .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23fde047' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* La barra inferior del celular seguía blanca en alto contraste */
html.a11y-high-contrast .mobile-sticky-cta {
    background-color: #000000 !important;
    border-top: 2px solid #fde047 !important;
}
html.a11y-high-contrast .mobile-sticky-cta .btn-outline-primary {
    background-color: #000000 !important;
    color: #fde047 !important;
    border: 2px solid #fde047 !important;
}

/* Barra superior de Accesibilidad y Soporte */
.a11y-topbar {
    background-color: #0f172a;
    color: #f8fafc;
    font-size: 0.9375rem;
    line-height: 1.4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    z-index: 1045;
    position: relative;
}

.a11y-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 50rem;
    min-height: 2.75rem;
    min-width: 2.75rem;
    padding: 0.35rem 0.875rem;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: all 0.15s ease;
    cursor: pointer;
}

.a11y-btn:hover,
.a11y-btn:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    border-color: #fbbf24;
    color: #ffffff;
}

.a11y-btn[aria-pressed="true"] {
    background: #fbbf24;
    color: #0f172a;
    border-color: #fbbf24;
    font-weight: 700;
}

/* Texto mínimo de 16px en la barra (antes 14.4px) */
.a11y-topbar,
.a11y-btn {
    font-size: 1rem;
}

/* Celular: las herramientas de accesibilidad se pliegan tras el botón "Accesibilidad" (id btnA11yToggle)
   para no ocupar la primera pantalla. Se abren en una fila completa debajo. */
@media (max-width: 767.98px) {
    .a11y-herramientas {
        order: 3;
        width: 100%;
    }
    .a11y-herramientas:not(.abierto) {
        display: none !important;
    }
    #btnA11yToggle[aria-expanded="true"] .a11y-toggle-icono {
        transform: rotate(180deg);
    }
}
/* ============================================================
   ESTILOS DE IMPRESIÓN GLOBALES (WCAG AA / A4 / PDF)
   ============================================================ */
@media print {
    header,
    footer,
    nav,
    .navbar,
    .no-print,
    .accessibility-toolbar,
    .btn,
    #accessibility-controls,
    .alert,
    #sidebar,
    .sidebar,
    #avisos-plataforma-container,
    .avisos-plataforma-wrapper,
    .aviso-item,
    .aviso-cta-btn,
    .aviso-close-btn,
    .breadcrumb,
    #editorSeccion {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Evitar que el navegador o Bootstrap impriman la URL detrás de los enlaces */
    a[href]:after,
    a:after {
        content: "" !important;
        display: none !important;
    }
}

/* ============================================================
   HERO v2 - Buscador principal + accesos compactos. WCAG 2.2 AA
   ============================================================ */
.hero-section.hero-v2 {
    background: #0f1f5c !important;
    padding: 2.5rem 1.25rem 2.75rem !important;
}
.hero-section.hero-v2::before,
.hero-section.hero-v2::after { display: none; }

.hero-v2__inner { max-width: 920px; margin: 0 auto; position: relative; z-index: 1; }

.hero-section.hero-v2 .hero-v2__title {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
    font-weight: 800;
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
    color: #fff !important;
}
.hero-section.hero-v2 .hero-v2__subtitle-highlight {
    display: block;
    color: #fbbf24 !important;
    font-size: clamp(1.35rem, 3.2vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
    margin-top: 0.35rem;
}
.hero-v2__sub {
    font-size: 1.1875rem;
    line-height: 1.55;
    margin: 0 0 1.75rem;
    max-width: 68ch;
    color: #fff;
}

.hero-v2__search {
    background: #fff;
    color: #0f172a;
    border-radius: 1rem;
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.hero-section.hero-v2 .hero-v2__search .hero-v2__search-title {
    color: #0f172a !important;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 800;
}
.hero-v2__field { display: grid; gap: 0.375rem; min-width: 0; }
.hero-v2__label { font-weight: 700; font-size: 1rem; color: #0f172a; }
.hero-v2__control {
    width: 100%;
    min-height: 3.25rem;
    padding: 0.5rem 0.875rem;
    font-size: 1.125rem;
    color: #0f172a;
    background-color: #fff;
    border: 2px solid #475569;
    border-radius: 0.625rem;
}
.hero-v2__select {
    min-width: 220px;
    padding-right: 2rem;
    text-overflow: ellipsis;
}
.hero-v2__control::placeholder { color: #4b5563; opacity: 1; }

.hero-v2__submit {
    min-height: 3.25rem;
    border: 0;
    border-radius: 0.75rem;
    padding: 0 1.5rem;
    background: #f59e0b;
    color: #0f172a;
    font-size: 1.1875rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    cursor: pointer;
}
.hero-v2__submit:hover { background: #d97706; }

.hero-v2__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.hero-v2__chips-label { width: 100%; font-size: 1rem; font-weight: 600; color: #4b5563; }
.hero-section.hero-v2 .hero-v2__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.375rem 1rem;
    border: 2px solid #1e3a8a;
    border-radius: 999px;
    background: #fff;
    color: #1e3a8a !important;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
}
.hero-section.hero-v2 .hero-v2__chip:hover { background: #dbeafe; }

/* Accesos compactos en fila debajo del buscador */
.hero-v2__actions {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.hero-section.hero-v2 .hero-v2__action-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    min-height: 4.5rem;
    border-radius: 0.875rem;
    background: #0f172a;
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.25);
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.hero-section.hero-v2 .hero-v2__action-card--simulador {
    border-left: 6px solid #fbbf24;
}
.hero-section.hero-v2 .hero-v2__action-card--empresa {
    border-left: 6px solid #22c55e;
}
.hero-section.hero-v2 .hero-v2__action-card:hover {
    background: #1e293b;
    border-color: #fbbf24;
}
.hero-v2__action-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.625rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.35rem;
    background: rgba(255, 255, 255, 0.12);
    color: #fbbf24;
}
.hero-v2__action-card--empresa .hero-v2__action-icon {
    color: #4ade80;
}
.hero-v2__action-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}
.hero-v2__action-title {
    font-weight: 800;
    font-size: 1.0625rem;
    line-height: 1.3;
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.hero-v2__action-desc {
    font-size: 0.95rem;
    line-height: 1.45;
    color: #f1f5f9;
}

/* Foco visible: anillo oscuro + halo ambar (contraste >= 3:1 en ambos fondos) */
.hero-v2__control:focus-visible,
.hero-v2__submit:focus-visible,
.hero-section.hero-v2 .hero-v2__chip:focus-visible,
.hero-section.hero-v2 .hero-v2__action-card:focus-visible {
    outline: 3px solid #0f172a;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px #f59e0b;
}

@media (min-width: 768px) {
    .hero-v2__search { grid-template-columns: minmax(0, 1.1fr) minmax(230px, 1.15fr) auto; align-items: end; }
    .hero-v2__search-title,
    .hero-v2__chips { grid-column: 1 / -1; }
    .hero-v2__actions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767.98px) {
    .hero-v2__select { min-width: 0; }
    .hero-v2__search { padding: 1.125rem; }
}

/* Compatibilidad con modo Alto Contraste (WCAG AAA) */
html.a11y-high-contrast .hero-section.hero-v2 {
    background: #000000 !important;
    border: 2px solid #fde047 !important;
}
html.a11y-high-contrast .hero-v2__search {
    background: #111827 !important;
    color: #ffffff !important;
    border: 2px solid #fde047 !important;
}
html.a11y-high-contrast .hero-section.hero-v2 .hero-v2__search .hero-v2__search-title,
html.a11y-high-contrast .hero-v2__label,
html.a11y-high-contrast .hero-v2__chips-label {
    color: #ffffff !important;
}
html.a11y-high-contrast .hero-v2__control {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #fde047 !important;
}
html.a11y-high-contrast .hero-v2__control::placeholder {
    color: #e2e8f0 !important;
}
html.a11y-high-contrast .hero-section.hero-v2 .hero-v2__chip {
    background: #000000 !important;
    color: #fde047 !important;
    border: 2px solid #fde047 !important;
}
html.a11y-high-contrast .hero-section.hero-v2 .hero-v2__action-card {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #fde047 !important;
}
html.a11y-high-contrast .hero-v2__action-title {
    color: #fde047 !important;
}

@media (forced-colors: active) {
    .hero-v2__control, .hero-v2__submit, .hero-section.hero-v2 .hero-v2__chip, .hero-section.hero-v2 .hero-v2__action-card { border: 2px solid ButtonText; }
}

/* ============================================================
   ACCESIBILIDAD TRANSVERSAL (WCAG 2.2: 2.4.11 / 2.5.8)
   ============================================================ */

/* El foco nunca queda oculto tras la navbar sticky ni la barra movil inferior */
html {
    scroll-padding-top: 6rem;
    scroll-padding-bottom: 6rem;
}

/* Destino del skip link: sin anillo al recibir foco programatico */
main:focus { outline: none; }

/* Enlaces de texto de accion: area tactil minima de 44px */
main a.small.fw-bold.text-decoration-none {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
}

/* ============================================================
   HOME v2 - Bloque "Que necesitas hoy?" (tarjetas con detalle opcional)
   ============================================================ */
.ei-tools { margin-block: 4rem; }
.ei-tools__head { max-width: 65ch; margin: 0 auto 1.75rem; text-align: center; }
.ei-tools__title { font-size: 1.75rem; line-height: 1.2; margin: 0 0 0.5rem; font-weight: 700; }
.ei-tools__lead { font-size: 1.125rem; margin: 0; color: #4b5563; }

.ei-tools__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .ei-tools__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767.98px) {
    .ei-tools { margin-block: 3rem; }
    .ei-tools__grid { gap: 1rem; }
}

.ei-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: #fff;
    color: #0f172a;
    border: 2px solid #cbd5e1;
    border-left: 6px solid #1e3a8a;
    border-radius: 1rem;
}
.ei-tile__icon { font-size: 2rem; color: #1e3a8a; line-height: 1; }
.ei-tile__title { font-size: 1.25rem; line-height: 1.3; margin: 0; font-weight: 700; }
.ei-tile__text { font-size: 1.125rem; line-height: 1.6; margin: 0; max-width: 60ch; }

/* Toda la tarjeta es clicable con UN solo enlace (un unico tab stop) */
.ei-tile__link { color: inherit !important; text-decoration: none; }
.ei-tile__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ei-tile__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.ei-tile__link:focus-visible { outline: none !important; box-shadow: none !important; }
.ei-tile__link:focus-visible::after {
    outline: 3px solid #0f172a;
    outline-offset: 2px;
    box-shadow: 0 0 0 6px #f59e0b;
}

/* Detalle opcional: por encima del enlace extendido */
.ei-tile__more { position: relative; z-index: 1; margin-top: auto; padding-top: 0.5rem; }
.ei-tile__more > summary {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    font-weight: 700;
    font-size: 1.0625rem;
    color: #1e3a8a;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ei-tile__more > summary:focus-visible { box-shadow: 0 0 0 6px #f59e0b !important; }
.ei-tile__more p { margin: 0.5rem 0 0; font-size: 1.0625rem; line-height: 1.6; }

/* Variante empresas: fondo oscuro + etiqueta (no solo color) */
.ei-tile--empresa { background: #0f172a; color: #fff; border-color: #0f172a; border-left-color: #f59e0b; }
.ei-tile--empresa .ei-tile__icon { color: #fbbf24; }
.ei-tile--empresa .ei-tile__more > summary { color: #fbbf24; }
.ei-tile--empresa .ei-tile__link:focus-visible::after { outline-color: #fff; }
.ei-tile__tag {
    align-self: flex-start;
    background: #f59e0b;
    color: #0f172a;
    font-weight: 800;
    font-size: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

@media (prefers-reduced-motion: no-preference) {
    .ei-tile { transition: box-shadow 0.15s ease, transform 0.15s ease; }
    .ei-tile:hover { box-shadow: 0 6px 20px rgba(15, 23, 42, 0.15); transform: translateY(-2px); }
}
@media (forced-colors: active) {
    .ei-tile { border: 2px solid CanvasText; }
    .ei-tile__link:focus-visible::after { outline: 3px solid Highlight; }
}


/* ============================================================
   SIMULADOR DE ENTREVISTAS UX v2 (WCAG 2.2 AA / AAA)
   ============================================================ */
.sim-hero {
    background: linear-gradient(135deg, #0d1a70 0%, #1e3a8a 60%, #1d4ed8 100%);
    color: #ffffff;
}

.sim-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
}

.sim-control {
    min-height: 3.25rem;
    font-size: 1.0625rem;
    color: #0f172a;
    background-color: #ffffff !important;
    border: 2px solid #475569 !important;
    border-radius: 0.625rem;
}

.sim-control::placeholder {
    color: #4b5563;
    opacity: 1;
}

.sim-control:focus-visible {
    outline: 3px solid #0f172a;
    outline-offset: 2px;
    border-color: #1e3a8a !important;
    box-shadow: 0 0 0 5px #f59e0b !important;
}

.sim-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.35rem 0.9rem;
    border: 2px solid #1e3a8a;
    border-radius: 999px;
    background: #ffffff;
    color: #1e3a8a;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sim-chip:hover {
    background: #dbeafe;
}

.sim-chip[aria-pressed="true"] {
    background: #1e3a8a;
    color: #ffffff;
}

.sim-chip:focus-visible {
    outline: 3px solid #0f172a;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #f59e0b;
}

.sim-option-card {
    border: 2px solid #94a3b8;
    border-radius: 0.875rem;
    background-color: #f8fafc;
    padding: 1rem 1.125rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.sim-option-card:hover {
    border-color: #1e3a8a;
    background-color: #f1f5f9;
}

.sim-option-card:has(input:checked),
.sim-option-card.is-selected {
    border-color: #1e3a8a !important;
    background-color: #eff6ff !important;
    box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.2);
}

.sim-option-card:has(input:focus-visible) {
    outline: 3px solid #0f172a;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #f59e0b !important;
}

.sim-option-card .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #475569;
    flex-shrink: 0;
}

.sim-option-card .form-check-input:checked {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
}

/* Alto contraste para el Simulador */
html.a11y-high-contrast .sim-hero {
    background: #000000 !important;
    border: 2px solid #fde047 !important;
}

html.a11y-high-contrast .sim-pill {
    background: #000000 !important;
    color: #fde047 !important;
    border: 1.5px solid #fde047 !important;
}

html.a11y-high-contrast .sim-chip {
    background: #000000 !important;
    color: #fde047 !important;
    border: 2px solid #fde047 !important;
}

html.a11y-high-contrast .sim-chip[aria-pressed="true"] {
    background: #fde047 !important;
    color: #000000 !important;
}

html.a11y-high-contrast .sim-option-card {
    background: #111827 !important;
    color: #ffffff !important;
    border: 2px solid #94a3b8 !important;
}

html.a11y-high-contrast .sim-option-card:has(input:checked),
html.a11y-high-contrast .sim-option-card.is-selected {
    background: #000000 !important;
    border: 3px solid #fde047 !important;
}
