/* ============================================================
   IJS GROUP — Web corporativa
   Sistema de diseño "Precisión industrial, presentación premium"
   Azul IJS #0D72C6 como único acento · secciones claro/oscuro
   ============================================================ */

/* ── Fuente (Inter variable, autoalojada; fallback system-ui) ── */
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/InterVariable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color */
  --blue: #0D72C6;
  --blue-dark: #0A5A9E;
  --blue-bright: #3D9AE8;      /* enlaces sobre fondo oscuro */
  --ink: #16181d;              /* texto sobre claro */
  --ink-soft: rgba(22, 24, 29, 0.72);
  --ink-faint: rgba(22, 24, 29, 0.5);
  --paper: #f5f6f8;            /* fondo claro (gris azulado) */
  --white: #ffffff;
  --dark: #0c0e12;             /* fondo oscuro */
  --dark-2: #14171d;           /* superficie sobre oscuro */
  --dark-line: rgba(255, 255, 255, 0.1);
  --on-dark: rgba(255, 255, 255, 0.92);
  --on-dark-soft: rgba(255, 255, 255, 0.64);
  --line: rgba(22, 24, 29, 0.1);
  --steel: #8a919c;            /* gris metálico del logo */

  /* Tipografía */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Métricas */
  --container: 1200px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 30px rgba(12, 14, 18, 0.09);
  --shadow-lift: 0 14px 44px rgba(12, 14, 18, 0.16);
  --header-h: 72px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 650; line-height: 1.12; letter-spacing: -0.022em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: 1.17rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
address { font-style: normal; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(18px, 4vw, 32px); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--blue); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ── Botones ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16px/1 var(--font); letter-spacing: -0.01em;
  padding: 13px 26px; border-radius: 980px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(13, 114, 198, 0.32); }
.btn-primary:hover { background: var(--blue-dark); box-shadow: 0 10px 26px rgba(13, 114, 198, 0.42); }
.btn-ghost { background: rgba(255, 255, 255, 0.09); color: #fff; border-color: rgba(255, 255, 255, 0.35); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }
.btn-outline { background: transparent; color: var(--blue); border-color: currentColor; }
.btn-outline:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: #eef4fb; }
.btn-lg { padding: 16px 34px; font-size: 17px; }
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* ── Header / Nav ──────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 246, 248, 0.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 4px 24px rgba(12, 14, 18, 0.08); }
.nav { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.nav-logo { flex-shrink: 0; }
.nav-logo img { width: 120px; max-width: none; height: auto; }
.nav-menu { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  display: block; padding: 9px 13px; border-radius: 8px;
  color: var(--ink-soft); font-size: 15px; font-weight: 550;
}
.nav-links a:hover { color: var(--ink); background: rgba(22, 24, 29, 0.05); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--blue); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; }

/* Selector de idioma */
.lang-switch { position: relative; }
.lang-current {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 14px var(--font); color: var(--ink-soft);
  background: none; border: 1.5px solid var(--line); border-radius: 980px;
  padding: 8px 14px; cursor: pointer;
}
.lang-current:hover { color: var(--ink); border-color: var(--ink-faint); }
.lang-options {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 92px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lift); list-style: none; padding: 6px; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.lang-switch.open .lang-options { opacity: 1; visibility: visible; transform: none; }
.lang-options a {
  display: block; padding: 8px 14px; border-radius: 8px;
  color: var(--ink-soft); font-size: 14px; font-weight: 600;
}
.lang-options a:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.lang-options a[aria-current="true"] { color: var(--blue); }

/* Mega-menú de Productos */
.nav-item-mega { position: static; }
.mega-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 26px 42px rgba(12, 14, 18, 0.13);
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s; z-index: 40;
}
.mega-panel::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 22px; }
.nav-item-mega:hover .mega-panel,
.nav-item-mega:focus-within .mega-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-inner {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 44px;
  padding: 26px 24px 32px; align-items: start;
}
.mega-cat {
  display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue); padding: 6px 10px; margin-bottom: 4px;
}
.mega-cat:hover { text-decoration: none; opacity: .8; }
.mega-col ul { list-style: none; display: grid; gap: 2px; margin: 0; padding: 0; }
.mega-col li a {
  display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 10px;
  color: var(--ink); font-size: .92rem; font-weight: 550;
}
.mega-col li a:hover { background: var(--paper); text-decoration: none; }
.mega-thumb {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 8px;
  background: radial-gradient(120% 100% at 50% 30%, #fff, #eef1f6);
  border: 1px solid var(--line); display: grid; place-items: center;
}
.mega-thumb img { width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(15,30,55,.18)); }
.mega-fam { line-height: 1.2; }
.mega-new {
  /* inline-block + nowrap: sin esto "Nueva línea" partía en dos y el recuadro
     del badge salía cortado a media palabra */
  display: inline-block; white-space: nowrap;
  font-style: normal; font-size: .64rem; font-weight: 800; letter-spacing: .04em;
  color: var(--blue); border: 1px solid var(--blue); border-radius: 4px;
  padding: 1px 5px; margin-left: 5px;
}
@media (max-width: 980px) { .mega-panel { display: none; } }

