/* ============================================================
   mejoras.css — componentes nuevos para usajobsapoyoyeducacion.com
   (se carga DESPUÉS de styles.css)
   ============================================================ */

/* --- Barra de aviso de no afiliación (debajo del header) --- */
.aviso-no-afiliacion {
  background: #fff8e1;
  border-bottom: 1px solid #f0e0a8;
  color: #6b5900;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  padding: 10px 20px;
}
.aviso-no-afiliacion strong { color: #5a4a00; }
.aviso-no-afiliacion a { color: #0056b3; }

/* --- Migas de pan (breadcrumbs) --- */
.breadcrumbs {
  max-width: 1100px;
  margin: 18px auto 0;
  padding: 0 20px;
  font-size: 13px;
  color: #667;
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.breadcrumbs li { display: flex; align-items: center; gap: 6px; }
.breadcrumbs li:not(:last-child)::after {
  content: "›";
  color: #aab;
}
.breadcrumbs a { color: #0056b3; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: #556; }

/* --- Layout con barra lateral --- */
.layout-con-sidebar {
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}
.layout-con-sidebar .contenido-principal { min-width: 0; }

.sidebar { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 24px; }

.sidebar-bloque {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 22px;
}
.sidebar-bloque h3 {
  font-size: 16px;
  color: #003366;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e6e9ef;
}
.sidebar-bloque ul { list-style: none; margin: 0; padding: 0; }
.sidebar-bloque li { margin-bottom: 10px; line-height: 1.45; }
.sidebar-bloque li:last-child { margin-bottom: 0; }
.sidebar-bloque a {
  color: #2b3a55;
  text-decoration: none;
  font-size: 14px;
}
.sidebar-bloque a:hover { color: #0056b3; text-decoration: underline; }
.sidebar-bloque .externo::after { content: " ↗"; color: #90a0b8; font-size: 12px; }

.sidebar-aviso {
  background: #f1f4f8;
  border-left: 4px solid #0056b3;
  font-size: 13px;
  color: #4a5568;
  line-height: 1.6;
  padding: 16px 18px;
  border-radius: 0 8px 8px 0;
}

/* --- Caja editorial honesta (reemplaza autores ficticios) --- */
.caja-editorial {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #0056b3;
  border-radius: 0 10px 10px 0;
  padding: 26px 28px;
  margin: 45px 0;
}
.caja-editorial h2 { margin: 0 0 12px; color: #003366; font-size: 21px; }
.caja-editorial p { color: #40506a; font-size: 15px; line-height: 1.7; margin-bottom: 12px; }
.caja-editorial p:last-child { margin-bottom: 0; }
.caja-editorial .firma { font-size: 13.5px; color: #718096; font-style: italic; }

/* --- Rejilla de guías esenciales --- */
.guias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 20px;
}
.guia-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.guia-card .etiqueta {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #0056b3;
  margin-bottom: 10px;
}
.guia-card h3 { font-size: 18px; color: #1a202c; margin: 0 0 10px; line-height: 1.35; }
.guia-card p { font-size: 14.5px; color: #55617a; line-height: 1.6; flex-grow: 1; margin-bottom: 16px; }
.guia-card a.btn-leer { align-self: flex-start; margin-top: auto; }

/* --- Enlace de preferencias de cookies en el footer --- */
.footer-links button.link-como-enlace {
  background: none;
  border: none;
  color: #adb5bd;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}
.footer-links button.link-como-enlace:hover { color: #fff; text-decoration: underline; }

/* --- Nota "no es asesoría legal" dentro de artículos --- */
.nota-legal {
  background: #fdf2f2;
  border: 1px solid #f5c6c6;
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 14px;
  color: #7a2e2e;
  line-height: 1.6;
  margin: 24px 0;
}

/* --- Responsivo --- */
@media (max-width: 900px) {
  .layout-con-sidebar {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .sidebar { position: static; top: auto; }
}


/* ============================================================
   Rediseño octubre 2026: marca, imágenes, tarjetas, herramientas
   ============================================================ */

/* --- Marca --- */
.logo-img { height: 46px; width: 46px; }
.logo-text.marca { font-size: 19px; font-weight: 800; color: #0b2f57; letter-spacing: -0.3px; line-height: 1.1; display: flex; flex-direction: column; }
.logo-text.marca small { font-size: 12px; font-weight: 600; color: #5b6b82; letter-spacing: 0.2px; margin-top: 3px; }
.main-nav a { white-space: nowrap; }

/* --- Cabecera de artículo --- */
.categoria-art { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.titulo-art { color: #1a202c; font-size: 31px; line-height: 1.25; margin: 8px 0 14px; }
.meta-art { color: #718096; font-size: 14px; margin-bottom: 22px; }
.meta-art a, .meta-info a { color: #0056b3; }
.hero-art { margin: 0 0 24px; }
.hero-art img { display: block; width: 100%; height: auto; border-radius: 10px; }
.cuerpo-articulo h3 { color: #1a202c; font-size: 19px; margin: 26px 0 10px; }
.cuerpo-articulo ol { margin: 0 0 20px 22px; }
.cuerpo-articulo ol li { margin-bottom: 10px; color: #444; }
.cuerpo-articulo a { color: #0056b3; }
.gris { color: #7a8699; font-size: 13px; }

/* --- Tablas --- */
.tabla-scroll { overflow-x: auto; margin: 0 0 24px; }
table.tabla { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 560px; }
table.tabla th { text-align: left; padding: 10px 12px; border-bottom: 2px solid #0056b3; color: #0b2f57; background: #f4f8fc; }
table.tabla td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; vertical-align: top; color: #3d4a5c; }

/* --- Cajas --- */
.consejo { background: #f1f4f8; padding: 14px 18px; border-radius: 8px; margin: 0 0 22px; color: #33415a; }
.alerta { background: #fff4e5; border-left: 4px solid #e08a00; padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 0 0 22px; color: #5c3b00; }
.clave { background: #eaf6f1; border-left: 4px solid #0f6b5c; padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 0 0 22px; color: #0d3f37; }
.clave ul, .alerta ul { margin: 8px 0 0 20px; }

/* --- Pasos numerados --- */
.pasos { list-style: none; margin: 0 0 26px; padding: 0; counter-reset: paso; }
.pasos > li { counter-increment: paso; position: relative; padding: 0 0 20px 58px; margin: 0; border-left: 2px solid #d5deea; margin-left: 19px; }
.pasos > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.pasos > li::before { content: counter(paso); position: absolute; left: -20px; top: -2px; width: 38px; height: 38px; border-radius: 50%; background: #0b4a8f; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.pasos > li strong:first-child { display: block; color: #0b2f57; font-size: 16.5px; margin-bottom: 3px; }

/* --- Figuras / esquemas --- */
figure.esquema { margin: 0 0 26px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 18px; }
figure.esquema svg, figure.esquema img { display: block; width: 100%; height: auto; }
figure.esquema figcaption { font-size: 13px; color: #6b7890; margin-top: 12px; text-align: center; }

/* --- Talón de pago de ejemplo --- */
.talon { font-family: "Courier New", monospace; font-size: 13.5px; border: 2px solid #33415a; border-radius: 6px; overflow: hidden; }
.talon-cab { background: #33415a; color: #fff; padding: 10px 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.talon-fila { display: flex; justify-content: space-between; gap: 12px; padding: 7px 14px; border-bottom: 1px dashed #cbd5e1; color: #1f2937; }
.talon-fila b { color: #0b4a8f; font-family: Segoe UI, Arial, sans-serif; font-size: 11px; background: #e6eff9; border-radius: 10px; padding: 1px 8px; margin-right: 8px; }
.talon-total { background: #eaf6f1; font-weight: 700; border-bottom: none; }

/* --- Tarjetas con imagen --- */
.tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; margin: 18px 0 10px; }
.tarjetas-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
a.tarjeta { background: #fff; border-radius: 10px; box-shadow: 0 3px 10px rgba(0,0,0,.07); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; transition: transform .2s, box-shadow .2s; }
a.tarjeta:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,.11); }
a.tarjeta img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; }
.tarjeta-cuerpo { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.tarjeta-cuerpo .etiqueta { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.tarjeta-cuerpo strong { color: #1a202c; font-size: 16.5px; line-height: 1.35; }
.tarjeta-desc { color: #5b677d; font-size: 13.5px; line-height: 1.55; }
.bloque-cat { margin-bottom: 46px; scroll-margin-top: 120px; }
.intro-cat { color: #55617a; margin: -6px 0 6px; }
.cuerpo-articulo h2, .cuerpo-articulo h3 { scroll-margin-top: 120px; }

/* --- Portada --- */
.portada-hero { background: linear-gradient(135deg, #0b4a8f, #062c57); border-radius: 14px; color: #fff; padding: 40px 36px; margin-bottom: 34px; }
.portada-hero h1 { font-size: 34px; line-height: 1.2; margin: 0 0 14px; color: #fff; }
.portada-hero p { color: #dbe7f5; font-size: 16.5px; line-height: 1.65; max-width: 640px; margin: 0 0 12px; }
.portada-hero .cifras { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.portada-hero .cifras span { background: rgba(255,255,255,.13); border-radius: 20px; padding: 7px 16px; font-size: 13.5px; font-weight: 600; }
.portada-hero .botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn-claro, .btn-borde { display: inline-block; padding: 11px 22px; border-radius: 8px; font-weight: 700; text-decoration: none; font-size: 15px; }
.btn-claro { background: #ffb84d; color: #3b2500; }
.btn-borde { border: 2px solid rgba(255,255,255,.6); color: #fff; }
.lista-todo { columns: 2; column-gap: 30px; margin: 0 0 20px 18px; }
.lista-todo li { margin-bottom: 8px; break-inside: avoid; }
.sin-sidebar { grid-template-columns: minmax(0, 1fr); max-width: 860px; }

/* --- Autor --- */
.ficha-autor { display: flex; gap: 22px; align-items: flex-start; background: #fff; border-radius: 12px; box-shadow: 0 3px 10px rgba(0,0,0,.07); padding: 26px; margin-bottom: 30px; }
.ficha-autor .inicial { flex: 0 0 84px; height: 84px; border-radius: 50%; background: #0b4a8f; color: #fff; font-size: 36px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.ficha-autor > div:last-child { min-width: 0; }
.ficha-autor h1 { margin: 0 0 4px; font-size: 26px; color: #1a202c; overflow-wrap: anywhere; }
.ficha-autor p { color: #4a5568; margin: 0 0 10px; }

/* --- Herramientas (formularios) --- */
.herr { background: #fff; border: 1px solid #d9e2ee; border-radius: 12px; padding: 24px; margin: 0 0 28px; box-shadow: 0 3px 10px rgba(0,0,0,.05); }
.herr h2 { margin-top: 0 !important; }
.herr-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 18px; }
.herr label { display: block; font-size: 13.5px; font-weight: 700; color: #2b3a55; margin-bottom: 6px; }
.herr input[type=number], .herr input[type=text], .herr input[type=email], .herr select, .herr textarea { width: 100%; padding: 10px 12px; border: 1px solid #b8c4d6; border-radius: 8px; font-size: 16px; font-family: inherit; background: #fff; color: #1a202c; box-sizing: border-box; }
.herr textarea { min-height: 84px; resize: vertical; }
.herr input:focus, .herr select:focus, .herr textarea:focus { outline: 3px solid #b9d4f5; border-color: #0b4a8f; }
.herr .ayuda { font-size: 12.5px; color: #6b7890; margin-top: 4px; font-weight: 400; }
.herr-btn { background: #0b4a8f; color: #fff; border: none; border-radius: 8px; padding: 12px 24px; font-size: 15.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.herr-btn:hover { background: #083a70; }
.herr-btn.sec { background: #e6eef8; color: #0b2f57; }
.herr-resultado { margin-top: 20px; background: #f4f8fc; border-radius: 10px; padding: 18px 20px; }
.herr-resultado:empty { display: none; }
.herr-resultado .grande { font-size: 30px; font-weight: 800; color: #0b4a8f; line-height: 1.2; }
.herr-resultado table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 15px; }
.herr-resultado td { padding: 7px 0; border-bottom: 1px solid #dfe7f1; color: #33415a; }
.herr-resultado td:last-child { text-align: right; font-weight: 700; }
.chequeo { list-style: none; margin: 0 0 18px !important; padding: 0; }
.chequeo li { margin: 0 0 8px !important; }
.chequeo label { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; font-size: 15px; background: #f7f9fc; border: 1px solid #e0e7f0; border-radius: 8px; padding: 12px 14px; cursor: pointer; margin: 0; color: #2b3a55; }
.chequeo input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 18px; }
.semaforo { border-radius: 10px; padding: 18px 20px; font-size: 15.5px; }
.semaforo.rojo { background: #fde8e8; color: #7a1c1c; border-left: 6px solid #c62828; }
.semaforo.ambar { background: #fff4e0; color: #6b4300; border-left: 6px solid #e08a00; }
.semaforo.verde { background: #e6f5ec; color: #17512f; border-left: 6px solid #2e7d32; }

/* --- Vista previa del resume --- */
.resume-hoja { background: #fff; border: 1px solid #c9d3e0; padding: 38px 42px; font-family: Georgia, "Times New Roman", serif; color: #111; font-size: 14.5px; line-height: 1.5; margin-top: 20px; }
.resume-hoja h3 { font-size: 24px; margin: 0; text-align: center; letter-spacing: .5px; color: #111; }
.resume-hoja .contacto { text-align: center; font-size: 13.5px; margin: 4px 0 14px; }
.resume-hoja h4 { font-size: 13.5px; letter-spacing: 1.2px; text-transform: uppercase; border-bottom: 1.5px solid #111; margin: 16px 0 8px; padding-bottom: 2px; color: #111; }
.resume-hoja .puesto { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.resume-hoja ul { margin: 4px 0 10px 20px; }
.resume-hoja li { margin: 0 0 3px; color: #111; }
.resume-hoja p { margin: 0 0 8px; color: #111; font-size: 14.5px; }
.exp-bloque { border: 1px dashed #b8c4d6; border-radius: 10px; padding: 16px; margin-bottom: 16px; }

/* --- Espacios publicitarios (solo existen cuando hay bloque configurado) --- */
.espacio-anuncio { margin: 28px 0; padding: 6px 0 10px; text-align: center; min-height: 280px; border-top: 1px solid #e6ebf2; border-bottom: 1px solid #e6ebf2; clear: both; }
.espacio-anuncio .espacio-etiqueta { display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #8a96a8; margin-bottom: 6px; }
.sidebar .espacio-anuncio { margin: 0; min-height: 250px; border: none; }

@media print {
  body.imprimiendo-resume > *:not(.layout-con-sidebar), body.imprimiendo-resume .sidebar,
  body.imprimiendo-resume .cuerpo-articulo > *:not(#zona-impresion) { display: none !important; }
  body.imprimiendo-resume, body.imprimiendo-resume .layout-con-sidebar, body.imprimiendo-resume .cuerpo-articulo { margin: 0 !important; padding: 0 !important; background: #fff !important; display: block !important; box-shadow: none !important; max-width: none !important; }
  body.imprimiendo-resume .resume-hoja { border: none; padding: 0; margin: 0; }
  body.imprimiendo-resume #uja-cookie-banner { display: none !important; }
}

/* --- Cabecera: logo a la izquierda, menú centrado, buscador a la derecha --- */
header { height: 76px; padding: 0 28px; grid-template-columns: auto 1fr auto; gap: 24px; }
.logo-container { justify-self: start; }
.main-nav { justify-self: center; }
.main-nav > ul { gap: 22px; }
body { padding-top: 76px; }
.sidebar { top: 96px; }
.main-nav .dropdown-menu { min-width: 290px; }

/* Menú plegable también en pantallas medianas */
@media (max-width: 1120px) {
  body { padding-top: 0; }
  header { position: static; display: flex; justify-content: center; height: 68px; padding: 0 20px; }
  .menu-móvil-btn { display: block; position: absolute; left: 18px; }
  .header-right { display: none; }
  .main-nav { display: none; position: absolute; top: 68px; left: 0; width: 100%; background: #fff; box-shadow: 0 6px 10px rgba(0,0,0,.1); padding: 8px 0 14px; z-index: 999; }
  .main-nav.activo { display: block !important; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav > ul > li > a { padding: 13px 24px; font-size: 16px; border-bottom: 1px solid #f0f2f5; justify-content: space-between; }
  .main-nav .dropdown { padding: 0; }
  .main-nav .dropdown-menu, .main-nav .dropdown:hover .dropdown-menu { display: none !important; }
  .main-nav .dropdown > a span { display: none; }
  .sidebar { position: static; }
}
@media (max-width: 768px) {
  .portada-hero { padding: 28px 22px; }
  .portada-hero h1 { font-size: 26px; }
  .titulo-art { font-size: 25px; }
  .lista-todo { columns: 1; }
  .ficha-autor { flex-direction: column; }
  .resume-hoja { padding: 22px 18px; }
  .logo-text.marca small { display: block; }
}
