/* ================================================================
   JOB MINI CARD  (.jmc)
   Compact stacked card for grid contexts (home, blocks).
   ================================================================ */

/* ── 4-column grid for ultimos empleos block ── */
.view.view-ultimos-empleos-publicados .view-content {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  flex-wrap: unset;
}

.view.view-ultimos-empleos-publicados .views-row {
  width: auto;
  padding: 0;
  box-sizing: border-box;
  min-width: 0;
}

.view.view-ultimos-empleos-publicados .jmc {
  min-height: 160px;
}

@media (max-width: 991px) {
  .view.view-ultimos-empleos-publicados .view-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 575px) {
  .view.view-ultimos-empleos-publicados .view-content {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ── Card ── */
.jmc {
  position: relative;
  background: #fff;
  border: 1px solid #e6eef8;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.jmc:hover {
  border-color: rgba(0, 101, 155, 0.3);
  box-shadow: 0 4px 14px rgba(0, 101, 155, 0.07);
  transform: translateY(-2px);
}

/* ── Link ── */
.jmc__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px;
  text-decoration: none !important;
  color: inherit;
  min-width: 0;
  overflow: hidden;
}

.jmc__link:hover,
.jmc__link:focus {
  color: inherit;
  text-decoration: none !important;
}

/* ── Head: logo + company inline ── */
.jmc__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  padding-right: 24px;
  min-width: 0;
}

.jmc__logo {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: #f0f6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid #e6eef8;
}

.jmc__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jmc__initial {
  font-weight: 700;
  font-size: 12px;
  color: #00659b;
  text-transform: uppercase;
  line-height: 1;
}

.jmc__company {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.3;
}

/* ── Title ── */
h2.jmc__title,
.jmc__title {
  font-size: 14px;
  font-weight: 600;
  color: #00659b;
  margin: 0 0 6px;
  padding: 0;
  border: none;
  line-height: 1.3;
  transition: color 0.15s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jmc:hover .jmc__title {
  color: #013e5e;
}

/* ── Meta tags ── */
.jmc__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
}

.jmc__tag {
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ── Favorite button ── */
.jmc__fav {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.jmc__fav:hover {
  background: #e3f2fd;
  transform: scale(1.1);
}

.jmc__fav:active {
  transform: scale(0.9);
}

.jmc__fav-icon {
  width: 15px;
  height: 15px;
  stroke: #94a3b8;
  fill: none;
  stroke-width: 2;
  transition: stroke 0.18s ease, fill 0.22s ease;
}

.jmc__fav:hover .jmc__fav-icon {
  stroke: #00659b;
}

.jmc__fav.is-active .jmc__fav-icon {
  fill: #00659b;
  stroke: #00659b;
}

.jmc__fav.is-active {
  background: #e3f2fd;
}

.jmc__fav--info .jmc__fav-icon {
  stroke: #cbd5e1;
}

/* ── Anuncios relacionados sidebar ── */
.view-anuncios-relacionados .view-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.view-anuncios-relacionados .views-row {
  border-bottom: 1px solid #f1f5f9;
}

.view-anuncios-relacionados .views-row:last-child {
  border-bottom: none;
}

.view-anuncios-relacionados .jmc {
  border: none;
  border-radius: 0;
  background: transparent;
}

.view-anuncios-relacionados .jmc:hover {
  background: #f8fbff;
  box-shadow: none;
  transform: none;
}

.view-anuncios-relacionados .jmc__link {
  padding: 10px 4px;
}

.view-anuncios-relacionados .jmc__head {
  margin-bottom: 4px;
}

.view-anuncios-relacionados .jmc__logo {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.view-anuncios-relacionados .jmc__initial {
  font-size: 10px;
}

.view-anuncios-relacionados .jmc__company {
  font-size: 11px;
}

.view-anuncios-relacionados .jmc__title {
  font-size: 13px;
  margin-bottom: 4px;
}

.view-anuncios-relacionados .jmc__tag {
  font-size: 10px;
  padding: 1px 5px;
}

.view-anuncios-relacionados .jmc__fav {
  display: none;
}

.view-anuncios-relacionados .view-footer {
  padding: 10px 4px 4px;
}

.view-anuncios-relacionados .view-footer a {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #00659b;
  padding: 8px 12px;
  border: 1px solid #00659b;
  border-radius: 6px;
  background: #f8fbff;
  text-decoration: none;
  transition: background 0.15s ease;
}

.view-anuncios-relacionados .view-footer a:hover {
  background: #e3f2fd;
  text-decoration: none;
}

@keyframes jmc-bookmark-pulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.3); }
  60%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.jmc__fav.is-animating .jmc__fav-icon {
  animation: jmc-bookmark-pulse 0.4s ease;
}