/* ── Hero home ─────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: var(--dark); color: var(--on-dark);
  min-height: min(88vh, 780px);
  display: grid; align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 520px at 82% 18%, rgba(13, 114, 198, 0.28), transparent 62%),
    radial-gradient(700px 420px at 12% 88%, rgba(13, 114, 198, 0.12), transparent 60%),
    var(--dark);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0; opacity: 0.35;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(900px 600px at 70% 40%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(900px 600px at 70% 40%, #000, transparent 75%);
}
.hero-grid {
  position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-block: clamp(70px, 10vh, 120px);
}
.hero-content { position: relative; max-width: 680px; }
.hero-card {
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform .4s ease;
  background: #05070a;
}
.hero-card img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* Badge Made in Spain */
.made-badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 999px; margin-bottom: 20px;
  backdrop-filter: blur(6px);
}
.made-flag {
  width: 22px; height: 15px; border-radius: 2px; flex-shrink: 0;
  background: linear-gradient(#c60b1e 0 25%, #ffc400 25% 75%, #c60b1e 75% 100%);
}

/* Grupos de compra (estilo BGA) */
.section-groups { background: #0c0e12; color: var(--on-dark); }
.groups-title { text-align: center; color: #fff; margin-bottom: 30px; }
.groups-row {
  width: min(1340px, calc(100vw - 40px)); margin: 0 auto;
  display: flex; flex-wrap: nowrap; justify-content: center; align-items: center;
  gap: clamp(16px, 1.9vw, 26px);
}
.group-logo {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  opacity: 0.95; transition: opacity .2s ease, transform .2s ease;
}
.group-logo:hover { opacity: 1; transform: translateY(-2px); }
.group-logo img {
  height: clamp(30px, 3.6vw, 52px); width: auto;
  max-width: clamp(150px, 17vw, 235px);
  object-fit: contain; display: block;
}
.group-logo.is-compact img { height: clamp(44px, 5.1vw, 72px); max-width: none; }
@media (max-width: 760px) {
  .groups-row { width: auto; flex-wrap: wrap; gap: 24px 30px; }
  .group-logo img { height: 32px; max-width: 118px; }
  .group-logo.is-compact img { height: 46px; }
}
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 4.4rem); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.35em; }
.hero-subtitle { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--on-dark-soft); max-width: 34em; margin-bottom: 2em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { font-size: 0.85rem; color: var(--ink-faint); margin-top: 10px; }

/* ── Hero épico (portada) ──────────────────────────────────── */
.hero-epic {
  position: relative; overflow: hidden;
  background: #0a0c11; color: var(--on-dark);
  min-height: min(90vh, 820px); display: flex; align-items: center;
}
.hero-slides { position: absolute; inset: 0 0 0 auto; width: 66%; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.3s ease-in-out; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img {
  width: 100%; height: 100%; object-fit: cover; object-position: 40% center;
  transform: scale(1.05); transition: transform 8s ease-out;
}
/* Ken Burns con transición (no animation): al desactivarse vuelve
   suavemente en vez de saltar, así el fundido es fluido. */
.hero-slide.is-active img { transform: scale(1.14); }
.hero-epic-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, #0a0c11 20%, rgba(10, 12, 17, 0.72) 45%, rgba(10, 12, 17, 0.12) 72%, rgba(10, 12, 17, 0.5) 100%),
    radial-gradient(58% 80% at 80% 26%, rgba(13, 114, 198, 0.34), transparent 68%);
}
.hero-ghost {
  position: absolute; right: 3%; bottom: 3%; margin: 0; z-index: 1;
  font-size: clamp(4rem, 15vw, 15rem); font-weight: 800; line-height: 0.85;
  letter-spacing: 0.01em; color: transparent; white-space: nowrap;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.06);
  user-select: none; pointer-events: none;
}
.hero-epic .container { position: relative; z-index: 2; width: 100%; }
.hero-epic-inner { max-width: 620px; padding-block: clamp(52px, 8vh, 92px); }
.hero-epic-inner h1 {
  font-size: clamp(2.7rem, 6.2vw, 4.8rem); font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.03; margin-bottom: 0.4em;
}
.hero-epic-inner .kicker { color: var(--blue-bright); }
.hero-epic-inner .hero-subtitle { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--on-dark-soft); max-width: 33em; }
.hero-rating {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 20px 0 30px; font-weight: 650; font-size: 0.92rem; color: var(--on-dark-soft);
}
.hero-stars { color: #ffb400; letter-spacing: 2px; font-size: 1rem; }
.hero-sep { color: rgba(255, 255, 255, 0.32); }

/* Carrusel: navegación (dots + nombre de gama) */
.hero-nav { display: flex; align-items: center; gap: 18px; margin-top: 32px; }
.hero-dots { display: flex; gap: 9px; }
.hero-dot {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.28); transition: background .25s ease, width .25s ease;
  position: relative;
}
/* Área táctil ampliada sin tocar el aspecto: 9px visibles son imposibles con el dedo.
   (No usar borde transparente + gap: ensancha .hero-dots y corta el nombre de gama.) */
