/* Listados: buscar-trabajo.html, ver-perfiles.html y cursos.html */

/* Estado vacío */
.empty-state {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: 4rem 1.5rem;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.8rem;
}

.empty-state-icon.theme-persona {
  background: var(--primary-light);
  color: var(--primary);
}

.empty-state-icon.theme-empresa {
  background: var(--secondary-light);
  color: var(--secondary);
}

.empty-state h2 {
  margin-bottom: 0.75rem;
}

.empty-state p {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.empty-state-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Barra de búsqueda y filtros */
.listing-toolbar {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .listing-toolbar {
    grid-template-columns: 1fr;
  }
}

.listing-toolbar input,
.listing-toolbar select {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--input-background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: var(--font-family);
  outline: none;
}

.listing-count {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  margin-bottom: 1.25rem;
}

/* Tarjetas */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 800px) {
  .listing-grid {
    grid-template-columns: 1fr;
  }
}

.item-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.item-card h3 {
  font-size: 1.1rem;
}

.item-card .item-sub {
  color: var(--muted-foreground);
  font-size: 0.92rem;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.85rem;
  color: var(--foreground);
}

.item-meta span {
  white-space: nowrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-family: var(--font-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
}

.tag.tag-persona {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.tag.tag-empresa {
  background: var(--secondary-light);
  color: var(--secondary-dark);
}

/* Inclusión laboral / CUD: color sólido para distinguirlo de habilidades y competencias */
.tag.tag-inclusion {
  background: #f59e0b;
  color: #fff;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
}

/* Matrícula habilitante (electricistas y gasistas) */
.tag.tag-matricula {
  background: var(--secondary);
  color: #fff;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
}

.tag.tag-carnet {
  background: #e0e7ff;
  color: #3730a3;
}

.item-card details {
  font-size: 0.9rem;
}

.item-card details summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.item-card details p {
  color: var(--muted-foreground);
  white-space: pre-line;
}

.item-contact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.88rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.item-contact a {
  color: var(--secondary-dark);
  font-weight: 600;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.item-actions .btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Encabezado de tarjeta con el % de compatibilidad a la derecha */
.item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.match-badge {
  flex: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  font-family: var(--font-secondary);
  font-weight: 800;
  font-size: 1.15rem;
  border-radius: var(--radius-md);
  padding: 0.35rem 0.7rem;
}

.match-badge small {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.match-alto { background: var(--secondary-light); color: var(--secondary-dark); }
.match-medio { background: #fef3c7; color: #92400e; }
.match-bajo { background: var(--muted); color: var(--muted-foreground); }

/* Detalle del match en la vacante completa */
.match-summary {
  margin-bottom: 1rem;
}

.match-row {
  margin-bottom: 0.9rem;
}

.match-row-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.match-bar {
  height: 8px;
  background: var(--muted);
  border-radius: 999px;
  overflow: hidden;
}

.match-bar span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}

.match-row .item-sub {
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

/* Botón "Estoy interesado/a" (lado persona, lila) */
.btn-interes {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid var(--primary);
  cursor: pointer;
}

.btn-interes:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
}

.btn-interes.done,
.btn-interes:disabled {
  background: var(--muted);
  color: var(--muted-foreground);
  border-color: var(--border);
  cursor: default;
}

.listing-message {
  text-align: center;
  color: var(--muted-foreground);
  padding: 2rem 0;
}

/* Páginas de detalle (perfil.html / vacante.html) */
.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.back-link:hover {
  color: var(--foreground);
}

.detail-section {
  margin-bottom: 2rem;
}

.detail-section h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

@media (max-width: 640px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-item .label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted-foreground);
  margin-bottom: 0.15rem;
}

.detail-item .value {
  font-size: 0.95rem;
  white-space: pre-line;
}

.detail-item.full {
  grid-column: 1 / -1;
}

.detail-entry {
  background: var(--muted);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.detail-entry strong {
  display: block;
}

.detail-entry .item-sub {
  font-size: 0.85rem;
}
