/* ==============================================================
   RSM — estilos específicos de CPTs y plantillas interiores
   (noticias, noticia, proyectos, proyecto, contacto)
   ============================================================== */

/* ── Grids de layout ──────────────────────────────────────────── */
@media (min-width: 1024px) {
  .rsm-grid-2-3   { grid-template-columns: 1fr 1.6fr; }
  .rsm-grid-3-2   { grid-template-columns: 1.6fr 1fr; }
  .rsm-grid-1-2   { grid-template-columns: 1fr 2fr; }
  .rsm-grid-sector { grid-template-columns: 1.3fr 1fr; }
  .rsm-grid-contact { grid-template-columns: 1.6fr 1fr; }
  /* Catálogo (lo que Tailwind expresaba como grid-cols-[...], sin runtime) */
  .rsm-grid-catalog  { grid-template-columns: 240px 1fr; }
  .rsm-grid-cat-head { grid-template-columns: 1.4fr 1fr; }
  .rsm-grid-gallery  { grid-template-columns: 1.2fr 1fr; }
  .rsm-grid-desc     { grid-template-columns: 1fr 320px; }
  .rsm-grid-cta      { grid-template-columns: 1fr auto; }
}

/* ── Capacidades (página empresa/capacidades) ─────────────────── */
.rsm-cap-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--rsm-border-soft);
  border-radius: 10px;
  padding: 1.5rem;
}
.rsm-cap-card__code {
  font-family: var(--rsm-font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--rsm-orange);
  line-height: 1;
  min-width: 3rem;
  letter-spacing: -0.02em;
}

/* ── Filtros pill (noticias / proyectos) ──────────────────────── */
.nt-filter {
  padding: 0.625rem 1.125rem;
  border: 1.5px solid var(--rsm-border);
  background: #fff;
  color: var(--rsm-ink);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--rsm-font-display);
  letter-spacing: -0.005em;
  transition: all 150ms;
}
.nt-filter:hover  { border-color: var(--rsm-orange); }
.nt-filter.is-active { border-color: var(--rsm-ink); background: var(--rsm-ink); color: #fff; }

/* ── Cards de noticias ────────────────────────────────────────── */
.nt-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 250ms ease;
}
.nt-card:hover { transform: translateY(-3px); }
.nt-card__media {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 10px;
  background: var(--rsm-bg-soft);
  margin-bottom: 1.125rem;
  position: relative;
}
.nt-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms ease;
}
.nt-card:hover .nt-card__media img { transform: scale(1.04); }
.nt-card__cat {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--rsm-font-mono); font-size: 0.6875rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: #fff; color: var(--rsm-ink);
  padding: 0.3rem 0.65rem; border-radius: 3px; font-weight: 700;
}
.nt-card__meta {
  display: flex; gap: 0.5rem; align-items: center;
  font-family: var(--rsm-font-mono); font-size: 0.7rem;
  letter-spacing: 0.06em; color: var(--rsm-text-muted);
  text-transform: uppercase; margin-bottom: 0.5rem;
}
.nt-card__meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: currentColor; opacity: 0.5;
}
.nt-card__title {
  font-family: var(--rsm-font-display); font-weight: 700;
  font-size: 1.25rem; letter-spacing: -0.015em; line-height: 1.2;
  margin-bottom: 0.5rem; text-wrap: pretty;
}
.nt-card:hover .nt-card__title { color: var(--rsm-orange-700); }
.nt-card__excerpt {
  font-size: 0.9rem; color: var(--rsm-text-muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Featured card (noticias) ─────────────────────────────────── */
.nt-featured {
  display: grid; grid-template-columns: 1fr;
  gap: 1.5rem; align-items: center;
  border-bottom: 1px solid var(--rsm-border-soft);
  padding-bottom: 2.5rem; margin-bottom: 2.5rem;
}
@media (min-width: 900px) {
  .nt-featured { grid-template-columns: 1.1fr 1fr; gap: 3rem; padding-bottom: 4rem; margin-bottom: 4rem; }
}
.nt-featured__media {
  aspect-ratio: 16/11; overflow: hidden; border-radius: 12px;
  background: var(--rsm-ink); position: relative;
}
.nt-featured__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 800ms ease; }
.nt-featured:hover .nt-featured__media img { transform: scale(1.03); }
.nt-featured__badge {
  position: absolute; top: 18px; left: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--rsm-orange); color: #fff;
  font-family: var(--rsm-font-display); font-weight: 700;
  font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.45rem 0.85rem; border-radius: 3px;
}
.nt-featured h2 {
  font-family: var(--rsm-font-display); font-weight: 700;
  font-size: clamp(2rem, 3.5vw, 3rem);
  letter-spacing: -0.025em; line-height: 1.02;
  margin-bottom: 1rem; text-wrap: pretty;
}
.nt-number {
  font-family: var(--rsm-font-display); font-weight: 700;
  color: var(--rsm-orange); font-size: 0.75rem; letter-spacing: 0.18em;
  text-transform: uppercase; margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 12px;
}
.nt-number::before { content: ""; width: 28px; height: 1px; background: var(--rsm-orange); }