.hero-dot::before { content: ""; position: absolute; inset: -8px; }
.hero-dot:hover { background: rgba(255, 255, 255, 0.5); }
.hero-dot.is-active { background: var(--blue-bright); width: 26px; }
.hero-caps { position: relative; height: 1.25em; min-width: 190px; flex: 1; }
.hero-cap {
  position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--on-dark-soft); transition: opacity .45s ease;
}
.hero-cap.is-active { opacity: 1; }

@media (max-width: 900px) {
  .hero-epic { min-height: 0; }
  .hero-slides { width: 100%; opacity: 0.42; }
  .hero-epic-overlay {
    background:
      linear-gradient(180deg, rgba(10, 12, 17, 0.55), rgba(10, 12, 17, 0.9)),
      radial-gradient(80% 50% at 70% 12%, rgba(13, 114, 198, 0.3), transparent 70%);
  }
  .hero-epic-inner { max-width: none; padding-block: 64px; }
  .hero-ghost { display: none; }
}

.kicker {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 1.1em;
}
.hero .kicker, .section-dark .kicker { color: var(--blue-bright); }

/* ── Stats ─────────────────────────────────────────────────── */
.stats { background: var(--dark-2); color: var(--on-dark); border-top: 1px solid var(--dark-line); }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  padding-block: 38px;
}
.stat { text-align: center; }
.stat-value {
  display: block; font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 750; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.stats .stat-value { color: var(--blue-bright); }
.stat-label { font-size: 0.86rem; color: var(--on-dark-soft); letter-spacing: 0.03em; }
.stats-mini { display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 22px; }
.stats-mini .stat-value { color: var(--blue); }
.stats-mini .stat-label { color: var(--ink-faint); }

/* ── Secciones ─────────────────────────────────────────────── */
.section { padding-block: clamp(64px, 9vw, 110px); }
.section-tight { padding-block: clamp(44px, 6vw, 72px); }
.section-light { background: var(--paper); }
.section-light + .section-light { padding-top: 0; }
.section-dark { background: var(--dark); color: var(--on-dark); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-blue { background: linear-gradient(120deg, var(--blue-dark), var(--blue) 60%, #1e88dd); color: #fff; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head-row {
  display: flex; align-items: end; justify-content: space-between; gap: 20px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.section-subtitle { font-size: 1.08rem; color: var(--ink-soft); max-width: 44em; }
.section-dark .section-subtitle { color: var(--on-dark-soft); }
.section-narrow { max-width: 780px; }

/* ── Grid de gamas ─────────────────────────────────────────── */
.family-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.family-card {
  background: var(--white); border-radius: var(--radius);
  padding: 0; color: var(--ink); overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex; flex-direction: column;
}
.family-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: rgba(13, 114, 198, 0.35); text-decoration: none; }
.family-img {
  overflow: hidden; aspect-ratio: 1 / 1;
  /* Las tarjetas se estiran a la altura de la más alta (los nombres de dos líneas
     hacen la barra más alta). Sin flex-grow, esa holgura salía como banda blanca
     entre la foto y la barra. Que la absorba la zona de imagen, que lleva fondo. */
  flex: 1 1 auto;
  display: grid; place-items: center; padding: 11%;
  background:
    radial-gradient(120% 100% at 50% 30%, #ffffff 0%, #eef1f6 55%, #dfe5ee 100%);
}
.family-img img {
  object-fit: contain; width: 100%; height: 100%;
  filter: drop-shadow(0 14px 18px rgba(15, 30, 55, 0.22));
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.family-card:hover .family-img img { transform: scale(1.06) translateY(-2px); }
.family-bar {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 15px 18px; background: #666b73; color: #fff; font-weight: 700; font-size: 1.02rem;
  letter-spacing: 0.01em; line-height: 1.25;
  transition: background .25s ease;
}
.family-bar .family-go {
  flex-shrink: 0; opacity: 0; transform: translateX(-6px);
  transition: opacity .22s ease, transform .22s ease;
}
.family-card:hover .family-bar { background: var(--blue); }
.family-card:hover .family-bar .family-go { opacity: 1; transform: translateX(0); }

.family-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.family-chip {
  padding: 9px 18px; border-radius: 980px; font-size: 0.9rem; font-weight: 600;
  background: var(--white); color: var(--ink-soft); border: 1px solid var(--line);
  transition: all .18s ease;
}
.family-chip:hover { color: var(--blue); border-color: var(--blue); text-decoration: none; }

/* ── Hero de gama ──────────────────────────────────────────── */
.family-hero { background: var(--paper); padding-block: clamp(48px, 7vw, 90px); }
.family-hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.family-tagline { font-size: 1.25rem; font-weight: 600; color: var(--blue); margin-bottom: 0.6em; }
/* Los nombres de gama en alemán son palabras compuestas larguísimas
   (Kurbelwellenriemenscheiben, 26 letras) y en móvil desbordaban la caja,
   metiendo scroll horizontal en toda la página. Se permite partirlas. */
.family-hero h1, .family-hero .breadcrumbs, .family-hero .family-tagline {
  overflow-wrap: break-word;
  hyphens: auto;
}
.family-hero-img {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(115% 100% at 50% 25%, #ffffff 0%, #e9edf3 55%, #d5dce6 100%);
  box-shadow: var(--shadow); padding: clamp(28px, 4vw, 56px);
  display: grid; place-items: center;
}
.family-hero-img::after {
  content: ""; position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%);
  width: 60%; height: 24px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(15, 30, 55, 0.2), transparent 70%);
}
.family-hero-img img {
  position: relative; object-fit: contain; aspect-ratio: 4 / 3; width: 100%;
  filter: drop-shadow(0 22px 26px rgba(15, 30, 55, 0.22));
}
.breadcrumbs { font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 1.4em; display: flex; flex-wrap: wrap; gap: 8px; }
/* nowrap por tramo: sin esto, en móvil los tramos largos rompen línea POR DENTRO
   y los textos de dos migas se entrelazan (ilegible en las fichas de familia) */
.breadcrumbs a, .breadcrumbs span { white-space: nowrap; }
.breadcrumbs a { color: var(--ink-faint); }
.breadcrumbs a:hover { color: var(--blue); }

/* ── Puntos / features ─────────────────────────────────────── */
.points-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.point { padding: 26px 24px; border-radius: var(--radius); background: var(--dark-2); border: 1px solid var(--dark-line); }
.section-light .point, .point.card { background: var(--white); border-color: var(--line); }
.point-icon { width: 34px; height: 34px; color: var(--blue-bright); margin-bottom: 14px; }
.section-light .point-icon { color: var(--blue); }
.point p { font-size: 0.95rem; color: var(--on-dark-soft); margin: 0; }
.section-light .point p { color: var(--ink-soft); }

.feature-list {
  list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px;
  max-width: 900px;
}
.feature-item {
  display: flex; gap: 12px; align-items: start;
  background: var(--white); padding: 16px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); font-weight: 550;
}
.feature-item svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--blue); margin-top: 1px; }

/* ── Bandas ────────────────────────────────────────────────── */
.quality-band {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(28px, 5vw, 60px);
  align-items: center;
}
.quality-badges { display: flex; align-items: center; justify-content: center; }
.cert-badges { display: block; width: 100%; max-width: 540px; height: auto; }
.badge-cert {
  display: inline-block; padding: 14px 26px; border-radius: var(--radius-sm);
  background: var(--white); border: 1px solid var(--line);
  font-weight: 750; letter-spacing: 0.02em; color: var(--ink);
  box-shadow: var(--shadow);
}
.point .badge-cert { box-shadow: none; padding: 8px 16px; margin-bottom: 14px; background: rgba(13,114,198,0.08); border-color: rgba(13,114,198,0.25); color: var(--blue); }

.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 40em; margin: 0; }

