/* ==========================================================================
   EstuTrabajo — Hoja de estilos principal
   Tema: Profesional (referencia: LinkedIn Jobs / Indeed)
   Ver DESIGN.md para el sistema de diseño completo.

   ÍNDICE
   01. Tokens
   02. Base
   03. Botones
   04. Encabezado y navegación
   05. Buscador principal
   06. Héroe
   07. Secciones y encabezados
   08. Tarjetas
   09. Estadísticas
   10. Chips de búsqueda frecuente
   11. Pasos
   12. Tarjeta de empleo
   13. Banda CTA
   14. Encabezado de página interior
   15. Panel de filtros
   16. Resultados y orden
   17. Formulario de perfil
   18. Vista previa
   19. Pie de página
   20. Badges
   21. Elementos inyectados por JS
   22. Animaciones de entrada
   23. Responsive
   24. Preferencias de movimiento
   ========================================================================== */


/* ==========================================================================
   01. TOKENS
   ========================================================================== */

:root {
  /* Superficies */
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --surface-alt: #FAFBFC;

  /* Marca */
  --primary: #0F7BFF;
  --primary-hover: #0E6FE6;
  --primary-light: rgba(15, 123, 255, 0.08);

  /* Estado */
  --success: #16A34A;
  --success-light: #DCFCE7;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;

  /* Texto */
  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --text-tertiary: #6B7280;
  --text-muted: #9CA3AF;

  /* Bordes */
  --border: #E5E7EB;
  --border-light: #F1F3F5;

  /* Radios */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 12px 32px -8px rgba(15, 23, 42, 0.16);

  /* Tipografía */
  --font-head: 'Baloo 2', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;

  /* Movimiento */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.15s;
  --dur-base: 0.2s;

  /* Layout */
  --header-h: 64px;
  --z-header: 100;
  --z-overlay: 90;
  --z-float: 150;
  --z-progress: 1000;
}

/* Tema oscuro */
[data-theme="dark"] {
  --bg: #0B1220;
  --surface: #151E2E;
  --surface-alt: #1B2536;

  --primary: #3B82F6;
  --primary-hover: #60A5FA;
  --primary-light: rgba(59, 130, 246, 0.16);

  --success: #22C55E;
  --success-light: #052E16;
  --warning: #FBBF24;
  --warning-light: #451A03;

  --text-primary: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-tertiary: #94A3B8;
  --text-muted: #64748B;

  --border: #2A3648;
  --border-light: #202B3C;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.40);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, 0.60);
}


/* ==========================================================================
   02. BASE
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text-primary);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Orbes decorativos de fondo */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

body::before {
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(15, 123, 255, 0.06) 0%, transparent 70%);
  animation: orb-float 22s ease-in-out infinite;
}

body::after {
  bottom: -15%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(15, 123, 255, 0.04) 0%, transparent 70%);
  animation: orb-float 28s ease-in-out infinite reverse;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -20px) scale(1.05); }
  66%      { transform: translate(-20px, 20px) scale(0.95); }
}

img { display: block; max-width: 100%; }

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}

a:hover { color: var(--primary); }

p { margin-top: 0; }

button {
  cursor: pointer;
  font-family: inherit;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

::selection {
  background: var(--primary);
  color: #FFFFFF;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

h1, h2, h3, h4 {
  margin-top: 0;
  color: var(--text-primary);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.contenedor {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
}

/* Enlace de salto al contenido */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -999;
}

.skip-link:focus {
  left: 50%;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  transform: translateX(-50%);
  box-shadow: var(--shadow-md);
  z-index: 200;
}


/* ==========================================================================
   03. BOTONES
   ========================================================================== */

.boton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background var(--dur-fast) ease,
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) ease,
              border-color var(--dur-fast) ease;
}

/* Onda expansiva al pulsar */
.boton::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.boton:active::after {
  width: 320px;
  height: 320px;
  transition: width 0.5s ease, height 0.5s ease;
}

