/* ====== GRID (solo dentro de .job-category-token) ====== */
.job-category-token .views-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}
.job-category-token .views-row .views-col {
  box-sizing: border-box;
  padding: 12px;
}

@media (max-width: 640px) {
  .job-category-token .views-row { margin: -8px; }
  .job-category-token .views-row .views-col { padding: 8px; }
}

/* ====== CARD BASE (tu taxonomy term) ====== */
.job-category-token .taxonomy-term.vocabulary-job-category {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  /*background: #0b0f19;*/
  /*border: 1px solid rgba(15, 23, 42, .08);*/
  box-shadow: 0 14px 40px rgba(2, 6, 23, .16);
  aspect-ratio: 3 / 4; /* mucho más compacta */
  min-height: 220px; /* drásticamente reducida */
  color: #fff;
  margin-top: 15px;
  margin-bottom: 15px;
}

/* ====== IMAGEN A FULL ====== */
.job-category-token .taxonomy-term.vocabulary-job-category .content {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  z-index: 0;
}
.job-category-token .taxonomy-term.vocabulary-job-category .field--name-field-image,
.job-category-token .taxonomy-term.vocabulary-job-category .field--name-field-image .field__item {
  /*position: absolute; */
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}
.job-category-token .taxonomy-term.vocabulary-job-category .field--name-field-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transition: transform .45s ease;
}
.job-category-token .taxonomy-term.vocabulary-job-category:hover
.field--name-field-image img {
  transform: scale(1.03);
}

/* ====== DEGRADADO OSCURO INFERIOR ====== */
.job-category-token .taxonomy-term.vocabulary-job-category .field--name-field-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 70%,
    rgba(0, 0, 0, .72) 95%,
    rgba(0, 0, 0, .92) 100%
  );
  transition: background .35s ease;
}
/* Si quieres activar el hover del degradado, descomenta y dejará de ser “static” */
/*
.job-category-token .taxonomy-term.vocabulary-job-category:hover
.field--name-field-image::after {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 10%,
    rgba(0, 0, 0, .70) 50%,
    rgba(0, 0, 0, .95) 100%
  );
}
*/

/* ====== TÍTULO EN OVERLAY ====== */
/* Tu título es: h2 > a > div.field--name-name */
.job-category-token .taxonomy-term.vocabulary-job-category h2 {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 24px; /* si lo quieres más alto, usa 110px */
  margin: 0;
  padding: 0;
}
.job-category-token .taxonomy-term.vocabulary-job-category h2 a {
  display: inline-block; /* que el foco se vea correcto */
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
.job-category-token .taxonomy-term.vocabulary-job-category h2 a:hover {
  text-decoration: underline;
}

/* El div interno que trae el texto del título */
.job-category-token .taxonomy-term.vocabulary-job-category
.field--name-name.field--type-string.field--label-hidden.field__item {
  color: #fff; /* por si Drupal mete estilos raros */
}

/* ====== OCULTAR CONTROLES CONTEXTUALES DENTRO DE LA CARD ====== */
.job-category-token .taxonomy-term.vocabulary-job-category .contextual {
  display: none !important;
}

/* ====== ACCESIBILIDAD: FOCO VISIBLE EN EL ENLACE DEL TÍTULO ====== */
.job-category-token .taxonomy-term.vocabulary-job-category h2 a:focus-visible {
  outline: 3px solid rgba(147, 197, 253, .8);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ====== AJUSTES MÓVILES ====== */
@media (max-width: 768px) {
  .job-category-token .taxonomy-term.vocabulary-job-category {
    min-height: 200px;
  }
  .views-view-responsive-grid.views-view-responsive-grid--horizontal {
    grid-template-columns: repeat(2, 1fr); /* Creates two equal-width columns */
  }
}

/* Dos columnas: imagen izq. + texto dcha. */
.vocabulary-job-category .content {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(320px, 1fr);
  gap: clamp(18px, 4vw, 56px);
  align-items: center;
  max-width: min(1220px, 94vw);
  margin: 0 auto;
}

/* ---- Imagen con “mordida” circular (del CSS .info-page adaptado) ---- */
.vocabulary-job-category .field--name-field-media-image {
  position: relative;         /* de tu .info-page */
  width: 100%;                /* de tu .info-page */
  height: 490px;              /* de tu .info-page */
  overflow: hidden;           /* de tu .info-page (recorta) */
  padding-bottom: 0;          /* de tu .info-page */
  border-bottom-right-radius: 175px; /* como .radius_bottom_right */
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  background: #ddd;
}

.vocabulary-job-category .field--name-field-media-image img {
  position: absolute;   /* de tu .info-page */
  top: 0; left: 0;      /* de tu .info-page */
  width: 100%; height: 100%;  /* de tu .info-page */
  object-fit: cover;    /* de tu .info-page */
  object-position: center; /* de tu .info-page */
}

/* Texto a la derecha + espacio inferior para el listado */
.vocabulary-job-category .field--name-description {
  margin: 0 0 clamp(16px, 4vw, 36px);
}
.vocabulary-job-category .field--name-description p {
  margin: 0;
  font-size: clamp(1rem, 0.96rem + 0.35vw, 1.12rem);
  line-height: 1.75;
  color: #1f2328;
  max-width: 68ch;
  text-wrap: pretty;
}

/* Responsive: apilar en móvil y suavizar la esquina redondeada */
@media (max-width: 900px) {
  .vocabulary-job-category .content {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .vocabulary-job-category .field--name-field-media-image {
    height: clamp(220px, 46vh, 420px);
    border-bottom-right-radius: 28px; /* menos agresivo en móvil */
  }
}