/* ── Banda "Hazte distribuidor" (recurrente, tipo BGA) ─────── */
.distributor-strip { background: var(--blue); color: #fff; }
.distributor-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px 40px; padding-block: clamp(22px, 3vw, 34px); flex-wrap: wrap;
}
.distributor-title {
  margin: 0; color: #fff; font-weight: 800; line-height: 1.15;
  text-transform: uppercase; letter-spacing: 0.005em;
  font-size: clamp(1.15rem, 2.3vw, 1.8rem); max-width: 22em;
  /* reparte las líneas en vez de dejar una palabra huérfana */
  text-wrap: balance;
}
.distributor-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 12px;
  background: #14161b; color: #fff;
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.92rem;
  padding: 17px 32px; border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.distributor-btn:hover {
  background: #000; color: #fff; text-decoration: none; transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
}
.distributor-arrow { transition: transform .2s ease; }
.distributor-btn:hover .distributor-arrow { transform: translateX(4px); }
@media (max-width: 640px) { .distributor-btn { width: 100%; justify-content: center; } }

/* ── Noticias ──────────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); color: var(--ink); display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); text-decoration: none; }
.news-card > img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.news-card-body { padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 8px; }
.news-card h3, .news-card-title { font-size: 1.08rem; margin: 0; }
.news-meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 0.8rem; color: var(--ink-faint); margin: 0;
}
.news-cat {
  color: var(--blue); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.75rem;
}
.news-excerpt { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.filter-tabs a {
  padding: 9px 20px; border-radius: 980px; font-size: 0.92rem; font-weight: 600;
  color: var(--ink-soft); border: 1px solid var(--line); background: var(--white);
}
.filter-tabs a:hover { color: var(--blue); text-decoration: none; }
.filter-tabs a[aria-current="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 44px; }
.pagination a {
  min-width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: var(--white);
  font-weight: 600; color: var(--ink-soft);
}
.pagination a[aria-current="page"] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Artículo ──────────────────────────────────────────────── */
.article-container { max-width: 800px; }
.article h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
.article-cover { border-radius: var(--radius); margin-block: 26px; width: 100%; object-fit: cover; }
.article-back { margin-top: 44px; }
/* Tipografía del Markdown renderizado (noticias, legales, empresa).
   El reset global pone ul/ol a padding 0, así que aquí se recupera la
   sangría y se dan viñetas propias: sin esto las listas salen descolocadas. */