/* ── Tipografía del artículo (single post / single proyecto) ──── */
.nt-body {
  font-family: var(--rsm-font-sans); font-size: 1.0625rem;
  line-height: 1.75; color: var(--rsm-text); max-width: 680px; margin: 0 auto;
}
.nt-body p { margin: 0 0 1.4rem; text-wrap: pretty; }
.nt-body p.lead {
  font-family: var(--rsm-font-serif); font-style: italic;
  font-size: clamp(1.2rem, 1.6vw, 1.45rem); line-height: 1.5;
  color: var(--rsm-ink); margin-bottom: 2rem;
}
.nt-body h2 {
  font-family: var(--rsm-font-display); font-weight: 700;
  font-size: clamp(1.4rem, 2vw, 1.75rem); letter-spacing: -0.02em;
  line-height: 1.2; margin: 2.5rem 0 1rem; text-wrap: pretty;
}
.nt-body strong { color: var(--rsm-ink); font-weight: 600; }
.nt-body figure { margin: 2.25rem -2rem; }
@media (max-width: 720px) { .nt-body figure { margin-left: 0; margin-right: 0; } }
.nt-body figure img { width: 100%; border-radius: 10px; }
.nt-body figure figcaption {
  font-family: var(--rsm-font-mono); font-size: 0.7rem;
  color: var(--rsm-text-faint); margin-top: 0.6rem;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.nt-body a:not(.rsm-btn) { color: var(--rsm-orange-700); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.nt-body a:not(.rsm-btn):hover { color: var(--rsm-orange); }

.nt-cat {
  display: inline-flex; align-items: center;
  padding: 0.45rem 0.85rem; background: var(--rsm-orange); color: #fff;
  font-family: var(--rsm-font-display); font-weight: 700;
  font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase;
  border-radius: 3px;
}
.nt-meta {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  font-family: var(--rsm-font-mono); font-size: 0.75rem;
  color: var(--rsm-text-muted); letter-spacing: 0.04em; text-transform: uppercase;
}
.nt-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }

.nt-share {
  width: 38px; height: 38px; border-radius: 50%;
  background: #fff; border: 1px solid var(--rsm-border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--rsm-ink); transition: all 150ms; cursor: pointer;
  text-decoration: none;
}
.nt-share:hover { border-color: var(--rsm-orange); color: var(--rsm-orange); }

/* ── Barra de progreso de lectura ─────────────────────────────── */
.nt-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 100; pointer-events: none;
}
.nt-progress__fill {
  height: 100%; background: var(--rsm-orange);
  width: var(--p, 0%); transition: width 100ms linear;
}

/* ── Formulario contacto (pills) ──────────────────────────────── */
.rsm-contact-form .rsm-pill { margin: 0; }

/* ── Buscador del catálogo ────────────────────────────────────────
   El foco vive en la CAJA (parece el input), en color de marca — no
   el anillo azul del navegador. El input interior no lleva anillo propio. */
.rsm-search { transition: border-color 150ms ease, box-shadow 150ms ease; }
.rsm-search:focus-within {
  border-color: var(--rsm-orange);
  box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.15);
}
.rsm-search input { border: 0; padding: 0; height: 100%; -webkit-appearance: none; appearance: none; }
.rsm-search input:focus,
.rsm-search input:focus-visible { outline: none; box-shadow: none; }