.boton:hover {
  background: var(--primary-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.boton:active {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-xs);
}

.boton + .boton { margin-left: 8px; }

/* Variantes */
.boton-ghost,
.boton-limpiar {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}

.boton-ghost:hover,
.boton-limpiar:hover {
  background: var(--surface-alt);
  border-color: var(--primary);
}

.boton-exito {
  background: var(--success) !important;
  color: #FFFFFF !important;
}

.enlace {
  color: var(--primary);
  font-weight: 600;
}

.enlace:hover { text-decoration: underline; }


/* ==========================================================================
   04. ENCABEZADO Y NAVEGACIÓN
   ========================================================================== */

.encabezado {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur-fast) ease, background var(--dur-fast) ease;
}

/* Velo translúcido al hacer scroll (respeta el tema) */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .encabezado {
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    backdrop-filter: blur(14px) saturate(180%);
  }
}

.encabezado-scroll { box-shadow: var(--shadow-sm); }

.barra-superior {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
  padding: 8px 0;
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.marca i {
  color: var(--primary);
  font-size: 20px;
}

.menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}

/* Subrayado animado */
.menu a::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transform: translateX(-50%);
  transition: width var(--dur-base) ease;
}

.menu a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.menu a:hover::after { width: 55%; }

.menu a.activo {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
}

.menu a.activo:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.menu a.activo::after { display: none; }

/* Botón hamburguesa (inyectado por main.js) */
.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.menu-toggle:hover {
  background: var(--surface-alt);
  border-color: var(--primary);
}

.menu-toggle-bar {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform var(--dur-base) ease, opacity var(--dur-base) ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) { opacity: 0; }

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.no-scroll { overflow: hidden; }


/* ==========================================================================
   05. BUSCADOR PRINCIPAL
   ========================================================================== */

.busqueda-principal {
  padding: 20px 0;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.busqueda-principal form {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.campo-busqueda {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 8px 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.campo-busqueda:hover { border-color: rgba(15, 123, 255, 0.4); }

.campo-busqueda:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.campo-busqueda i {
  flex-shrink: 0;
  margin-right: 10px;
  color: var(--text-tertiary);
  font-size: 15px;
}

.campo-busqueda input,
.campo-busqueda select {
  flex: 1;
  min-width: 0;
  padding: 11px 10px 11px 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
}

.campo-busqueda input::placeholder { color: var(--text-muted); }
.campo-busqueda select { cursor: pointer; }
.campo-busqueda option { background: var(--surface); color: var(--text-primary); }


/* ==========================================================================
   06. HÉROE
   ========================================================================== */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
  padding: 56px 0 40px;
}

/* Velo con gradiente animado */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg,
              rgba(15, 123, 255, 0.04) 0%,
              transparent 45%,
              rgba(15, 123, 255, 0.03) 100%);
  background-size: 200% 200%;
  animation: gradient-shift 16s ease infinite;
  pointer-events: none;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

.hero-texto h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.resaltado { color: var(--primary); }

.hero-texto > p:not(.hero-nota):not(.hero-ctas) {
  max-width: 56ch;
  margin-bottom: 28px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}

.hero-nota {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text-tertiary);
  font-size: 14px;
}

.hero-nota i { color: var(--primary); }

.hero-visual { position: relative; }

.tarjeta-imagen {
  position: relative;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

/* Reflejo diagonal sobre la imagen */
.tarjeta-imagen::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: calc(var(--radius-lg) - 4px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, transparent 55%);
  pointer-events: none;
}

.tarjeta-imagen img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 4px);
}

.chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.chip-sol {
  top: 16px;
  left: 16px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text-primary);
}

.chip-rosa {
  bottom: 16px;
  right: 16px;
  border-color: transparent;
  background: var(--primary);
  color: #FFFFFF;
}


/* ==========================================================================
   07. SECCIONES Y ENCABEZADOS
   ========================================================================== */

.seccion { padding: 48px 0; }

.seccion-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.seccion-encabezado { margin-bottom: 32px; }

.seccion-encabezado h2 {
  margin-bottom: 8px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.seccion-encabezado p {
  max-width: 70ch;
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.etiqueta {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tarjetas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}


/* ==========================================================================
   08. TARJETAS
   ========================================================================== */

.tarjeta {
  position: relative;
  height: 100%;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) ease,
              border-color var(--dur-base) ease;
}

/* Barrido de luz al hacer hover */
.tarjeta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  pointer-events: none;
}