.prose { font-size: 1.06rem; line-height: 1.75; color: var(--ink-soft); }
.prose p { margin: 0 0 1.15em; }

/* Entradilla: solo en artículos, no en legales */
.article .prose > p:first-of-type {
  font-size: 1.2rem; line-height: 1.62; color: var(--ink); font-weight: 450;
  margin-bottom: 1.3em;
}

.prose h2 {
  position: relative; color: var(--ink); letter-spacing: -0.02em;
  font-size: clamp(1.35rem, 2.6vw, 1.6rem); margin: 2.1em 0 0.7em; padding-left: 16px;
}
.prose h2::before {
  content: ""; position: absolute; left: 0; top: 0.18em; bottom: 0.18em;
  width: 4px; border-radius: 2px; background: var(--blue);
}
.prose h3 { color: var(--ink); font-size: 1.12rem; margin: 1.8em 0 0.5em; }

.prose ol { margin: 0 0 1.3em; padding-left: 1.5em; }
.prose ol > li::marker { color: var(--blue); font-weight: 700; }
.prose ul { list-style: none; margin: 0 0 1.3em; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 1.6em; }
.prose ul > li::before {
  content: ""; position: absolute; left: 0.3em; top: 0.66em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--blue);
}
.prose li { margin-bottom: 0.5em; }
.prose li > ul, .prose li > ol { margin: 0.5em 0 0; }

.prose strong { color: var(--ink); font-weight: 650; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--blue-dark); }
.prose img { border-radius: var(--radius-sm); width: 100%; margin: 1.6em 0; box-shadow: var(--shadow); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose code {
  background: var(--paper); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; font-size: 0.92em;
}
.prose blockquote {
  border-left: 3px solid var(--blue); margin: 1.6em 0; padding: 6px 0 6px 22px;
  color: var(--ink); font-size: 1.1rem; font-style: italic;
}
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 1.6em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.prose th { background: var(--paper); color: var(--ink); font-weight: 650; }

/* ── Timeline ──────────────────────────────────────────────── */
.timeline { list-style: none; position: relative; max-width: 720px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: linear-gradient(var(--blue), rgba(13, 114, 198, 0.15));
}
.timeline-item { position: relative; padding: 0 0 34px 42px; }
.timeline-item::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--dark); border: 3px solid var(--blue-bright);
}
.timeline-year { font-size: 1.15rem; font-weight: 750; color: var(--blue-bright); display: block; margin-bottom: 4px; }
.timeline-item p { color: var(--on-dark-soft); margin: 0; max-width: 52em; }

/* ── Descargas ─────────────────────────────────────────────── */
.downloads-cat { margin-top: 40px; }
.downloads-cat:first-child { margin-top: 0; }
.download-list { list-style: none; display: grid; gap: 12px; }
.download-item {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px 22px;
}
.download-item h3 { font-size: 1.02rem; margin: 0 0 2px; }
.download-item p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.download-size { color: var(--ink-faint) !important; font-size: 0.78rem !important; }

/* Desplegable compacto para categorías con muchos documentos */
.downloads-fold {
  margin-top: 12px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.downloads-fold > summary {
  cursor: pointer; padding: 16px 22px; font-weight: 700; color: var(--blue);
  display: flex; align-items: center; gap: 10px; list-style: none;
}
.downloads-fold > summary::-webkit-details-marker { display: none; }
.downloads-fold > summary::after {
  content: ""; margin-left: auto; width: 9px; height: 9px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease;
}
.downloads-fold[open] > summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.download-grid {
  list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 26px; padding: 0 22px 10px;
}
.download-grid a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 11px 0; border-top: 1px solid var(--line); min-height: 44px;
}
.download-grid a:hover { text-decoration: none; }
.download-grid a:hover .dl-name { color: var(--blue); }
.dl-name { font-weight: 650; color: var(--ink); font-size: 0.94rem; line-height: 1.3; }
.dl-meta { font-size: 0.8rem; color: var(--ink-faint); }
@media (max-width: 700px) {
  .download-grid { grid-template-columns: 1fr; gap: 0; }
}

