/* ==========================================================================
   KABINEST — Hoja de Estilos Oficial (Beta 1.0 · Producción)
   Diseño Editorial Técnico e Industrial · Claro, Nítido y de Alta Conversión
   ========================================================================== */

:root {
  /* Superficies claras y limpias (Editorial / Industrial Daylight) */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-muted: #e2e8f0;

  /* Superficies técnicas oscuras (Reservadas para el marco del software y estudio de vídeo) */
  --navy-950: #05080f;
  --navy-900: #0a1428;
  --navy-800: #0f2240;
  --navy-700: #163058;

  /* Tipografía de alto contraste */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-on-dark: #f8fafc;
  --text-muted-on-dark: #94a3b8;

  /* Acentos corporativos KABINEST */
  --brand-blue: #0284c7;
  --brand-blue-dark: #0369a1;
  --brand-sky: #38bdf8;
  --brand-teal: #0d9488;
  --brand-teal-bright: #2dd4bf;
  --brand-amber: #d97706;

  /* Bordes y sombras de precisión */
  --border-light: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-dark: rgba(148, 163, 184, 0.2);
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 32px -4px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 24px 56px -12px rgba(15, 23, 42, 0.16);
  --shadow-dark: 0 24px 60px rgba(2, 6, 23, 0.45);

  /* Radios y espaciado */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --container-max: 1320px;

  /* Fuentes del sistema y geométricas de carga instantánea */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Display', 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Segoe UI Variable Display', 'Bahnschrift', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video, svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   1. BARRA TÉCNICA SUPERIOR Y NAVEGACIÓN
   ========================================================================== */
.topbar {
  background: var(--navy-900);
  color: var(--text-muted-on-dark);
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 0;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-specs {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
  font-weight: 600;
}

.topbar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-teal-bright);
  box-shadow: 0 0 8px var(--brand-teal-bright);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-link {
  color: #cbd5e1;
  transition: color 0.15s ease;
  font-weight: 500;
}

.topbar-link:hover {
  color: var(--brand-teal-bright);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow 0.2s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.14em;
  color: var(--navy-900);
  flex-shrink: 0;
}

.brand-logo svg {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.brand-sub {
  display: block;
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--brand-teal);
  text-transform: uppercase;
  margin-top: -3px;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.15s ease;
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--brand-blue);
}

.nav-link-badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  background: #e0f2fe;
  color: var(--brand-blue-dark);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 3px;
  vertical-align: middle;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.header-actions .btn {
  padding: 9px 15px;
  font-size: 0.86rem;
}

@media (max-width: 1240px) {
  .header-actions .btn-outline {
    display: none;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--navy-900);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(10, 20, 40, 0.18);
}

.btn-primary:hover {
  background: var(--brand-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(3, 105, 161, 0.28);
}

.btn-accent {
  background: var(--brand-blue);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.28);
}

.btn-accent:hover {
  background: var(--brand-blue-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--navy-900);
  background: var(--bg-subtle);
}

.btn-lg {
  padding: 15px 28px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text-primary);
}

/* ==========================================================================
   2. HERO PRINCIPAL — CLARO, DIRECTO Y CON ESTUDIO DE VÍDEO EN VIVO
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 56px 0 72px;
  background:
    radial-gradient(900px 420px at 85% 20%, rgba(2, 132, 199, 0.07), transparent 70%),
    radial-gradient(700px 380px at 10% 80%, rgba(13, 148, 136, 0.06), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-light);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 1.18fr;
  gap: 48px;
  align-items: center;
}

.eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: var(--brand-blue-dark);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 3.6vw, 3.35rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--navy-900);
  margin-bottom: 20px;
}

.hero-title-highlight {
  color: var(--brand-blue);
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 580px;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.proof-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proof-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-900);
}

.proof-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Marco de monitor industrial para el vídeo del Hero */
.hero-showcase {
  position: relative;
}

.studio-frame {
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  border: 1px solid #1e293b;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.studio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: var(--navy-950);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 0.78rem;
}

.studio-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.studio-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
}

