/* ==========================================================================
   Páginas CMS de «Proyectos profesionales» (2026-10-23) — diseño común a toda la categoría CMS.
   Plantilla: templates/cms/sector.tpl (incluida desde cms/page.tpl). Contenido editable en el BO.
   Caja centrada (≤ 1240 px). Portada en dos columnas, bloques foto/texto alternos, franja de cifras,
   proceso en 4 pasos y cierre oscuro. Escala contenida: h1 28–38, h2 20–24, texto 15 px, títulos ≤ 500.
   ========================================================================== */
.mls {
  --s-ink: #1b2140;
  --s-soft: #4a5170;
  --s-tone: #f2f4f8;
  --s-tone-2: #e7ebf3;
  --s-pro: #ffd400;
  --s-gap: clamp(48px, 6vw, 96px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 0 var(--s-gap);
  color: var(--s-soft);
  font-size: 15px;
  line-height: 1.65;
}
.mls h1, .mls h2 { color: var(--s-ink); margin: 0; text-wrap: balance; }
.mls h1 { font-size: clamp(28px, 2.6vw, 38px) !important; font-weight: 300 !important; line-height: 1.12; letter-spacing: -.01em; }
.mls h2 { font-size: clamp(20px, 1.7vw, 24px) !important; font-weight: 300 !important; line-height: 1.2; }
.mls p { margin: 0; }
.mls img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: cover; }
.mls a:focus-visible { outline: 3px solid #2f6fd6; outline-offset: 3px; }

/* ---- botones ---- */
.mls .mls-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.mls .mls-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 20px; border-radius: 999px;
  background: var(--s-tone); color: var(--s-ink); font-size: 14px; font-weight: 700; text-decoration: none;
}
.mls .mls-btn:hover { background: var(--s-tone-2); color: var(--s-ink); text-decoration: none; }
.mls .mls-btn--solid { background: var(--s-ink); color: #fff; }
.mls .mls-btn--solid:hover { background: #2a3260; color: #fff; }
.mls .mls-btn--light { background: var(--s-pro); color: var(--s-ink); }
.mls .mls-btn--light:hover { background: #ffe14d; color: var(--s-ink); }
.mls .mls-btn--ghost { background: rgba(255, 255, 255, .12); color: #fff; }
.mls .mls-btn--ghost:hover { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---- portada ---- */
.mls-hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px 56px; align-items: center; }
.mls .mls-lead { margin-top: 16px; font-size: 16px; max-width: 52ch; }
.mls-hero__img { aspect-ratio: 4 / 3; overflow: hidden; }
.mls-hero__img img { object-position: 70% 50%; }

/* ---- bloques alternos ---- */
.mls-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: center; margin-top: var(--s-gap); }
.mls-row:nth-of-type(odd) .mls-row__img { order: 2; }   /* el 1.º de los bloques (2.º section) foto a la izquierda; luego alterna */
.mls-row__img { aspect-ratio: 4 / 3; overflow: hidden; }
.mls-row__img img { object-position: 72% 50%; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.mls-row:hover .mls-row__img img { transform: scale(1.03); }
.mls-row__text { display: grid; gap: 14px; max-width: 56ch; }

.mls .mls-list { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.mls .mls-list li { position: relative; padding-left: 20px; color: var(--s-ink); font-size: 14px; }
.mls .mls-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; background: var(--s-pro); }

.mls .mls-links { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.mls .mls-links a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 16px;
  background: var(--s-tone); color: var(--s-ink); text-decoration: none;
}
.mls .mls-links a:hover { background: var(--s-tone-2); color: var(--s-ink); text-decoration: none; }
.mls .mls-links strong { grid-column: 1; font-size: 14px; font-weight: 600; }
.mls .mls-links span { grid-column: 1; color: var(--s-soft); font-size: 13px; }
.mls .mls-links svg { grid-column: 2; grid-row: 1 / span 2; }

/* ---- cifras ---- */
.mls-figs { margin-top: var(--s-gap); padding: clamp(24px, 3vw, 40px); background: var(--s-tone); }
.mls-figs ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 20px 0 0 !important; padding: 0; list-style: none; }
.mls-figs li { display: grid; grid-template-rows: min-content; gap: 4px; }
.mls-figs strong { color: var(--s-ink); font-size: clamp(22px, 2vw, 28px); font-weight: 400; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mls-figs span { font-size: 13px; }

/* ---- proceso ---- */
.mls-steps { margin-top: var(--s-gap); }
.mls-steps ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 28px 0 0 !important; padding: 0; list-style: none; counter-reset: s; }
.mls-steps li { counter-increment: s; display: grid; align-content: start; gap: 6px; padding-top: 14px; border-top: 3px solid var(--s-ink); }
.mls-steps li::before { content: counter(s); color: var(--s-soft); font-size: 13px; font-weight: 700; }
.mls-steps strong { color: var(--s-ink); font-size: 15px; font-weight: 600; }
.mls-steps span { font-size: 14px; }
.mls .mls-note { margin-top: 16px; font-size: 14px; }
.mls .mls-note a { color: var(--s-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---- cierre ---- */
.mls-close { margin-top: var(--s-gap); padding: clamp(28px, 4vw, 56px); background: var(--s-ink); color: rgba(255, 255, 255, .8); }
.mls .mls-close h2 { color: #fff; }
.mls-close > p:not(.mls-cta) { margin-top: 10px; max-width: 60ch; }

/* ---- móvil / tableta ---- */
@media (max-width: 991px) {
  .mls-hero, .mls-row { grid-template-columns: 1fr; }
  .mls-row:nth-of-type(odd) .mls-row__img { order: 0; }
  .mls-figs ul, .mls-steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .mls-figs ul, .mls-steps ol { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .mls-row__img img { transition: none; }
  .mls-row:hover .mls-row__img img { transform: none; }
}

/* 23/11/2026: en móvil, la foto de la primera fila quedaba pegada a la del hero (dos imágenes seguidas): se oculta */
@media (max-width: 767px) {
  .mls-hero + .mls-row .mls-row__img { display: none; }
}