/* ── Contacto ──────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.contact-block { margin-bottom: 26px; }
.contact-block h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); margin-bottom: 6px; }
.contact-block p, .contact-block address { font-size: 1.05rem; margin: 0; }
.map-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.contact-form { padding: clamp(22px, 3.5vw, 36px); display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: grid; gap: 6px; font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); }
.contact-form input:not([type="checkbox"]), .contact-form textarea {
  font: 400 16px var(--font); color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); width: 100%;
  transition: border-color .15s ease, background .15s ease;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--blue); background: #fff;
}
.check-label { display: flex !important; flex-direction: row; gap: 10px; align-items: start; font-weight: 500 !important; }
.check-label input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.form-feedback { min-height: 1.2em; margin: 0; font-weight: 600; font-size: 0.95rem; }
.form-feedback.ok { color: #1a7f4b; }
.form-feedback.error { color: #c62828; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer { background: var(--dark); color: var(--on-dark-soft); padding-top: clamp(48px, 7vw, 80px); }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: clamp(28px, 4vw, 48px);
  padding-bottom: 48px;
}
.footer-brand img { width: 140px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.92rem; }
.footer-certs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.cert-tile {
  background: #fff; border-radius: 8px; padding: 6px 11px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}
.cert-tile img { height: 26px; width: auto; display: block; }
.site-footer h3 {
  color: #fff; font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.12em; margin-bottom: 14px;
}
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { color: var(--on-dark-soft); font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.site-footer address { font-size: 0.92rem; line-height: 1.7; margin-bottom: 22px; }

.newsletter-form { display: grid; gap: 10px; }
.newsletter-text { font-size: 0.85rem; margin: 0; }
.newsletter-row { display: flex; gap: 8px; }
.newsletter-row input {
  /* 16px mínimo: por debajo, iOS hace zoom automático al enfocar el campo */
  flex: 1; min-width: 0; font: 400 16px var(--font);
  padding: 10px 14px; border-radius: 980px; border: 1.5px solid var(--dark-line);
  background: var(--dark-2); color: #fff;
}
.newsletter-row input:focus { outline: none; border-color: var(--blue-bright); }
.newsletter-form .check-label { font-size: 0.78rem; }
.newsletter-form .check-label a { text-decoration: underline; }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--dark-line); padding-block: 22px;
  font-size: 0.82rem;
}
.footer-bottom p { margin: 0; }
.footer-legal-links { display: flex; gap: 20px; list-style: none; }
.footer-feder {
  border-top: 1px solid var(--dark-line); padding: 22px 24px 30px;
  display: flex; justify-content: center;
}
.footer-feder img { width: 100%; max-width: 640px; height: auto; opacity: 0.88; }