.studio-dots span:nth-child(1) { background: #ef4444; }
.studio-dots span:nth-child(2) { background: #f59e0b; }
.studio-dots span:nth-child(3) { background: #10b981; }

.studio-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94a3b8;
}

.studio-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(45, 212, 191, 0.14);
  color: var(--brand-teal-bright);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
}

.studio-video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #05080f;
}

.studio-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video-overlay-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  background: rgba(10, 20, 40, 0.88);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.45);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.hero-video-overlay-btn:hover {
  background: var(--brand-blue);
  border-color: #ffffff;
}

.studio-chapters-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--navy-950);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-chap-btn {
  background: none;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  padding: 10px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.studio-chap-btn:last-child {
  border-right: none;
}

.studio-chap-btn:hover,
.studio-chap-btn.active {
  background: rgba(56, 189, 248, 0.12);
  color: #ffffff;
}

.studio-chap-btn strong {
  display: block;
  color: var(--brand-teal-bright);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  margin-bottom: 2px;
}

/* ==========================================================================
   3. BANDA TÉCNICA DE COMPATIBILIDAD Y FLUJO
   ========================================================================== */
.trust-strip {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 22px 0;
}

.trust-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.trust-strip-label {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.trust-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.trust-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 6px 13px;
  border-radius: 6px;
}

/* ==========================================================================
   4. SECCIONES GENERALES Y CABECERAS EDITORIALES
   ========================================================================== */
.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-dark {
  background: var(--navy-900);
  color: var(--text-on-dark);
}

.section-header {
  max-width: 780px;
  margin: 0 auto 52px;
  text-align: center;
}

.section-header-left {
  margin-left: 0;
  text-align: left;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-teal);
  margin-bottom: 10px;
}

.section-dark .section-kicker {
  color: var(--brand-teal-bright);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 2.8vw, 2.65rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy-900);
  margin-bottom: 16px;
}

.section-dark .section-title {
  color: #ffffff;
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.section-dark .section-desc {
  color: var(--text-muted-on-dark);
}

/* ==========================================================================
   5. SECCIÓN ESTRELLA: CENTRO DE VÍDEOS DEMOSTRATIVOS CORTOS (9 VÍDEOS)
   ========================================================================== */
.video-hub-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 44px;
}

.main-player-card {
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  border: 1px solid #1e293b;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.main-player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.main-player-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #05080f;
}

.main-player-info {
  padding: 22px 24px;
  color: #ffffff;
}

.main-player-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.main-player-badge {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-teal-bright);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.main-player-duration {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 9px;
  border-radius: 6px;
  color: #e2e8f0;
}

.main-player-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.main-player-desc {
  font-size: 0.9375rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 16px;
}

.main-player-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player-tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #bae6fd;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Lista lateral rápida de reproducción */
.playlist-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.playlist-header {
  padding: 16px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.playlist-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-900);
}

.playlist-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.playlist-items {
  max-height: 515px;
  overflow-y: auto;
}

.playlist-item {
  width: 100%;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  padding: 12px 16px;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
  align-items: center;
}

.playlist-item:hover {
  background: #f8fafc;
}

.playlist-item.active {
  background: #f0f9ff;
  border-left: 4px solid var(--brand-blue);
}

.playlist-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--navy-900);
}

.playlist-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-thumb-time {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: rgba(5, 8, 15, 0.85);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
}

.playlist-item-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brand-teal);
  text-transform: uppercase;
}

.playlist-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.3;
  margin: 2px 0 4px;
}

.playlist-item-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Filtros y cuadrícula de tarjetas de vídeo */
.video-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab:hover {
  border-color: var(--navy-900);
  color: var(--navy-900);
}

.filter-tab.active {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: #ffffff;
}

.video-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.video-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

.video-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--navy-900);
  overflow: hidden;
}

.video-card-media video,
.video-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.video-card:hover .video-card-media img {
  transform: scale(1.03);
}

.video-card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 20, 40, 0.28);
  transition: background 0.2s ease;
}

.video-card:hover .video-card-play {
  background: rgba(10, 20, 40, 0.12);
}

.play-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background 0.2s ease;
}

.video-card:hover .play-circle {
  transform: scale(1.08);
  background: var(--brand-blue);
  color: #ffffff;
}

