/* ==========================================================================
   Listado de categorías CMS «Proyectos profesionales» (3) y «Proyectos a medida» (4) — 23/11/2026
   Plantilla: templates/cms/category.tpl. Lenguaje del rediseño: caja 1240 como las páginas .mls, títulos ligeros,
   tarjetas con foto y degradado como las de Proyectos profesionales de la portada, azul #1d2a55 y acento #ffdd00.
   ========================================================================== */
.mlcl {
  --mlcl-ink: #1d2a55;
  --mlcl-text: #1a2332;
  --mlcl-muted: #5b6575;
  --mlcl-line: #e6e9ee;
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 0 96px;
  color: var(--mlcl-text);
}

/* Cabecera */
.mlcl__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--mlcl-line); }
.mlcl__intro { max-width: 680px; }
.mlcl__kicker { margin: 0 0 10px; color: var(--mlcl-muted); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.mlcl .mlcl__title { margin: 0; padding: 0; border: 0; color: var(--mlcl-ink); font-size: clamp(30px, 2.4vw + 14px, 46px); font-weight: 300; line-height: 1.1; text-wrap: balance; }
.mlcl__text { margin: 14px 0 0; color: var(--mlcl-muted); font-size: 16px; line-height: 1.6; }
.mlcl__aside { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; flex: none; }
.mlcl__count { color: var(--mlcl-muted); font-size: 14px; }
.mlcl__count strong { margin-right: 4px; color: var(--mlcl-ink); font-size: 34px; font-weight: 300; font-variant-numeric: tabular-nums; }
.mlcl__switch {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid #d6dbe4; border-radius: 999px;
  color: var(--mlcl-ink) !important; font-size: 13px; font-weight: 500; text-decoration: none !important; transition: border-color .2s, background-color .2s;
}
.mlcl__switch:hover { border-color: var(--mlcl-ink); background: #f5f6f8; }

/* Rejilla de tarjetas */
.mlcl__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.mlcl__item { margin: 0; padding: 0; }
.mlcl__card {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; background: #1a2332;
  color: #fff !important; text-decoration: none !important; isolation: isolate;
}
.mlcl__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.mlcl__card::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(10, 16, 28, .1) 0%, rgba(10, 16, 28, .15) 38%, rgba(10, 16, 28, .88) 100%);
  transition: background .4s ease;
}
.mlcl__num { position: absolute; top: 14px; left: 14px; z-index: 2; padding: 4px 9px; border-radius: 999px; background: rgba(10, 16, 28, .5); font-size: 12px; font-weight: 500; letter-spacing: .08em; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.mlcl__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 8px; padding: 22px; }
.mlcl__name { font-size: 21px; font-weight: 400; line-height: 1.2; text-wrap: balance; }
.mlcl__desc {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  color: rgba(255, 255, 255, .82); font-size: 13.5px; line-height: 1.5;
}
.mlcl__cta { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin-top: 4px; font-size: 13px; font-weight: 600; }
.mlcl__cta span { color: #ffdd00; transition: transform .25s ease; }
.mlcl__card:hover .mlcl__img { transform: scale(1.05); }
.mlcl__card:hover::after { background: linear-gradient(180deg, rgba(10, 16, 28, .2) 0%, rgba(10, 16, 28, .3) 38%, rgba(10, 16, 28, .92) 100%); }
.mlcl__card:hover .mlcl__cta span { transform: translateX(4px); }
.mlcl__card:focus-visible { outline: 3px solid #ffdd00; outline-offset: 3px; }

/* Banda de contacto */
.mlcl__band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 40px; padding: 28px 32px;
  border-radius: 12px; background: var(--mlcl-ink); color: #fff;
}
.mlcl__band-title { margin: 0; color: #fff; font-size: 22px; font-weight: 300; line-height: 1.2; }
.mlcl__band-text { margin: 6px 0 0; color: rgba(255, 255, 255, .78); font-size: 14px; }
.mlcl__band-btn {
  display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 12px 22px; border-radius: 999px; background: #ffdd00;
  color: #111 !important; font-size: 14px; font-weight: 600; text-decoration: none !important; transition: background-color .2s;
}
.mlcl__band-btn:hover { background: #ffe633; }

/* Tableta */
@media (max-width: 991px) {
  .mlcl__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

/* Móvil */
@media (max-width: 767px) {
  .mlcl { padding: 16px 0 56px; }
  .mlcl__head { flex-direction: column; align-items: flex-start; gap: 18px; padding-bottom: 20px; margin-bottom: 20px; }
  .mlcl__text { font-size: 14.5px; }
  .mlcl__aside { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .mlcl__count strong { font-size: 26px; }
  .mlcl__switch { padding: 9px 14px; font-size: 12.5px; }
  .mlcl__grid { grid-template-columns: 1fr; gap: 12px; }
  .mlcl__card { aspect-ratio: 16 / 11; }
  .mlcl__body { padding: 18px; gap: 6px; }
  .mlcl__name { font-size: 19px; }
  .mlcl__desc { font-size: 13px; }
  .mlcl__band { flex-direction: column; align-items: flex-start; margin-top: 28px; padding: 24px 20px; }
  .mlcl__band-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .mlcl__img, .mlcl__cta span, .mlcl__card::after { transition: none; }
  .mlcl__card:hover .mlcl__img, .mlcl__card:hover .mlcl__cta span { transform: none; }
}