/* ── Page hero (interior) ──────────────────────────────────── */
.page-hero {
  background: var(--dark); color: var(--on-dark);
  padding-block: clamp(56px, 8vw, 96px);
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 400px at 85% 0%, rgba(13, 114, 198, 0.22), transparent 65%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero-intro { font-size: 1.12rem; color: var(--on-dark-soft); max-width: 46em; margin-top: 0.6em; }
.family-hero .page-hero-intro { color: var(--ink-soft); }

/* ── 404 ───────────────────────────────────────────────────── */
.notfound-code {
  font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; letter-spacing: -0.05em;
  color: transparent; -webkit-text-stroke: 2px rgba(13, 114, 198, 0.4);
  line-height: 1; margin: 0;
}

.empty-state { color: var(--ink-faint); font-size: 1.05rem; padding-block: 30px; }

/* ── Animaciones reveal ────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .family-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .points-grid, .news-grid { grid-template-columns: 1fr 1fr; }
  .family-hero-grid, .quality-band, .contact-grid { grid-template-columns: 1fr; }
  .family-hero-img { order: -1; max-width: 480px; }
}
@media (max-width: 1120px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px; justify-content: center;
    margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer;
  }
  .nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lift);
    flex-direction: column; align-items: stretch; gap: 10px;
    padding: 16px clamp(18px, 4vw, 32px) 22px; margin: 0;
  }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { padding: 12px 10px; font-size: 16px; }
  /* align-items start: al abrirse el acordeón de idiomas, el botón B2B no debe
     quedarse flotando centrado en vertical a media altura de la lista */
  .nav-actions { justify-content: space-between; align-items: flex-start; }
  /* Idiomas como acordeón dentro del panel del menú: flotando (position:absolute)
     la lista colgaba por debajo del panel, sobre el hero, como un elemento roto */
  .lang-options {
    position: static; min-width: 0; box-shadow: none; margin-top: 6px;
    display: none; opacity: 1; visibility: visible; transform: none;
  }
  .lang-switch.open .lang-options { display: block; }
}
@media (max-width: 640px) {
  .family-grid, .points-grid, .points-grid-2, .news-grid, .form-row, .feature-list { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  /* Overflow global del footer: el ancho intrínseco del input de email (~254px)
     inflaba el track 1fr a 380px y empujaba TODA la página a 398px (botón
     "Suscribirme" cortado y scroll lateral). Tres reglas, las tres necesarias. */
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid > * { min-width: 0; }
  .newsletter-row input { width: 0; } /* flex:1 lo re-expande; anula el mínimo intrínseco */
  .section-head-row { flex-direction: column; align-items: start; }
  .cta-band { flex-direction: column; align-items: start; }
  .download-item { flex-direction: column; align-items: start; }
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 460px; }
  .cap-figures { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; }
  /* Carrusel del hero: la leyenda pasa a línea completa bajo los dots
     (antes se cortaba: "KITS DE CADENA DE DISTRIBUC") */
  .hero-nav { flex-wrap: wrap; }
  .hero-caps { flex: 1 1 100%; min-width: 0; }
  .hero-cap { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  /* Separadores "·" huérfanos al partir la línea del rating: fuera en móvil */
  .hero-sep { display: none; }
  /* Botones compactos (Descargar, Volver): mínimo táctil de 44px en móvil */
  .btn-sm { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ── Badges de novedad ─────────────────────────────────────── */
.card-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: var(--blue); color: #fff; font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px;
}
.family-card { position: relative; }
.badge-new {
  display: inline-block; background: rgba(13, 114, 198, 0.14); color: var(--blue-bright);
  border: 1px solid rgba(13, 114, 198, 0.4);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 14px;
}
.family-hero .badge-new { color: var(--blue); }

/* ── Navegación de categorías (products) ───────────────────── */
.cat-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.cat-nav a {
  padding: 9px 18px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  color: var(--on-dark); background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.cat-nav a:hover { background: rgba(255, 255, 255, 0.18); text-decoration: none; }
.section-paper-alt { background: #eceef2; }
.points-grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ── Rail de progreso por secciones (productos) ────────────── */
.section-rail {
  position: fixed; left: clamp(12px, 2vw, 36px); top: 50%; transform: translateY(-50%);
  z-index: 30; opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
.section-rail.is-visible { opacity: 1; pointer-events: auto; }
.rail-inner { position: relative; }
.rail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 60px; }
.rail-track {
  position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px;
  background: rgba(22, 24, 29, 0.15); border-radius: 2px;
}
.rail-fill { position: absolute; left: 0; top: 0; width: 2px; height: 0; background: var(--blue); border-radius: 2px; transition: height .18s ease; }
.rail-item { position: relative; display: flex; align-items: center; }
.rail-dot {
  width: 12px; height: 12px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid rgba(22, 24, 29, 0.3); background: var(--paper); flex-shrink: 0;
  position: relative; z-index: 2;
  transition: transform .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.rail-dot:hover { border-color: var(--blue); }
.rail-item.is-passed .rail-dot { border-color: var(--blue); background: var(--blue); }
.rail-item.is-active .rail-dot {
  border-color: var(--blue); background: var(--blue);
  transform: scale(1.35); box-shadow: 0 0 0 5px rgba(13, 114, 198, 0.16);
}
.rail-text {
  position: absolute; left: 28px; white-space: nowrap; opacity: 0; pointer-events: none;
  font-size: 0.8rem; font-weight: 700; color: var(--ink); letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.94); padding: 6px 14px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); transition: opacity .3s ease;
}
.rail-item.is-active .rail-text, .rail-item:hover .rail-text { opacity: 1; }
@media (max-width: 1024px) { .section-rail { display: none; } }

/* ── Capacidades ───────────────────────────────────────────── */
.capabilities {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.cap-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.cap-figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cap-fig {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 20px 14px; text-align: center;
  /* centrado vertical: con los valores de una y de dos líneas mezclados, el
     contenido quedaba pegado arriba y las etiquetas desalineadas entre tarjetas */
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.cap-value {
  display: block; font-weight: 750; color: var(--blue); letter-spacing: -0.02em;
  /* nowrap + tamaño fluido: "+3.000 m²" se partía en dos líneas */
  white-space: nowrap; line-height: 1.15;
  font-size: clamp(1.2rem, 2.05vw, 1.75rem);
}
.cap-label { display: block; font-size: 0.82rem; color: var(--ink-soft); line-height: 1.3; }

/* ── Vídeo ─────────────────────────────────────────────────── */
.section-video { overflow: hidden; }
.video-band {
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(24px, 4vw, 52px); align-items: center;
}
.video-frame {
  border-radius: var(--radius); overflow: hidden; background: #05070a;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}
.video-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video-copy h2 { color: #fff; }
.video-copy p { color: var(--on-dark-soft); }
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.video-grid-1 { grid-template-columns: 1fr; max-width: 860px; margin-inline: auto; }

/* Escaparate de vídeos de proceso (fabricación + control de calidad) */
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.process-item { margin: 0; }
.process-item .video-frame { box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4); }
.process-item figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; flex-wrap: wrap;
}
.process-fam { font-weight: 650; color: var(--on-dark); font-size: 0.95rem; }
.process-type {
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.process-type-factory { background: rgba(13, 114, 198, 0.2); color: var(--blue-bright); }
.process-type-quality { background: rgba(26, 179, 108, 0.18); color: #47d18d; }
@media (max-width: 900px) { .process-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .process-grid { grid-template-columns: 1fr; } }
.process-reel { max-width: 1000px; margin: 0 auto; }
.process-reel .video-frame { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
/* figure sin reset: el margin UA (1em 40px) robaba 80px de ancho a cada vídeo */
.video-item { margin: 0; }
.video-item figcaption {
  margin-top: 12px; font-weight: 650; color: var(--on-dark);
  display: flex; align-items: center; gap: 8px; font-size: 0.95rem;
}
.video-item figcaption::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-bright);
}
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.btn-outline-light:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ── Galería de fábrica ────────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-item { margin: 0; }
.gallery-item img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.gallery-item figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--ink-soft); }

/* ── Page hero con imagen de fondo ─────────────────────────── */
.page-hero-media { position: relative; }
.page-hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0.28;
  mask-image: linear-gradient(180deg, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
}
.hero-bg-entrada { background-image: url("/static/img/factory/entrada-1600.webp"); background-position: center 25%; }
.hero-bg-productos { background-image: url("/static/img/factory/robot-1600.webp"); }
.hero-bg-calidad { background-image: url("/static/img/factory/cnc-operator-1600.webp"); }
.hero-bg-servicios { background-image: url("/static/img/factory/cnc-lines-1600.webp"); }
.hero-bg-contacto { background-image: url("/static/img/factory/office-1600.webp"); background-position: center 60%; }
.hero-bg-descargas { background-image: url("/static/img/factory/packaging-1600.webp"); background-position: center 88%; }
.hero-bg-noticias { background-image: url("/static/img/factory/bearings-1600.webp"); background-position: center 82%; }
.text-center { text-align: center; }

/* ── Banda de foto a pantalla completa (estilo BGA) ────────── */
.feature-band {
  position: relative; overflow: hidden; color: #fff;
  min-height: min(72vh, 660px); display: flex; align-items: center;
}
.feature-band-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.feature-band-bg-timing { background-image: url("/static/img/studio/timing-kit-dark-1600.webp"); }
.feature-band-bg-crank { background-image: url("/static/img/studio/crankshaft-dark-1600.webp"); }
.feature-band-bg-camshaft { background-image: url("/static/img/studio/camshaft-pulley-dark-1600.webp"); }
.feature-band-bg-packaging { background-image: url("/static/img/studio/packaging-1600.webp"); }
.feature-band-bg-hub { background-image: url("/static/img/studio/hub-kit-dark-1600.webp"); }
.feature-band-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.92) 26%, rgba(8, 10, 14, 0.5) 60%, rgba(8, 10, 14, 0.2) 100%),
    radial-gradient(70% 90% at 82% 30%, rgba(13, 114, 198, 0.28), transparent 70%);
}
.feature-band .container { position: relative; z-index: 2; }
.feature-band-box { max-width: 560px; }
.feature-band-box h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -0.025em; }
.feature-band-box .kicker { color: var(--blue-bright); }
.feature-band-box p { color: var(--on-dark-soft); font-size: 1.1rem; margin-bottom: 1.6em; max-width: 34em; }