.video-card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: rgba(10, 20, 40, 0.86);
  backdrop-filter: blur(6px);
  color: var(--brand-teal-bright);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
}

.video-card-duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(10, 20, 40, 0.88);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
}

.video-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.video-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 6px;
  line-height: 1.35;
}

.video-card-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
}

.video-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--brand-blue);
}

/* ==========================================================================
   6. COMPARADOR INTERACTIVO ANTES / DESPUÉS (DEL 3D TÉCNICO AL RENDER IA)
   ========================================================================== */
.compare-wrapper {
  max-width: 1120px;
  margin: 0 auto;
}

.compare-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.compare-tab {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.compare-tab.active {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.compare-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  user-select: none;
  background: var(--navy-900);
}

.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.compare-before-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 50% 0 0);
}

.compare-label {
  position: absolute;
  top: 18px;
  padding: 7px 14px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 5;
  pointer-events: none;
}

.compare-label-left {
  left: 18px;
  background: rgba(15, 23, 42, 0.86);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.compare-label-right {
  right: 18px;
  background: rgba(15, 23, 42, 0.86);
  color: var(--brand-teal-bright);
  border: 1px solid rgba(45, 212, 191, 0.4);
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #ffffff;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
  z-index: 10;
  cursor: ew-resize;
}

.compare-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--navy-900);
  border: 2px solid var(--navy-900);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.compare-range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 15;
}

.compare-caption-bar {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   7. COMPARATIVA COMPETENCIA: 4 PROGRAMAS SUELTOS vs KABINEST
   ========================================================================== */
.vs-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  align-items: stretch;
}

.vs-card {
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  border: 1px solid var(--border-light);
}

.vs-card-old {
  background: #f8fafc;
  border-color: var(--border-strong);
}

.vs-card-kabinest {
  background: #ffffff;
  border: 2px solid var(--brand-blue);
  box-shadow: var(--shadow-md);
  position: relative;
}

.vs-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.vs-card-old .vs-badge {
  background: #fee2e2;
  color: #b91c1c;
}

.vs-card-kabinest .vs-badge {
  background: #e0f2fe;
  color: var(--brand-blue-dark);
}

.vs-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--navy-900);
}

.vs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vs-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.vs-icon-bad {
  color: #dc2626;
  font-weight: 800;
  flex-shrink: 0;
}

.vs-icon-good {
  color: var(--brand-teal);
  font-weight: 800;
  flex-shrink: 0;
}

/* ==========================================================================
   8. ARQUITECTURA DE 6 MÓDULOS DE INGENIERÍA REAL
   ========================================================================== */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.module-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px 26px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.module-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-sm);
}

.module-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-blue);
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 3px 10px;
  border-radius: 6px;
  align-self: flex-start;
  margin-bottom: 16px;
}

.module-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 10px;
}

.module-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

