/* Viscom Familias — widget de Creative Elements
 * Los valores de este archivo son los del mockup v5 (base). Todo lo que se
 * cambie desde el editor de Creative Elements tiene prioridad sobre ellos.
 * La tipografía se hereda del kit de CE (Poppins); pesos máximos 700.
 */

.vcf {
  --vcf-line-c: #444;
  --vcf-line-w: 1px;
  position: relative;
  color: #fff;
}

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

.vcf-grid {
  display: grid;
  grid-template-columns: repeat(var(--vcf-cols, 4), minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.vcf-item {
  display: flex;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.vcf-item::before { content: none; } /* por si el tema pone viñetas */

/* ---------- Tarjeta ---------- */
.vcf-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 250px;
  padding: 24px 18px;
  background-color: #181a1d;
  color: inherit;
  text-align: left;
  text-decoration: none;
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

a.vcf-card,
a.vcf-card:hover,
a.vcf-card:focus { color: inherit; text-decoration: none; }

a.vcf-card:focus-visible {
  outline: 2px solid #ffc400;
  outline-offset: -2px;
}

/* ---------- Modo líneas divisorias ----------
   Cada tarjeta dibuja su línea derecha e inferior; la rejilla se desplaza
   el grosor de la línea para que la última columna y la última fila no la
   muestren. Así no aparecen huecos de color si la última fila está incompleta. */
.vcf--lines { overflow: hidden; }

.vcf--lines .vcf-grid {
  margin-right: calc(var(--vcf-line-w) * -1);
  margin-bottom: calc(var(--vcf-line-w) * -1);
}

.vcf--lines .vcf-item {
  border-right: var(--vcf-line-w) solid var(--vcf-line-c);
  border-bottom: var(--vcf-line-w) solid var(--vcf-line-c);
}

.vcf--lines.vcf--outer { border: var(--vcf-line-w) solid var(--vcf-line-c); }

/* ---------- Modo tarjetas separadas ---------- */
.vcf--cards .vcf-grid { gap: 20px; }

.vcf--cards .vcf-card { border: 0 solid transparent; }

.vcf--lift .vcf-card:hover { transform: translateY(-4px); }

/* ---------- Imagen ---------- */
.vcf-media {
  display: block;
  align-self: stretch;
  position: relative;
  overflow: hidden;
  height: 125px;
  margin-bottom: 17px;
  background-color: #0b0c0e;
  flex: 0 0 auto;
}

.vcf-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  transition: transform .6s ease;
}

.vcf--zoom .vcf-card:hover .vcf-img { transform: scale(1.05); }

/* ---------- Textos ---------- */
.vcf .vcf-title {
  margin: 0 0 6px;
  padding: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  text-transform: none;
  transition: color .25s ease;
}

.vcf .vcf-desc {
  margin: 0 0 14px;
  padding: 0;
  font-size: 10px;
  line-height: 1.45;
  color: #aaa;
  transition: color .25s ease;
}

/* ---------- Enlace ---------- */
.vcf .vcf-link {
  display: inline-block;
  width: max-content;
  max-width: 100%;
  padding-bottom: 3px;
  border-bottom: 1px solid;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffc400;
  text-decoration: none;
  transition: color .25s ease, border-color .25s ease;
}

.vcf--no-ul .vcf-link {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.vcf--link-bottom .vcf-link { margin-top: auto; }

/* ---------- Responsive (por defecto: 4 / 2 / 1 columnas) ---------- */
@media (max-width: 1024px) {
  .vcf-grid { --vcf-cols: 2; }
}

@media (max-width: 767px) {
  .vcf-grid { --vcf-cols: 1; }
  .vcf-card { min-height: 0; }
  .vcf-media { height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  .vcf-card,
  .vcf-img { transition: none; }
  .vcf--zoom .vcf-card:hover .vcf-img,
  .vcf--lift .vcf-card:hover { transform: none; }
}
