/* ── VARIABLES Y ESTILOS BASE DE MÓDULOS ── */
:root {
  --navy: #04101f;
  --navy-mid: #071829;
  --navy-card: #0a1f35;
  --navy-card2: #0d2540;
  --blue-primary: #1a6bff;
  --blue-bright: #2ec6ff;
  --blue-light: #cadeff;
  --action: #3865f5;
  --dark-ui: #2a303f;
  --white: #ffffff;
  --text-muted: rgba(255,255,255,0.55);
  --text-body: rgba(255,255,255,0.75);
  --card-border: rgba(255,255,255,0.07);
  --card-bg: linear-gradient(165deg, rgba(22,58,140,0.55) 0%, rgba(6,13,32,0.92) 65%);
}

/* ── VARIANTES DE COLOR POR MÓDULO ──
   --mod-rgb permite construir rgba(var(--mod-rgb), alpha) para glows y tintes */
.mod-reclutamiento { --mod-color: #1a6bff; --mod-rgb: 26,107,255; }
.mod-aprendizaje   { --mod-color: #1a6bff; --mod-rgb: 26,107,255; }
.mod-desempeno     { --mod-color: #00c853; --mod-rgb: 0,200,83; }
.mod-encuestas     { --mod-color: #00bcd4; --mod-rgb: 0,188,212; }
.mod-operaciones   { --mod-color: #ff9800; --mod-rgb: 255,152,0; }
.mod-marketia {
  --mod-color: #e5007d;
  --mod-rgb: 229,0,125;
  --mod-gradient: linear-gradient(90deg, #1a6bff 0%, #e5007d 50%, #ff5f1f 100%);
}

/* Market IA - Agentic HR usa el degradado de marca en vez de un color plano
   (selector con doble clase para ganar en especificidad sobre las reglas base) */
.module-card.mod-marketia::before {
  background: var(--mod-gradient);
  opacity: 0.9;
  height: 4px;
  border-radius: 16px 16px 0 0; /* solo las esquinas superiores, como el borde de la tarjeta — no una píldora completa */
}

.module-card.mod-marketia .module-icon {
  background: var(--mod-gradient);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 0 18px rgba(229,0,125,0.5);
}

.module-card.mod-marketia .module-icon svg { fill: #fff; }

/* Glow ambiental tricolor (azul + rosa + naranja) en reposo y en hover */
.module-card.mod-marketia {
  box-shadow: 0 0 22px rgba(26,107,255,0.16), 0 0 22px rgba(229,0,125,0.16), 0 0 22px rgba(255,95,31,0.16);
}

.module-card.mod-marketia:hover {
  box-shadow: 0 0 32px rgba(26,107,255,0.28), 0 0 32px rgba(229,0,125,0.3), 0 0 32px rgba(255,95,31,0.28), 0 20px 45px rgba(0,0,0,0.35);
}

/* ── HERO ── */
.hero-modulos {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #0d3a7a 0%, #071829 55%, #04101f 100%);
  padding: 11rem 40px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-modulos::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 60% 40% at 50% -10%, rgba(42,100,255,0.35) 0%, transparent 70%);
  pointer-events: none;
}

.hero-subtitle {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-body);
  letter-spacing: 0.01em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(52px, 8vw, 80px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ── MODULES GRID ── */
.modules-section {
  background: linear-gradient(180deg, #04101f 0%, #071829 40%, #04101f 100%);
  padding: 20px 32px 40px;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  max-width: 1300px;
  margin: 0 auto;
}

.module-card {
  background: var(--card-bg);
  border: 1px solid rgba(var(--mod-rgb), 0.28);
  border-radius: 20px;
  padding: 26px 20px;
  height: 250px; /* altura fija e igual para las 6 tarjetas */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 0 22px rgba(var(--mod-rgb), 0.16); /* glow ambiental sutil, siempre visible */
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--mod-color);
  opacity: 0.55;
  transition: opacity 0.3s;
}

.module-card:hover {
  border-color: rgba(var(--mod-rgb), 0.65);
  transform: translateY(-6px);
  box-shadow: 0 0 38px rgba(var(--mod-rgb), 0.32), 0 20px 45px rgba(0,0,0,0.35);
}

.module-card:hover::before { opacity: 1; }

.module-icon {
  width: 42px;
  height: 42px;
  background: rgba(var(--mod-rgb), 0.16);
  border: 1px solid rgba(var(--mod-rgb), 0.35);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(var(--mod-rgb), 0.35);
  transition: transform 0.3s ease;
}

.module-card:hover .module-icon {
  transform: scale(1.08);
}

.module-icon svg {
  width: 20px; height: 20px;
  fill: var(--mod-color);
}

.module-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  min-height: 2.5em; /* reserva espacio de 2 líneas siempre, así la descripción arranca igual en todas */
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 200px;
  min-height: 2.9em; /* reserva 2 líneas de descripción para que el botón quede a la misma altura */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.module-btn {
  margin-top: auto;
  width: 100%;
  padding: 9px 14px;
  background: #ffffff;
  border: none;
  border-radius: 999px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: all 0.25s ease;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.module-btn:hover {
  background: var(--mod-color);
  color: #fff;
  box-shadow: 0 10px 24px rgba(var(--mod-rgb), 0.45);
}

/* ── DETAIL SECTION ── */
.detail-section {
  background: linear-gradient(180deg, #04101f 0%, #06152a 100%);
  padding: 40px 32px 0;
}

.detail-header {
  text-align: center;
  margin-bottom: 24px;
}

.detail-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  color: var(--white);
  margin-bottom: 12px;
}

.detail-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── VIDEO PLAYER ── */
.video-container {
  max-width: 760px;
  margin: 0 auto 48px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #040e1c;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