.module-specs {
  list-style: none;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.module-specs li::before {
  content: "→ ";
  color: var(--brand-teal);
  font-weight: 700;
}

/* ==========================================================================
   8A. SECCIÓN KABINEST CAD INTEGRADO Y ANCLAJE DE GUÍAS
   ========================================================================== */
.zoomable-shot {
  position: relative;
  cursor: zoom-in;
}

.shot-zoom-pill {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(10, 20, 40, 0.86);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  pointer-events: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.zoomable-shot:hover .shot-zoom-pill {
  background: var(--brand-blue);
  border-color: #7dd3fc;
  transform: translateY(-1px);
}

.shot-zoom-mini {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(10, 20, 40, 0.84);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  pointer-events: none;
}

.cad-hero-card {
  display: grid;
  grid-template-columns: 1.24fr 0.76fr;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 28px;
  align-items: stretch;
}

.cad-hero-left {
  background: var(--navy-950);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cad-hero-media {
  aspect-ratio: 16 / 9;
  background: #0a101d;
  overflow: hidden;
}

.cad-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.cad-hero-media:hover img {
  transform: scale(1.015);
}

.cad-sizes-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #0d182d 0%, #091224 100%);
  flex: 1;
  align-items: stretch;
}

.cad-size-chip {
  padding: 14px 12px 15px;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.cad-size-chip:last-child {
  border-right: none;
}

.cad-size-preview {
  flex: 1;
  min-height: 112px;
  background: radial-gradient(circle at 50% 45%, #111c33 0%, #070d19 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cad-size-preview svg {
  width: 100%;
  height: 100%;
  max-height: 124px;
  display: block;
}

.cad-size-meta {
  display: flex;
  flex-direction: column;
}

.cad-size-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--brand-teal-bright);
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.cad-size-chip strong {
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.cad-size-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.3;
}

.cad-hero-content {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cad-pill-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--brand-blue-dark);
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 5px 11px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.cad-hero-title {
  font-size: 1.42rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.25;
  margin-bottom: 10px;
}

.cad-hero-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}

.cad-hero-text code,
.cad-feature-body code,
.report-card-body code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: #f1f5f9;
  color: var(--navy-900);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

.cad-guides-rules {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.cad-guide-rule {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.cad-rule-num {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--navy-900);
  border-radius: 6px;
  padding: 3px 7px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cad-guide-rule > div > strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 2px;
}

.cad-guide-rule p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.48;
  margin: 0;
}

.cad-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cad-cards-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cad-feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cad-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

.cad-feature-media {
  aspect-ratio: 16 / 9;
  background: #0a101d;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
}

.cad-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.cad-feature-card:hover .cad-feature-media img {
  transform: scale(1.03);
}

.cad-feature-body {
  padding: 20px 22px 22px;
  flex: 1;
}

.cad-feature-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brand-teal);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.cad-feature-body h3 {
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 8px;
  line-height: 1.32;
}

.cad-feature-body p {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.56;
  margin: 0;
}

/* ==========================================================================
   8B. SECCIÓN DEDICADA DE NESTING INTELIGENTE, 2.ª CARA Y SIMULACIÓN 3D
   ========================================================================== */
.nesting-showcase {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
}

.nesting-steps-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nesting-step-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-xs);
}

.nesting-step-btn:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.nesting-step-btn.active {
  background: #f0f9ff;
  border-color: var(--brand-blue);
  border-left: 4px solid var(--brand-blue);
  box-shadow: var(--shadow-sm);
}

.nesting-step-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-teal);
  display: block;
  margin-bottom: 4px;
}

.nesting-step-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--navy-900);
  display: block;
  margin-bottom: 6px;
}

.nesting-step-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: block;
}

.nesting-stage-card {
  background: var(--navy-900);
  border: 1px solid #1e293b;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.nesting-stage-media {
  aspect-ratio: 16 / 9;
  background: #05080f;
  overflow: hidden;
}

.nesting-stage-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nesting-stage-bar {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nesting-stage-kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--brand-teal-bright);
  display: block;
  margin-bottom: 4px;
}

.nesting-stage-caption {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.5;
  max-width: 600px;
}

.nesting-visual-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 22px;
}

.nesting-mini-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nesting-mini-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-blue);
}

.nesting-mini-img {
  aspect-ratio: 16 / 9;
  background: #0a101d;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
}

.nesting-mini-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nesting-mini-body {
  padding: 14px 18px 16px;
}

.nesting-mini-body strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 4px;
}

.nesting-mini-body span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.48;
}

.nesting-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.nesting-metric-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.nesting-metric-pill strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 4px;
}

.nesting-metric-pill span {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  display: block;
}

/* ==========================================================================
   8C. SECCIÓN DE INFORMES DE TALLER, NESTING, HERRAJES Y COMPRA
   ========================================================================== */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.report-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.report-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

.report-card-media {
  aspect-ratio: 16 / 9;
  background: #0f172a;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
}

.report-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.3s ease;
}

.report-card:hover .report-card-media img {
  transform: scale(1.03);
}

.report-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: rgba(10, 20, 40, 0.88);
  backdrop-filter: blur(6px);
  color: var(--brand-teal-bright);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid rgba(45, 212, 191, 0.3);
  pointer-events: none;
}

.report-card-body {
  padding: 20px 22px 22px;
  flex: 1;
}

.report-card-body h3 {
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--navy-900);
  line-height: 1.32;
  margin-bottom: 8px;
}

.report-card-body p {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.56;
  margin: 0;
}