.tarjeta:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 123, 255, 0.3);
  box-shadow: var(--shadow-md);
}

.tarjeta:hover::after {
  left: 100%;
  transition: left 0.7s ease;
}

.tarjeta-panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}


/* ==========================================================================
   09. ESTADÍSTICAS
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 8px 0 32px;
}

.stat {
  padding: 20px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  text-align: center;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) ease;
}

.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat b {
  display: block;
  color: var(--text-primary);
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stat span {
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 500;
}


/* ==========================================================================
   10. CHIPS DE BÚSQUEDA FRECUENTE
   ========================================================================== */

.frecuentes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.frecuente {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) ease,
              border-color var(--dur-base) ease;
}

.frecuente::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  pointer-events: none;
}

.frecuente:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.frecuente:hover::after {
  left: 100%;
  transition: left 0.7s ease;
}

.frecuente b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.frecuente span {
  color: var(--text-tertiary);
  font-size: 13px;
}


/* ==========================================================================
   11. PASOS
   ========================================================================== */

.paso { transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) ease; }

.paso:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.paso .numero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.paso h3 {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
}

.paso p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ==========================================================================
   12. TARJETA DE EMPLEO
   ========================================================================== */

.empleo {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) ease,
              border-color var(--dur-base) ease;
}

.empleo[hidden] { display: none; }

.empleo::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  pointer-events: none;
}

.empleo:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 123, 255, 0.3);
  box-shadow: var(--shadow-md);
}

.empleo:hover::after {
  left: 100%;
  transition: left 0.7s ease;
}

.fecha {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--text-tertiary);
  font-size: 13px;
}