/* ── Servicios (filas alternas) ────────────────────────────── */
.service-list { display: grid; gap: clamp(36px, 6vw, 72px); }
.service-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center;
}
.service-row-rev .service-media { order: 2; }
.service-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.service-num { font-size: 0.9rem; font-weight: 800; color: var(--blue); letter-spacing: 0.1em; }
.service-copy h2 { margin-top: 6px; }
.service-copy p { color: var(--ink-soft); font-size: 1.05rem; }

@media (max-width: 900px) {
  .capabilities, .video-band, .service-row, .service-row-rev { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .points-grid-2 { grid-template-columns: 1fr; }
  .service-row-rev .service-media { order: 0; }
  .cap-media { order: -1; }
}

/* ── Overrides responsive finales (ganan por orden de cascada) ── */
.cap-media, .cap-figures, .cap-fig { min-width: 0; }
@media (max-width: 640px) {
  .cap-figures { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; }
}

/* Pie de foto: parrafo en cursiva justo debajo de una imagen del cuerpo.
   Se cubren los dos casos: parrafo propio (lo normal) y cursiva pegada a la
   imagen dentro del mismo parrafo (si se escribe sin linea en blanco). */
.prose p:has(> img) + p:has(> em:only-child) {
  margin-top: -1.05em; font-size: 0.88rem; color: var(--ink-faint); text-align: center;
}
.prose p:has(> img) + p:has(> em:only-child) em { font-style: normal; }
.prose p > img + em {
  display: block; margin-top: 0.6em; font-size: 0.88rem;
  color: var(--ink-faint); text-align: center; font-style: normal;
}

/* Adjuntos al final del articulo */
.article-files { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.article-files h2 { font-size: 1.1rem; margin-bottom: 16px; }