/* ==========================================================================
   9. SECCIÓN DE LOS 4 TIPOS DE MÁQUINAS CNC + POSTPROCESADORES
   ========================================================================== */
.cnc-types-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}

.cnc-type-card {
  background: rgba(15, 34, 64, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cnc-type-card:hover,
.cnc-type-card.active {
  border-color: var(--brand-teal-bright);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.cnc-type-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #05080f;
  overflow: hidden;
}

.cnc-type-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.cnc-type-card:hover .cnc-type-media img {
  transform: scale(1.04);
}

.cnc-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(5, 8, 15, 0.86);
  color: var(--brand-teal-bright);
  border: 1px solid rgba(45, 212, 191, 0.35);
  padding: 3px 8px;
  border-radius: 5px;
}

.cnc-type-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cnc-type-body h3 {
  font-size: 1.02rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.3;
}

.cnc-type-body p {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.52;
  margin-bottom: 14px;
  flex: 1;
}

.cnc-type-output {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: #7dd3fc;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.cnc-showcase-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  align-items: start;
}

.cnc-selector-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cnc-tab-btn {
  background: rgba(15, 34, 64, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  color: #cbd5e1;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
}

.cnc-tab-btn:hover {
  background: rgba(30, 58, 95, 0.65);
  color: #ffffff;
}

.cnc-tab-btn.active {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.24), rgba(2, 132, 199, 0.24));
  border-color: var(--brand-teal-bright);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.cnc-tab-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--brand-teal-bright);
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.cnc-tab-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.cnc-tab-sub {
  font-size: 0.82rem;
  color: #94a3b8;
  display: block;
}

.cnc-viewer-panel {
  background: var(--navy-950);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-dark);
}

.cnc-viewer-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #05080f;
}