.titulo-empleo {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.titulo-empleo a { color: var(--text-primary); }
.titulo-empleo a:hover { color: var(--primary); }

.ubicacion {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.ubicacion i {
  color: var(--primary);
  font-size: 14px;
}

.empresa {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur-base) var(--ease-out);
}

.empresa:hover .avatar { transform: scale(1.1); }

.empresa strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.salario { margin: 0 0 10px; }

.salario strong {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.salario span {
  margin-left: 6px;
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 500;
}

.descripcion {
  margin: 0 0 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.etiquetas-trabajo {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
}

.tag {
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  transition: transform var(--dur-fast) ease;
}

.tag:hover { transform: scale(1.05); }

.tag-tipo {
  border-color: rgba(15, 123, 255, 0.18);
  background: var(--primary-light);
  color: var(--primary);
}

.tag-horario {
  border-color: var(--border);
  background: var(--surface-alt);
  color: var(--text-secondary);
}

.inscribirme {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  transition: background var(--dur-fast) ease,
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) ease;
}

.inscribirme:hover {
  background: var(--primary-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}


/* ==========================================================================
   13. BANDA CTA
   ========================================================================== */

.cta-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin: 48px 0 64px;
  padding: 40px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
}

/* Barrido de brillo continuo */
.cta-band::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  animation: shine 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shine {
  0%       { left: -100%; }
  50%, 100% { left: 100%; }
}

.cta-band h2 {
  margin-bottom: 6px;
  color: #FFFFFF;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.7;
}

.cta-band .boton {
  min-width: 180px;
  border-color: #FFFFFF;
  background: #FFFFFF;
  color: var(--primary);
}

.cta-band .boton:hover {
  background: #F8FAFF;
  color: var(--primary);
}


/* ==========================================================================
   14. ENCABEZADO DE PÁGINA INTERIOR
   ========================================================================== */

.titulo-pagina { padding: 32px 0 8px; }

.titulo-pagina h1 {
  margin-bottom: 6px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.titulo-pagina p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}


/* ==========================================================================
   15. PANEL DE FILTROS
   ========================================================================== */

.resultado-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: start;
  gap: 24px;
  padding: 24px 0 64px;
}

.panel-filtros {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.panel-filtros h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}

.grupo-filtro {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.grupo-filtro:last-of-type { border-bottom: none; }

.grupo-filtro label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.grupo-filtro select,
.grupo-filtro input {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.grupo-filtro select:hover,
.grupo-filtro input:hover { border-color: rgba(15, 123, 255, 0.4); }

.grupo-filtro select:focus,
.grupo-filtro input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.grupo-filtro option { background: var(--surface); color: var(--text-primary); }
.grupo-filtro input::placeholder { color: var(--text-muted); }

.panel-filtros .boton { width: 100%; margin-top: 16px; }

.lista-empleos { min-width: 0; }

.tarjetas-empleos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.sin-resultados {
  margin: 24px 0;
  padding: 48px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-secondary);
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.sin-resultados[hidden] { display: none; }


/* ==========================================================================
   16. RESULTADOS Y ORDEN
   ========================================================================== */

.resultado-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.resultados {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.resultados strong { color: var(--text-primary); font-weight: 700; }

.ordenar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text-tertiary);
  font-size: 14px;
}

.ordenar select {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.ordenar select:hover { border-color: var(--primary); }

.ordenar select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Botón "cargar más" */
.cargar-mas {
  display: block;
  margin: 24px auto 0;
  min-width: 220px;
}

.cargar-mas[hidden] { display: none; }


/* ==========================================================================
   17. FORMULARIO DE PERFIL
   ========================================================================== */

.formulario-seccion { padding: 24px 0 64px; }

.perfil-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
  gap: 24px;
}

.formulario {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.campo {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}

.campo label {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color var(--dur-fast) ease,
              box-shadow var(--dur-fast) ease,
              transform var(--dur-fast) ease;
}

.campo input:hover,
.campo select:hover,
.campo textarea:hover { border-color: rgba(15, 123, 255, 0.4); }

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  transform: translateY(-1px);
}

.campo input::placeholder,
.campo textarea::placeholder { color: var(--text-muted); }

/* Error de validación nativa */
.campo input:user-invalid {
  border-color: var(--warning);
  background: var(--warning-light);
}

.formulario-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.formulario-acciones .boton { flex: 1; min-width: 160px; }

.formulario-acciones .boton + .boton { margin-left: 0; }


/* ==========================================================================
   18. VISTA PREVIA
   ========================================================================== */

.vista-previa {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.vista-previa h3 {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 16px;
  font-weight: 700;
}

.avatar-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.avatar-preview i { font-size: 24px; }

.dato-vista {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.dato-vista:last-child { border-bottom: none; }

.dato-vista span {
  display: block;
  margin-bottom: 2px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dato-vista strong {
  display: block;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* Estado vacío: valor sin escribir */
.dato-vista strong:empty::before,
.dato-vista strong.vacio { color: var(--text-muted); }


/* ==========================================================================
   19. PIE DE PÁGINA
   ========================================================================== */

.pie-pagina {
  background: #0F172A;
  color: #E2E8F0;
}

.pie-contenido {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 48px 0 36px;
}

.pie-titulo {
  margin: 0 0 16px;
  color: #FFFFFF;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
}

.pie-titulo i {
  margin-right: 8px;
  color: #60A5FA;
}

.pie-marca p {
  max-width: 38ch;
  margin: 0;
  color: #CBD5E1;
  line-height: 1.7;
}

.pie-columna {
  display: grid;
  align-content: start;
  gap: 10px;
}

.pie-columna a {
  position: relative;
  width: fit-content;
  color: #E2E8F0;
  font-size: 14px;
}

.pie-columna a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #60A5FA;
  transition: width var(--dur-base) ease;
}

.pie-columna a:hover { color: #FFFFFF; }
.pie-columna a:hover::after { width: 100%; }

.pie-copy {
  margin: 0;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94A3B8;
  font-size: 13px;
  text-align: center;
}


/* Imagen de la oferta */
.empleo-imagen {
  position: relative;
  margin: -20px -24px 16px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--surface-alt);
}

.empleo-imagen img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}

.empleo:hover .empleo-imagen img { transform: scale(1.04); }

/* El badge "Nuevo" se superpone a la imagen */
.empleo-imagen .badge-nuevo,
.empleo-imagen .badge-destacado {
  position: absolute;
  top: 12px;
  right: 12px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   19b. HERRAMIENTAS: encaje, sueldo y carta
   ========================================================================== */

/* Panel de encaje horario.
   Va FUERA de .resultado-layout a propósito: si estuviera dentro del grid de
   dos columnas, el panel de filtros (sticky) se le montaría encima al hacer
   scroll, porque el encaje ocupa todo el ancho. */
.panel-encaje {
  margin: 0 0 18px;
}

.panel-encaje details {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.panel-encaje .encaje-resumen-icono {
  background: var(--primary);
  color: #FFFFFF;
}

.panel-encaje summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  transition: background var(--dur-fast) ease;
}

.panel-encaje summary::-webkit-details-marker { display: none; }

.panel-encaje summary:hover { background: var(--surface-alt); }

.encaje-resumen-icono {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 17px;
}

.encaje-resumen-texto { flex: 1; min-width: 0; }

.encaje-resumen-texto strong {
  display: block;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
}

.encaje-resumen-texto small {
  display: block;
  color: var(--text-tertiary);
  font-size: 13px;
}

.encaje-resumen-cuento {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
}

.encaje-flecha {
  flex-shrink: 0;
  color: var(--text-tertiary);
  transition: transform var(--dur-base) ease;
}

.panel-encaje details[open] .encaje-flecha { transform: rotate(180deg); }

.encaje-cuerpo {
  padding: 4px 20px 20px;
  border-top: 1px solid var(--border-light);
}

.encaje-instruccion {
  margin: 16px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.encaje-instruccion strong { color: var(--text-primary); }

/* Retícula 7 días × 3 franjas, hecha con grid */
.encaje-tabla {
  display: grid;
  grid-template-columns: 74px repeat(7, 1fr);
  gap: 6px;
  align-items: stretch;
}

.encaje-borde { display: none; }

.encaje-dia-cabecera {
  padding-bottom: 6px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.encaje-franja-nombre {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.encaje-franja-nombre small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}

.encaje-franja {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 14px;
  transition: all var(--dur-fast) ease;
}

.encaje-franja:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.encaje-franja.activo {
  border-color: var(--primary);
  background: var(--primary);
  color: #FFFFFF;
}

.encaje-pie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 0;
}

.encaje-vacio {
  color: var(--text-tertiary);
  font-size: 13px;
}

.enlace-boton {
  padding: 0;
  border: none;
  background: none;
  font-size: 13px;
  cursor: pointer;
}

/* Puntaje de encaje, sobre la imagen */
.puntaje-encaje {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.puntaje-encaje.alto {
  background: var(--success);
  color: #FFFFFF;
}

.puntaje-encaje.medio {
  background: var(--warning);
  color: #1F1300;
}

.puntaje-encaje.bajo {
  background: rgba(15, 23, 42, 0.72);
  color: #FFFFFF;
}

/* Puntaje de afinidad, junto a los tags */
.puntaje-afinidad {
  padding: 4px 10px;
  border: 1px dashed var(--primary);
  border-radius: var(--radius-pill);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

/* Fila de herramientas */
.herramientas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 20px;
}

.herramienta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  text-align: left;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) ease,
              border-color var(--dur-base) ease;
}

.herramienta:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.herramienta > i {
  flex-shrink: 0;
  color: var(--primary);
  font-size: 20px;
}

.herramienta span { min-width: 0; }

.herramienta strong {
  display: block;
  color: var(--text-primary);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

.herramienta small {
  display: block;
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

/* Simulador de sueldo */
.modal-panel-angosta { width: min(520px, 100%); }
.modal-panel-ancha { width: min(680px, 100%); }

.sueldo-contexto {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--primary-light);
  color: var(--text-secondary);
  font-size: 14px;
}

.sueldo-entrada-campos {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 12px;
  margin-bottom: 20px;
}

.sueldo-entrada-campos .campo { margin-bottom: 0; }

.sueldo-resultado:empty { display: none; }

.sueldo-vacio {
  margin: 0;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  text-align: center;
}

.sueldo-entrada {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 14px;
}

.sueldo-fila {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.sueldo-fila strong {
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
}

.sueldo-neto {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #FFFFFF;
}

.sueldo-neto span { font-size: 14px; }

.sueldo-neto strong {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sueldo-nota {
  margin: 12px 0 0;
  color: var(--text-tertiary);
  font-size: 13px;
}

.sueldo-descargo {
  display: flex;
  gap: 10px;
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.6;
}

.sueldo-descargo i {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--warning);
}

/* Generador de carta */
.carta-contexto {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--warning-light);
  color: var(--text-secondary);
  font-size: 13px;
}

.carta-aviso {
  margin: 12px 0 0;
  color: var(--success);
  font-size: 13px;
  font-weight: 600;
}

#carta-texto {
  min-height: 300px;
  border-radius: var(--radius-md);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
}


/* ==========================================================================
   20. BADGES
   ========================================================================== */

.badge-nuevo,
.badge-destacado {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-nuevo {
  background: var(--success);
  color: #FFFFFF;
  animation: pulse-badge 2.4s ease-in-out infinite;
}

.badge-destacado {
  background: var(--warning);
  color: #1F1300;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}


/* Modal de detalle de oferta */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal[hidden] { display: none; }

.modal-velo {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--dur-base) ease;
}

.modal.visible .modal-velo { opacity: 1; }

.modal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(620px, 100%);
  max-height: min(88vh, 900px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}

.modal.visible .modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-cabecera {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border-light);
}

.modal-empresa {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.modal-meta {
  margin: 0 0 2px;
  color: var(--text-tertiary);
  font-size: 13px;
}

.modal-titulo {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.modal-compania {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.modal-cerrar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-secondary);
  transition: background var(--dur-fast) ease,
              color var(--dur-fast) ease,
              border-color var(--dur-fast) ease;
}

.modal-cerrar:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.modal-imagen {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface-alt);
}

.modal-imagen img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.modal-cuerpo {
  flex: 1;
  padding: 20px 24px 24px;
  overflow-y: auto;
}

.modal-salario {
  margin: 0 0 14px;
}

.modal-salario strong {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal-salario span {
  margin-left: 6px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.modal-bloque { margin-top: 24px; }

.modal-bloque:first-of-type { margin-top: 20px; }

.modal-bloque h3 {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.modal-bloque p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.modal-lista {
  display: grid;
  gap: 8px;
  margin: 0;
}

.modal-lista li {
  position: relative;
  padding-left: 22px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.modal-lista li::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.modal-fecha { color: var(--text-tertiary) !important; }

.modal-pie {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--surface-alt);
}

.modal-pie .boton { min-width: 150px; }

.modal-pie-tres { flex-wrap: wrap; }

.modal-pie-tres .boton { flex: 1; min-width: 110px; }

/* AvisoEmergent */
.aviso {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 130;
  max-width: min(440px, calc(100% - 32px));
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--text-primary);
  color: var(--surface);
  font-size: 14px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity var(--dur-base) ease, transform var(--dur-base) var(--ease-out);
}

.aviso[hidden] { display: none; }

.aviso.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Sin JavaScript */
.sin-noscript {
  max-width: 1140px;
  margin: 16px auto 0;
  padding: 14px 18px;
  border: 1px solid var(--warning);
  border-radius: var(--radius-md);
  background: var(--warning-light);
  color: var(--text-primary);
  font-size: 14px;
  width: calc(100% - 32px);
}


/* ==========================================================================
   21. ELEMENTOS INYECTADOS POR JS
   ========================================================================== */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: var(--z-float);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur-base) ease,
              visibility var(--dur-base) ease,
              transform var(--dur-base) var(--ease-out),
              background var(--dur-fast) ease,
              color var(--dur-fast) ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: transparent;
  background: var(--primary);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.theme-toggle {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: var(--z-float);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  transition: background var(--dur-fast) ease,
              color var(--dur-fast) ease,
              transform var(--dur-fast) var(--ease-out);
}

.theme-toggle:hover {
  border-color: transparent;
  background: var(--primary);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-progress);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #60A5FA);
  transition: width 0.1s linear;
}

.particle {
  position: fixed;
  z-index: -1;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  pointer-events: none;
  animation: particle-float linear infinite;
}

@keyframes particle-float {
  0%        { transform: translateY(100vh); opacity: 0; }
  10%, 90%  { opacity: 0.25; }
  100%      { transform: translateY(-10vh); opacity: 0; }
}


/* ==========================================================================
   22. ANIMACIONES DE ENTRADA
   ========================================================================== */

.will-fade {
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.fade-in-up {
  opacity: 1;
  transform: translateY(0);
}


/* ==========================================================================
   23. RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 40px;
    text-align: center;
  }

  .hero-texto > p:not(.hero-nota):not(.hero-ctas) {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-ctas,
  .hero-nota { justify-content: center; }

  .hero-visual {
    max-width: 560px;
    margin: 0 auto;
  }

  .tarjeta-imagen img { height: 360px; }

  .stats,
  .tarjetas,
  .frecuentes { grid-template-columns: repeat(2, 1fr); }

  .resultado-layout { grid-template-columns: 1fr; }

  .panel-filtros,
  .vista-previa {
    position: static;
    top: auto;
  }

  .perfil-grid { grid-template-columns: 1fr; }

  .pie-contenido { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 760px) {
  .menu-toggle { display: flex; }

  .menu {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 24px;
    background: var(--surface);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.28s var(--ease-out), visibility 0.28s ease;
  }

  .menu.menu-abierto {
    transform: translateX(0);
    visibility: visible;
  }

  .menu a {
    padding: 12px 22px;
    font-size: 18px;
    font-weight: 600;
  }

  .menu a::after { display: none; }

  .barra-superior > .boton { display: none; }

  .busqueda-principal form { flex-direction: column; }

  .busqueda-principal .boton { width: 100%; }

  .hero { padding: 32px 0; }
  .tarjeta-imagen img { height: 280px; }

  .seccion { padding: 36px 0; }

  .stats,
  .tarjetas,
  .frecuentes { grid-template-columns: 1fr; }

  .pie-contenido {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 0 32px;
  }

  .formulario,
  .vista-previa { padding: 24px 20px; }

  .formulario-acciones .boton { min-width: 100%; }

  .cta-band {
    flex-direction: column;
    gap: 24px;
    padding: 32px 24px;
    text-align: center;
  }

  .cta-band .boton { width: 100%; min-width: 0; }

  .empleo { padding: 18px 20px; }

  .back-to-top,
  .theme-toggle {
    width: 42px;
    height: 42px;
  }

  .back-to-top { right: 16px; bottom: 16px; }
  .theme-toggle { left: 16px; bottom: 16px; }

  .modal { padding: 0; align-items: flex-end; }

  .modal-panel,
  .modal-panel-angosta,
  .modal-panel-ancha {
    width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .encaje-tabla { grid-template-columns: 56px repeat(7, 1fr); gap: 4px; }
  .encaje-franja { min-height: 36px; }
  .encaje-dia-cabecera { font-size: 11px; }
  .encaje-franja-nombre { font-size: 12px; }
  .encaje-franja-nombre small { font-size: 10px; }
  .encaje-resumen-texto small { display: none; }

  .herramientas { grid-template-columns: 1fr; }

  .sueldo-entrada-campos { grid-template-columns: 1fr; }

  .sueldo-neto { flex-direction: column; gap: 4px; }

  .modal-cabecera,
  .modal-cuerpo,
  .modal-pie { padding-right: 20px; padding-left: 20px; }

  .modal-pie { flex-direction: column-reverse; }

  .modal-pie .boton { width: 100%; min-width: 0; }

  .aviso { bottom: 16px; }
}

@media (max-width: 420px) {
  .contenedor { width: calc(100% - 24px); }

  .hero-texto h1 { font-size: 1.75rem; }

  .hero-ctas .boton { width: 100%; }

  .salario strong { font-size: 17px; }

  .inscribirme { width: 100%; justify-content: center; }
}


/* ==========================================================================
   24. PREFERENCIAS DE MOVIMIENTO
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .will-fade,
  .fade-in-up {
    opacity: 1 !important;
    transform: none !important;
  }

  .back-to-top,
  .theme-toggle {
    transform: none !important;
  }

  .back-to-top:hover,
  .theme-toggle:hover { transform: none !important; }

  .modal-panel,
  .modal-velo,
  .aviso {
    transition: none !important;
    transform: none !important;
  }

  .modal-panel { opacity: 1 !important; }
  .modal-velo { opacity: 1 !important; }
  .aviso { opacity: 1 !important; transform: translate(-50%, 0) !important; }

  .cta-band::before,
  .particle,
  body::before,
  body::after { animation: none !important; }
}

/* ==========================================================================
   BASE DE DATOS — Panel de acceso y avisos (Supabase)
   Añadido al final para no interferir con las reglas anteriores.
   Usa las mismas variables CSS que el resto del proyecto, así que el
   panel cambia de color solo con el modo claro/oscuro.
   ========================================================================== */

/* --- Contenedor del panel --- */

.panel-acceso {
  margin: 0 0 32px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-acceso[hidden] {
  display: none;
}

.panel-acceso-cabecera {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.panel-acceso-cabecera h2 {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* --- Mensajes de estado (éxito / error) --- */

.panel-acceso-cabecera p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

#acceso-mensaje:empty {
  display: none;
}

#acceso-mensaje[data-tipo='exito'] { color: var(--success); font-weight: 600; }
#acceso-mensaje[data-tipo='error'] { color: #DC2626; font-weight: 600; }

/* --- Formulario de acceso --- */

.acceso-formulario {
  display: grid;
  gap: 16px;
  max-width: 420px;
}

.acceso-formulario .formulario-acciones {
  margin-top: 4px;
}

.acceso-ayuda {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-tertiary);
}

/* --- Sesión iniciada --- */

.sesion-activa {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sesion-activa p {
  margin: 0;
  color: var(--text-secondary);
}

.sesion-activa strong {
  color: var(--text-primary);
}

/* --- Aviso del formulario de perfil --- */

.aviso-perfil {
  margin: 14px 0 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.aviso-perfil:empty {
  display: none;
}

.aviso-perfil[data-tipo='exito'] { color: var(--success); font-weight: 600; }
.aviso-perfil[data-tipo='error'] { color: #DC2626; font-weight: 600; }

/* --- Modo oscuro: colores más suaves para los errores --- */

[data-theme='dark'] #acceso-mensaje[data-tipo='error'],
[data-theme='dark'] .aviso-perfil[data-tipo='error'] {
  color: #F87171;
}

/* --- En móvil --- */

@media (max-width: 640px) {
  .panel-acceso {
    padding: 20px 16px;
  }

  .sesion-activa {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   POSTULACIONES — Lista de postulaciones y avisos
   ========================================================================== */

.mis-postulaciones-seccion[hidden] {
  display: none;
}

.mis-postulaciones-seccion h2 {
  margin: 0 0 6px;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

#postulaciones-mensaje {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

#postulaciones-mensaje:empty { display: none; }
#postulaciones-mensaje[data-tipo='exito'] { color: var(--success); font-weight: 600; }
#postulaciones-mensaje[data-tipo='error'] { color: #DC2626; font-weight: 600; }

.lista-postulaciones {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.postulacion {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-base) var(--ease-out);
}

.postulacion:hover {
  border-color: var(--primary);
}

.postulacion-imagen {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-alt);
}

.postulacion-cuerpo {
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.postulacion-cuerpo strong {
  font-size: 1rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.postulacion-empresa {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.postulacion-fecha {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.postulacion-estado {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.estado-enviada   { background: var(--primary-light);  color: var(--primary); }
.estado-revision  { background: rgba(245, 158, 11, 0.14); color: #B45309; }
.estado-aceptada  { background: var(--success-light); color: var(--success); }
.estado-rechazada { background: rgba(220, 38, 38, 0.10);  color: #DC2626; }

[data-theme='dark'] .estado-revision  { color: #FBBF24; }
[data-theme='dark'] .estado-rechazada { color: #F87171; }

.postulacion-vacia {
  padding: 22px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--text-secondary);
}

.postulacion-vacia a {
  color: var(--primary);
  font-weight: 600;
}

.boton-chico {
  padding: 8px 14px;
  font-size: 0.82rem;
  flex: 0 0 auto;
}

/* --- Botón Inscribirme ya postulado --- */

.inscribirme.postulado {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
}

/* --- Aviso flotante al postear --- */

.aviso-postular {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: var(--z-overlay);
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--text-primary);
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}

.aviso-postular.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.aviso-postular[data-tipo='error'] {
  background: #DC2626;
}

.aviso-postular[data-tipo='exito'] {
  background: var(--success);
}

/* --- En móvil --- */

@media (max-width: 640px) {
  .postulacion {
    flex-wrap: wrap;
  }

  .postulacion-estado {
    order: 3;
  }

  .boton-chico {
    order: 4;
    margin-left: auto;
  }
}