.cnc-viewer-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cnc-view-toggle {
  position: absolute;
  right: 16px;
  top: 16px;
  display: flex;
  background: rgba(5, 8, 15, 0.86);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.cnc-view-btn {
  background: none;
  border: none;
  color: #cbd5e1;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.cnc-view-btn.active {
  background: var(--brand-blue);
  color: #ffffff;
}

.cnc-viewer-footer {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cnc-Specs-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.cnc-spec-item {
  font-size: 0.82rem;
  color: #cbd5e1;
}

.cnc-spec-item strong {
  color: var(--brand-teal-bright);
  font-family: var(--font-mono);
}

.cnc-postpro-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 36px;
}

.cnc-postpro-card {
  background: rgba(15, 34, 64, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cnc-postpro-img {
  aspect-ratio: 16 / 9;
  background: #05080f;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.cnc-postpro-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cnc-postpro-body {
  padding: 20px 24px;
}

.cnc-postpro-body h3 {
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.cnc-postpro-body p {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.cnc-brands-bar {
  margin-top: 28px;
  padding: 20px 24px;
  background: rgba(5, 8, 15, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cnc-brands-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-teal-bright);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cnc-brands-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cnc-brands-pills span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #e2e8f0;
  background: rgba(30, 58, 95, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 5px 12px;
  border-radius: 6px;
}

/* ==========================================================================
   11. PREGUNTAS FRECUENTES (FAQ SEO) Y FORMULARIO DE DEMOSTRACIÓN
   ========================================================================== */
.faq-grid {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.faq-answer {
  padding: 0 24px 20px;
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-toggle-icon {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--brand-blue);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-toggle-icon {
  transform: rotate(45deg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.contact-form-card {
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text-primary);
  transition: border-color 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* ==========================================================================
   12. MODAL DE CINE PARA VÍDEOS CON VOZ Y PANTALLA COMPLETA
   ========================================================================== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 8, 15, 0.88);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.video-modal.open {
  display: flex;
}

.video-modal-dialog {
  width: 100%;
  max-width: 1120px;
  background: var(--navy-900);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-dark);
}

.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--navy-950);
  color: #ffffff;
}

.video-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
}

.video-modal-body {
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-modal-body video {
  width: 100%;
  height: 100%;
}

/* Lightbox 1080p para capturas reales de interfaz e informes */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(5, 8, 15, 0.92);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.img-lightbox.open {
  display: flex;
}

.img-lightbox-dialog {
  width: 100%;
  max-width: 1460px;
  background: var(--navy-950);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-dark);
}

.img-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: #04070e;
  color: #ffffff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.9rem;
}

.img-lightbox-body {
  background: #060b14;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 85vh;
}

.img-lightbox-body img {
  width: 100%;
  max-height: 85vh;
  object-fit: contain;
  display: block;
}

/* ==========================================================================
   13. PIE DE PÁGINA
   ========================================================================== */
.site-footer {
  background: var(--navy-950);
  color: #94a3b8;
  padding: 64px 0 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--brand-teal-bright);
}

.footer-bottom {
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   14. DISEÑO RESPONSIVO (TABLET Y MÓVIL)
   ========================================================================== */
@media (max-width: 1080px) {
  .hero-grid,
  .video-hub-layout,
  .vs-grid,
  .cad-hero-card,
  .nesting-showcase,
  .cnc-showcase-grid,
  .cnc-postpro-split,
  .roi-box,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .video-cards-grid,
  .modules-grid,
  .cad-cards-trio,
  .nesting-visual-trio,
  .reports-grid,
  .cad-sizes-strip,
  .nesting-metrics-strip,
  .cnc-types-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .topbar {
    display: none;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-strong);
    box-shadow: var(--shadow-md);
    align-items: flex-start;
    gap: 14px;
  }

  .main-nav.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .video-cards-grid,
  .modules-grid,
  .cad-cards-trio,
  .nesting-visual-trio,
  .reports-grid,
  .cad-sizes-strip,
  .nesting-metrics-strip,
  .cnc-types-cards-grid,
  .hero-proof-grid,
  .form-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .studio-chapters-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   15. SELECTOR INTERNACIONAL DE IDIOMAS (19 IDIOMAS) Y SOPORTE RTL (ÁRABE)
   ========================================================================== */
.lang-switcher {
  position: relative;
  display: inline-block;
}

.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--navy-900);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.lang-switcher-btn:hover,
.lang-switcher.open .lang-switcher-btn {
  border-color: var(--brand-blue);
  background: #f0f9ff;
  color: var(--brand-blue-dark);
}

.lang-switcher-globe {
  font-size: 0.95rem;
  line-height: 1;
}

.lang-switcher-code {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
}

.lang-switcher-caret {
  font-size: 0.7rem;
  opacity: 0.75;
  transition: transform 0.18s ease;
}

.lang-switcher.open .lang-switcher-caret {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  z-index: 1200;
}

.lang-switcher.open .lang-dropdown {
  display: grid;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.14s ease, color 0.14s ease;
}

.lang-option:hover {
  background: var(--bg-subtle);
  color: var(--navy-900);
}

.lang-option.active {
  background: #e0f2fe;
  color: var(--brand-blue-dark);
  font-weight: 800;
}

.lang-option-code {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.lang-option.active .lang-option-code {
  color: var(--brand-blue);
}

@media (max-width: 768px) {
  .header-actions .btn-outline {
    display: none;
  }

  .header-actions .btn-primary {
    padding: 9px 13px;
    font-size: 0.82rem;
  }

  .lang-dropdown {
    right: -44px;
    width: min(320px, calc(100vw - 24px));
  }
}

/* Ajustes para lectura Derecha a Izquierda (Árabe /ar/) */
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .section-header-left,
html[dir="rtl"] .playlist-item,
html[dir="rtl"] .nesting-step-btn,
html[dir="rtl"] .cnc-tab-btn,
html[dir="rtl"] .faq-question {
  text-align: right;
}

html[dir="rtl"] .playlist-item.active,
html[dir="rtl"] .nesting-step-btn.active {
  border-left: 1px solid var(--border-light);
  border-right: 4px solid var(--brand-blue);
}

html[dir="rtl"] .nav-link-badge {
  margin-left: 0;
  margin-right: 4px;
}

html[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

html[dir="rtl"] .cad-hero-left {
  border-right: none;
  border-left: 1px solid var(--border-light);
}

/* El comparador Antes/Después mantiene geometría visual LTR para el recorte CSS */
html[dir="rtl"] .compare-stage {
  direction: ltr;
}
